[Mlir-commits] [mlir] [mlir][vector] Clarify the semantics of gather/scatter indexing (nfc) (PR #181357)
Jakub Kuderski
llvmlistbot at llvm.org
Fri Feb 13 05:58:59 PST 2026
================
@@ -2087,7 +2087,10 @@ def Vector_GatherOp :
result[i,j] := if mask[i,j] then base[i0, i1, i2 + indices[i,j]]
else pass_thru[i,j]
```
- The index into `base` only varies in the innermost ((k-1)-th) dimension.
+ The index into `base` only varies in the innermost ((k-1)-th) dimension and
+ is treated as a logical rather than a physical index, i.e. it does not
+ encode any potential non-identity strides in the underlying MemRef layout
----------------
kuhar wrote:
I'm not sure the 'physical index' term is well-understood in general (physical addressing is also a thing and mostly orthogonal to this) -- maybe better to say what it is wrt to strides
```suggestion
The access into `base` is contiguous within the innermost ((k-1)-th) dimension and
does not account for any potential non-identity strides in the underlying MemRef layout
```
https://github.com/llvm/llvm-project/pull/181357
More information about the Mlir-commits
mailing list