MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT / add_args

Method add_args

demo/HuggingFace/NNDF/interface.py:412–431  ·  view source on GitHub ↗
(self, parser)

Source from the content-addressed store, hash-verified

410 return network_results
411
412 def add_args(self, parser) -> argparse.ArgumentParser:
413 super().add_args(parser)
414 trt_group = parser.add_argument_group("trt")
415 trt_group.add_argument(
416 "--disable-preview-dynamic-shapes",
417 help="Disable the FASTER_DYNAMIC_SHAPES_0805 preview feature when building the TensorRT engine",
418 action="store_true",
419 )
420
421 trt_benchmarking_group = parser.add_argument_group("trt benchmarking group")
422 trt_benchmarking_group.add_argument(
423 "--input-profile-max-len",
424 type=int,
425 help="Specify max input sequence length in TRT engine profile. (default: max supported sequence length)",
426 )
427 trt_benchmarking_group.add_argument(
428 "--output-profile-max-len",
429 type=int,
430 help="Specify max output sequence length in TRT engine profile. (default: max supported sequence length)",
431 )
432
433 def args_to_network_metadata(self, args) -> NetworkMetadata:
434 return self.config.MetadataClass.from_inference_args(args)

Callers

nothing calls this directly

Calls 1

add_argsMethod · 0.45

Tested by

no test coverage detected