File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
mlir/lib/Conversion/VectorToSCF Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -1063,8 +1063,10 @@ struct ScalableTransposeTransferWriteConversion
1063
1063
writeOp, " lowering tensor transfers is disabled" );
1064
1064
}
1065
1065
1066
- Value vector = writeOp.getVector ();
1067
1066
VectorType vectorType = writeOp.getVectorType ();
1067
+
1068
+ // Note: By comparing the scalable dims to an ArrayRef of length two this
1069
+ // implicitly checks the rank (is also two).
1068
1070
ArrayRef<bool > scalableFlags = vectorType.getScalableDims ();
1069
1071
if (scalableFlags != ArrayRef<bool >{true , false }) {
1070
1072
return rewriter.notifyMatchFailure (
@@ -1077,11 +1079,15 @@ struct ScalableTransposeTransferWriteConversion
1077
1079
writeOp, " non-identity permutations are unsupported (lower first)" );
1078
1080
}
1079
1081
1082
+ // Note: This pattern is only lowering the leading dimension (to a loop),
1083
+ // so we only check if the leading dimension is in bounds. The in-bounds
1084
+ // attribute for the trailing dimension will be propagated.
1080
1085
if (!writeOp.isDimInBounds (0 )) {
1081
1086
return rewriter.notifyMatchFailure (
1082
1087
writeOp, " out-of-bounds dims are unsupported (use masking)" );
1083
1088
}
1084
1089
1090
+ Value vector = writeOp.getVector ();
1085
1091
auto transposeOp = vector.getDefiningOp <vector::TransposeOp>();
1086
1092
if (!transposeOp ||
1087
1093
transposeOp.getPermutation () != ArrayRef<int64_t >{1 , 0 }) {
You can’t perform that action at this time.
0 commit comments