File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
paddlex/inference/models/common Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -246,12 +246,19 @@ def _create(
246246 )
247247 elif self .option .device == "npu" :
248248 config .enable_custom_device ("npu" )
249+ if hasattr (config , "enable_new_executor" ):
250+ config .enable_new_executor ()
249251 elif self .option .device == "xpu" :
250- pass
252+ if hasattr (config , "enable_new_executor" ):
253+ config .enable_new_executor ()
251254 elif self .option .device == "mlu" :
252255 config .enable_custom_device ("mlu" )
256+ if hasattr (config , "enable_new_executor" ):
257+ config .enable_new_executor ()
253258 elif self .option .device == "dcu" :
254259 config .enable_use_gpu (100 , self .option .device_id )
260+ if hasattr (config , "enable_new_executor" ):
261+ config .enable_new_executor ()
255262 # XXX: is_compiled_with_rocm() must be True on dcu platform ?
256263 if paddle .is_compiled_with_rocm ():
257264 # Delete unsupported passes in dcu
You can’t perform that action at this time.
0 commit comments