From 732a40523de700d061c747508af1749b20bd1e61 Mon Sep 17 00:00:00 2001 From: zhangjun Date: Thu, 27 May 2021 11:36:29 +0000 Subject: [PATCH] update --- paddle_inference/paddle/include/paddle_engine.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/paddle_inference/paddle/include/paddle_engine.h b/paddle_inference/paddle/include/paddle_engine.h index 58144e7d..ea6530e0 100755 --- a/paddle_inference/paddle/include/paddle_engine.h +++ b/paddle_inference/paddle/include/paddle_engine.h @@ -166,6 +166,13 @@ class PaddleInferenceEngine : public EngineCore { } precision_type = GetPrecision(FLAGS_precision); + if (engine_conf.has_enable_ir_optimization() && + !engine_conf.enable_ir_optimization()) { + config.SwitchIrOptim(false); + } else { + config.SwitchIrOptim(true); + } + if (engine_conf.has_use_trt() && engine_conf.use_trt()) { if (!engine_conf.has_use_gpu() || !engine_conf.use_gpu()) { config.EnableUseGpu(2000, FLAGS_gpuid); @@ -209,12 +216,6 @@ class PaddleInferenceEngine : public EngineCore { // 2 MB l3 cache config.EnableXpu(2 * 1024 * 1024); } - if (engine_conf.has_enable_ir_optimization() && - !engine_conf.enable_ir_optimization()) { - config.SwitchIrOptim(false); - } else { - config.SwitchIrOptim(true); - } if (engine_conf.has_enable_memory_optimization() && engine_conf.enable_memory_optimization()) { -- GitLab