Skip to content

Commit ff57f40

Browse files
authored
[mlir][py] fix option passing in transform interpreter (#89922)
There was a typo in dispatch trampoline.
1 parent 69a3976 commit ff57f40

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

mlir/python/mlir/dialects/transform/interpreter/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def apply_named_sequence(
2929
if transform_options is None:
3030
_cextTransformInterpreter.apply_named_sequence(*args)
3131
else:
32-
_cextTransformInterpreter(*args, transform_options)
32+
_cextTransformInterpreter.apply_named_sequence(*args, transform_options)
3333

3434

3535
def copy_symbols_and_merge_into(target, other):

mlir/test/python/dialects/transform_interpreter.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,21 @@ def print_other():
4545
# CHECK: this.is.payload
4646

4747

48+
@test_in_context
49+
def transform_options():
50+
options = interp.TransformOptions()
51+
options.expensive_checks = False
52+
options.enforce_single_top_level_transform_op = True
53+
m = ir.Module.parse(
54+
print_root_module.replace("from interpreter", "transform_options")
55+
)
56+
payload = ir.Module.parse("module attributes { this.is.payload } {}")
57+
interp.apply_named_sequence(payload, m.body.operations[0], m, options)
58+
59+
60+
# CHECK-LABEL: transform_options
61+
62+
4863
@test_in_context
4964
def failed():
5065
payload = ir.Module.parse("module attributes { this.is.payload } {}")

0 commit comments

Comments
 (0)