Public Member Functions | |
def | add (self, name, min, opt, max) |
def | __getitem__ (self, key) |
An ordered dictionary that represents a single optimization profile that can be used to build an engine. More specifically, this is a OrderedDict[str, ShapeTuple] which maps binding names to a set of min/opt/max shapes.
def polygraphy.backend.trt.loader.Profile.add | ( | self, | |
name, | |||
min, | |||
opt, | |||
max | |||
) |
A convenience function to add shapes for a single binding. Args: name (str): The name of the binding. min (Tuple[int]): The minimum shape that the profile will support. opt (Tuple[int]): The shape for which TensorRT will optimize the engine. max (Tuple[int]): The maximum shape that the profile will support. Returns: self: Which allows this function to be easily chained to add multiple bindings, e.g., Profile().add(...).add(...)
def polygraphy.backend.trt.loader.Profile.__getitem__ | ( | self, | |
key | |||
) |
Retrieves the shapes registered for a given input name. Returns: ShapeTuple: A named tuple include ``min``, ``opt``, and ``max`` members for the shapes corresponding to the input.