Skip to content

Commit 46b833d

Browse files
committed
overload add()
1 parent 7a491af commit 46b833d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

mlir/lib/Bindings/Python/Pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ void mlir::python::populatePassManagerSubmodule(nb::module_ &m) {
160160
"Add textual pipeline elements to the pass manager. Throws a "
161161
"ValueError if the pipeline can't be parsed.")
162162
.def(
163-
"add_python_pass",
163+
"add",
164164
[](PyPassManager &passManager, const nb::callable &run,
165165
std::optional<std::string> &name, const std::string &argument,
166166
const std::string &description, const std::string &opName) {

mlir/test/python/python_pass.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ def __call__(self, m):
7878

7979
# CHECK: hello from pass 1!!!
8080
# CHECK-LABEL: Dump After custom_pass_1
81-
pm.add_python_pass(custom_pass_1)
81+
pm.add(custom_pass_1)
8282
# CHECK-LABEL: Dump After CustomPass2
8383
# CHECK: arith.muli
84-
pm.add_python_pass(custom_pass_2, "CustomPass2")
84+
pm.add(custom_pass_2, "CustomPass2")
8585
# CHECK-LABEL: Dump After ArithToLLVMConversionPass
8686
# CHECK: llvm.mul
8787
pm.add("convert-arith-to-llvm")

0 commit comments

Comments
 (0)