13#ifndef NV_INFER_SAFE_RUNTIME_H
14#define NV_INFER_SAFE_RUNTIME_H
43class IExecutionContext;
217 TRT_DEPRECATED virtual
bool bindingIsInput(std::int32_t const bindingIndex) const noexcept = 0;
233 TRT_DEPRECATED virtual
Dims getBindingDimensions(std::int32_t const bindingIndex) const noexcept = 0;
288 virtual
size_t getDeviceMemorySize() const noexcept = 0;
305 TRT_DEPRECATED virtual std::int32_t getBindingBytesPerComponent(std::int32_t const bindingIndex) const noexcept = 0;
322 TRT_DEPRECATED virtual std::int32_t getBindingComponentsPerElement(std::int32_t const bindingIndex) const noexcept = 0;
354 TRT_DEPRECATED virtual std::int32_t getBindingVectorizedDim(std::int32_t const bindingIndex) const noexcept = 0;
430 virtual
Dims getTensorShape(
AsciiChar const* tensorName) const noexcept = 0;
487 virtual std::int32_t getTensorBytesPerComponent(
AsciiChar const* tensorName) const noexcept = 0;
509 virtual std::int32_t getTensorComponentsPerElement(
AsciiChar const* tensorName) const noexcept = 0;
550 virtual std::int32_t getTensorVectorizedDim(
AsciiChar const* tensorName) const noexcept = 0;
563 virtual std::int32_t getNbIOTensors() const noexcept = 0;
582 virtual
AsciiChar const* getIOTensorName(std::int32_t const index) const noexcept = 0;
640 virtual
void setName(
AsciiChar const* const name) noexcept = 0;
668 virtual
void setDeviceMemory(
void* const memory) noexcept = 0;
741 void* const* const bindings, cudaStream_t const stream, cudaEvent_t const* const inputConsumed) noexcept = 0;
804 virtual
Dims getTensorStrides(
AsciiChar const* tensorName) const noexcept = 0;
830 virtual
bool setInputTensorAddress(
AsciiChar const* tensorName,
void const* data) noexcept = 0;
856 virtual
bool setOutputTensorAddress(
AsciiChar const* tensorName,
void* data) noexcept = 0;
871 virtual
bool setInputConsumedEvent(cudaEvent_t event) noexcept = 0;
882 virtual cudaEvent_t getInputConsumedEvent() const noexcept = 0;
902 virtual
void const* getInputTensorAddress(
AsciiChar const* tensorName) const noexcept = 0;
922 virtual
void* getOutputTensorAddress(
AsciiChar const* tensorName) const noexcept = 0;
939 virtual
bool enqueueV3(cudaStream_t stream) noexcept = 0;
998 AsciiChar const*
const pluginNamespace =
"") noexcept
1096template <typename T>
1114#define REGISTER_SAFE_TENSORRT_PLUGIN(name) \
1115 static nvinfer1::safe::PluginRegistrar<name> pluginRegistrar##name {}
#define TENSORRTAPI
Definition: NvInferRuntimeBase.h:54
#define TRT_DEPRECATED
Definition: NvInferRuntimeBase.h:40
Definition: NvInferRuntimeBase.h:179
Reference counted application-implemented error reporting interface for TensorRT objects.
Definition: NvInferRuntimeBase.h:694
Application-implemented class for controlling allocation on the GPU.
Definition: NvInferRuntimeBase.h:367
Application-implemented logging interface for the builder, refitter and runtime.
Definition: NvInferRuntimeBase.h:505
Plugin creator class for user implemented layers.
Definition: NvInferRuntimePlugin.h:803
A functionally safe engine for executing inference on a built network.
Definition: NvInferSafeRuntime.h:144
virtual TRT_DEPRECATED std::int32_t getNbBindings() const noexcept=0
Get the number of binding indices.
Functionally safe context for executing inference using an engine.
Definition: NvInferSafeRuntime.h:613
virtual ICudaEngine const & getEngine() const noexcept=0
Get the associated engine.
Single registration point for all plugins in an application. It is used to find plugin implementation...
Definition: NvInferSafeRuntime.h:961
virtual IPluginCreator * getPluginCreator(AsciiChar const *const pluginName, AsciiChar const *const pluginVersion, AsciiChar const *const pluginNamespace="") noexcept=0
Return plugin creator based on plugin name, version, and namespace associated with plugin during netw...
virtual IPluginCreator *const * getPluginCreatorList(int32_t *const numCreators) const noexcept=0
Return all the registered plugin creators and the number of registered plugin creators....
virtual bool registerCreator(IPluginCreator &creator, AsciiChar const *const pluginNamespace) noexcept=0
Register a plugin creator. Returns false if one with same type is already registered.
Allows a serialized functionally safe engine to be deserialized.
Definition: NvInferSafeRuntime.h:56
virtual ICudaEngine * deserializeCudaEngine(void const *const blob, std::size_t const size) noexcept=0
Deserialize an engine from a stream.
virtual IErrorRecorder * getErrorRecorder() const noexcept=0
Get the ErrorRecorder assigned to this interface.
virtual void setGpuAllocator(IGpuAllocator *const allocator) noexcept=0
Set the GPU allocator.
virtual void setErrorRecorder(IErrorRecorder *const recorder) noexcept=0
Set the ErrorRecorder for this interface.
Register the plugin creator to the registry The static registry object will be instantiated when the ...
Definition: NvInferSafeRuntime.h:1098
PluginRegistrar()
Definition: NvInferSafeRuntime.h:1100
IPluginRegistry * getSafePluginRegistry() noexcept
Return the safe plugin registry.
IRuntime * createInferRuntime(ILogger &logger) noexcept
Create an instance of an safe::IRuntime class.
The TensorRT API version 1 namespace.
TensorIOMode
Definition of tensor IO Mode.
Definition: NvInferRuntimeBase.h:883
char_t AsciiChar
Definition: NvInferRuntimeBase.h:94
DataType
The type of weights and tensors.
Definition: NvInferRuntimeBase.h:120
TensorFormat
Format of the input/output tensors.
Definition: NvInferRuntimeBase.h:209