Skip to content

Commit aabc3c5

Browse files
committed
[mlir] [VectorOps] fixed minor typos in vector ops doc
Summary: Rationale: Some examples were using "offsets : [0, 2]" syntax which should use a "=" instead. The same examples were referring to the integer attribute array as k-dimensional, which is a bit confusing (it is 1-dimensional, with k elements). Changed to "k-sized". Reviewers: nicolasvasilache, andydavis1, ftynse Reviewed By: nicolasvasilache Subscribers: merge_guards_bot, mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, arpith-jacob, mgester, lucyrfox, liufengdb, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D73293
1 parent 7154413 commit aabc3c5

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

mlir/include/mlir/Dialect/VectorOps/VectorOps.td

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -495,10 +495,10 @@ def Vector_InsertStridedSliceOp :
495495
Results<(outs AnyVector)> {
496496
let summary = "strided_slice operation";
497497
let description = [{
498-
Takes a k-D source vector, an n-D destination vector (n >= k), n-D `offsets`
499-
integer array attribute, a k-D `strides` integer array attribute and inserts
500-
the k-D source vector as a strided subvector at the proper offset into the
501-
n-D destination vector.
498+
Takes a k-D source vector, an n-D destination vector (n >= k), n-sized
499+
`offsets` integer array attribute, a k-sized `strides` integer array attribute
500+
and inserts the k-D source vector as a strided subvector at the proper offset
501+
into the n-D destination vector.
502502

503503
At the moment strides must contain only 1s.
504504

@@ -509,7 +509,7 @@ def Vector_InsertStridedSliceOp :
509509
Examples:
510510
```
511511
%2 = vector.insert_strided_slice %0, %1
512-
{offsets : [0, 0, 2], strides : [1, 1]}:
512+
{offsets = [0, 0, 2], strides = [1, 1]}:
513513
vector<2x4xf32> into vector<16x4x8xf32>
514514
```
515515
}];
@@ -693,9 +693,9 @@ def Vector_StridedSliceOp :
693693
Results<(outs AnyVector)> {
694694
let summary = "strided_slice operation";
695695
let description = [{
696-
Takes an n-D vector, k-D `offsets` integer array attribute, a k-D `sizes`
697-
integer array attribute, a k-D `strides` integer array attribute and
698-
extracts the n-D subvector at the proper offset.
696+
Takes an n-D vector, k-D `offsets` integer array attribute, a k-sized
697+
`sizes` integer array attribute, a k-sized `strides` integer array
698+
attribute and extracts the n-D subvector at the proper offset.
699699

700700
At the moment strides must contain only 1s.
701701
// TODO(ntv) support non-1 strides.
@@ -707,7 +707,7 @@ def Vector_StridedSliceOp :
707707
Examples:
708708
```
709709
%1 = vector.strided_slice %0
710-
{offsets : [0, 2], sizes : [2, 4], strides : [1, 1]}:
710+
{offsets = [0, 2], sizes = [2, 4], strides = [1, 1]}:
711711
vector<4x8x16xf32> to vector<2x4x16xf32>
712712
```
713713

0 commit comments

Comments
 (0)