diff --git a/mlir/include/mlir/Dialect/Linalg/Passes.h b/mlir/include/mlir/Dialect/Linalg/Passes.h --- a/mlir/include/mlir/Dialect/Linalg/Passes.h +++ b/mlir/include/mlir/Dialect/Linalg/Passes.h @@ -13,9 +13,11 @@ #ifndef MLIR_DIALECT_LINALG_PASSES_H_ #define MLIR_DIALECT_LINALG_PASSES_H_ +#include "mlir/Dialect/Linalg/Utils/Utils.h" #include "mlir/Pass/Pass.h" namespace mlir { + std::unique_ptr> createConvertElementwiseToLinalgPass(); std::unique_ptr> createLinalgFoldUnitExtentDimsPass(); @@ -23,15 +25,10 @@ std::unique_ptr createLinalgElementwiseOpFusionPass(); std::unique_ptr createFoldReshapeOpsByLinearizationPass(); -std::unique_ptr> -createLinalgTilingPass(ArrayRef tileSizes = {}); - -std::unique_ptr> -createLinalgTilingToParallelLoopsPass(ArrayRef tileSizes = {}); - -std::unique_ptr> -createLinalgTilingToTiledLoopPass(ArrayRef tileSizes = {}, - ArrayRef distributionTypes = {}); +std::unique_ptr> createLinalgTilingPass( + ArrayRef tileSizes = {}, + linalg::LinalgTilingLoopType loopType = linalg::LinalgTilingLoopType::Loops, + ArrayRef distributionTypes = {}); std::unique_ptr> createLinalgPromotionPass(bool dynamicBuffers, bool useAlloca); diff --git a/mlir/include/mlir/Dialect/Linalg/Passes.td b/mlir/include/mlir/Dialect/Linalg/Passes.td --- a/mlir/include/mlir/Dialect/Linalg/Passes.td +++ b/mlir/include/mlir/Dialect/Linalg/Passes.td @@ -169,43 +169,15 @@ "scf::SCFDialect" ]; let options = [ - ListOption<"tileSizes", "linalg-tile-sizes", "int64_t", "Tile sizes", - "llvm::cl::ZeroOrMore, llvm::cl::MiscFlags::CommaSeparated"> - ]; -} - -def LinalgTilingToParallelLoops - : FunctionPass<"linalg-tile-to-parallel-loops"> { - let summary = "Tile operations in the linalg dialect to parallel loops"; - let constructor = "mlir::createLinalgTilingToParallelLoopsPass()"; - let options = [ - ListOption<"tileSizes", "linalg-tile-sizes", "int64_t", "Tile sizes", - "llvm::cl::ZeroOrMore, llvm::cl::MiscFlags::CommaSeparated"> - ]; - let dependentDialects = [ - "AffineDialect", - "linalg::LinalgDialect", - "memref::MemRefDialect", - "scf::SCFDialect" - ]; -} - -def LinalgTilingToTiledLoops - : FunctionPass<"linalg-tile-to-tiled-loop"> { - let summary = "Tile operations in the linalg dialect to linalg.tiled_loop"; - let constructor = "mlir::createLinalgTilingToTiledLoopPass()"; - let options = [ - ListOption<"tileSizes", "linalg-tile-sizes", "int64_t", "Tile sizes", + ListOption<"tileSizes", "tile-sizes", "int64_t", "Tile sizes", "llvm::cl::ZeroOrMore, llvm::cl::MiscFlags::CommaSeparated">, - ListOption<"distributionTypes", "linalg-distribution-types", "std::string", - "DistributionTypes", + Option<"loopType", "loop-type", "std::string", /*default=*/"\"for\"", + "Specify the type of loops to generate: for, parallel or " + "tiled_loop">, + ListOption<"distributionTypes", "distribution-types", "std::string", + "DistributionTypes (if loop-type=tiled_loop)", "llvm::cl::ZeroOrMore, llvm::cl::MiscFlags::CommaSeparated"> - ]; - let dependentDialects = [ - "AffineDialect", - "linalg::LinalgDialect", - "memref::MemRefDialect", - "scf::SCFDialect" + ]; } diff --git a/mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h b/mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h --- a/mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h +++ b/mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h @@ -435,19 +435,6 @@ Optional replacement; }; -/// -/// Linalg tiling patterns. -/// -/// Apply the `tileLinalgOp` transformation as a pattern. -/// `filter` controls LinalgTransformMarker matching and update when specified. -/// See `tileLinalgOp` for more details. -enum class LinalgTilingLoopType { - Loops = 0, - AffineLoops = 1, - ParallelLoops = 2, - TiledLoops = 3, -}; - using TileSizeComputationFunction = std::function(OpBuilder &, Operation *)>; diff --git a/mlir/include/mlir/Dialect/Linalg/Utils/Utils.h b/mlir/include/mlir/Dialect/Linalg/Utils/Utils.h --- a/mlir/include/mlir/Dialect/Linalg/Utils/Utils.h +++ b/mlir/include/mlir/Dialect/Linalg/Utils/Utils.h @@ -76,9 +76,17 @@ ArrayRef sizes, ArrayRef strides); //===----------------------------------------------------------------------===// -// Fusion utilities +// Fusion / Tiling utilities //===----------------------------------------------------------------------===// +/// The type of loops to be generated during tiling. +enum class LinalgTilingLoopType { + Loops = 0, + AffineLoops = 1, + ParallelLoops = 2, + TiledLoops = 3, +}; + /// Checks whether the specific `producer` is the last write to exactly the /// whole `consumedView`. This checks structural dominance, that the dependence /// is a RAW without any interleaved write to any piece of `consumedView`. diff --git a/mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp b/mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp --- a/mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp +++ b/mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp @@ -508,89 +508,59 @@ funcOp, getLinalgTilingCanonicalizationPatterns(ctx)); } -static void -applyTilingToLoopPatterns(LinalgTilingLoopType loopType, FuncOp funcOp, - ArrayRef tileSizes, - ArrayRef distributionTypes = {}) { - auto options = LinalgTilingOptions() - .setTileSizes(tileSizes) - .setLoopType(loopType) - .setDistributionTypes(distributionTypes); - MLIRContext *ctx = funcOp.getContext(); - RewritePatternSet patterns(ctx); - insertTilingPatterns(patterns, options); - scf::populateSCFForLoopCanonicalizationPatterns(patterns); - (void)applyPatternsAndFoldGreedily(funcOp, std::move(patterns)); - (void)applyPatternsAndFoldGreedily( - funcOp, getLinalgTilingCanonicalizationPatterns(ctx)); - // Drop the marker. - funcOp.walk([](LinalgOp op) { - op->removeAttr(LinalgTransforms::kLinalgTransformMarker); - }); - - // Apply swap pattern after generating loop nest and running - // canonicalizations. - applyExtractSliceOfPadTensorSwapPattern(funcOp); -} - namespace { struct LinalgTilingPass : public LinalgTilingBase { LinalgTilingPass() = default; - LinalgTilingPass(ArrayRef sizes) { tileSizes = sizes; } - - void runOnFunction() override { - applyTilingToLoopPatterns(LinalgTilingLoopType::Loops, getFunction(), - tileSizes); - } -}; - -struct LinalgTilingToParallelLoopsPass - : public LinalgTilingToParallelLoopsBase { - LinalgTilingToParallelLoopsPass() = default; - LinalgTilingToParallelLoopsPass(ArrayRef sizes) { - tileSizes = sizes; + LinalgTilingPass(ArrayRef tileSizes, LinalgTilingLoopType loopType, + ArrayRef distributionTypes) { + this->tileSizes = tileSizes; + this->loopType = ""; + this->loopTypeEnum = loopType; + this->distributionTypes = llvm::to_vector<2>(llvm::map_range( + distributionTypes, [](StringRef ref) { return ref.str(); })); } void runOnFunction() override { - applyTilingToLoopPatterns(LinalgTilingLoopType::ParallelLoops, - getFunction(), tileSizes); - } -}; - -struct LinalgTilingToTiledLoopsPass - : public LinalgTilingToTiledLoopsBase { - LinalgTilingToTiledLoopsPass() = default; - LinalgTilingToTiledLoopsPass(ArrayRef sizes, - ArrayRef types) { - tileSizes = sizes; - distributionTypes = llvm::to_vector<2>( - llvm::map_range(types, [](StringRef ref) { return ref.str(); })); + FuncOp funcOp = getFunction(); + LinalgTilingLoopType type = + llvm::StringSwitch(loopType) + .Case("for", LinalgTilingLoopType::Loops) + .Case("affine", LinalgTilingLoopType::AffineLoops) + .Case("parallel", LinalgTilingLoopType::ParallelLoops) + .Case("tiled_loop", LinalgTilingLoopType::TiledLoops) + .Default(loopTypeEnum); + auto distTypes = llvm::to_vector<2>(llvm::map_range( + distributionTypes, [](std::string &str) { return StringRef(str); })); + auto options = LinalgTilingOptions() + .setTileSizes(tileSizes) + .setLoopType(type) + .setDistributionTypes(distTypes); + MLIRContext *ctx = funcOp.getContext(); + RewritePatternSet patterns(ctx); + insertTilingPatterns(patterns, options); + scf::populateSCFForLoopCanonicalizationPatterns(patterns); + (void)applyPatternsAndFoldGreedily(funcOp, std::move(patterns)); + (void)applyPatternsAndFoldGreedily( + funcOp, getLinalgTilingCanonicalizationPatterns(ctx)); + // Drop the marker. + funcOp.walk([](LinalgOp op) { + op->removeAttr(LinalgTransforms::kLinalgTransformMarker); + }); + + // Apply swap pattern after generating loop nest and running + // canonicalizations. + applyExtractSliceOfPadTensorSwapPattern(funcOp); } - void runOnFunction() override { - applyTilingToLoopPatterns( - LinalgTilingLoopType::TiledLoops, getFunction(), tileSizes, - llvm::to_vector<2>( - llvm::map_range(distributionTypes, - [](std::string &str) { return StringRef(str); }))); - } + LinalgTilingLoopType loopTypeEnum; }; } // namespace std::unique_ptr> -mlir::createLinalgTilingPass(ArrayRef tileSizes) { - return std::make_unique(tileSizes); -} - -std::unique_ptr> -mlir::createLinalgTilingToParallelLoopsPass(ArrayRef tileSizes) { - return std::make_unique(tileSizes); -} - -std::unique_ptr> -mlir::createLinalgTilingToTiledLoopPass(ArrayRef tileSizes, - ArrayRef distributionTypes) { - return std::make_unique(tileSizes, - distributionTypes); +mlir::createLinalgTilingPass(ArrayRef tileSizes, + linalg::LinalgTilingLoopType loopType, + ArrayRef distributionTypes) { + return std::make_unique(tileSizes, loopType, + distributionTypes); } diff --git a/mlir/test/Dialect/Linalg/tile-conv-padding.mlir b/mlir/test/Dialect/Linalg/tile-conv-padding.mlir --- a/mlir/test/Dialect/Linalg/tile-conv-padding.mlir +++ b/mlir/test/Dialect/Linalg/tile-conv-padding.mlir @@ -1,5 +1,5 @@ -// RUN: mlir-opt %s -linalg-tile="linalg-tile-sizes=2,3,0,0,4" | FileCheck %s -check-prefix=TILE-23004 -// RUN: mlir-opt %s -linalg-tile="linalg-tile-sizes=2" | FileCheck %s -check-prefix=TILE-20000 +// RUN: mlir-opt %s -linalg-tile="tile-sizes=2,3,0,0,4" | FileCheck %s -check-prefix=TILE-23004 +// RUN: mlir-opt %s -linalg-tile="tile-sizes=2" | FileCheck %s -check-prefix=TILE-20000 // TILE-23004-DAG: #[[$strided4D:.*]] = affine_map<(d0, d1, d2, d3)[s0, s1, s2, s3] -> (d0 * s1 + s0 + d1 * s2 + d2 * s3 + d3)> // TILE-20000-DAG: #[[$strided4D:.*]] = affine_map<(d0, d1, d2, d3)[s0, s1, s2, s3] -> (d0 * s1 + s0 + d1 * s2 + d2 * s3 + d3)> diff --git a/mlir/test/Dialect/Linalg/tile-conv.mlir b/mlir/test/Dialect/Linalg/tile-conv.mlir --- a/mlir/test/Dialect/Linalg/tile-conv.mlir +++ b/mlir/test/Dialect/Linalg/tile-conv.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -linalg-tile="linalg-tile-sizes=2,3,0,0,4" | FileCheck %s -check-prefix=TILE-23004 +// RUN: mlir-opt %s -linalg-tile="tile-sizes=2,3,0,0,4" | FileCheck %s -check-prefix=TILE-23004 // TILE-23004-DAG: #[[$D0x30pS0x10:.*]] = affine_map<(d0) -> (d0 * 30)> // TILE-23004-DAG: #[[$S0x10p90D0x30pS1:.*]] = affine_map<(d0)[s0, s1] -> (s0 * 10 + 51, d0 * -30 + s0 * 10 + s1 * 30)> diff --git a/mlir/test/Dialect/Linalg/tile-indexed.mlir b/mlir/test/Dialect/Linalg/tile-indexed.mlir --- a/mlir/test/Dialect/Linalg/tile-indexed.mlir +++ b/mlir/test/Dialect/Linalg/tile-indexed.mlir @@ -1,6 +1,6 @@ -// RUN: mlir-opt %s -linalg-tile="linalg-tile-sizes=10,25" -split-input-file | FileCheck %s -check-prefix=TILE-10n25 -// RUN: mlir-opt %s -linalg-tile="linalg-tile-sizes=25,0" -split-input-file | FileCheck %s -check-prefix=TILE-25n0 -// RUN: mlir-opt %s -linalg-tile="linalg-tile-sizes=0,25" -split-input-file | FileCheck %s -check-prefix=TILE-0n25 +// RUN: mlir-opt %s -linalg-tile="tile-sizes=10,25" -split-input-file | FileCheck %s -check-prefix=TILE-10n25 +// RUN: mlir-opt %s -linalg-tile="tile-sizes=25,0" -split-input-file | FileCheck %s -check-prefix=TILE-25n0 +// RUN: mlir-opt %s -linalg-tile="tile-sizes=0,25" -split-input-file | FileCheck %s -check-prefix=TILE-0n25 func @indexed_vector(%arg0: memref<50xindex>) { linalg.generic {indexing_maps = [affine_map<(i) -> (i)>], diff --git a/mlir/test/Dialect/Linalg/tile-pad-tensor-op.mlir b/mlir/test/Dialect/Linalg/tile-pad-tensor-op.mlir --- a/mlir/test/Dialect/Linalg/tile-pad-tensor-op.mlir +++ b/mlir/test/Dialect/Linalg/tile-pad-tensor-op.mlir @@ -1,6 +1,6 @@ -// RUN: mlir-opt %s -linalg-tile="linalg-tile-sizes=2,3" -cse -split-input-file | \ +// RUN: mlir-opt %s -linalg-tile="tile-sizes=2,3" -cse -split-input-file | \ // RUN: FileCheck %s -check-prefix=TILE2 -// RUN: mlir-opt %s -linalg-tile="linalg-tile-sizes=0,3" -resolve-shaped-type-result-dims -cse -split-input-file | \ +// RUN: mlir-opt %s -linalg-tile="tile-sizes=0,3" -resolve-shaped-type-result-dims -cse -split-input-file | \ // RUN: FileCheck %s -check-prefix=TILE1 // TILE2-DAG: #[[MAP0:.*]] = affine_map<()[s0] -> (s0 + 8)> diff --git a/mlir/test/Dialect/Linalg/tile-parallel-reduce.mlir b/mlir/test/Dialect/Linalg/tile-parallel-reduce.mlir --- a/mlir/test/Dialect/Linalg/tile-parallel-reduce.mlir +++ b/mlir/test/Dialect/Linalg/tile-parallel-reduce.mlir @@ -1,6 +1,6 @@ -// RUN: mlir-opt %s -linalg-tile-to-parallel-loops="linalg-tile-sizes=2,4,8" -split-input-file | FileCheck %s -// RUN: mlir-opt %s -linalg-tile-to-parallel-loops="linalg-tile-sizes=2" -split-input-file | FileCheck %s -check-prefix=TILE1 -// RUN: mlir-opt %s -linalg-tile-to-parallel-loops="linalg-tile-sizes=2,4" -split-input-file | FileCheck %s -check-prefix=TILE2 +// RUN: mlir-opt %s -linalg-tile="tile-sizes=2,4,8 loop-type=parallel" -split-input-file | FileCheck %s +// RUN: mlir-opt %s -linalg-tile="tile-sizes=2 loop-type=parallel" -split-input-file | FileCheck %s -check-prefix=TILE1 +// RUN: mlir-opt %s -linalg-tile="tile-sizes=2,4 loop-type=parallel" -split-input-file | FileCheck %s -check-prefix=TILE2 func @gemm(%arg0 : memref, %arg1 : memref, diff --git a/mlir/test/Dialect/Linalg/tile-parallel.mlir b/mlir/test/Dialect/Linalg/tile-parallel.mlir --- a/mlir/test/Dialect/Linalg/tile-parallel.mlir +++ b/mlir/test/Dialect/Linalg/tile-parallel.mlir @@ -1,7 +1,7 @@ -// RUN: mlir-opt %s -linalg-tile-to-parallel-loops="linalg-tile-sizes=2" | FileCheck %s -check-prefix=TILE-2 -// RUN: mlir-opt %s -linalg-tile-to-parallel-loops="linalg-tile-sizes=0,2" | FileCheck %s -check-prefix=TILE-02 -// RUN: mlir-opt %s -linalg-tile-to-parallel-loops="linalg-tile-sizes=0,0,2" | FileCheck %s -check-prefix=TILE-002 -// RUN: mlir-opt %s -linalg-tile-to-parallel-loops="linalg-tile-sizes=2,3,4" | FileCheck %s -check-prefix=TILE-234 +// RUN: mlir-opt %s -linalg-tile="tile-sizes=2 loop-type=parallel" | FileCheck %s -check-prefix=TILE-2 +// RUN: mlir-opt %s -linalg-tile="tile-sizes=0,2 loop-type=parallel" | FileCheck %s -check-prefix=TILE-02 +// RUN: mlir-opt %s -linalg-tile="tile-sizes=0,0,2 loop-type=parallel" | FileCheck %s -check-prefix=TILE-002 +// RUN: mlir-opt %s -linalg-tile="tile-sizes=2,3,4 loop-type=parallel" | FileCheck %s -check-prefix=TILE-234 #id_2d = affine_map<(i, j) -> (i, j)> #pointwise_2d_trait = { diff --git a/mlir/test/Dialect/Linalg/tile-simple-conv.mlir b/mlir/test/Dialect/Linalg/tile-simple-conv.mlir --- a/mlir/test/Dialect/Linalg/tile-simple-conv.mlir +++ b/mlir/test/Dialect/Linalg/tile-simple-conv.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -linalg-tile="linalg-tile-sizes=2,3,4" | FileCheck %s +// RUN: mlir-opt %s -linalg-tile="tile-sizes=2,3,4" | FileCheck %s // CHECK-DAG: #[[MAP0:.*]] = affine_map<(d0)[s0] -> (2, -d0 + s0)> // CHECK-DAG: #[[MAP1:.*]] = affine_map<(d0)[s0, s1] -> (s0 + 2, -d0 + s0 + s1)> diff --git a/mlir/test/Dialect/Linalg/tile-tensors.mlir b/mlir/test/Dialect/Linalg/tile-tensors.mlir --- a/mlir/test/Dialect/Linalg/tile-tensors.mlir +++ b/mlir/test/Dialect/Linalg/tile-tensors.mlir @@ -1,5 +1,5 @@ -// RUN: mlir-opt %s -linalg-tile="linalg-tile-sizes=2,3,4" -split-input-file | FileCheck %s -// RUN: mlir-opt %s -linalg-tile-to-tiled-loop="linalg-tile-sizes=2,3,4 linalg-distribution-types=block_x,block_y,none" -split-input-file | FileCheck %s -check-prefix=TLOOP +// RUN: mlir-opt %s -linalg-tile="tile-sizes=2,3,4" -split-input-file | FileCheck %s +// RUN: mlir-opt %s -linalg-tile="tile-sizes=2,3,4 loop-type=tiled_loop distribution-types=block_x,block_y,none" -split-input-file | FileCheck %s -check-prefix=TLOOP // CHECK-LABEL: func @matmul_tensors( // CHECK-SAME: %[[TA:[0-9a-z]+]]: tensor diff --git a/mlir/test/Dialect/Linalg/tile.mlir b/mlir/test/Dialect/Linalg/tile.mlir --- a/mlir/test/Dialect/Linalg/tile.mlir +++ b/mlir/test/Dialect/Linalg/tile.mlir @@ -1,7 +1,7 @@ -// RUN: mlir-opt %s -linalg-tile="linalg-tile-sizes=2" -mlir-disable-threading=true | FileCheck %s -check-prefix=TILE-2 -// RUN: mlir-opt %s -linalg-tile="linalg-tile-sizes=0,2" -mlir-disable-threading=true | FileCheck %s -check-prefix=TILE-02 -// RUN: mlir-opt %s -linalg-tile="linalg-tile-sizes=0,0,2" -mlir-disable-threading=true | FileCheck %s -check-prefix=TILE-002 -// RUN: mlir-opt %s -linalg-tile="linalg-tile-sizes=2,3,4" -mlir-disable-threading=true | FileCheck %s -check-prefix=TILE-234 +// RUN: mlir-opt %s -linalg-tile="tile-sizes=2" -mlir-disable-threading=true | FileCheck %s -check-prefix=TILE-2 +// RUN: mlir-opt %s -linalg-tile="tile-sizes=0,2" -mlir-disable-threading=true | FileCheck %s -check-prefix=TILE-02 +// RUN: mlir-opt %s -linalg-tile="tile-sizes=0,0,2" -mlir-disable-threading=true | FileCheck %s -check-prefix=TILE-002 +// RUN: mlir-opt %s -linalg-tile="tile-sizes=2,3,4" -mlir-disable-threading=true | FileCheck %s -check-prefix=TILE-234 // TILE-2-DAG: #[[$strided1D:.*]] = affine_map<(d0)[s0] -> (d0 + s0)> // TILE-02-DAG: #[[$strided1D:.*]] = affine_map<(d0)[s0] -> (d0 + s0)> diff --git a/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-1d-call.mlir b/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-1d-call.mlir --- a/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-1d-call.mlir +++ b/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-1d-call.mlir @@ -3,7 +3,7 @@ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext \ // RUN: | FileCheck %s -// RUN: mlir-opt %s -linalg-tile="linalg-tile-sizes=4" -convert-linalg-to-loops -convert-scf-to-std \ +// RUN: mlir-opt %s -linalg-tile="tile-sizes=4" -convert-linalg-to-loops -convert-scf-to-std \ // RUN: -convert-linalg-to-llvm -lower-affine -convert-scf-to-std --convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e main -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext \ @@ -14,7 +14,7 @@ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext \ // RUN: | FileCheck %s -// RUN: mlir-opt %s -linalg-tile="linalg-tile-sizes=4" \ +// RUN: mlir-opt %s -linalg-tile="tile-sizes=4" \ // RUN: -test-conv-vectorization="tile-sizes=1,3" -convert-linalg-to-llvm -lower-affine -convert-scf-to-std -convert-vector-to-llvm --convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e main -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext \ diff --git a/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-1d-nwc-wcf-call.mlir b/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-1d-nwc-wcf-call.mlir --- a/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-1d-nwc-wcf-call.mlir +++ b/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-1d-nwc-wcf-call.mlir @@ -3,7 +3,7 @@ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext \ // RUN: | FileCheck %s -// RUN: mlir-opt %s -linalg-tile="linalg-tile-sizes=2,4" -convert-linalg-to-loops -convert-scf-to-std \ +// RUN: mlir-opt %s -linalg-tile="tile-sizes=2,4" -convert-linalg-to-loops -convert-scf-to-std \ // RUN: -convert-linalg-to-llvm -lower-affine -convert-scf-to-std --convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e main -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext \ @@ -14,7 +14,7 @@ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext \ // RUN: | FileCheck %s -// RUN: mlir-opt %s -linalg-tile="linalg-tile-sizes=2,4" \ +// RUN: mlir-opt %s -linalg-tile="tile-sizes=2,4" \ // RUN: -test-conv-vectorization="tile-sizes=1,1,1,3,3" -convert-linalg-to-llvm -lower-affine -convert-scf-to-std -convert-vector-to-llvm --convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e main -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext \ diff --git a/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-2d-call.mlir b/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-2d-call.mlir --- a/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-2d-call.mlir +++ b/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-2d-call.mlir @@ -3,7 +3,7 @@ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext \ // RUN: | FileCheck %s -// RUN: mlir-opt %s -linalg-tile="linalg-tile-sizes=2,2" -convert-linalg-to-loops -convert-scf-to-std \ +// RUN: mlir-opt %s -linalg-tile="tile-sizes=2,2" -convert-linalg-to-loops -convert-scf-to-std \ // RUN: -convert-linalg-to-llvm -lower-affine -convert-scf-to-std --convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e main -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext \ @@ -14,7 +14,7 @@ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext \ // RUN: | FileCheck %s -// RUN: mlir-opt %s -linalg-tile="linalg-tile-sizes=2,2" \ +// RUN: mlir-opt %s -linalg-tile="tile-sizes=2,2" \ // RUN: -test-conv-vectorization="tile-sizes=1,1,3,3" -convert-linalg-to-llvm -lower-affine -convert-scf-to-std -convert-vector-to-llvm --convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e main -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext \ diff --git a/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-2d-nhwc-hwcf-call.mlir b/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-2d-nhwc-hwcf-call.mlir --- a/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-2d-nhwc-hwcf-call.mlir +++ b/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-2d-nhwc-hwcf-call.mlir @@ -3,7 +3,7 @@ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext \ // RUN: | FileCheck %s -// RUN: mlir-opt %s -linalg-tile="linalg-tile-sizes=2,3,3,2" -convert-linalg-to-loops -convert-scf-to-std \ +// RUN: mlir-opt %s -linalg-tile="tile-sizes=2,3,3,2" -convert-linalg-to-loops -convert-scf-to-std \ // RUN: -convert-linalg-to-llvm -lower-affine -convert-scf-to-std --convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e main -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext \ @@ -14,7 +14,7 @@ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext \ // RUN: | FileCheck %s -// RUN: mlir-opt %s -linalg-tile="linalg-tile-sizes=2,3,3,2" \ +// RUN: mlir-opt %s -linalg-tile="tile-sizes=2,3,3,2" \ // RUN: -test-conv-vectorization="tile-sizes=1,1,1,1,3,3,3" -convert-linalg-to-llvm -lower-affine -convert-scf-to-std -convert-vector-to-llvm --convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e main -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext \ diff --git a/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-3d-call.mlir b/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-3d-call.mlir --- a/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-3d-call.mlir +++ b/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-3d-call.mlir @@ -3,7 +3,7 @@ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext \ // RUN: | FileCheck %s -// RUN: mlir-opt %s -linalg-tile="linalg-tile-sizes=2,2,2" -convert-linalg-to-loops -convert-scf-to-std \ +// RUN: mlir-opt %s -linalg-tile="tile-sizes=2,2,2" -convert-linalg-to-loops -convert-scf-to-std \ // RUN: -convert-linalg-to-llvm -lower-affine -convert-scf-to-std --convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e main -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext \ @@ -14,7 +14,7 @@ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext \ // RUN: | FileCheck %s -// RUN: mlir-opt %s -linalg-tile="linalg-tile-sizes=2,2,2" \ +// RUN: mlir-opt %s -linalg-tile="tile-sizes=2,2,2" \ // RUN: -test-conv-vectorization="tile-sizes=1,1,1,3,3,3" -convert-linalg-to-llvm -lower-affine -convert-scf-to-std -convert-vector-to-llvm --convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e main -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext \ diff --git a/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-3d-ndhwc-dhwcf-call.mlir b/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-3d-ndhwc-dhwcf-call.mlir --- a/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-3d-ndhwc-dhwcf-call.mlir +++ b/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-3d-ndhwc-dhwcf-call.mlir @@ -3,7 +3,7 @@ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext \ // RUN: | FileCheck %s -// RUN: mlir-opt %s -linalg-tile="linalg-tile-sizes=0,5,5,5" -convert-linalg-to-loops -convert-scf-to-std \ +// RUN: mlir-opt %s -linalg-tile="tile-sizes=0,5,5,5" -convert-linalg-to-loops -convert-scf-to-std \ // RUN: -convert-linalg-to-llvm -lower-affine -convert-scf-to-std --convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e main -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext \ @@ -14,7 +14,7 @@ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext \ // RUN: | FileCheck %s -// RUN: mlir-opt %s -linalg-tile="linalg-tile-sizes=0,5,5,5" \ +// RUN: mlir-opt %s -linalg-tile="tile-sizes=0,5,5,5" \ // RUN: -test-conv-vectorization="tile-sizes=1,1,1,1,1,3,3,3,3" -convert-linalg-to-llvm -lower-affine -convert-scf-to-std -convert-vector-to-llvm --convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e main -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext \ diff --git a/mlir/test/Integration/Dialect/Linalg/CPU/test-tensor-matmul.mlir b/mlir/test/Integration/Dialect/Linalg/CPU/test-tensor-matmul.mlir --- a/mlir/test/Integration/Dialect/Linalg/CPU/test-tensor-matmul.mlir +++ b/mlir/test/Integration/Dialect/Linalg/CPU/test-tensor-matmul.mlir @@ -5,7 +5,7 @@ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext \ // RUN: | FileCheck %s -// RUN: mlir-opt %s -linalg-tile="linalg-tile-sizes=1,2,3" -linalg-bufferize \ +// RUN: mlir-opt %s -linalg-tile="tile-sizes=1,2,3" -linalg-bufferize \ // RUN: -scf-bufferize -std-bufferize -tensor-constant-bufferize -tensor-bufferize \ // RUN: -func-bufferize \ // RUN: -finalizing-bufferize -convert-linalg-to-loops -convert-scf-to-std -convert-scf-to-std \