diff --git a/mlir/test/Dialect/Linalg/interchange.mlir b/mlir/test/Dialect/Linalg/interchange.mlir --- a/mlir/test/Dialect/Linalg/interchange.mlir +++ b/mlir/test/Dialect/Linalg/interchange.mlir @@ -1,5 +1,5 @@ -// RUN: mlir-opt %s -test-linalg-transform-patterns=test-interchange-pattern=4,0,3,1,2 | FileCheck %s -// RUN: mlir-opt %s -test-linalg-transform-patterns=test-interchange-pattern=4,0,3,1,2 -test-linalg-transform-patterns=test-interchange-pattern=1,3,4,2,0 | FileCheck --check-prefix=CANCEL-OUT %s +// RUN: mlir-opt %s -test-linalg-codegen-strategy="anchor-op=linalg.generic iterator-interchange=4,0,3,1,2" | FileCheck %s +// RUN: mlir-opt %s -test-linalg-codegen-strategy="anchor-op=linalg.generic iterator-interchange=4,0,3,1,2" -test-linalg-codegen-strategy="anchor-op=linalg.generic iterator-interchange=1,3,4,2,0" | FileCheck --check-prefix=CANCEL-OUT %s #map0 = affine_map<(d0, d1, d2, d3, d4) -> (d0, d1, d2, d3, d4)> #map1 = affine_map<(d0, d1, d2, d3, d4) -> (d0, d1, d3)> diff --git a/mlir/test/lib/Dialect/Linalg/TestLinalgTransforms.cpp b/mlir/test/lib/Dialect/Linalg/TestLinalgTransforms.cpp --- a/mlir/test/lib/Dialect/Linalg/TestLinalgTransforms.cpp +++ b/mlir/test/lib/Dialect/Linalg/TestLinalgTransforms.cpp @@ -114,9 +114,6 @@ *this, "tile-sizes", llvm::cl::desc("Linalg tile sizes for test-tile-pattern"), llvm::cl::ZeroOrMore, llvm::cl::MiscFlags::CommaSeparated}; - ListOption testInterchangePattern{ - *this, "test-interchange-pattern", llvm::cl::MiscFlags::CommaSeparated, - llvm::cl::desc("Test the interchange pattern.")}; ListOption testTiledLoopPeeling{ *this, "test-tiled-loop-peeling", llvm::cl::desc("Test peeling of linalg.tiled_loop ops"), @@ -612,17 +609,6 @@ (void)applyPatternsAndFoldGreedily(funcOp, std::move(tilingPattern)); } -static void applyInterchangePattern(FuncOp funcOp, - ArrayRef interchangeVector) { - MLIRContext *context = funcOp.getContext(); - RewritePatternSet interchangePattern(context); - interchangePattern.add( - context, interchangeVector, - LinalgTransformationFilter(ArrayRef{}, - Identifier::get("interchange", context))); - (void)applyPatternsAndFoldGreedily(funcOp, std::move(interchangePattern)); -} - static constexpr char kPeeledLoopsLabel[] = "__peeled_loops__"; static constexpr char kPartialIterationLabel[] = "__partial_iteration__"; @@ -742,8 +728,6 @@ if (testTileScalarizeDynamicDims) return applyTilePattern(getFunction(), loopType, tileSizes, /*peeledLoops=*/{}, /*scalarizeDynamicDims=*/true); - if (testInterchangePattern.hasValue()) - return applyInterchangePattern(getFunction(), testInterchangePattern); if (testDecomposeConvolutionPattern) return applyDecomposeConvolutionPatterns(getFunction()); }