File tree 3 files changed +9
-2
lines changed
include/mlir/Dialect/Vector/IR 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -367,7 +367,7 @@ def Vector_BroadcastOp :
367
367
s_1 x .. x s_j x .. x s_k
368
368
<duplication> <potential stretch>
369
369
```
370
- * a scalable unit dimeension , `[1]`, must match exactly.
370
+ * a scalable unit dimension , `[1]`, must match exactly.
371
371
372
372
The source operand is duplicated over all the missing leading dimensions
373
373
and stretched over the trailing dimensions where the source has a non-equal
Original file line number Diff line number Diff line change @@ -2403,7 +2403,7 @@ BroadcastableToResult mlir::vector::isBroadcastableTo(
2403
2403
bool srcDimScalableFlag = srcVectorType.getScalableDims ()[r];
2404
2404
bool dstDimScalableFlag = dstVectorType.getScalableDims ()[lead + r];
2405
2405
if ((srcDim == 1 && srcDimScalableFlag && dstDim != 1 ) ||
2406
- (srcDimScalableFlag && ! dstDimScalableFlag))
2406
+ (srcDimScalableFlag != dstDimScalableFlag))
2407
2407
mismatch = true ;
2408
2408
2409
2409
if (mismatch) {
Original file line number Diff line number Diff line change @@ -42,6 +42,13 @@ func.func @broadcast_scalable_unit_dim(%arg0: vector<[1]xf32>) {
42
42
43
43
// -----
44
44
45
+ func.func @broadcast_fixed_to_scalable (%arg0: vector <2 xf32 >) {
46
+ // expected-error@+1 {{'vector.broadcast' op dimension mismatch (2 vs. [2])}}
47
+ %0 = vector.broadcast %arg0 : vector <2 xf32 > to vector <[2 ]xf32 >
48
+ }
49
+
50
+ // -----
51
+
45
52
func.func @broadcast_scalable_to_fixed (%arg0: vector <[1 ]xf32 >) {
46
53
// expected-error@+1 {{'vector.broadcast' op dimension mismatch ([1] vs. 1)}}
47
54
%0 = vector.broadcast %arg0 : vector <[1 ]xf32 > to vector <4 x1 xf32 >
You can’t perform that action at this time.
0 commit comments