Skip to content

Commit cfb79ac

Browse files
Hardcode84tmsri
authored andcommitted
[mlir][vector][nfc] Update vector load/store doc wrt unit strides. (llvm#109267)
Follow up to llvm#108998. Non-contiguous strides are allowed now for 1-element vector load/stores.
1 parent 7eda8ad commit cfb79ac

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

mlir/include/mlir/Dialect/Vector/IR/VectorOps.td

+8-6
Original file line numberDiff line numberDiff line change
@@ -1652,9 +1652,10 @@ def Vector_LoadOp : Vector_Op<"load"> {
16521652
based on the element type of the memref. The shape of the result vector
16531653
type determines the shape of the slice read from the start memory address.
16541654
The elements along each dimension of the slice are strided by the memref
1655-
strides. Only unit strides are allowed along the most minor memref
1656-
dimension. These constraints guarantee that elements read along the first
1657-
dimension of the slice are contiguous in memory.
1655+
strides. When loading more than 1 element, only unit strides are allowed
1656+
along the most minor memref dimension. These constraints guarantee that
1657+
elements read along the first dimension of the slice are contiguous in
1658+
memory.
16581659

16591660
The memref element type can be a scalar or a vector type. If the memref
16601661
element type is a scalar, it should match the element type of the result
@@ -1736,9 +1737,10 @@ def Vector_StoreOp : Vector_Op<"store"> {
17361737
memref dimension based on the element type of the memref. The shape of the
17371738
vector value to store determines the shape of the slice written from the
17381739
start memory address. The elements along each dimension of the slice are
1739-
strided by the memref strides. Only unit strides are allowed along the most
1740-
minor memref dimension. These constraints guarantee that elements written
1741-
along the first dimension of the slice are contiguous in memory.
1740+
strided by the memref strides. When storing more than 1 element, only unit
1741+
strides are allowed along the most minor memref dimension. These constraints
1742+
guarantee that elements written along the first dimension of the slice are
1743+
contiguous in memory.
17421744

17431745
The memref element type can be a scalar or a vector type. If the memref
17441746
element type is a scalar, it should match the element type of the value

0 commit comments

Comments
 (0)