llvm-project
aac4eb5c - [MLIR][Python] Add a python function to apply patterns with MlirOperation (#157487)

Commit
197 days ago
[MLIR][Python] Add a python function to apply patterns with MlirOperation (#157487) In https://github.com/llvm/llvm-project/pull/94714, we add a python function `apply_patterns_and_fold_greedily` which accepts an `MlirModule` as the argument type. However, sometimes we want to apply patterns with an `MlirOperation` argument, and there is currently no python API to convert an `MlirOperation` to `MlirModule`. So here we overload this function `apply_patterns_and_fold_greedily` to do this (also a corresponding new C API `mlirApplyPatternsAndFoldGreedilyWithOp`)
Author
Parents
Loading