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() | |
def polygraphy.backend.trt.util.load_plugins | ( | plugins | ) |
def polygraphy.backend.trt.util.check_onnx_parser_errors | ( | parser | ) |
def polygraphy.backend.trt.util.get_layer_class_mapping | ( | ) |
def polygraphy.backend.trt.util.get_input_metadata | ( | network | ) |
def polygraphy.backend.trt.util.get_output_metadata | ( | 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
|
private |
def polygraphy.backend.trt.util.check_outputs_not_found | ( | not_found, | |
available_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.
def polygraphy.backend.trt.util.mark_layerwise | ( | network | ) |
def polygraphy.backend.trt.util.unmark_outputs | ( | network, | |
outputs | |||
) |
def polygraphy.backend.trt.util.str_from_config | ( | config | ) |
def polygraphy.backend.trt.util.check_profile | ( | profile | ) |
def polygraphy.backend.trt.util.build_default_profile | ( | builder, | |
network, | |||
default_shape_value = None |
|||
) |
def polygraphy.backend.trt.util.build_profile | ( | builder, | |
network, | |||
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.
def polygraphy.backend.trt.util.add_binding_to_metadata | ( | engine, | |
binding, | |||
metadata | |||
) |
def polygraphy.backend.trt.util.get_input_metadata_from_engine | ( | engine, | |
start_binding, | |||
end_binding | |||
) |
def polygraphy.backend.trt.util.get_output_metadata_from_engine | ( | engine, | |
start_binding, | |||
end_binding | |||
) |
def polygraphy.backend.trt.util.str_from_engine | ( | engine | ) |
def polygraphy.backend.trt.util.get_bindings_per_profile | ( | engine | ) |
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
polygraphy.backend.trt.util.TRT_LOGGER = trt.Logger() |