From 4511aa3c2b095fc15c269b437569b0383d242961 Mon Sep 17 00:00:00 2001 From: Kevin Stephano Date: Thu, 31 Oct 2024 22:43:56 -0700 Subject: [PATCH] Change where we print python repros to allow us to print repros prior to segfaults (#3303) This is just a simple code reordering to put the point at which I print a repro from `fd.execute()` after the pybind function `_execute()` to before the function to allow us to print repros prior to segfaults. --- nvfuser/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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))