Block.create_paramter. _is_inited_by is very time-consuming
Created by: baiyfbupt
Currently, our Block.create_paramter. _is_inited_by uses a for loop to find how many ops have initialized a var. However, when the magnitude of block.ops is large, this implementation can be very time-consuming.
For example, in an 8-layer large network, each layer has about 600 + OPS, and the complexity of each layer is roughly the same. As you can see, as the graph composition process continues to add more OPS to the block, the composition time of each layer will be longer and longer, 1s, 3s, 5s, 7s, 8s... Finally, the composition of each layer of the network takes tens of seconds。