-
Notifications
You must be signed in to change notification settings - Fork 31
Description
There is an interesting "issue" after a recent LLVM change (llvm/llvm-project@589eac6). The pattern replaces a LinalgOp without calling the replaceOp
method. As a result, the listeners do not observe the replacement and the "payload op" to "transformed op" mapping gets out of sync.
The problem can be reproduced by running:
build/bin/mlir-proto-opt test/LinalgTransform/double-tiling.mlir -linalg-interp-transforms
The interpreter generates only three instead of six tile loops.
A way to fix this issue is to ensure the pattern calls the replaceOp
(https://reviews.llvm.org/D121369). I wonder if there is a solution to make the tracking infrastructure more robust to cover such cases? I think the pattern does what it is supposed to do. It matches the cast op and properly calls replaceOp
for the cast operation. Adapting patterns to make the replace explicit still seems like the way to go...