IRuntimeConfig¶
- tensorrt_rtx.ExecutionContextAllocationStrategy¶
Different memory allocation behaviors for IExecutionContext.
Members:
STATIC : Default static allocation with the maximum size across all profiles.
ON_PROFILE_CHANGE : Reallocate for a profile when it’s selected.
USER_MANAGED : The user supplies custom allocation to the execution context.
- class tensorrt_rtx.IRuntimeConfig¶
A runtime configuration for an
ICudaEngine
.- __init__(*args, **kwargs)¶
- create_runtime_cache(self: tensorrt_rtx.tensorrt_rtx.IRuntimeConfig) nvinfer1::IRuntimeCache ¶
Create a runtime cache.
- Returns:
The runtime cache.
- get_execution_context_allocation_strategy(self: tensorrt_rtx.tensorrt_rtx.IRuntimeConfig) tensorrt_rtx.tensorrt_rtx.ExecutionContextAllocationStrategy ¶
Get the execution context allocation strategy.
- Returns:
The execution context allocation strategy.
- get_runtime_cache(self: tensorrt_rtx.tensorrt_rtx.IRuntimeConfig) nvinfer1::IRuntimeCache ¶
Get the runtime cache.
- Returns:
The runtime cache.
- set_execution_context_allocation_strategy(self: tensorrt_rtx.tensorrt_rtx.IRuntimeConfig, strategy: tensorrt_rtx.tensorrt_rtx.ExecutionContextAllocationStrategy = <ExecutionContextAllocationStrategy.STATIC: 0>) None ¶
Set the execution context allocation strategy.
- Parameters:
strategy – The execution context allocation strategy.
- set_runtime_cache(self: tensorrt_rtx.tensorrt_rtx.IRuntimeConfig, cache: tensorrt_rtx.IRuntimeCache = None) bool ¶
Set the runtime cache.
- Parameters:
cache – The runtime cache.