Skip to content

Commit 5751d1b

Browse files
peri044cehongwang
authored andcommitted
chore: fix use_cache flag (#2965)
1 parent 86bbb45 commit 5751d1b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

py/torch_tensorrt/ts/ptq.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def __new__(cls, *args: Any, **kwargs: Any) -> Self:
101101
),
102102
)
103103

104-
if not cache_file:
104+
if cache_file:
105105
if use_cache:
106106
log(
107107
Level.Debug,
@@ -112,8 +112,8 @@ def __new__(cls, *args: Any, **kwargs: Any) -> Self:
112112
else:
113113
if use_cache:
114114
log(
115-
Level.Error,
116-
"Input cache file is None but use_cache is set to True in INT8 mode.",
115+
Level.Warning,
116+
"Input cache file is None but use_cache is set to True in INT8 mode. Ignoring use_cache flag in this run.",
117117
)
118118

119119
# Define attributes and member functions for the calibrator class

0 commit comments

Comments
 (0)