Skip to content

Commit f153804

Browse files
committed
Adding comment in conv precondition check
1 parent a58b8da commit f153804

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2027,6 +2027,7 @@ static LogicalResult vectorizeConvOpPrecondition(linalg::LinalgOp convOp) {
20272027
ShapedType resShapedType = getOperandType(convOp.getDpsInitOperand(0));
20282028
// (LHS has dimension NCW/NWC and RES has dimension NFW/NCW/NWF/NWC) OR
20292029
// (non-channeled convolution -> LHS and RHS both have single dimensions).
2030+
// Note that this also ensures 2D and 3D convolutions are rejected.
20302031
if ((lhsShapedType.getRank() != 3 || resShapedType.getRank() != 3) &&
20312032
(lhsShapedType.getRank() != 1 || resShapedType.getRank() != 1))
20322033
return failure();

0 commit comments

Comments
 (0)