Skip to content

[mlir] Fix CI breakage from https://github.com/llvm/llvm-project/pull/146228 #149378

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
Jul 17, 2025

Conversation

j2kun
Copy link
Contributor

@j2kun j2kun commented Jul 17, 2025

Some platforms print {anonymous} instead of the other two forms accepted by the test regex. This PR just removes the attempt to guess how the anonymous namespace will be printed.

@Kewen12 is there a way to trigger the particular CIs that failed in #146228 on this PR?

@j2kun j2kun requested a review from Kewen12 July 17, 2025 18:35
@j2kun j2kun changed the title Fix CI breakage from https://github.com/llvm/llvm-project/pull/146228 [mlir] Fix CI breakage from https://github.com/llvm/llvm-project/pull/146228 Jul 17, 2025
@llvmbot llvmbot added the mlir label Jul 17, 2025
@llvmbot
Copy link
Member

llvmbot commented Jul 17, 2025

@llvm/pr-subscribers-mlir

Author: Jeremy Kun (j2kun)

Changes

Some platforms print {anonymous} instead of the other two forms accepted by the test regex. This PR just removes the attempt to guess how the anonymous namespace will be printed.

@Kewen12 is there a way to trigger the particular CIs that failed in #146228 on this PR?


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

1 Files Affected:

  • (modified) mlir/test/IR/test-pattern-logging-listener.mlir (+14-7)
diff --git a/mlir/test/IR/test-pattern-logging-listener.mlir b/mlir/test/IR/test-pattern-logging-listener.mlir
index a1d27741a0723..e8f0d61a75960 100644
--- a/mlir/test/IR/test-pattern-logging-listener.mlir
+++ b/mlir/test/IR/test-pattern-logging-listener.mlir
@@ -2,14 +2,21 @@
 // RUN:   --allow-unregistered-dialect --debug-only=pattern-logging-listener 2>&1 | FileCheck %s
 
 // Check that when replacing an op with a new op, we get appropriate
-// pattern-logging lines. The regex is because the anonymous namespace is
-// printed differently on different platforms.
+// pattern-logging lines. The use of check same is to avoid the complexity of
+// matching the anonymous namespace prefix, which can be one of {anonymous} vs
+// {anonymous_namespace} vs `anonymous_namespace` (and maybe others?) on the
+// various platforms.
 
-// CHECK: [pattern-logging-listener] {{.anonymous.namespace.}}::ReplaceWithNewOp | notifyOperationInserted | test.new_op
-// CHECK: [pattern-logging-listener] {{.anonymous.namespace.}}::ReplaceWithNewOp | notifyOperationReplaced (with values) | test.replace_with_new_op
-// CHECK: [pattern-logging-listener] {{.anonymous.namespace.}}::ReplaceWithNewOp | notifyOperationModified | arith.addi
-// CHECK: [pattern-logging-listener] {{.anonymous.namespace.}}::ReplaceWithNewOp | notifyOperationModified | arith.addi
-// CHECK: [pattern-logging-listener] {{.anonymous.namespace.}}::ReplaceWithNewOp | notifyOperationErased | test.replace_with_new_op
+// CHECK: [pattern-logging-listener]
+// CHECK-SAME: ::ReplaceWithNewOp | notifyOperationInserted | test.new_op
+// CHECK: [pattern-logging-listener]
+// CHECK-SAME: ::ReplaceWithNewOp | notifyOperationReplaced (with values) | test.replace_with_new_op
+// CHECK: [pattern-logging-listener]
+// CHECK-SAME: ::ReplaceWithNewOp | notifyOperationModified | arith.addi
+// CHECK: [pattern-logging-listener]
+// CHECK-SAME: ::ReplaceWithNewOp | notifyOperationModified | arith.addi
+// CHECK: [pattern-logging-listener]
+// CHECK-SAME: ::ReplaceWithNewOp | notifyOperationErased | test.replace_with_new_op
 func.func @replace_with_new_op() -> i32 {
   %a = "test.replace_with_new_op"() : () -> (i32)
   %res = arith.addi %a, %a : i32

Copy link

⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo.
Please turn off Keep my email addresses private setting in your account.
See LLVM Developer Policy and LLVM Discourse for more information.

@Kewen12
Copy link
Contributor

Kewen12 commented Jul 17, 2025

Thanks for the quick fix!

is there a way to trigger the particular CIs that failed in #146228 on this PR?

These are post-commit bots, not sure if we can manually trigger the runs here. Maybe we can try to land and see how it goes.

I don't have the context for this work. wondering if @jpienaar or others could help with a quick review. Thanks!

@Kewen12
Copy link
Contributor

Kewen12 commented Jul 17, 2025

I checked this PR and built locally with the configs our bots use. It works. Approve to unblock the bots.

-- Testing: 1 tests, 1 workers --
PASS: MLIR :: IR/test-pattern-logging-listener.mlir (1 of 1)
Testing Time: 0.04s
Total Discovered Tests: 1
Passed: 1 (100.00%)

@joker-eph joker-eph merged commit a888026 into llvm:main Jul 17, 2025
11 checks passed
@jpienaar
Copy link
Member

Thanks! I don't actually know to trigger on specific one, the closests I've done is just use the docker images and launch locally (but that only works for some builders).

rupprecht added a commit that referenced this pull request Jul 19, 2025
…149634)

Debug flags are not provided in fully optimized builds.

Test added in #149378 / #146228
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants