From fff71ecece4661962a96b953f21532c71350b9ed Mon Sep 17 00:00:00 2001 From: Dheeraj Peri Date: Fri, 28 Jun 2024 10:07:38 -0700 Subject: [PATCH] chore: fix use_cache flag --- py/torch_tensorrt/ts/ptq.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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