Skip to content

Commit

Permalink
modify npu predict bug (#2454)
Browse files Browse the repository at this point in the history
  • Loading branch information
a31413510 authored Nov 11, 2024
1 parent e35f2f1 commit 0160aa3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion paddlex/inference/components/paddle_predictor/predictor.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ def _create(self):
config.enable_new_ir(self.option.enable_new_ir)
if hasattr(config, "enable_new_executor"):
config.enable_new_executor()
config.set_optimization_level(3)
if self.option.device in ("cpu", "gpu"):
config.set_optimization_level(3)

for del_p in self.option.delete_pass:
config.delete_pass(del_p)
Expand Down

0 comments on commit 0160aa3

Please sign in to comment.