diff --git a/dace/sdfg/sdfg.py b/dace/sdfg/sdfg.py index 07267ec786..e89c167184 100644 --- a/dace/sdfg/sdfg.py +++ b/dace/sdfg/sdfg.py @@ -2191,8 +2191,8 @@ def compile(self, output_file=None, validate=True) -> 'CompiledSDFG': # Generate code for the program by traversing the SDFG state by state program_objects = codegen.generate_code(sdfg, validate=validate) except Exception: - fpath = os.path.join('_dacegraphs', 'failing.sdfg') - self.save(fpath) + fpath = os.path.join('_dacegraphs', 'failing.sdfgz') + self.save(fpath, compress=True) print(f'Failing SDFG saved for inspection in {os.path.abspath(fpath)}') raise diff --git a/dace/sdfg/validation.py b/dace/sdfg/validation.py index 45d38e33e2..a3914494c3 100644 --- a/dace/sdfg/validation.py +++ b/dace/sdfg/validation.py @@ -264,8 +264,8 @@ def validate_sdfg(sdfg: 'dace.sdfg.SDFG', references: Set[int] = None, **context validate_control_flow_region(sdfg, sdfg, initialized_transients, symbols, references, **context) except InvalidSDFGError as ex: # If the SDFG is invalid, save it - fpath = os.path.join('_dacegraphs', 'invalid.sdfg') - sdfg.save(fpath, exception=ex) + fpath = os.path.join('_dacegraphs', 'invalid.sdfgz') + sdfg.save(fpath, exception=ex, compress=True) ex.path = fpath raise