From 957fbb02445d1bebe26b3dd5c08064e603152947 Mon Sep 17 00:00:00 2001 From: shentanyue <34421038+shentanyue@users.noreply.github.com> Date: Tue, 1 Nov 2022 18:30:25 +0800 Subject: [PATCH] fix (#47537) --- paddle/fluid/inference/lite/engine.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/paddle/fluid/inference/lite/engine.cc b/paddle/fluid/inference/lite/engine.cc index 3a60077e9f..c48b718d88 100644 --- a/paddle/fluid/inference/lite/engine.cc +++ b/paddle/fluid/inference/lite/engine.cc @@ -65,7 +65,9 @@ paddle::lite_api::PaddlePredictor* EngineManager::Create( lite_cxx_config.set_xpu_multi_encoder_method(cfg.precision, cfg.adaptive_seqlen); lite_cxx_config.set_xpu_dev_per_thread(cfg.device_id); - lite_cxx_config.enable_xpu_multi_stream(cfg.enable_multi_stream); + if (cfg.enable_multi_stream) { + lite_cxx_config.enable_xpu_multi_stream(); + } #endif #ifdef LITE_SUBGRAPH_WITH_NPU -- GitLab