[Mlir-commits] [mlir] [mlir][Transform] Create a transform interpreter and a preloader pass (PR #68661)
Nicolas Vasilache
llvmlistbot at llvm.org
Wed Oct 11 11:24:44 PDT 2023
================
@@ -32,8 +32,17 @@ transform.named_sequence @lower_to_cpu(
partial_conversion
} : !transform.any_op
- %m2 = transform.apply_registered_pass "reconcile-unrealized-casts" to %module : (!transform.any_op) -> !transform.any_op
- transform.yield %m2 : !transform.any_op
+ // Need to rematch here because:
+ // 1. applying reconcile-unrealized-casts on the whole module yields the
+ // transform applies to transform, when called from a named sequence, at
+ // this time.
+ // 2. apply_conversion patterns consumes the func but does not produce
+ // a new llvm.func.
+ %f6 = transform.structured.match ops{["llvm.func"]} in %module
+ : (!transform.any_op) -> !transform.any_op
+ %f7 = transform.apply_registered_pass "reconcile-unrealized-casts" to %f6
+ : (!transform.any_op) -> !transform.any_op
+ transform.yield %module : !transform.any_op
----------------
nicolasvasilache wrote:
There are 2 things here:
1. some missing tracking that this PR exposes and that I was not able to find yet, I'll file a bug on top to get back to running reconcile-unrealized-casts on module. I am not completely sure how this interacts right now with point 2 below.
2. the other issue is that by dropping `{transform.target_tag="payload"}` support, we end up trying to apply transform to the transform module embedded along with the payload IR. This currently fails and should be fixed separately I believe.
https://github.com/llvm/llvm-project/pull/68661
More information about the Mlir-commits
mailing list