Skip to content

[mlir][linalg][nfc] Move vectorization tests #141656

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 30, 2025

Conversation

banach-space
Copy link
Contributor

@banach-space banach-space commented May 27, 2025

Moves all the remaining Linalg vectorization tests from:

  • mlir/tests/Dialect/Linalg/*

to:

  • mlir/tests/Dialect/Linalg/vectorization/*

To maintain consistency within tests, vectorize-convolution.mlir
was updated to use:

  • transform.structured.vectorize_children_and_apply_patterns

instead of:

  • -test-linalg-transform-patterns=test-linalg-to-vector-patterns

This change required minor updates to some CHECK lines, reflecting
only reordering of ops due to an additional pattern being applied.

Closes #141025

Moves:
  * mlir/test/Dialect/Linalg/vectorization-with-patterns.mlir
  * mlir/test/Dialect/Linalg/vectorization.mlir
  * mlir/test/Dialect/Linalg/vectorization-unsupported.mlir

to:
  * mlir/test/Dialect/Linalg/vectorization/

This patch implements part of llvm#141025 - please see the ticket for full
context.
@llvmbot
Copy link
Member

llvmbot commented May 27, 2025

@llvm/pr-subscribers-mlir

@llvm/pr-subscribers-mlir-linalg

Author: Andrzej Warzyński (banach-space)

Changes

Moves:

  • mlir/test/Dialect/Linalg/vectorization-with-patterns.mlir
  • mlir/test/Dialect/Linalg/vectorization.mlir
  • mlir/test/Dialect/Linalg/vectorization-unsupported.mlir

to:

  • mlir/test/Dialect/Linalg/vectorization/

This patch implements part of #141025 - please see the ticket for full
context.


Full diff: https://github.com/llvm/llvm-project/pull/141656.diff

3 Files Affected:

  • (renamed) mlir/test/Dialect/Linalg/vectorization/linalg-ops-with-patterns.mlir ()
  • (renamed) mlir/test/Dialect/Linalg/vectorization/linalg-ops.mlir ()
  • (renamed) mlir/test/Dialect/Linalg/vectorization/unsupported.mlir ()
diff --git a/mlir/test/Dialect/Linalg/vectorization-with-patterns.mlir b/mlir/test/Dialect/Linalg/vectorization/linalg-ops-with-patterns.mlir
similarity index 100%
rename from mlir/test/Dialect/Linalg/vectorization-with-patterns.mlir
rename to mlir/test/Dialect/Linalg/vectorization/linalg-ops-with-patterns.mlir
diff --git a/mlir/test/Dialect/Linalg/vectorization.mlir b/mlir/test/Dialect/Linalg/vectorization/linalg-ops.mlir
similarity index 100%
rename from mlir/test/Dialect/Linalg/vectorization.mlir
rename to mlir/test/Dialect/Linalg/vectorization/linalg-ops.mlir
diff --git a/mlir/test/Dialect/Linalg/vectorization-unsupported.mlir b/mlir/test/Dialect/Linalg/vectorization/unsupported.mlir
similarity index 100%
rename from mlir/test/Dialect/Linalg/vectorization-unsupported.mlir
rename to mlir/test/Dialect/Linalg/vectorization/unsupported.mlir

Copy link
Contributor

@hanhanW hanhanW left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm okay with reviewing a large change if you break it into several commits, like what you're doing now. (I think the only difference is that it is PR-based, and I can do commit-based within a PR.)

Would it be better to submit a single PR for the ticket?

@banach-space
Copy link
Contributor Author

Would it be better to submit a single PR for the ticket?

Sure, let me extend this PR.

TBH, I kept it small to make sure some progress is made - I am trying to squeeze this in between other things 😅

* In vectorize-convolution.mlir, switch from
  `-test-linalg-transform-patterns=test-linalg-to-vector-patterns` to
  `transform.structured.vectorize_children_and_apply_patterns` (for
  consistency with other tests for vectorization).
* Move + rename the remaining vectorization tests.
* Add comments.
@hanhanW
Copy link
Contributor

hanhanW commented May 30, 2025

You may want to add Closes https://github.com/llvm/llvm-project/issues/141025 in the PR description. This is the last PR, right?

@banach-space banach-space merged commit 85f791d into llvm:main May 30, 2025
11 checks passed
@banach-space banach-space deleted the andrzej/linalg/move_tests branch May 30, 2025 08:21
sivan-shani pushed a commit to sivan-shani/llvm-project that referenced this pull request Jun 3, 2025
Moves all the remaining Linalg vectorization tests from:
  * `mlir/tests/Dialect/Linalg/*`

to:
  * `mlir/tests/Dialect/Linalg/vectorization/*`

To maintain consistency within tests,  `vectorize-convolution.mlir` 
was updated to use:
  *  `transform.structured.vectorize_children_and_apply_patterns` 

instead of:
  * `-test-linalg-transform-patterns=test-linalg-to-vector-patterns`

This change required minor updates to some `CHECK` lines, reflecting
only reordering of ops due to an additional pattern being applied.

Closes llvm#141025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[mlir][linalg] Re-organise tests for vectorization
3 participants