[Mlir-commits] [mlir] [mlir][vector] Make gather/scatter index dimensions separately (PR #194395)

Krzysztof Drewniak llvmlistbot at llvm.org
Mon May 4 13:56:35 PDT 2026


krzysz00 wrote:

> This looks really interesting but I am having a little bit of trouble following this sentence. Can you write an example using MLIR syntax?
So I went with subview and not expand_shape, but I'm noticing that 

```mlir
%tile = memref.subview %base[%off0, %off1] [%sz0, %sz1] [1, 1] 
%g = vector.gather %tile[%c0, %c0] [%m_idxs, %n_idxs]
```

can now be easily transformed to
 
```mlir
%g = vector.gather %base[%off0, %off1] [%idxs_m, %idxs_n]
```

without needing to either delinearize/linearize the indexes or being incorrect.

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


More information about the Mlir-commits mailing list