[Mlir-commits] [mlir] [mlir][vector] Specify bounds of dynamic indices in vector.extract/insert (PR #95933)
Benjamin Maxwell
llvmlistbot at llvm.org
Tue Jun 18 07:18:31 PDT 2024
https://github.com/MacDue created https://github.com/llvm/llvm-project/pull/95933
None
>From 8755e1599f695d6b984e9a8b857ec65ff893334e Mon Sep 17 00:00:00 2001
From: Benjamin Maxwell <benjamin.maxwell at arm.com>
Date: Tue, 18 Jun 2024 14:12:54 +0000
Subject: [PATCH] [mlir][vector] Specify bounds of dynamic indices in
vector.extract/insert
---
mlir/include/mlir/Dialect/Vector/IR/VectorOps.td | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td b/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
index 56d866ac5b40c..fb8aff503cdc1 100644
--- a/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
+++ b/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
@@ -680,6 +680,10 @@ def Vector_ExtractOp :
Takes an n-D vector and a k-D position and extracts the (n-k)-D vector at
the proper position. Degenerates to an element type if n-k is zero.
+ Dynamic indices must be greater or equal to zero and less than the size of
+ the corresponding dimension. The result is undefined if any index is
+ out-of-bounds.
+
Example:
```mlir
@@ -828,6 +832,10 @@ def Vector_InsertOp :
and inserts the n-D source into the (n+k)-D destination at the proper
position. Degenerates to a scalar or a 0-d vector source type when n = 0.
+ Dynamic indices must be greater or equal to zero and less than the size of
+ the corresponding dimension. The result is undefined if any index is
+ out-of-bounds.
+
Example:
```mlir
More information about the Mlir-commits
mailing list