TensorRT  7.2.1.6
NVIDIA TensorRT
Looking for a C++ dev who knows TensorRT?
I'm looking for work. Hire me!
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
polygraphy.tools.util.misc Namespace Reference

Functions

def get (args, attr)
 
def get_outputs (args, name)
 
def get_outputs_for_script (script, outputs)
 
def parse_meta (meta_args, includes_shape=True, includes_dtype=True)
 
def parse_profile_shapes (default_shapes, min_args, opt_args, max_args)
 

Function Documentation

◆ get()

def polygraphy.tools.util.misc.get (   args,
  attr 
)
Gets a command-line argument if it exists, otherwise returns None.

Args:
    args: The command-line arguments.
    attr (str): The name of the command-line argument.
Here is the caller graph for this function:

◆ get_outputs()

def polygraphy.tools.util.misc.get_outputs (   args,
  name 
)
Here is the call graph for this function:

◆ get_outputs_for_script()

def polygraphy.tools.util.misc.get_outputs_for_script (   script,
  outputs 
)

◆ parse_meta()

def polygraphy.tools.util.misc.parse_meta (   meta_args,
  includes_shape = True,
  includes_dtype = True 
)
Parses a list of tensor metadata arguments of the form "<name>,<shape>,<dtype>"
`shape` and `dtype` are optional, but `dtype` must always come after `shape` if they are both enabled.

Args:
    meta_args (List[str]): A list of tensor metadata arguments from the command-line.
    includes_shape (bool): Whether the arguments include shape information.
    includes_dtype (bool): Whether the arguments include dtype information.

Returns:
    TensorMetadata: The parsed tensor metadata.
Here is the caller graph for this function:

◆ parse_profile_shapes()

def polygraphy.tools.util.misc.parse_profile_shapes (   default_shapes,
  min_args,
  opt_args,
  max_args 
)
Parses TensorRT profile options from command-line arguments.

Args:
    default_shapes (TensorMetadata): The inference input shapes.

Returns:
 List[Tuple[OrderedDict[str, Shape]]]:
        A list of profiles with each profile comprised of three dictionaries
        (min, opt, max) mapping input names to shapes.
Here is the call graph for this function: