BladeDISC icon indicating copy to clipboard operation
BladeDISC copied to clipboard

about pdll inculded cpp function

Open callmelaoyi opened this issue 1 year ago • 2 comments

I greatly appreciate your team's work. I have a question regarding the PDLL language in MLIR: How can I import C++ functions into PDLL? I haven't found this mechanism in the MLIR documentation. Is there any relevant information available?

callmelaoyi avatar Sep 12 '23 01:09 callmelaoyi

Take a look at this: https://github.com/alibaba/BladeDISC/blob/da990f41641affe228ad5122aaa8badd2ccd70bd/tao_compiler/mlir/disc/transforms/disc_pdl_utils.cc#L411

qiuxiafei avatar Sep 12 '23 02:09 qiuxiafei

Thank you very much. This method resolved my question regarding the conversion between value and valueRange. Additionally, if possible, I would like to inquire whether such functionality can be directly implemented in PDLL without C++?

callmelaoyi avatar Sep 13 '23 01:09 callmelaoyi