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.backend.trt.loader.Profile Class Reference
Inheritance diagram for polygraphy.backend.trt.loader.Profile:
Collaboration diagram for polygraphy.backend.trt.loader.Profile:

Public Member Functions

def add (self, name, min, opt, max)
 
def __getitem__ (self, key)
 

Detailed Description

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.

Member Function Documentation

◆ add()

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(...)

◆ __getitem__()

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.

The documentation for this class was generated from the following file: