Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix use_cache flag #2965

Merged
merged 1 commit into from
Jul 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading