Skip to content

Commit 9669a02

Browse files
committed
Fixups
1 parent 965e66c commit 9669a02

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ def Vector_ReductionOp :
265265
"::mlir::arith::FastMathFlags::none">:$fastMathFlags)>
266266
];
267267

268-
let assemblyFormat = "$kind `,` $vector (`,` $acc^)? (`fastmath` $fastmath^)?"
268+
let assemblyFormat = "$kind `,` $vector (`,` $acc^)? (`fastmath` `` $fastmath^)?"
269269
" attr-dict `:` type($vector) `into` type($dest)";
270270
let hasCanonicalizer = 1;
271271
let hasVerifier = 1;

mlir/test/Dialect/Vector/invalid.mlir

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1168,6 +1168,13 @@ func.func @reduce_unsupported_attr(%arg0: vector<16xf32>) -> i32 {
11681168

11691169
// -----
11701170

1171+
func.func @reduce_unsupported_third_argument(%arg0: vector<16xf32>, %arg1: f32) -> f32 {
1172+
// expected-error@+1 {{expected ':'}}
1173+
%0 = vector.reduction <add>, %arg0, %arg1, %arg1 : vector<16xf32> into f32
1174+
}
1175+
1176+
// -----
1177+
11711178
func.func @reduce_unsupported_rank(%arg0: vector<4x16xf32>) -> f32 {
11721179
// expected-error@+1 {{'vector.reduction' op unsupported reduction rank: 2}}
11731180
%0 = vector.reduction <add>, %arg0 : vector<4x16xf32> into f32

mlir/test/Dialect/Vector/ops.mlir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1042,7 +1042,7 @@ func.func @contraction_masked_scalable(%A: vector<3x4xf32>,
10421042

10431043
// CHECK-LABEL: func.func @fastmath(
10441044
func.func @fastmath(%x: vector<42xf32>) -> f32 {
1045-
// CHECK: vector.reduction <minf>, %{{.*}} fastmath <reassoc,nnan,ninf>
1045+
// CHECK: vector.reduction <minf>, %{{.*}} fastmath<reassoc,nnan,ninf>
10461046
%min = vector.reduction <minf>, %x fastmath<reassoc,nnan,ninf> : vector<42xf32> into f32
10471047
return %min: f32
10481048
}

0 commit comments

Comments
 (0)