File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
paddlex/inference/components/paddle_predictor Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -176,12 +176,14 @@ def _create(self):
176176
177177 config .set_cpu_math_library_num_threads (self .option .cpu_threads )
178178
179- if not (self .option .device == "gpu" and self .option .run_mode .startswith ("trt" )):
180- if hasattr (config , "enable_new_ir" ):
181- config .enable_new_ir (self .option .enable_new_ir )
182- if hasattr (config , "enable_new_executor" ):
183- config .enable_new_executor ()
184- if self .option .device in ("cpu" , "gpu" ):
179+ if self .option .device in ("cpu" , "gpu" ):
180+ if not (
181+ self .option .device == "gpu" and self .option .run_mode .startswith ("trt" )
182+ ):
183+ if hasattr (config , "enable_new_ir" ):
184+ config .enable_new_ir (self .option .enable_new_ir )
185+ if hasattr (config , "enable_new_executor" ):
186+ config .enable_new_executor ()
185187 config .set_optimization_level (3 )
186188
187189 for del_p in self .option .delete_pass :
You can’t perform that action at this time.
0 commit comments