sophgo / tpu-mlir

Machine learning compiler based on MLIR for Sophgo TPU.
Other
612 stars 154 forks source link

the meaning of traits: ShapeProducer, ShapeConsumer #196

Closed PPG11 closed 4 days ago

PPG11 commented 2 weeks ago

excuse me, there are 2 traits: ShapeProducer, ShapeConsumer, and it seems like the 2 treats are used in Lowering phase, could you tell me the different between them, and what is the meaning of the 2 treats? thanks

HarmonyHu commented 4 days ago

ShapeProducer is a trait for op that will output shape tensor, ShapeOp as example. ShapeProducer means that op will use Shape tensor as input, ConstantFillOp as example. These shape related traits use to support dynamic shape situation. @PPG11

PPG11 commented 4 days ago

get it, thank you very much : )