Skip to content

Commit b54a4d0

Browse files
author
Nicolas Vasilache
committed
[mlir][Linalg] NFC - Make useFullTileBuffersByDefault option take a boolean.
1 parent 0d4e243 commit b54a4d0

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ struct LinalgPromotionOptions {
106106
/// If true all operands unspecified by `useFullTileBuffers` will use the full
107107
/// view, otherwise the partial view.
108108
bool useFullTileBuffersDefault = false;
109-
LinalgPromotionOptions &useFullTileBuffersByDefault() {
110-
useFullTileBuffersDefault = true;
109+
LinalgPromotionOptions &setUseFullTileBuffersByDefault(bool use) {
110+
useFullTileBuffersDefault = use;
111111
return *this;
112112
}
113113
/// Allow the use of dynamicaly-sized buffers.

mlir/test/lib/Transforms/TestLinalgTransforms.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,14 +158,14 @@ static void applyPatterns(FuncOp funcOp) {
158158
// Linalg subview operands promotion.
159159
//===--------------------------------------------------------------------===//
160160
patterns.insert<LinalgPromotionPattern<MatmulOp>>(
161-
ctx, LinalgPromotionOptions().useFullTileBuffersByDefault(),
161+
ctx, LinalgPromotionOptions().setUseFullTileBuffersByDefault(true),
162162
LinalgMarker(Identifier::get("_promote_views_", ctx),
163163
Identifier::get("_views_promoted_", ctx)));
164164
patterns.insert<LinalgPromotionPattern<MatmulOp>>(
165165
ctx,
166166
LinalgPromotionOptions()
167167
.setOperandsToPromote({0})
168-
.useFullTileBuffersByDefault(),
168+
.setUseFullTileBuffersByDefault(true),
169169
LinalgMarker(Identifier::get("_promote_first_view_", ctx),
170170
Identifier::get("_first_view_promoted_", ctx)));
171171
patterns.insert<LinalgPromotionPattern<FillOp>>(
@@ -196,7 +196,7 @@ static void fillL1TilingAndMatmulToVectorPatterns(
196196
Identifier::get("L1", ctx))));
197197

198198
patternsVector.emplace_back(LinalgPromotionPattern<MatmulOp>(
199-
ctx, LinalgPromotionOptions().useFullTileBuffersByDefault(),
199+
ctx, LinalgPromotionOptions().setUseFullTileBuffersByDefault(true),
200200
LinalgMarker(Identifier::get("L1", ctx), Identifier::get("VEC", ctx))));
201201

202202
patternsVector.emplace_back(LinalgVectorizationPattern<MatmulOp>(

0 commit comments

Comments
 (0)