diff --git a/py/torch_tensorrt/ts/ptq.py b/py/torch_tensorrt/ts/ptq.py index da2fbee47b..d129ea2824 100644 --- a/py/torch_tensorrt/ts/ptq.py +++ b/py/torch_tensorrt/ts/ptq.py @@ -101,7 +101,7 @@ def __new__(cls, *args: Any, **kwargs: Any) -> Self: ), ) - if not cache_file: + if cache_file: if use_cache: log( Level.Debug, @@ -112,8 +112,8 @@ def __new__(cls, *args: Any, **kwargs: Any) -> Self: else: if use_cache: log( - Level.Error, - "Input cache file is None but use_cache is set to True in INT8 mode.", + Level.Warning, + "Input cache file is None but use_cache is set to True in INT8 mode. Ignoring use_cache flag in this run.", ) # Define attributes and member functions for the calibrator class