docstr: Init the config for nvidia gpu.
docstr_tok: ["Init","the","config","for","nvidia","gpu","."]
code: def _init_gpu_config(self):
      """
      Init the config for nvidia gpu.
      """
      logger.info("Use GPU")
      self.pred_cfg.enable_use_gpu(100, 0)
      precision_map = {
          "fp16": PrecisionType.Half,
          "fp32": PrecisionType.Float32,
          "int8": PrecisionType.Int8,
      }
      precision_mode = precision_map[self.args.precision]
  
      if self.args.use_trt:
          logger.info("Use TRT")
          self.pred_cfg.enable_tensorrt_engine(
              workspace_size=1 << 30,
              max_batch_size=1,
              min_subgraph_size=self.args.min_subgraph_size,
              precision_mode=precision_mode,
              use_static=False,
              use_calib_mode=False,
          )
  
          if use_auto_tune(self.args) and osp.exists(
              self.args.auto_tuned_shape_file
          ):
              logger.info("Use auto tuned dynamic shape")
              allow_build_at_runtime = True
              self.pred_cfg.enable_tuned_tensorrt_dynamic_shape(
                  self.args.auto_tuned_shape_file,
                  allow_build_at_runtime,
              )
          else:
              logger.info("Use manual set dynamic shape")
              min_input_shape = {"x": [1, 3, 100, 100]}
              max_input_shape = {"x": [1, 3, 2000, 3000]}
              opt_input_shape = {"x": [1, 3, 512, 1024]}
              self.pred_cfg.set_trt_dynamic_shape_info(
                  min_input_shape, max_input_shape, opt_input_shape
              )
  
imports: import os
  import os.path
  import argparse
  from ast import literal_eval
  import numpy
  from PIL import Image
  from paddle.inference import create_predictor, PrecisionType
  from paddle.inference import Config
  from paddleseg.utils import logger, get_image_list
  from paddleseg.deploy.infer import DeployConfig
  from paddlepanseg.cvlibs.info_dicts import build_info_dict
  from paddlepanseg.transforms.functional import id2rgb
label_desc: Use image node_id 4 for calling the Predictor obj's underlying member method code with example usage: obj._init_gpu_config() without return types