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) |
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.
def polygraphy.tools.util.misc.get_outputs | ( | args, | |
name | |||
) |
def polygraphy.tools.util.misc.get_outputs_for_script | ( | script, | |
outputs | |||
) |
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.
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.