[Mlir-commits] [mlir] b54a4d0 - [mlir][Linalg] NFC - Make useFullTileBuffersByDefault option take a boolean.
Nicolas Vasilache
llvmlistbot at llvm.org
Fri Jun 5 14:48:34 PDT 2020
Author: Nicolas Vasilache
Date: 2020-06-05T17:44:29-04:00
New Revision: b54a4d0f8ff8f3530b107d0e4ac57e7e1bcf1031
URL: https://github.com/llvm/llvm-project/commit/b54a4d0f8ff8f3530b107d0e4ac57e7e1bcf1031
DIFF: https://github.com/llvm/llvm-project/commit/b54a4d0f8ff8f3530b107d0e4ac57e7e1bcf1031.diff
LOG: [mlir][Linalg] NFC - Make useFullTileBuffersByDefault option take a boolean.
Added:
Modified:
mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
mlir/test/lib/Transforms/TestLinalgTransforms.cpp
Removed:
################################################################################
diff --git a/mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h b/mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
index 101a1a580278..7bd57c832f77 100644
--- a/mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
+++ b/mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
@@ -106,8 +106,8 @@ struct LinalgPromotionOptions {
/// If true all operands unspecified by `useFullTileBuffers` will use the full
/// view, otherwise the partial view.
bool useFullTileBuffersDefault = false;
- LinalgPromotionOptions &useFullTileBuffersByDefault() {
- useFullTileBuffersDefault = true;
+ LinalgPromotionOptions &setUseFullTileBuffersByDefault(bool use) {
+ useFullTileBuffersDefault = use;
return *this;
}
/// Allow the use of dynamicaly-sized buffers.
diff --git a/mlir/test/lib/Transforms/TestLinalgTransforms.cpp b/mlir/test/lib/Transforms/TestLinalgTransforms.cpp
index 4b1b5bdc1366..44a0e8cbdb14 100644
--- a/mlir/test/lib/Transforms/TestLinalgTransforms.cpp
+++ b/mlir/test/lib/Transforms/TestLinalgTransforms.cpp
@@ -158,14 +158,14 @@ static void applyPatterns(FuncOp funcOp) {
// Linalg subview operands promotion.
//===--------------------------------------------------------------------===//
patterns.insert<LinalgPromotionPattern<MatmulOp>>(
- ctx, LinalgPromotionOptions().useFullTileBuffersByDefault(),
+ ctx, LinalgPromotionOptions().setUseFullTileBuffersByDefault(true),
LinalgMarker(Identifier::get("_promote_views_", ctx),
Identifier::get("_views_promoted_", ctx)));
patterns.insert<LinalgPromotionPattern<MatmulOp>>(
ctx,
LinalgPromotionOptions()
.setOperandsToPromote({0})
- .useFullTileBuffersByDefault(),
+ .setUseFullTileBuffersByDefault(true),
LinalgMarker(Identifier::get("_promote_first_view_", ctx),
Identifier::get("_first_view_promoted_", ctx)));
patterns.insert<LinalgPromotionPattern<FillOp>>(
@@ -196,7 +196,7 @@ static void fillL1TilingAndMatmulToVectorPatterns(
Identifier::get("L1", ctx))));
patternsVector.emplace_back(LinalgPromotionPattern<MatmulOp>(
- ctx, LinalgPromotionOptions().useFullTileBuffersByDefault(),
+ ctx, LinalgPromotionOptions().setUseFullTileBuffersByDefault(true),
LinalgMarker(Identifier::get("L1", ctx), Identifier::get("VEC", ctx))));
patternsVector.emplace_back(LinalgVectorizationPattern<MatmulOp>(
More information about the Mlir-commits
mailing list