Skip to content

Commit

Permalink
[mlir][vector] Specify bounds of dynamic indices in vector.extract/in…
Browse files Browse the repository at this point in the history
…sert (llvm#95933)
  • Loading branch information
MacDue committed Jun 19, 2024
1 parent 5574a58 commit c83d9e9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -862,6 +866,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
Expand Down

0 comments on commit c83d9e9

Please sign in to comment.