Python APIs Added in 10.x#

The following Python APIs have been added in TensorRT 10.x to support new features and improved functionality.

Types#

  • APILanguage

  • ExecutionContextAllocationStrategy

  • IGpuAsyncAllocator

  • InterfaceInfo

  • IPluginResource

  • IPluginV3

  • IStreamReader

  • IVersionedInterface

Methods and Properties#

  • ICudaEngine.is_debug_tensor()

  • ICudaEngine.minimum_weight_streaming_budget

  • ICudaEngine.streamable_weights_size

  • ICudaEngine.weight_streaming_budget

  • IExecutionContext.get_debug_listener()

  • IExecutionContext.get_debug_state()

  • IExecutionContext.set_all_tensors_debug_state()

  • IExecutionContext.set_debug_listener()

  • IExecutionContext.set_tensor_debug_state()

  • IExecutionContext.update_device_memory_size_for_shapes()

  • IGpuAllocator.allocate_async()

  • IGpuAllocator.deallocate_async()

  • INetworkDefinition.add_plugin_v3()

  • INetworkDefinition.is_debug_tensor()

  • INetworkDefinition.mark_debug()

  • INetworkDefinition.unmark_debug()

  • IPluginRegistry.acquire_plugin_resource()

  • IPluginRegistry.all_creators

  • IPluginRegistry.deregister_creator()

  • IPluginRegistry.get_creator()

  • IPluginRegistry.register_creator()

  • IPluginRegistry.release_plugin_resource()

Removed Python APIs and Replacements#

Warning

The APIs listed below have been removed in TensorRT 10.x and will cause runtime errors if called. Review each entry for its replacement before upgrading.

Removed API

Replacement

BuilderFlag.ENABLE_TACTIC_HEURISTIC

Builder optimization level 2.

BuilderFlag.STRICT_TYPES

Use BuilderFlag.DIRECT_IO, BuilderFlag.PREFER_PRECISION_CONSTRAINTS, and BuilderFlag.REJECT_EMPTY_ALGORITHMS.

EngineCapability.DEFAULT

EngineCapability.STANDARD

EngineCapability.kSAFE_DLA

EngineCapability.DLA_STANDALONE

EngineCapability.SAFE_GPU

EngineCapability.SAFETY

IAlgorithmIOInfo.tensor_format

Strides, data type, and vectorization information are sufficient to identify tensor formats uniquely.

IBuilder.max_batch_size

Implicit batch support was removed.

IBuilderConfig.max_workspace_size

IBuilderConfig.set_memory_pool_limit() or get_memory_pool_limit() with MemoryPoolType.WORKSPACE

IBuilderConfig.min_timing_iterations

IBuilderConfig.avg_timing_iterations

ICudaEngine.binding_is_input()

ICudaEngine.get_tensor_mode()

ICudaEngine.get_binding_bytes_per_component()

ICudaEngine.get_tensor_bytes_per_component()

ICudaEngine.get_binding_components_per_element()

ICudaEngine.get_tensor_components_per_element()

ICudaEngine.get_binding_dtype()

ICudaEngine.get_tensor_dtype()

ICudaEngine.get_binding_format()

ICudaEngine.get_tensor_format()

ICudaEngine.get_binding_format_desc()

ICudaEngine.get_tensor_format_desc()

ICudaEngine.get_binding_index()

No name-based equivalent replacement.

ICudaEngine.get_binding_name()

No name-based equivalent replacement.

ICudaEngine.get_binding_shape()

ICudaEngine.get_tensor_shape()

ICudaEngine.get_binding_vectorized_dim()

ICudaEngine.get_tensor_vectorized_dim()

ICudaEngine.get_location()

ITensor.location

ICudaEngine.get_profile_shape()

ICudaEngine.get_tensor_profile_shape()

ICudaEngine.get_profile_shape_input()

ICudaEngine.get_tensor_profile_values()

ICudaEngine.has_implicit_batch_dimension()

Implicit batch is no longer supported.

ICudaEngine.is_execution_binding()

No name-based equivalent replacement.

ICudaEngine.is_shape_binding()

ICudaEngine.is_shape_inference_io()

ICudaEngine.max_batch_size()

Implicit batch is no longer supported.

ICudaEngine.num_bindings()

ICudaEngine.num_io_tensors()

IExecutionContext.get_binding_shape()

IExecutionContext.get_tensor_shape()

IExecutionContext.get_strides()

IExecutionContext.get_tensor_strides()

IExecutionContext.set_binding_shape()

IExecutionContext.set_input_shape()

IFullyConnectedLayer

IMatrixMultiplyLayer

INetworkDefinition.add_convolution()

INetworkDefinition.add_convolution_nd()

INetworkDefinition.add_deconvolution()

INetworkDefinition.add_deconvolution_nd()

INetworkDefinition.add_fully_connected()

INetworkDefinition.add_matrix_multiply()

INetworkDefinition.add_padding()

INetworkDefinition.add_padding_nd()

INetworkDefinition.add_pooling()

INetworkDefinition.add_pooling_nd()

INetworkDefinition.add_rnn_v2()

INetworkDefinition.add_loop()

INetworkDefinition.has_explicit_precision

Explicit precision support was removed in 10.0.

INetworkDefinition.has_implicit_batch_dimension

Implicit batch support was removed.

IRNNv2Layer

ILoop

NetworkDefinitionCreationFlag.EXPLICIT_BATCH

Support was removed in 10.0.

NetworkDefinitionCreationFlag.EXPLICIT_PRECISION

Support was removed in 10.0.

PaddingMode.CAFFE_ROUND_DOWN

Caffe support was removed.

PaddingMode.CAFFE_ROUND_UP

Caffe support was removed.

PreviewFeature.DISABLE_EXTERNAL_TACTIC_SOURCES_FOR_CORE_0805

External tactics are always disabled for core code.

PreviewFeature.FASTER_DYNAMIC_SHAPES_0805

This flag is on by default.

ProfilingVerbosity.DEFAULT

ProfilingVerbosity.LAYER_NAMES_ONLY

ProfilingVerbosity.VERBOSE

ProfilingVerbosity.DETAILED

ResizeMode

Use InterpolationMode. Alias was removed.

SampleMode.DEFAULT

SampleMode.STRICT_BOUNDS

SliceMode

Use SampleMode. Alias was removed.