[Mlir-commits] [mlir] Support non minor id maps (PR #178992)
Michael Platings
llvmlistbot at llvm.org
Mon Feb 2 06:18:59 PST 2026
mplatings wrote:
I'm persuaded that this is a reasonable change after all. It is already possible to have the same effect using memref.subview. This change makes the subview unnecessary. In the following example, `%A` will already be lowered to GPU without this change whereas `%B` does the same thing but won't be lowered to GPU without this change. I think it can be argued that if `%A` is permitted then `%B` should be permitted also.
```
func.func @read_transpose_with_strides_3d(%arg0: memref<2x5x3xf16>, %arg1: memref<2x3xf16>) {
%c0 = arith.constant 0 : index
%cst = arith.constant 0.0 : f16
%subview = memref.subview %arg0[0, 0, 0] [2, 1, 3] [1, 1, 1] : memref<2x5x3xf16> to memref<2x3xf16, strided<[15, 1]>>
%A = vector.transfer_read %subview[%c0, %c0], %cst {in_bounds = [true, true], permutation_map = affine_map<(d0, d1) -> (d1, d0)>} : memref<2x3xf16, strided<[15, 1]>>, vector<2x3xf16>
%B = vector.transfer_read %arg0[%c0, %c0, %c0], %cst {in_bounds = [true, true], permutation_map = affine_map<(d0, d1, d2) -> (d2, d0)>} : memref<2x5x3xf16>, vector<2x3xf16>
...
```
https://github.com/llvm/llvm-project/pull/178992
More information about the Mlir-commits
mailing list