[Mlir-commits] [mlir] [mlir][vector] Update vector load/store doc wrt unit strides. (PR #109267)

Ivan Butygin llvmlistbot at llvm.org
Thu Sep 19 03:39:08 PDT 2024


https://github.com/Hardcode84 created https://github.com/llvm/llvm-project/pull/109267

Follow up to https://github.com/llvm/llvm-project/pull/108998.

Non-contiguous strides are allowed now for 1-element vector load/stores.

>From 091526bb43db9234d7d3cd09c0408ef558a80424 Mon Sep 17 00:00:00 2001
From: Ivan Butygin <ivan.butygin at gmail.com>
Date: Thu, 19 Sep 2024 12:35:19 +0200
Subject: [PATCH] [mlir][vector] Update vector load/store doc wrt unit strides.

Follow up to https://github.com/llvm/llvm-project/pull/108998.

Non-contigious strides are allowed for 1-slement vector load/stores.
---
 mlir/include/mlir/Dialect/Vector/IR/VectorOps.td | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td b/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
index b96f5c2651bce5..65ed9b9d3df927 100644
--- a/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
+++ b/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
@@ -1655,6 +1655,7 @@ def Vector_LoadOp : Vector_Op<"load"> {
     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.
+    Non-unit strides are allowed when doing 0-rank or 1-element vector load.
 
     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
@@ -1739,6 +1740,7 @@ def Vector_StoreOp : Vector_Op<"store"> {
     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.
+    Non-unit strides are allowed when doing 0-rank or 1-element vector store.
 
     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



More information about the Mlir-commits mailing list