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.util Namespace Reference

Functions

def load_plugins (plugins)
 
def check_onnx_parser_errors (parser)
 
def get_layer_class_mapping ()
 
def get_input_metadata (network)
 
def get_output_metadata (network)
 
def str_from_network (network, mode="full")
 
def _get_network_outputs (network)
 
def check_outputs_not_found (not_found, available_outputs)
 
def mark_outputs (network, outputs)
 
def mark_layerwise (network)
 
def unmark_outputs (network, outputs)
 
def str_from_config (config)
 
def check_profile (profile)
 
def build_default_profile (builder, network, default_shape_value=None)
 
def build_profile (builder, network, profile)
 
def get_input_metadata_from_profile (profile, network)
 
def add_binding_to_metadata (engine, binding, metadata)
 
def get_input_metadata_from_engine (engine, start_binding, end_binding)
 
def get_output_metadata_from_engine (engine, start_binding, end_binding)
 
def str_from_engine (engine)
 
def get_bindings_per_profile (engine)
 
def get_active_profile_bindings (context)
 

Variables

 TRT_LOGGER = trt.Logger()
 

Function Documentation

◆ load_plugins()

def polygraphy.backend.trt.util.load_plugins (   plugins)

◆ check_onnx_parser_errors()

def polygraphy.backend.trt.util.check_onnx_parser_errors (   parser)

◆ get_layer_class_mapping()

def polygraphy.backend.trt.util.get_layer_class_mapping ( )
Here is the caller graph for this function:

◆ get_input_metadata()

def polygraphy.backend.trt.util.get_input_metadata (   network)
Here is the caller graph for this function:

◆ get_output_metadata()

def polygraphy.backend.trt.util.get_output_metadata (   network)
Here is the caller graph for this function:

◆ str_from_network()

def polygraphy.backend.trt.util.str_from_network (   network,
  mode = "full" 
)
Converts a TensorRT network to a human-readable representation

Args:
    network (trt.INetworkDefinition): The network.
    mode (str): Controls what is displayed for each layer. Choices: ["none", "basic", "attrs", "full"]

Returns:
    str
Here is the call graph for this function:

◆ _get_network_outputs()

def polygraphy.backend.trt.util._get_network_outputs (   network)
private
Here is the caller graph for this function:

◆ check_outputs_not_found()

def polygraphy.backend.trt.util.check_outputs_not_found (   not_found,
  available_outputs 
)
Here is the caller graph for this function:

◆ mark_outputs()

def polygraphy.backend.trt.util.mark_outputs (   network,
  outputs 
)
Mark the specified outputs as network outputs.

Args:
    network (trt.INetworkDefinition): The network in which to mark outputs.
    outputs (Sequence[str]): The names of tensors to mark as outputs.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mark_layerwise()

def polygraphy.backend.trt.util.mark_layerwise (   network)
Here is the call graph for this function:

◆ unmark_outputs()

def polygraphy.backend.trt.util.unmark_outputs (   network,
  outputs 
)
Here is the call graph for this function:

◆ str_from_config()

def polygraphy.backend.trt.util.str_from_config (   config)

◆ check_profile()

def polygraphy.backend.trt.util.check_profile (   profile)
Here is the caller graph for this function:

◆ build_default_profile()

def polygraphy.backend.trt.util.build_default_profile (   builder,
  network,
  default_shape_value = None 
)
Here is the call graph for this function:

◆ build_profile()

def polygraphy.backend.trt.util.build_profile (   builder,
  network,
  profile 
)
Here is the call graph for this function:

◆ get_input_metadata_from_profile()

def polygraphy.backend.trt.util.get_input_metadata_from_profile (   profile,
  network 
)
Returns metadata about the inputs based on a profile

Args:
    profile (trt.IOptimizationProfile): The profile from which to retrieve input metada.
    network (trt.INetworkDefinition): The network

Returns:
    TensorMetadata: A mapping of input names to their types and shapes.

◆ add_binding_to_metadata()

def polygraphy.backend.trt.util.add_binding_to_metadata (   engine,
  binding,
  metadata 
)
Here is the caller graph for this function:

◆ get_input_metadata_from_engine()

def polygraphy.backend.trt.util.get_input_metadata_from_engine (   engine,
  start_binding,
  end_binding 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_output_metadata_from_engine()

def polygraphy.backend.trt.util.get_output_metadata_from_engine (   engine,
  start_binding,
  end_binding 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ str_from_engine()

def polygraphy.backend.trt.util.str_from_engine (   engine)
Here is the call graph for this function:

◆ get_bindings_per_profile()

def polygraphy.backend.trt.util.get_bindings_per_profile (   engine)
Here is the caller graph for this function:

◆ get_active_profile_bindings()

def polygraphy.backend.trt.util.get_active_profile_bindings (   context)
Gets the start and end binding indices for the active optimization profile.

Args:
    engine (trt.ICudaEngine): The engine in question.
    context (trt.IExecutionContext): The context where the profile is currently set.

Returns:
    Tuple[int, int]: The start and end bindings indices, in that order
Here is the call graph for this function:

Variable Documentation

◆ TRT_LOGGER

polygraphy.backend.trt.util.TRT_LOGGER = trt.Logger()