Skip to content

Commit 2208f2b

Browse files
committed
Feedback
1 parent eae66c7 commit 2208f2b

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

mlir/include/mlir/Dialect/Vector/IR/VectorOps.td

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2475,7 +2475,9 @@ def Vector_MaskOp : Vector_Op<"mask", [
24752475
should not. The `vector.mask` operation returns the value produced by the
24762476
masked execution of the nested operation, if any. The masked-off lanes in
24772477
the result vector are taken from the corresponding lanes of the pass-thru
2478-
argument, if provided, or left unmodified, otherwise.
2478+
argument, if provided, or left unmodified, otherwise. At this point, 0-D
2479+
vectors are not supported by `vector.mask`. They may be supported in the
2480+
future.
24792481

24802482
The `vector.mask` operation does not prescribe how a maskable operation
24812483
should be masked or how a masked operation should be lowered. Masking

mlir/lib/Dialect/Vector/IR/VectorOps.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4122,7 +4122,8 @@ VectorType mlir::vector::inferTransferOpMaskType(VectorType vecType,
41224122
assert(invPermMap && "Inversed permutation map couldn't be computed");
41234123
SmallVector<int64_t, 8> maskShape = invPermMap.compose(vecType.getShape());
41244124

4125-
// Turn a 0-D mask into a single-element 1-D mask.
4125+
// The MaskOp specification doesn't support 0-D vectors at the moment. Turn a
4126+
// 0-D mask into a single-element 1-D mask.
41264127
if (maskShape.empty())
41274128
maskShape.push_back(1);
41284129

mlir/test/Dialect/Vector/invalid.mlir

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1752,7 +1752,6 @@ func.func @vector_mask_non_maskable_op(%a : vector<3x4xf32>) -> vector<3x4xf32>
17521752

17531753
// -----
17541754

1755-
// We can support 0-D masks if eventually needed.
17561755
func.func @vector_mask_0d_mask(%arg0: tensor<2x4xi32>,
17571756
%idx0: index, %idx1: index,
17581757
%m0: vector<i1>) -> vector<1x1x4xi32> {

0 commit comments

Comments
 (0)