Skip to content

[mlir][linalg][test] Fix flaky test linalg-morph-multi-step.mlir #152805

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 1 commit into from
Aug 8, 2025

Conversation

rupprecht
Copy link
Collaborator

This test runs mlir-opt %s | mlir-opt %s | FileCheck to test the round trip behavior, but the second command takes input from the pipe, not the lit test, so it should be mlir-opt %s | mlir-opt | FileCheck.

For some reason I haven't figured out, this causes ~50% flakiness when testing in certain environments (not reproducible in my shell, but reproduces in an internal buildbot), due to the pipeline raising SIGPIPE.

Test added in #148424.

@llvmbot
Copy link
Member

llvmbot commented Aug 8, 2025

@llvm/pr-subscribers-mlir-linalg

@llvm/pr-subscribers-mlir

Author: Jordan Rupprecht (rupprecht)

Changes

This test runs mlir-opt %s | mlir-opt %s | FileCheck to test the round trip behavior, but the second command takes input from the pipe, not the lit test, so it should be mlir-opt %s | mlir-opt | FileCheck.

For some reason I haven't figured out, this causes ~50% flakiness when testing in certain environments (not reproducible in my shell, but reproduces in an internal buildbot), due to the pipeline raising SIGPIPE.

Test added in #148424.


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

1 Files Affected:

  • (modified) mlir/test/Dialect/Linalg/linalg-morph-multi-step.mlir (+1-1)
diff --git a/mlir/test/Dialect/Linalg/linalg-morph-multi-step.mlir b/mlir/test/Dialect/Linalg/linalg-morph-multi-step.mlir
index ab50a44a37067..bdd29b96346e1 100644
--- a/mlir/test/Dialect/Linalg/linalg-morph-multi-step.mlir
+++ b/mlir/test/Dialect/Linalg/linalg-morph-multi-step.mlir
@@ -1,5 +1,5 @@
 // RUN: mlir-opt %s -linalg-morph-ops=named-to-generic |  FileCheck %s  --check-prefix=NAMED_TO_GENERIC
-// RUN: mlir-opt %s -linalg-morph-ops=named-to-generic |  mlir-opt %s -linalg-morph-ops=generic-to-named | \
+// RUN: mlir-opt %s -linalg-morph-ops=named-to-generic |  mlir-opt -linalg-morph-ops=generic-to-named | \
 // RUN:   FileCheck %s  --check-prefix=ROUND_TRIP
 
 func.func @exp(%A : tensor<16x8xf32>, %B : tensor<16x8xf32>) ->  tensor<16x8xf32> {

@rengolin
Copy link
Member

rengolin commented Aug 8, 2025

Totally missed that, thanks!

@rupprecht rupprecht merged commit 88b7915 into llvm:main Aug 8, 2025
12 checks passed
rupprecht added a commit that referenced this pull request Aug 11, 2025
…153080)

This is another followup to a test added in #148424 that I missed in
#152805

This test runs `mlir-opt %s | mlir-opt %s | FileCheck` to test the round
trip behavior, but the second command takes input from the pipe, not the
lit test, so it should be `mlir-opt %s | mlir-opt | FileCheck`.
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.

3 participants