Skip to content

Get rid of noisy debug log in verifyOpAndAdjustFlags. #84677

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
Mar 12, 2024

Conversation

jlebar
Copy link
Member

@jlebar jlebar commented Mar 10, 2024

This debug log adds noise to a large fraction of other debug logs when you
run with -debug, because it prints "Verifying operation: blah blah\n" whenever
those other debug logs dump an op.

You can use -debug-only to get around this, but sometimes -debug really is
what's called for!

This debug log adds noise to a large fraction of *other* debug logs when you
run with -debug, because it prints "Verifying operation: blah blah\n" whenever
those other debug logs dump an op.

You can use -debug-only to get around this, but sometimes -debug really is
what's called for!
@llvmbot llvmbot added mlir:core MLIR Core Infrastructure mlir labels Mar 10, 2024
@jlebar jlebar requested a review from joker-eph March 10, 2024 14:03
@llvmbot
Copy link
Member

llvmbot commented Mar 10, 2024

@llvm/pr-subscribers-mlir

@llvm/pr-subscribers-mlir-core

Author: Justin Lebar (jlebar)

Changes

This debug log adds noise to a large fraction of other debug logs when you
run with -debug, because it prints "Verifying operation: blah blah\n" whenever
those other debug logs dump an op.

You can use -debug-only to get around this, but sometimes -debug really is
what's called for!


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

1 Files Affected:

  • (modified) mlir/lib/IR/AsmPrinter.cpp (-3)
diff --git a/mlir/lib/IR/AsmPrinter.cpp b/mlir/lib/IR/AsmPrinter.cpp
index 8d75349f8eed45..456cf6a2c27783 100644
--- a/mlir/lib/IR/AsmPrinter.cpp
+++ b/mlir/lib/IR/AsmPrinter.cpp
@@ -1895,9 +1895,6 @@ static OpPrintingFlags verifyOpAndAdjustFlags(Operation *op,
       printerFlags.shouldAssumeVerified())
     return printerFlags;
 
-  LLVM_DEBUG(llvm::dbgs() << DEBUG_TYPE << ": Verifying operation: "
-                          << op->getName() << "\n");
-
   // Ignore errors emitted by the verifier. We check the thread id to avoid
   // consuming other threads' errors.
   auto parentThreadId = llvm::get_threadid();

@jlebar
Copy link
Member Author

jlebar commented Mar 12, 2024

@joker-eph friendly ping

Copy link
Collaborator

@joker-eph joker-eph left a comment

Choose a reason for hiding this comment

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

Sorry I missed it when you sent it initally

@jlebar
Copy link
Member Author

jlebar commented Mar 12, 2024

No worries, and thank you!

@jlebar jlebar merged commit 6095f8b into llvm:main Mar 12, 2024
@jlebar jlebar deleted the verifier-debug-log branch March 12, 2024 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mlir:core MLIR Core Infrastructure mlir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants