Skip to content

Commit 7025a8e

Browse files
committed
Fix formatting
1 parent eec3881 commit 7025a8e

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

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

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,7 @@ constexpr float A_2x2_5x5[] = {
188188
struct TransformMatrix {
189189
TransformMatrix(ArrayRef<float> table, int64_t rows, int64_t cols,
190190
int64_t scalarFactor = 1)
191-
: table(table), rows(rows), cols(cols), scalarFactor(scalarFactor) {
192-
}
191+
: table(table), rows(rows), cols(cols), scalarFactor(scalarFactor) {}
193192

194193
ArrayRef<float> table;
195194
int64_t rows;
@@ -200,8 +199,10 @@ struct TransformMatrix {
200199
/// Utility function to convert constant array to arith.constant Value.
201200
Value create2DTransformMatrix(OpBuilder &builder, Location loc,
202201
TransformMatrix transform) {
203-
assert(transform.table.size() == static_cast<size_t>(transform.rows * transform.cols));
204-
ArrayRef<float> constVec(transform.table.data(), transform.rows * transform.cols);
202+
assert(transform.table.size() ==
203+
static_cast<size_t>(transform.rows * transform.cols));
204+
ArrayRef<float> constVec(transform.table.data(),
205+
transform.rows * transform.cols);
205206
SmallVector<int64_t, 2> shape{transform.rows, transform.cols};
206207
return arith::ConstantOp::create(
207208
builder, loc,
@@ -551,8 +552,7 @@ Value inputTransform(RewriterBase &rewriter, Location loc, Value input,
551552
auto init =
552553
linalg::FillOp::create(builder, loc, zero, empty).getResult(0);
553554

554-
Value BT =
555-
create2DTransformMatrix(builder, loc, BTMatrix);
555+
Value BT = create2DTransformMatrix(builder, loc, BTMatrix);
556556
// Multiply BT x d.
557557
auto matmulOp = linalg::MatmulOp::create(builder, loc, matmulType,
558558
ValueRange{BT, matmulRetValue},
@@ -574,8 +574,7 @@ Value inputTransform(RewriterBase &rewriter, Location loc, Value input,
574574
.getResult();
575575
auto init =
576576
linalg::FillOp::create(builder, loc, zero, empty).getResult(0);
577-
Value B =
578-
create2DTransformMatrix(builder, loc, BMatrix);
577+
Value B = create2DTransformMatrix(builder, loc, BMatrix);
579578
// Multiply v = (BT x d) x B.
580579
auto matmulOp = linalg::MatmulOp::create(builder, loc, matmulType,
581580
ValueRange{matmulRetValue, B},

0 commit comments

Comments
 (0)