code: def create_paddle_predictor(args):
      config = Config(args.model_file, args.params_file)
  
      if args.use_gpu:
          config.enable_use_gpu(args.gpu_mem, 0)
      else:
          config.disable_gpu()
  
      if args.use_mkldnn:
          config.enable_mkldnn()
          config.set_cpu_math_library_num_threads(args.cpu_num_threads)
          config.set_mkldnn_cache_capacity(100)
  
      config.disable_glog_info()
      config.switch_ir_optim(args.ir_optim)  # default true
  
      config.enable_memory_optim()
      # use zero copy
      config.switch_use_feed_fetch_ops(False)
      predictor = create_predictor(config)
  
      return predictor
  
file_path: insightface/recognition/arcface_paddle/tools/benchmark_speed.py
imports: import os
  import numpy
  import time
  import argparse
  from paddle.inference import Config
  from paddle.inference import create_predictor
label_desc: Use image node_id 2 for calling a global function with example usage: create_paddle_predictor(args) and returns: predictor