未验证 提交 c6713bc0 编写于 作者: P Pei Yang 提交者: GitHub

remove check for optim_cache_dir in trt slim int8 (#32676)

上级 7e2b60a4
...@@ -106,8 +106,8 @@ void IRPassManager::CreatePasses(Argument *argument, ...@@ -106,8 +106,8 @@ void IRPassManager::CreatePasses(Argument *argument,
bool use_static_engine = argument->tensorrt_use_static_engine(); bool use_static_engine = argument->tensorrt_use_static_engine();
bool model_from_memory = argument->model_from_memory(); bool model_from_memory = argument->model_from_memory();
std::string optim_cache_dir = argument->optim_cache_dir(); std::string optim_cache_dir = argument->optim_cache_dir();
bool int8_valid = bool int8_valid = !(model_from_memory && optim_cache_dir.empty() &&
!(model_from_memory && optim_cache_dir.empty() && enable_int8); enable_int8 && use_calib_mode);
PADDLE_ENFORCE_EQ( PADDLE_ENFORCE_EQ(
int8_valid, true, int8_valid, true,
platform::errors::PreconditionNotMet( platform::errors::PreconditionNotMet(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册