This is an archive of the discontinued LLVM Phabricator instance.

[mlir] drop debug tags after TransformInterpreterPassBase
ClosedPublic

Authored by ftynse on May 31 2023, 1:46 AM.

Details

Summary

The pass attaches attributes to operations for repro generation
purposes, but never removes them. This is not desirable when the pass
actually succeeds.

Diff Detail

Event Timeline

ftynse created this revision.May 31 2023, 1:46 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 31 2023, 1:46 AM
ftynse requested review of this revision.May 31 2023, 1:46 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 31 2023, 1:46 AM
nicolasvasilache accepted this revision.May 31 2023, 1:50 AM
This revision is now accepted and ready to land.May 31 2023, 1:50 AM
This revision was landed with ongoing or failed builds.May 31 2023, 2:15 AM
This revision was automatically updated to reflect the committed changes.

@ftynse You can't use -debug* flags in test case run lines. These tests will fail in release mode with assertions disabled. So you can't test your change this way.

[211/212] Running the MLIR regression tests
FAIL: MLIR :: Dialect/Transform/test-repro-dump.mlir (1 of 2062)
******************** TEST 'MLIR :: Dialect/Transform/test-repro-dump.mlir' FAILED ********************
Script:
--
: 'RUN: at line 1';   /home/uday/llvm-project-upstream/build/bin/mlir-opt /home/uday/llvm-project-upstream/mlir/test/Dialect/Transform/test-repro-dump.mlir --test-transform-dialect-interpreter              --mlir-disable-threading              --debug-only=transform-dialect-dump-repro 2>&1  | /home/uday/llvm-project-upstream/build/bin/FileCheck /home/uday/llvm-project-upstream/mlir/test/Dialect/Transform/test-repro-dump.mlir
--
Exit Code: 1

Command Output (stderr):
--
/home/uday/llvm-project-upstream/mlir/test/Dialect/Transform/test-repro-dump.mlir:15:11: error: CHECK: expected string not found in input
// CHECK: Transform Interpreter Repro
          ^
<stdin>:1:1: note: scanning from here
mlir-opt: Unknown command line argument '--debug-only=transform-dialect-dump-repro'. Try: '/home/uday/llvm-project-upstream/build/bin/mlir-opt --help'
^
<stdin>:1:56: note: possible intended match here
mlir-opt: Unknown command line argument '--debug-only=transform-dialect-dump-repro'. Try: '/home/uday/llvm-project-upstream/build/bin/mlir-opt --help'
                                                       ^

Input file: <stdin>
Check file: /home/uday/llvm-project-upstream/mlir/test/Dialect/Transform/test-repro-dump.mlir

-dump-input=help explains the following input dump.

Input was:
<<<<<<
            1: mlir-opt: Unknown command line argument '--debug-only=transform-dialect-dump-repro'. Try: '/home/uday/llvm-project-upstream/build/bin/mlir-opt --help'

Ah yes, thanks for noticing, I forgot to add requires: assert, which exists exactly for the purpose of testing debug output.