Skip to content

Commit 18360e7

Browse files
committed
snake_case_helper
1 parent 461d7cf commit 18360e7

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,10 @@ def __init__(
249249
)
250250

251251

252+
def apply_registered_pass(result, pass_name, target, *, options=[], loc=None, ip=None) -> Value:
253+
return ApplyRegisteredPassOp(result=result, pass_name=pass_name, target=target, options=options, loc=loc, ip=ip).result
254+
255+
252256
AnyOpTypeT = NewType("AnyOpType", AnyOpType)
253257

254258

mlir/test/python/dialects/transform.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,15 +266,18 @@ def testApplyRegisteredPassOp(module: Module):
266266
transform.AnyOpType.get(), "canonicalize", sequence.bodyTarget
267267
)
268268
mod = transform.ApplyRegisteredPassOp(
269-
transform.AnyOpType.get(), "canonicalize", mod, options=("top-down=false",)
269+
transform.AnyOpType.get(),
270+
"canonicalize",
271+
mod.result,
272+
options=("top-down=false",),
270273
)
271274
max_iter = transform.param_constant(
272275
transform.AnyParamType.get(), StringAttr.get("max-iterations=10")
273276
)
274277
max_rewrites = transform.param_constant(
275278
transform.AnyParamType.get(), StringAttr.get("max-num-rewrites=1")
276279
)
277-
transform.ApplyRegisteredPassOp(
280+
transform.apply_registered_pass(
278281
transform.AnyOpType.get(),
279282
"canonicalize",
280283
mod,

0 commit comments

Comments
 (0)