From 44dfc318a42341b221d7f9ca6df2b894e9f90824 Mon Sep 17 00:00:00 2001 From: gaotingquan Date: Mon, 17 Nov 2025 07:49:54 +0000 Subject: [PATCH] [WIP] --- paddlex/inference/models/common/static_infer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/paddlex/inference/models/common/static_infer.py b/paddlex/inference/models/common/static_infer.py index 9009cdad59..50a418132f 100644 --- a/paddlex/inference/models/common/static_infer.py +++ b/paddlex/inference/models/common/static_infer.py @@ -358,7 +358,8 @@ def _create( logging.debug("`device_id` has been set to None") if ( - self._option.device_type in ("gpu", "dcu", "npu", "mlu", "gcu", "xpu", "iluvatar_gpu") + self._option.device_type + in ("gpu", "dcu", "npu", "mlu", "gcu", "xpu", "iluvatar_gpu") and self._option.device_id is None ): self._option.device_id = 0 @@ -399,6 +400,7 @@ def _create( if hasattr(config, "enable_new_executor"): config.enable_new_executor() config.set_optimization_level(3) + config.delete_pass("matmul_add_act_fuse_pass") elif self._option.device_type == "npu": config.enable_custom_device("npu", self._option.device_id) if hasattr(config, "enable_new_ir"):