Skip to content

Commit

Permalink
Revert "[mlir][transform] Support symlinks in module loading. Reorgan…
Browse files Browse the repository at this point in the history
…ize tests. (#69329)"

This reverts commit f681225. That
commit changed the organization of the tests of the transform dialect
interpreter but did not take into account some tests that were added in
the meantime.
  • Loading branch information
ingomueller-net committed Oct 19, 2023
1 parent 9f0f606 commit c122b97
Show file tree
Hide file tree
Showing 15 changed files with 25 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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 } {
Expand Down
2 changes: 1 addition & 1 deletion mlir/test/Dialect/Transform/preload-library.mlir
Original file line number Diff line number Diff line change
@@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion mlir/test/Dialect/Transform/test-interpreter-external.mlir
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Original file line number Diff line number Diff line change
@@ -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}) {
Expand Down
Original file line number Diff line number Diff line change
@@ -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})
Expand Down
15 changes: 13 additions & 2 deletions utils/bazel/llvm-project-overlay/mlir/test/Dialect/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,27 @@ 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(
include = ["**/*.mlir"],
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",
],
)
]

0 comments on commit c122b97

Please sign in to comment.