未验证 提交 b0e9e48d 编写于 作者: X xiaoxiaohehe001 提交者: GitHub

fix_arguments (#49186)

上级 e4857e0b
......@@ -1365,7 +1365,9 @@ void AnalysisPredictor::OptimizeInferenceProgram() {
#if defined(_WIN32)
argument_->PartiallyRelease();
#else
if (config_.mkldnn_enabled() || config_.tensorrt_engine_enabled()) {
if (config_.mkldnn_enabled() ||
(config_.tensorrt_engine_enabled() &&
config_.tensorrt_precision_mode_ == AnalysisConfig::Precision::kInt8)) {
argument_->PartiallyRelease();
} else {
argument_.reset(nullptr);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册