From 96ac627238dc515efdd61e5ddeda78cd17014fa5 Mon Sep 17 00:00:00 2001 From: Ivan Butygin Date: Thu, 19 Sep 2024 14:52:35 +0300 Subject: [PATCH] [mlir][vector][nfc] Update vector load/store doc wrt unit strides. (#109267) Follow up to https://github.com/llvm/llvm-project/pull/108998. Non-contiguous strides are allowed now for 1-element vector load/stores. --- mlir/include/mlir/Dialect/Vector/IR/VectorOps.td | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td b/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td index b96f5c2651bc..b6d2cc29cd1b 100644 --- a/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td +++ b/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td @@ -1652,9 +1652,10 @@ def Vector_LoadOp : Vector_Op<"load"> { based on the element type of the memref. The shape of the result vector type determines the shape of the slice read from the start memory address. The elements along each dimension of the slice are strided by the memref - strides. Only unit strides are allowed along the most minor memref - dimension. These constraints guarantee that elements read along the first - dimension of the slice are contiguous in memory. + strides. When loading more than 1 element, only unit strides are allowed + along the most minor memref dimension. These constraints guarantee that + elements read along the first dimension of the slice are contiguous in + memory. The memref element type can be a scalar or a vector type. If the memref element type is a scalar, it should match the element type of the result @@ -1736,9 +1737,10 @@ def Vector_StoreOp : Vector_Op<"store"> { memref dimension based on the element type of the memref. The shape of the vector value to store determines the shape of the slice written from the start memory address. The elements along each dimension of the slice are - strided by the memref strides. Only unit strides are allowed along the most - minor memref dimension. These constraints guarantee that elements written - along the first dimension of the slice are contiguous in memory. + strided by the memref strides. When storing more than 1 element, only unit + strides are allowed along the most minor memref dimension. These constraints + guarantee that elements written along the first dimension of the slice are + contiguous in memory. The memref element type can be a scalar or a vector type. If the memref element type is a scalar, it should match the element type of the value