Allows a serialized functionally safe engine to be deserialized.
More...
#include <NvInferSafeRuntime.h>
Allows a serialized functionally safe engine to be deserialized.
- Warning
- In the safety runtime the application is required to set the error reporter for correct error handling.
- See also
- setErrorRecorder()
- Warning
- Do not inherit from this class, as doing so will break forward-compatibility of the API and ABI.
◆ IRuntime() [1/3]
nvinfer1::safe::IRuntime::IRuntime |
( |
| ) |
|
|
default |
◆ ~IRuntime()
virtual nvinfer1::safe::IRuntime::~IRuntime |
( |
| ) |
|
|
virtualdefaultnoexcept |
◆ IRuntime() [2/3]
nvinfer1::safe::IRuntime::IRuntime |
( |
IRuntime const & |
| ) |
|
|
delete |
◆ IRuntime() [3/3]
nvinfer1::safe::IRuntime::IRuntime |
( |
IRuntime && |
| ) |
|
|
delete |
◆ deserializeCudaEngine()
virtual ICudaEngine * nvinfer1::safe::IRuntime::deserializeCudaEngine |
( |
void const *const |
blob, |
|
|
std::size_t const |
size |
|
) |
| |
|
pure virtualnoexcept |
Deserialize an engine from a stream.
If the serialized engine requires plugins the plugin creator must be registered by calling IPluginRegistry::registerCreator() before calling deserializeCudaEngine(). Every plugin creator registered must have a unique combination of namespace, plugin name, and version.
- Parameters
-
blob | The memory that holds the serialized engine. |
size | The size of the memory in bytes. |
- Returns
- The engine, or nullptr if it could not be deserialized.
- See also
- IPluginRegistry::registerCreator()
Usage considerations
- Allowed context for the API call
- Thread-safe: Yes, if called from different instances of safe::IRuntime. Calling deserializeCudaEngine of the same safety runtime from multiple threads is not guaranteed to be thread safe.
◆ getErrorRecorder()
virtual IErrorRecorder * nvinfer1::safe::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()
Usage considerations
- Allowed context for the API call
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ setErrorRecorder()
virtual void nvinfer1::safe::IRuntime::setErrorRecorder |
( |
IErrorRecorder *const |
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()
Usage considerations
- Allowed context for the API call
◆ setGpuAllocator()
virtual void nvinfer1::safe::IRuntime::setGpuAllocator |
( |
IGpuAllocator *const |
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.
Usage considerations
- Allowed context for the API call
The documentation for this class was generated from the following file: