From b54b6bdca7d762b3523725d851f51aa1fb376ce1 Mon Sep 17 00:00:00 2001 From: Naren Dasan Date: Wed, 11 Sep 2024 08:12:56 -0600 Subject: [PATCH] fix: distingush engines based on compilation settings in addition to graph structure Signed-off-by: Naren Dasan --- py/torch_tensorrt/dynamo/conversion/_TRTInterpreter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/py/torch_tensorrt/dynamo/conversion/_TRTInterpreter.py b/py/torch_tensorrt/dynamo/conversion/_TRTInterpreter.py index f1b68b5436..ff35bf39d7 100644 --- a/py/torch_tensorrt/dynamo/conversion/_TRTInterpreter.py +++ b/py/torch_tensorrt/dynamo/conversion/_TRTInterpreter.py @@ -557,7 +557,7 @@ def run( ) assert ( setting_compatiblity - ), f"Attempted to refit a prebuilt engine with incompatible settings: {incompattible_settings}, (old_settings: {engine_compilation_settings}, new_settings: {self.compilation_settings})" + ), f"Attempted to refit a cached engine with incompatible settings: {incompattible_settings}, (old_settings: {engine_compilation_settings}, new_settings: {self.compilation_settings})" for i, e in enumerate( [ @@ -567,7 +567,7 @@ def run( ): assert ( e - ), f"Found that cached engine was built for a different input size (input: {i}, cached size: {cached_engine_input_specs[i]}, new size: {self.input_specs[i]}" + ), f"Attempted to refit a cached engine built for a different input size (input: {i}, cached size: {cached_engine_input_specs[i]}, new size: {self.input_specs[i]}" _LOGGER.info( "Found the cached engine that corresponds to this graph. It is directly loaded."