code: def add_trt_args(parser):
      group = parser.add_argument_group("Paddle-TRT")
      group.add_argument(
          "--device",
          type=int,
          default="0",
          help="The GPU device id for Paddle-TRT inference.",
      )
      group.add_argument(
          "--trt-inference-dir",
          type=str,
          default="./inference",
          help="A path to store/load inference models. "
          "export_model.py would export models to this folder, "
          "then inference.py would load from here.",
      )
      group.add_argument(
          "--trt-precision",
          default="FP32",
          choices=("FP32", "FP16", "INT8"),
          help="The precision of TensorRT. It should be one of {FP32, FP16, INT8}.",
      )
      group.add_argument(
          "--trt-workspace-size",
          type=int,
          default=(1 << 30),
          help="The memory workspace of TensorRT in MB.",
      )
      group.add_argument(
          "--trt-min-subgraph-size",
          type=int,
          default=3,
          help="The minimal subgraph size to enable PaddleTRT.",
      )
      group.add_argument(
          "--trt-use-static",
          type=distutils.util.strtobool,
          default=False,
          help="Fix TensorRT engine at first running.",
      )
      group.add_argument(
          "--trt-use-calib-mode",
          type=distutils.util.strtobool,
          default=False,
          help="Use the PTQ calibration of PaddleTRT int8.",
      )
      group.add_argument(
          "--trt-export-log-path",
          type=str,
          default="./export.json",
          help="A file in which to store JSON model exporting report.",
      )
      group.add_argument(
          "--trt-log-path",
          type=str,
          default="./inference.json",
          help="A file in which to store JSON inference report.",
      )
      group.add_argument(
          "--trt-use-synthetic",
          type=distutils.util.strtobool,
          default=False,
          help="Apply synthetic data for benchmark.",
      )
      return parser
  
file_path: DALI/docs/examples/use_cases/paddle/resnet50/utils/config.py
imports: import os
  import copy
  import argparse
  import logging
  import distutils.util
  import dllogger
  from utils.mode import RunScope
  from utils.utility import get_num_trainers
  from utils.save_load import _PDOPT_SUFFIX, _PDPARAMS_SUFFIX
label_desc: Use image node_id 10 for calling a global function with example usage: add_trt_args(parser) and returns: parser