From d36ba7000f5a190de017a3f354bc13d0f8f3d75b Mon Sep 17 00:00:00 2001 From: Feng Ni Date: Thu, 9 Dec 2021 10:53:16 +0800 Subject: [PATCH] [cherry-pick] Fix xpu lite engine (#4848) * fix plot_tracking_dict, test=document_fix * fix xpu deploy infer enable_lite_engine, test=document_fix --- deploy/pptracking/python/det_infer.py | 1 + deploy/python/infer.py | 1 + static/deploy/python/infer.py | 1 + 3 files changed, 3 insertions(+) diff --git a/deploy/pptracking/python/det_infer.py b/deploy/pptracking/python/det_infer.py index a161962b8..c15739233 100644 --- a/deploy/pptracking/python/det_infer.py +++ b/deploy/pptracking/python/det_infer.py @@ -410,6 +410,7 @@ def load_predictor(model_dir, # optimize graph and fuse op config.switch_ir_optim(True) elif device == 'XPU': + config.enable_lite_engine() config.enable_xpu(10 * 1024 * 1024) else: config.disable_gpu() diff --git a/deploy/python/infer.py b/deploy/python/infer.py index 752a07efa..77f509c24 100644 --- a/deploy/python/infer.py +++ b/deploy/python/infer.py @@ -515,6 +515,7 @@ def load_predictor(model_dir, # optimize graph and fuse op config.switch_ir_optim(True) elif device == 'XPU': + config.enable_lite_engine() config.enable_xpu(10 * 1024 * 1024) else: config.disable_gpu() diff --git a/static/deploy/python/infer.py b/static/deploy/python/infer.py index 9b606aa44..d3afb138e 100644 --- a/static/deploy/python/infer.py +++ b/static/deploy/python/infer.py @@ -415,6 +415,7 @@ def load_predictor(model_dir, # optimize graph and fuse op config.switch_ir_optim(True) elif device == 'XPU': + config.enable_lite_engine() config.enable_xpu(10 * 1024 * 1024) else: config.disable_gpu() -- GitLab