Index: mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp =================================================================== --- mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp +++ mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp @@ -31,8 +31,8 @@ #include "llvm/ADT/TypeSwitch.h" #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" -#include #include +#include using namespace mlir; using namespace mlir::linalg; @@ -1998,14 +1998,14 @@ static void bindShapeDims(ShapedType shapedType) {} template -static void bindShapeDims(ShapedType shapedType, IntTy &val, IntTy2 &...vals) { +static void bindShapeDims(ShapedType shapedType, IntTy &val, IntTy2 &... vals) { val = shapedType.getShape()[N]; bindShapeDims(shapedType, vals...); } /// Bind a pack of int& to the leading dimensions of shapedType.getShape(). template -static void bindShapeDims(ShapedType shapedType, IntTy &...vals) { +static void bindShapeDims(ShapedType shapedType, IntTy &... vals) { bindShapeDims<0>(shapedType, vals...); } @@ -2092,7 +2092,7 @@ auto rhsRank = rhsShapedType.getRank(); switch (oper) { case Conv: - if (rhsRank != 2 && rhsRank!= 3) + if (rhsRank != 2 && rhsRank != 3) return; break; case Pool: @@ -2434,15 +2434,17 @@ // Compute contraction: O{n, w, c} += I{n, sw * w + dw * kw, c} * F{c} for (int64_t kw = 0; kw < kwSize; ++kw) { for (int64_t w = 0; w < wSize; w += wSizeStep) { - resVals[w] = depthwiseConv1dSliceAsMulAcc( - rewriter, loc, lhsVals[linearIndex(kw, w)], rhsVals[kw], resVals[w]); + resVals[w] = depthwiseConv1dSliceAsMulAcc(rewriter, loc, + lhsVals[linearIndex(kw, w)], + rhsVals[kw], resVals[w]); } } // Its possible we failed to create the Fma. if (!llvm::all_of(resVals, [](Value v) { return v; })) { // Manually revert (in reverse order) to avoid leaving a bad IR state. - for (auto &collection : {resVals, rhsVals, lhsVals, {res, rhs, lhs, zero}}) + for (auto &collection : + {resVals, rhsVals, lhsVals, {res, rhs, lhs, zero}}) for (Value v : collection) rewriter.eraseOp(v.getDefiningOp()); return rewriter.notifyMatchFailure(op, "failed to create FMA");