diff --git a/nvfuser/__init__.py b/nvfuser/__init__.py index 7d9048e7bf6..f986ffa0640 100644 --- a/nvfuser/__init__.py +++ b/nvfuser/__init__.py @@ -177,6 +177,8 @@ def execute( results = None try: + if print_repro: + print(self.repro_script_for(inputs)) results = self._execute( inputs, device=device, @@ -184,8 +186,6 @@ def execute( capture_debug_output=capture_debug_output, profile=profile, ) - if print_repro: - print(self.repro_script_for(inputs)) return results except Exception as err: logger.exception(self._repro_error_str("executing", inputs))