Allows a serialized functionally unsafe engine to be deserialized.
More...
Allows a serialized functionally unsafe engine to be deserialized.
- Warning
- Do not inherit from this class, as doing so will break forward-compatibility of the API and ABI.
◆ ~IRuntime()
virtual nvinfer1::IRuntime::~IRuntime |
( |
| ) |
|
|
inlineprotectedvirtual |
◆ deserializeCudaEngine() [1/2]
Deserialize an engine from a stream.
- Parameters
-
blob | The memory that holds the serialized engine. |
size | The size of the memory. |
pluginFactory | The plugin factory, if any plugins are used by the network, otherwise nullptr. |
- Returns
- The engine, or nullptr if it could not be deserialized.
◆ setDLACore()
virtual void nvinfer1::IRuntime::setDLACore |
( |
int32_t |
dlaCore | ) |
|
|
pure virtualnoexcept |
Set the DLA core that the deserialized engine must execute on.
- Parameters
-
dlaCore | The DLA core to execute the engine on (0 to N-1, where N is the maximum number of DLA's present on the device). Default value is 0. |
- See also
- getDLACore()
- Warning
- Starting with TensorRT 8, the default value will be -1 if the DLA is not specified or unused.
◆ getDLACore()
virtual int32_t nvinfer1::IRuntime::getDLACore |
( |
| ) |
const |
|
pure virtualnoexcept |
Get the DLA core that the engine executes on.
- Returns
- If setDLACore is called, returns DLA core from 0 to N-1, else returns 0.
- Warning
- Starting with TensorRT 8, the default value will be -1 if the DLA is not specified or unused.
◆ getNbDLACores()
virtual int32_t nvinfer1::IRuntime::getNbDLACores |
( |
| ) |
const |
|
pure virtualnoexcept |
Returns number of DLA hardware cores accessible.
◆ destroy()
virtual void nvinfer1::IRuntime::destroy |
( |
| ) |
|
|
pure virtualnoexcept |
◆ setGpuAllocator()
virtual void nvinfer1::IRuntime::setGpuAllocator |
( |
IGpuAllocator * |
allocator | ) |
|
|
pure virtualnoexcept |
Set the GPU allocator.
- Parameters
-
allocator | Set the GPU allocator to be used by the runtime. All GPU memory acquired will use this allocator. If NULL is passed, the default allocator will be used. |
Default: uses cudaMalloc/cudaFree.
If nullptr is passed, the default allocator will be used.
◆ setErrorRecorder()
virtual void nvinfer1::IRuntime::setErrorRecorder |
( |
IErrorRecorder * |
recorder | ) |
|
|
pure virtualnoexcept |
Set the ErrorRecorder for this interface.
Assigns the ErrorRecorder to this interface. The ErrorRecorder will track all errors during execution. This function will call incRefCount of the registered ErrorRecorder at least once. Setting recorder to nullptr unregisters the recorder with the interface, resulting in a call to decRefCount if a recorder has been registered.
- Parameters
-
recorder | The error recorder to register with this interface. |
- See also
- getErrorRecorder
◆ getErrorRecorder()
virtual IErrorRecorder* nvinfer1::IRuntime::getErrorRecorder |
( |
| ) |
const |
|
pure virtualnoexcept |
get the ErrorRecorder assigned to this interface.
Retrieves the assigned error recorder object for the given class. A default error recorder does not exist, so a nullptr will be returned if setErrorRecorder has not been called.
- Returns
- A pointer to the IErrorRecorder object that has been registered.
- See also
- setErrorRecorder
◆ deserializeCudaEngine() [2/2]
Deserialize an engine from a stream when plugin factory is not used.
- Parameters
-
blob | The memory that holds the serialized engine. |
size | The size of the memory. |
- Returns
- The engine, or nullptr if it could not be deserialized.
The documentation for this class was generated from the following file: