From e09e2cbe700481ac5b68f4be6d429edfb7089d04 Mon Sep 17 00:00:00 2001 From: Yi Zhang Date: Tue, 8 Feb 2022 21:14:14 -0500 Subject: [PATCH] Include IR dump options on e2e failure report --- python/torch_mlir_e2e_test/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/torch_mlir_e2e_test/utils.py b/python/torch_mlir_e2e_test/utils.py index c815590c4..4d41ecf1e 100644 --- a/python/torch_mlir_e2e_test/utils.py +++ b/python/torch_mlir_e2e_test/utils.py @@ -45,12 +45,14 @@ def run_pipeline_with_repro_report(module, filename = os.path.join(tempfile.gettempdir(), module_name + ".mlir") with open(filename, 'w') as f: f.write(asm_for_error_report) + debug_options="-print-ir-after-all -mlir-disable-threading" raise Exception(f""" {description} failed with the following diagnostics: {sys.stderr.getvalue()} Error can be reproduced with: $ torch-mlir-opt -pass-pipeline='{pipeline}' {filename} +Add '{debug_options}' to get the IR dump for debugging purpose. """) from None finally: sys.stderr = original_stderr