[Mlir-commits] [mlir] [mlir][Transforms] GreedyPatternRewriteDriver: verify IR after pattern application (PR #74270)

Matthias Springer llvmlistbot at llvm.org
Wed Dec 20 21:54:09 PST 2023


matthias-springer wrote:

> Do we already have a bot checking with `MLIR_ENABLE_EXPENSIVE_PATTERN_API_CHECKS`?

Not yet. One concern that I have is that some `MLIR_ENABLE_EXPENSIVE_PATTERN_API_CHECKS` checks can report false positives. The ones that look for "rewrite pattern returned success but IR did not change". The check is implemented by comparing the hash of the operations and there could be hash collisions. In practice, I haven't seen any hash collisions yet. Cloning the IR before every pattern application (to check for true equivalence) could be too expensive and may change the behavior of patterns (if Values get additional uses). What do you think?


https://github.com/llvm/llvm-project/pull/74270


More information about the Mlir-commits mailing list