Skip to content

Commit 370fb10

Browse files
author
Pei Yang
authored
remove check for optim_cache_dir in trt slim int8 (#32676) (#33629)
1 parent 40b2a03 commit 370fb10

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

paddle/fluid/inference/analysis/ir_pass_manager.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ void IRPassManager::CreatePasses(Argument *argument,
106106
bool use_static_engine = argument->tensorrt_use_static_engine();
107107
bool model_from_memory = argument->model_from_memory();
108108
std::string optim_cache_dir = argument->optim_cache_dir();
109-
bool int8_valid =
110-
!(model_from_memory && optim_cache_dir.empty() && enable_int8);
109+
bool int8_valid = !(model_from_memory && optim_cache_dir.empty() &&
110+
enable_int8 && use_calib_mode);
111111
PADDLE_ENFORCE_EQ(
112112
int8_valid, true,
113113
platform::errors::PreconditionNotMet(

0 commit comments

Comments
 (0)