From b2ba3471fd2b2952e6aaf4d0f18ccd7237179c8e Mon Sep 17 00:00:00 2001 From: nhzlx Date: Wed, 16 Jan 2019 04:09:34 +0000 Subject: [PATCH] fix analysis config bug. --- paddle/fluid/inference/api/analysis_config.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/inference/api/analysis_config.cc b/paddle/fluid/inference/api/analysis_config.cc index 336ab426c21..965bbd0fd26 100644 --- a/paddle/fluid/inference/api/analysis_config.cc +++ b/paddle/fluid/inference/api/analysis_config.cc @@ -127,6 +127,7 @@ void contrib::AnalysisConfig::EnableTensorRtEngine(int workspace_size, use_tensorrt_ = true; tensorrt_workspace_size_ = workspace_size; tensorrt_max_batchsize_ = max_batch_size; + tensorrt_min_subgraph_size_ = min_subgraph_size; Update(); } @@ -145,8 +146,8 @@ void contrib::AnalysisConfig::Update() { LOG(ERROR) << "TensorRT engine is not available when EnableGpu() not actived."; } else { - // Append after the infer_clean pass. - pass_builder()->InsertPass(1, "tensorrt_subgraph_pass"); + // Append after the Affine_channel_conv_fuse pass. + pass_builder()->InsertPass(3, "tensorrt_subgraph_pass"); } } -- GitLab