[Mlir-commits] [mlir] [MLIR][Tensor] Fix DPS op canonicalizer with `tensor.cast`` (PR #91382)

Christopher Bate llvmlistbot at llvm.org
Tue May 7 18:14:08 PDT 2024


christopherbate wrote:

> Havent looked at the change yet, but is a much bigger change than I would have anticipated.

It's mostly just code movement. I'll push an update to remove the old pattern so that's more clear.

> Wouldnt a solution be you create a new operation where the result type is also of the same type as the new destination?

That's not the problem/solution. The old pattern already did that for DPS init operands. The problem, as described in the linked issue, is that you can't assume any DPS operation can absorb casts on its operands (eve the DPS input operands). A concrete op may have arbitrary logic in its verifier that would make that invalid. A contrived example is I could create an op in a downstream  project where the shapes of all operands have to by dynamic.

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


More information about the Mlir-commits mailing list