Pārlūkot izejas kodu

support to enable new_ir on CPU device

gaotingquan 1 gadu atpakaļ
vecāks
revīzija
11d2e39f4a

+ 2 - 0
paddlex/modules/base/predictor/utils/paddle_inference_predictor.py

@@ -68,6 +68,8 @@ class _PaddleInferencePredictor(object):
         else:
             assert option.device == "cpu"
             config.disable_gpu()
+            config.enable_new_ir(True)
+            config.enable_new_executor(True)
             if "mkldnn" in option.run_mode:
                 try:
                     config.enable_mkldnn()