|
|
@@ -412,6 +412,8 @@ class PaddleInfer(StaticInfer):
|
|
|
if hasattr(config, "enable_new_executor"):
|
|
|
config.enable_new_executor()
|
|
|
elif self._option.device_type == "xpu":
|
|
|
+ if hasattr(config, "enable_new_ir"):
|
|
|
+ config.enable_new_ir(self._option.enable_new_ir)
|
|
|
if hasattr(config, "enable_new_executor"):
|
|
|
config.enable_new_executor()
|
|
|
elif self._option.device_type == "mlu":
|
|
|
@@ -431,6 +433,8 @@ class PaddleInfer(StaticInfer):
|
|
|
name = "PaddleX_" + self._option.model_name
|
|
|
gcu_passes.append_passes_for_legacy_ir(pass_builder, name)
|
|
|
elif self._option.device_type == "dcu":
|
|
|
+ if hasattr(config, "enable_new_ir"):
|
|
|
+ config.enable_new_ir(self._option.enable_new_ir)
|
|
|
config.enable_use_gpu(100, self._option.device_id)
|
|
|
if hasattr(config, "enable_new_executor"):
|
|
|
config.enable_new_executor()
|