diff --git a/mlir/lib/Dialect/Transform/Transforms/TransformInterpreterUtils.cpp b/mlir/lib/Dialect/Transform/Transforms/TransformInterpreterUtils.cpp index e6d692072267c1..41feffffaf97b3 100644 --- a/mlir/lib/Dialect/Transform/Transforms/TransformInterpreterUtils.cpp +++ b/mlir/lib/Dialect/Transform/Transforms/TransformInterpreterUtils.cpp @@ -61,8 +61,7 @@ LogicalResult transform::detail::expandPathsToMLIRFiles( it != itEnd && !ec; it.increment(ec)) { const std::string &fileName = it->path(); - if (it->type() != llvm::sys::fs::file_type::regular_file && - it->type() != llvm::sys::fs::file_type::symlink_file) { + if (it->type() != llvm::sys::fs::file_type::regular_file) { LLVM_DEBUG(DBGS() << " Skipping non-regular file '" << fileName << "'\n"); continue; diff --git a/mlir/test/Dialect/Transform/include/Library/lower-to-llvm.mlir b/mlir/test/Dialect/Transform/Library/lower-to-llvm.mlir similarity index 96% rename from mlir/test/Dialect/Transform/include/Library/lower-to-llvm.mlir rename to mlir/test/Dialect/Transform/Library/lower-to-llvm.mlir index afd1c89dd2b52f..0ba50bd2362b34 100644 --- a/mlir/test/Dialect/Transform/include/Library/lower-to-llvm.mlir +++ b/mlir/test/Dialect/Transform/Library/lower-to-llvm.mlir @@ -1,5 +1,4 @@ // RUN: mlir-opt %s -// No need to check anything else than parsing here, this is being used by another test as data. /// Schedule to lower to LLVM. module @lower_module_to_llvm attributes { transform.with_named_sequence } { diff --git a/mlir/test/Dialect/Transform/preload-library.mlir b/mlir/test/Dialect/Transform/preload-library.mlir index 9beefa44d673d9..61d22252dc61df 100644 --- a/mlir/test/Dialect/Transform/preload-library.mlir +++ b/mlir/test/Dialect/Transform/preload-library.mlir @@ -1,5 +1,5 @@ // RUN: mlir-opt %s \ -// RUN: -transform-preload-library=transform-library-paths=%p%{fs-sep}include%{fs-sep}test-interpreter-library \ +// RUN: -transform-preload-library=transform-library-paths=%p%{fs-sep}test-interpreter-library \ // RUN: -transform-interpreter=entry-point=private_helper \ // RUN: -split-input-file -verify-diagnostics diff --git a/mlir/test/Dialect/Transform/include/test-interpreter-external-concurrent-source.mlir b/mlir/test/Dialect/Transform/test-interpreter-external-concurrent-source.mlir similarity index 100% rename from mlir/test/Dialect/Transform/include/test-interpreter-external-concurrent-source.mlir rename to mlir/test/Dialect/Transform/test-interpreter-external-concurrent-source.mlir diff --git a/mlir/test/Dialect/Transform/test-interpreter-external-concurrent.mlir b/mlir/test/Dialect/Transform/test-interpreter-external-concurrent.mlir index 59c2b672a6e6b1..46a1a130d9bcb3 100644 --- a/mlir/test/Dialect/Transform/test-interpreter-external-concurrent.mlir +++ b/mlir/test/Dialect/Transform/test-interpreter-external-concurrent.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s --pass-pipeline="builtin.module(func.func(test-transform-dialect-interpreter{transform-file-name=%p%{fs-sep}include%{fs-sep}test-interpreter-external-concurrent-source.mlir}))" \ +// RUN: mlir-opt %s --pass-pipeline="builtin.module(func.func(test-transform-dialect-interpreter{transform-file-name=%p/test-interpreter-external-concurrent-source.mlir}))" \ // RUN: --verify-diagnostics // Exercising the pass on multiple functions of different lengths that may be diff --git a/mlir/test/Dialect/Transform/include/test-interpreter-external-source.mlir b/mlir/test/Dialect/Transform/test-interpreter-external-source.mlir similarity index 100% rename from mlir/test/Dialect/Transform/include/test-interpreter-external-source.mlir rename to mlir/test/Dialect/Transform/test-interpreter-external-source.mlir diff --git a/mlir/test/Dialect/Transform/test-interpreter-external-symbol-decl-and-schedule.mlir b/mlir/test/Dialect/Transform/test-interpreter-external-symbol-decl-and-schedule.mlir index 9e50ec1efac946..2c4812bf32b0f0 100644 --- a/mlir/test/Dialect/Transform/test-interpreter-external-symbol-decl-and-schedule.mlir +++ b/mlir/test/Dialect/Transform/test-interpreter-external-symbol-decl-and-schedule.mlir @@ -1,7 +1,7 @@ -// RUN: mlir-opt %s --pass-pipeline="builtin.module(test-transform-dialect-interpreter{transform-file-name=%p%{fs-sep}test-interpreter-external-symbol-decl.mlir transform-library-paths=%p%{fs-sep}include%{fs-sep}test-interpreter-library/definitions-self-contained.mlir})" \ +// RUN: mlir-opt %s --pass-pipeline="builtin.module(test-transform-dialect-interpreter{transform-file-name=%p/test-interpreter-external-symbol-decl.mlir transform-library-paths=%p/test-interpreter-library/definitions-self-contained.mlir})" \ // RUN: --verify-diagnostics -// RUN: mlir-opt %s --pass-pipeline="builtin.module(test-transform-dialect-interpreter{transform-file-name=%p%{fs-sep}test-interpreter-external-symbol-decl.mlir transform-library-paths=%p%{fs-sep}include%{fs-sep}test-interpreter-library/definitions-self-contained.mlir}, test-transform-dialect-interpreter{transform-file-name=%p%{fs-sep}test-interpreter-external-symbol-decl.mlir transform-library-paths=%p%{fs-sep}include%{fs-sep}test-interpreter-library/definitions-self-contained.mlir})" \ +// RUN: mlir-opt %s --pass-pipeline="builtin.module(test-transform-dialect-interpreter{transform-file-name=%p/test-interpreter-external-symbol-decl.mlir transform-library-paths=%p/test-interpreter-library/definitions-self-contained.mlir}, test-transform-dialect-interpreter{transform-file-name=%p/test-interpreter-external-symbol-decl.mlir transform-library-paths=%p/test-interpreter-library/definitions-self-contained.mlir})" \ // RUN: --verify-diagnostics // The external transform script has a declaration to the named sequence @foo, diff --git a/mlir/test/Dialect/Transform/test-interpreter-external-symbol-decl-dir.mlir b/mlir/test/Dialect/Transform/test-interpreter-external-symbol-decl-dir.mlir index 3681b913dc5b97..8b8254976e9aee 100644 --- a/mlir/test/Dialect/Transform/test-interpreter-external-symbol-decl-dir.mlir +++ b/mlir/test/Dialect/Transform/test-interpreter-external-symbol-decl-dir.mlir @@ -1,10 +1,10 @@ -// RUN: mlir-opt %s --pass-pipeline="builtin.module(test-transform-dialect-interpreter{transform-library-paths=%p%{fs-sep}include%{fs-sep}test-interpreter-library})" \ +// RUN: mlir-opt %s --pass-pipeline="builtin.module(test-transform-dialect-interpreter{transform-library-paths=%p%{fs-sep}test-interpreter-library})" \ // RUN: --verify-diagnostics --split-input-file | FileCheck %s -// RUN: mlir-opt %s --pass-pipeline="builtin.module(test-transform-dialect-interpreter{transform-library-paths=%p%{fs-sep}include%{fs-sep}test-interpreter-library/definitions-self-contained.mlir,%p%{fs-sep}include%{fs-sep}test-interpreter-library/definitions-with-unresolved.mlir})" \ +// RUN: mlir-opt %s --pass-pipeline="builtin.module(test-transform-dialect-interpreter{transform-library-paths=%p%{fs-sep}test-interpreter-library/definitions-self-contained.mlir,%p%{fs-sep}test-interpreter-library/definitions-with-unresolved.mlir})" \ // RUN: --verify-diagnostics --split-input-file | FileCheck %s -// RUN: mlir-opt %s --pass-pipeline="builtin.module(test-transform-dialect-interpreter{transform-library-paths=%p%{fs-sep}include%{fs-sep}test-interpreter-library}, test-transform-dialect-interpreter)" \ +// RUN: mlir-opt %s --pass-pipeline="builtin.module(test-transform-dialect-interpreter{transform-library-paths=%p%{fs-sep}test-interpreter-library}, test-transform-dialect-interpreter)" \ // RUN: --verify-diagnostics --split-input-file | FileCheck %s // The definition of the @foo named sequence is provided in another file. It diff --git a/mlir/test/Dialect/Transform/test-interpreter-external-symbol-decl-invalid.mlir b/mlir/test/Dialect/Transform/test-interpreter-external-symbol-decl-invalid.mlir index 060dab334ed438..c1bd071dc138d5 100644 --- a/mlir/test/Dialect/Transform/test-interpreter-external-symbol-decl-invalid.mlir +++ b/mlir/test/Dialect/Transform/test-interpreter-external-symbol-decl-invalid.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s --pass-pipeline="builtin.module(test-transform-dialect-interpreter{transform-library-paths=%p%{fs-sep}include%{fs-sep}test-interpreter-external-symbol-def-invalid.mlir}, test-transform-dialect-interpreter)" \ +// RUN: mlir-opt %s --pass-pipeline="builtin.module(test-transform-dialect-interpreter{transform-library-paths=%p/test-interpreter-external-symbol-def-invalid.mlir}, test-transform-dialect-interpreter)" \ // RUN: --verify-diagnostics --split-input-file // The definition of the @print_message named sequence is provided in another file. It diff --git a/mlir/test/Dialect/Transform/test-interpreter-external-symbol-decl.mlir b/mlir/test/Dialect/Transform/test-interpreter-external-symbol-decl.mlir index 8a35e981bd48b7..339e62072cd551 100644 --- a/mlir/test/Dialect/Transform/test-interpreter-external-symbol-decl.mlir +++ b/mlir/test/Dialect/Transform/test-interpreter-external-symbol-decl.mlir @@ -1,7 +1,7 @@ -// RUN: mlir-opt %s --pass-pipeline="builtin.module(test-transform-dialect-interpreter{transform-library-paths=%p%{fs-sep}include%{fs-sep}test-interpreter-library/definitions-self-contained.mlir})" \ +// RUN: mlir-opt %s --pass-pipeline="builtin.module(test-transform-dialect-interpreter{transform-library-paths=%p/test-interpreter-library/definitions-self-contained.mlir})" \ // RUN: --verify-diagnostics --split-input-file | FileCheck %s -// RUN: mlir-opt %s --pass-pipeline="builtin.module(test-transform-dialect-interpreter{transform-library-paths=%p%{fs-sep}include%{fs-sep}test-interpreter-library/definitions-self-contained.mlir}, test-transform-dialect-interpreter)" \ +// RUN: mlir-opt %s --pass-pipeline="builtin.module(test-transform-dialect-interpreter{transform-library-paths=%p/test-interpreter-library/definitions-self-contained.mlir}, test-transform-dialect-interpreter)" \ // RUN: --verify-diagnostics --split-input-file | FileCheck %s // The definition of the @print_message named sequence is provided in another diff --git a/mlir/test/Dialect/Transform/include/test-interpreter-external-symbol-def-invalid.mlir b/mlir/test/Dialect/Transform/test-interpreter-external-symbol-def-invalid.mlir similarity index 100% rename from mlir/test/Dialect/Transform/include/test-interpreter-external-symbol-def-invalid.mlir rename to mlir/test/Dialect/Transform/test-interpreter-external-symbol-def-invalid.mlir diff --git a/mlir/test/Dialect/Transform/test-interpreter-external.mlir b/mlir/test/Dialect/Transform/test-interpreter-external.mlir index ba8e0c6870dbf8..5ac6b66c817afe 100644 --- a/mlir/test/Dialect/Transform/test-interpreter-external.mlir +++ b/mlir/test/Dialect/Transform/test-interpreter-external.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s --pass-pipeline="builtin.module(test-transform-dialect-interpreter{transform-file-name=%p%{fs-sep}include%{fs-sep}test-interpreter-external-source.mlir})" \ +// RUN: mlir-opt %s --pass-pipeline="builtin.module(test-transform-dialect-interpreter{transform-file-name=%p/test-interpreter-external-source.mlir})" \ // RUN: --verify-diagnostics // The schedule in the separate file emits remarks at the payload root. diff --git a/mlir/test/Dialect/Transform/include/test-interpreter-library/definitions-self-contained.mlir b/mlir/test/Dialect/Transform/test-interpreter-library/definitions-self-contained.mlir similarity index 96% rename from mlir/test/Dialect/Transform/include/test-interpreter-library/definitions-self-contained.mlir rename to mlir/test/Dialect/Transform/test-interpreter-library/definitions-self-contained.mlir index 58a8f76c5791a2..66f0f1f62683b7 100644 --- a/mlir/test/Dialect/Transform/include/test-interpreter-library/definitions-self-contained.mlir +++ b/mlir/test/Dialect/Transform/test-interpreter-library/definitions-self-contained.mlir @@ -1,5 +1,4 @@ // RUN: mlir-opt %s -// No need to check anything else than parsing here, this is being used by another test as data. module attributes {transform.with_named_sequence} { transform.named_sequence private @private_helper(%arg0: !transform.any_op {transform.readonly}) { diff --git a/mlir/test/Dialect/Transform/include/test-interpreter-library/definitions-with-unresolved.mlir b/mlir/test/Dialect/Transform/test-interpreter-library/definitions-with-unresolved.mlir similarity index 78% rename from mlir/test/Dialect/Transform/include/test-interpreter-library/definitions-with-unresolved.mlir rename to mlir/test/Dialect/Transform/test-interpreter-library/definitions-with-unresolved.mlir index a3b315952b3097..b3d076f4698495 100644 --- a/mlir/test/Dialect/Transform/include/test-interpreter-library/definitions-with-unresolved.mlir +++ b/mlir/test/Dialect/Transform/test-interpreter-library/definitions-with-unresolved.mlir @@ -1,5 +1,4 @@ // RUN: mlir-opt %s -// No need to check anything else than parsing here, this is being used by another test as data. module attributes {transform.with_named_sequence} { transform.named_sequence @print_message(%arg0: !transform.any_op {transform.readonly}) diff --git a/utils/bazel/llvm-project-overlay/mlir/test/Dialect/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/test/Dialect/BUILD.bazel index 1fd6885db8bca9..e5b877a48d5e84 100644 --- a/utils/bazel/llvm-project-overlay/mlir/test/Dialect/BUILD.bazel +++ b/utils/bazel/llvm-project-overlay/mlir/test/Dialect/BUILD.bazel @@ -18,7 +18,11 @@ package(default_visibility = ["//visibility:public"]) ] + glob([ "IRDL/*.irdl.mlir", "LLVM/*-symbol-def.mlir", - "Transform/include/**/*.mlir", + "Transform/*-source.mlir", + "Transform/*-symbol-def.mlir", + "Transform/*-symbol-decl-and-schedule.mlir", + "Transform/Library/*.mlir", + "Transform/test-interpreter-library/*.mlir", ]), ) for src in glob( @@ -26,8 +30,15 @@ package(default_visibility = ["//visibility:public"]) exclude = [ "IRDL/*.irdl.mlir", "LLVM/*-symbol-def.mlir", + "Transform/*-source.mlir", + "Transform/*-symbol-def.mlir", "Transform/*-symbol-decl-and-schedule.mlir", - "Transform/include/**/*.mlir", + "Transform/*-symbol-decl-dir.mlir", + "Transform/*-symbol-decl-invalid.mlir", + "Transform/Library/*.mlir", + "Transform/preload-library.mlir", + "Transform/test-interpreter-library/*.mlir", + "Transform/test-repro-dump.mlir", ], ) ]