A class for runtime configuration. This class is used during execution context creation.
More...
#include <NvInferRuntime.h>
|
| apiv::VRuntimeConfig * | mImpl |
| |
A class for runtime configuration. This class is used during execution context creation.
- See also
- IRuntime, IBuilderConfig
◆ ~IRuntimeConfig()
| virtual nvinfer1::IRuntimeConfig::~IRuntimeConfig |
( |
| ) |
|
|
virtualdefaultnoexcept |
◆ createRuntimeCache()
| IRuntimeCache * nvinfer1::IRuntimeConfig::createRuntimeCache |
( |
| ) |
const |
|
inlinenoexcept |
Create an empty Runtime cache.
- Returns
- A fresh IRuntimeCache object.
◆ getCudaGraphStrategy()
Return the strategy used for CUDA graphs for JIT (Just-In-Time) inference.
- Returns
- The CUDA graph strategy.
◆ getDynamicShapesKernelSpecializationStrategy()
Return the dynamic shape specialization strategy of this config.
- Returns
- dynamicShapesKernelSpecializationStrategy The dynamic shape specialization strategy.
◆ getExecutionContextAllocationStrategy()
Get the execution context allocation strategy.
- Returns
- The execution context allocation strategy.
◆ getRuntimeCache()
| IRuntimeCache * nvinfer1::IRuntimeConfig::getRuntimeCache |
( |
| ) |
const |
|
inlinenoexcept |
Get the Runtime cache from the runtime config.
- Returns
- The Runtime cache.
◆ setCudaGraphStrategy()
Set the strategy used for CUDA graphs for JIT (Just-In-Time) inference. Default is kDISABLED.
- Note
- Even if the strategy was set to kWHOLE_GRAPH_CAPTURE, RTX CUDA graphs may be disabled internally during runtime under following circumstances:
- The given stream does not allow graph capture.
- The allocation strategy is blocking.
- Some layers in the engine use data-dependent dynamic shapes or on-device control flow.
- The engine is streaming weights. If CUDA graph is not supported for above or any other reason, it will silently ignore the set strategy and run inference without CUDA graphs.
- Warning
- If the stream is being captured elsewhere, RTX CUDA graphs will be disabled.
- Parameters
-
| strategy | The CUDA graph strategy. |
- Returns
- True if the strategy was within range and set successfully, false otherwise.
◆ setDynamicShapesKernelSpecializationStrategy()
Set the dynamic shape kernel specialization strategy for this config.
- Parameters
-
| dynamicShapesKernelSpecializationStrategy | The dynamic shape specialization strategy. |
◆ setExecutionContextAllocationStrategy()
Set the execution context allocation strategy. Default value is kSTATIC.
- Parameters
-
| strategy | The execution context allocation strategy. |
◆ setRuntimeCache()
| bool nvinfer1::IRuntimeConfig::setRuntimeCache |
( |
IRuntimeCache const & |
cache | ) |
|
|
inlinenoexcept |
Set Runtime cache to the runtime config. Enables Runtime caching.
- Parameters
-
| cache | The Runtime cache to set. |
◆ mImpl
| apiv::VRuntimeConfig* nvinfer1::IRuntimeConfig::mImpl |
|
protected |
The documentation for this class was generated from the following file: