[Mlir-commits] [mlir] [mlir][vector] Fix off-by-one error in `getTransferChunkAccessed` (PR #70292)

Matthias Springer llvmlistbot at llvm.org
Fri Oct 27 01:35:55 PDT 2023


matthias-springer wrote:

> is there a test we can add ?

I fixed `TransferReadAfterWriteToBroadcast`, which depended on the incorrect result of `getTransferChunkAccessed`. The pattern uses `getTransferChunkAccessed` to detect cases that are not supported by the canonicalization pattern, namely transfer_write/transfer_read pairs where one op explicitly writes a unit dimension and the other op implicitly reads a unit dimension via rank-reduction. This detection crashed with the fixed `getTransferChunkAccessed` and I added a regression test for that.

Ideally, we would also update the canonicalization pattern to support such cases, but it looks like that would require a complete redesign of `TransferReadAfterWriteToBroadcast` in a non-trivial way.


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


More information about the Mlir-commits mailing list