diff --git a/mlir/lib/Dialect/Transform/Transforms/TransformInterpreterPassBase.cpp b/mlir/lib/Dialect/Transform/Transforms/TransformInterpreterPassBase.cpp --- a/mlir/lib/Dialect/Transform/Transforms/TransformInterpreterPassBase.cpp +++ b/mlir/lib/Dialect/Transform/Transforms/TransformInterpreterPassBase.cpp @@ -294,6 +294,12 @@ debugPayloadRootTag, debugTransformRootTag, transformLibraryFileName, binaryName); }); + + // Remove temporary attributes if they were set. + if (debugPayloadRootTag.empty()) + target->removeAttr(kTransformDialectTagAttrName); + if (debugTransformRootTag.empty()) + transform->removeAttr(kTransformDialectTagAttrName); } /// Replaces external symbols in `block` with their (non-external) definitions diff --git a/mlir/test/Dialect/Transform/test-repro-dump.mlir b/mlir/test/Dialect/Transform/test-repro-dump.mlir new file mode 100644 --- /dev/null +++ b/mlir/test/Dialect/Transform/test-repro-dump.mlir @@ -0,0 +1,31 @@ +// RUN: mlir-opt %s --test-transform-dialect-interpreter \ +// RUN: --mlir-disable-threading \ +// RUN: --debug-only=transform-dialect-dump-repro 2>&1 \ +// RUN: | FileCheck %s + +module { + transform.sequence failures(propagate) { + ^bb0(%arg0: !transform.any_op): + transform.test_print_remark_at_operand %arg0, "remark" : !transform.any_op + } +} + +// Verify that the repro string is dumped. + +// CHECK: Transform Interpreter Repro +// CHECK: cat <