[Mlir-commits] [mlir] [mlir][gpu] Eliminate redundant gpu.barrier ops (PR #71575)

Oleksandr Alex Zinenko llvmlistbot at llvm.org
Thu Nov 9 00:52:02 PST 2023


ftynse wrote:

> Why shouldn't we run this as a part of the canonization? There is one and only reason we use GPUs and it is performance.

It doesn't mean it should run as part of _canonicalization_. The purpose of canonicalization isn't to make the generated code fast, it is to make it easier for the compiler to reason about the code by bringing it into the canonical form (even though I have doubts about existence of such a form in MLIR). Since it is called repeatedly in the pipeline as generalized cleanup, we don't want canonicalization patterns to be expensive to apply. This pattern can still be applied by a separate pass, just not canonicalizaiton.

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


More information about the Mlir-commits mailing list