code: def load_model(model_path, param_path, use_gpu=None):
      config = paddle_infer.Config(model_path, param_path)
      if use_gpu is None:
          if (
              paddle.device.is_compiled_with_cuda()
          ):  # TODO: 可以使用GPU却返回False
              use_gpu = True
          else:
              use_gpu = False
      if not use_gpu:
          config.enable_mkldnn()
          # TODO: fluid要废弃了，研究判断方式
          config.switch_ir_optim(True)
          config.set_cpu_math_library_num_threads(10)
      else:
          config.enable_use_gpu(500, 0)
          config.delete_pass("conv_elementwise_add_act_fuse_pass")
          config.delete_pass("conv_elementwise_add2_act_fuse_pass")
          config.delete_pass("conv_elementwise_add_fuse_pass")
          config.switch_ir_optim()
          config.enable_memory_optim()
      # config = paddle_infer.Config(model_path, param_path)
      # config.enable_mkldnn()
      # config.switch_ir_optim(True)
      # config.set_cpu_math_library_num_threads(10)
      model = paddle_infer.create_predictor(config)
      return model
  
file_path: PaddleSeg/EISeg/eiseg/plugin/video/load_model.py
imports: import paddle
  import paddle.inference
label_desc: Use image node_id 1 for calling a global function with example usage: load_model(model_path, param_path, use_gpu) and returns: model