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

Public Member Functions

def __init__ (self, network, config=None)
 
def __call__ (self)
 

Private Attributes

 _network
 
 _config
 

Constructor & Destructor Documentation

◆ __init__()

def polygraphy.backend.trt.loader.EngineFromNetwork.__init__ (   self,
  network,
  config = None 
)
Functor that uses a TensorRT ``INetworkDefinition`` to build an engine.

Args:
    network (Callable() -> trt.Builder, trt.INetworkDefinition):
    A callable capable of returning a TensorRT Builder and INetworkDefinition. The returned builder
    and network are owned by EngineFromNetwork and should not be freed manually. The callable may
    have at most 3 return values if another object needs to be kept alive for the duration of the network,
    e.g., in the case of a parser. EngineFromNetwork will take ownership of the third return value, and,
    like the network, it should not be freed by the callable. The first and second return values must
    always be the builder and network respectively.
    If instead of a loader, the network, builder, and optional parser arguments are provided directly,
    then EngineFromNetwork will *not* deallocate them.


    config (Callable(trt.Builder, trt.INetworkDefinition) -> trt.IBuilderConfig):
    A callable that returns a TensorRT builder configuration. If not supplied,
    a `CreateConfig` instance with default parameters is used.

Member Function Documentation

◆ __call__()

def polygraphy.backend.trt.loader.EngineFromNetwork.__call__ (   self)
Builds a TensorRT engine.

Returns:
    trt.ICudaEngine: The engine that was created.
Here is the call graph for this function:

Member Data Documentation

◆ _network

polygraphy.backend.trt.loader.EngineFromNetwork._network
private

◆ _config

polygraphy.backend.trt.loader.EngineFromNetwork._config
private

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