diff --git a/userbenchmark/torch_trt/run.py b/userbenchmark/torch_trt/run.py index bdc1b3cd3a..bcedea604a 100644 --- a/userbenchmark/torch_trt/run.py +++ b/userbenchmark/torch_trt/run.py @@ -271,10 +271,15 @@ def run(args: List[str]): # Delete model instance and clean up workspace del Model - except Exception as e: + # Halt further model runs + except KeyboardInterrupt: + break + + # Any subprocess errors should be caught and reported + except: traceback.print_exc() print( - f"\nLoading model {model_name} failed with:\n{e}\nSkipping the model.\n" + f"\nBenchmarking model {model_name} failed.\nSkipping the model.\n" ) metrics = { model_name: f"Failed to run benchmark: {traceback.format_exc()}"