Skip to content

Commit

Permalink
chore: fix use_cache flag (#2965)
Browse files Browse the repository at this point in the history
  • Loading branch information
peri044 authored and cehongwang committed Jul 8, 2024
1 parent 86bbb45 commit 5751d1b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions py/torch_tensorrt/ts/ptq.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down

0 comments on commit 5751d1b

Please sign in to comment.