13#ifndef NV_INFER_SAFE_RUNTIME_H
14#define NV_INFER_SAFE_RUNTIME_H
42class IExecutionContext;
216 TRT_DEPRECATED virtual
bool bindingIsInput(std::int32_t const bindingIndex) const noexcept = 0;
232 TRT_DEPRECATED virtual
Dims getBindingDimensions(std::int32_t const bindingIndex) const noexcept = 0;
287 virtual
size_t getDeviceMemorySize() const noexcept = 0;
304 TRT_DEPRECATED virtual std::int32_t getBindingBytesPerComponent(std::int32_t const bindingIndex) const noexcept = 0;
321 TRT_DEPRECATED virtual std::int32_t getBindingComponentsPerElement(std::int32_t const bindingIndex) const noexcept = 0;
353 TRT_DEPRECATED virtual std::int32_t getBindingVectorizedDim(std::int32_t const bindingIndex) const noexcept = 0;
429 virtual
Dims getTensorShape(
AsciiChar const* tensorName) const noexcept = 0;
486 virtual std::int32_t getTensorBytesPerComponent(
AsciiChar const* tensorName) const noexcept = 0;
508 virtual std::int32_t getTensorComponentsPerElement(
AsciiChar const* tensorName) const noexcept = 0;
549 virtual std::int32_t getTensorVectorizedDim(
AsciiChar const* tensorName) const noexcept = 0;
562 virtual std::int32_t getNbIOTensors() const noexcept = 0;
581 virtual
AsciiChar const* getIOTensorName(std::int32_t const index) const noexcept = 0;
639 virtual
void setName(
AsciiChar const* const name) noexcept = 0;
667 virtual
void setDeviceMemory(
void* const memory) noexcept = 0;
740 void* const* const bindings, cudaStream_t const stream, cudaEvent_t const* const inputConsumed) noexcept = 0;
803 virtual
Dims getTensorStrides(
AsciiChar const* tensorName) const noexcept = 0;
829 virtual
bool setInputTensorAddress(
AsciiChar const* tensorName,
void const* data) noexcept = 0;
855 virtual
bool setOutputTensorAddress(
AsciiChar const* tensorName,
void* data) noexcept = 0;
870 virtual
bool setInputConsumedEvent(cudaEvent_t event) noexcept = 0;
881 virtual cudaEvent_t getInputConsumedEvent() const noexcept = 0;
901 virtual
void const* getInputTensorAddress(
AsciiChar const* tensorName) const noexcept = 0;
921 virtual
void* getOutputTensorAddress(
AsciiChar const* tensorName) const noexcept = 0;
938 virtual
bool enqueueV3(cudaStream_t stream) noexcept = 0;
990#define REGISTER_SAFE_TENSORRT_PLUGIN(name) \
991 static nvinfer1::safe::PluginRegistrar<name> pluginRegistrar##name {}
#define TENSORRTAPI
Definition: NvInferRuntimeCommon.h:54
#define TRT_DEPRECATED
Definition: NvInferRuntimeCommon.h:40
Definition: NvInferRuntimeCommon.h:171
Reference counted application-implemented error reporting interface for TensorRT objects.
Definition: NvInferRuntimeCommon.h:1689
Application-implemented class for controlling allocation on the GPU.
Definition: NvInferRuntimeCommon.h:1362
Application-implemented logging interface for the builder, refitter and runtime.
Definition: NvInferRuntimeCommon.h:1500
Single registration point for all plugins in an application. It is used to find plugin implementation...
Definition: NvInferRuntimeCommon.h:1234
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.
A functionally safe engine for executing inference on a built network.
Definition: NvInferSafeRuntime.h:143
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:612
virtual ICudaEngine const & getEngine() const noexcept=0
Get the associated engine.
Allows a serialized functionally safe engine to be deserialized.
Definition: NvInferSafeRuntime.h:55
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:974
PluginRegistrar()
Definition: NvInferSafeRuntime.h:976
IRuntime * createInferRuntime(ILogger &logger) noexcept
Create an instance of an safe::IRuntime class.
nvinfer1::IPluginRegistry * getSafePluginRegistry() noexcept
Return the safe plugin registry.
The TensorRT API version 1 namespace.
TensorIOMode
Definition of tensor IO Mode.
Definition: NvInferRuntimeCommon.h:1878
char_t AsciiChar
Definition: NvInferRuntimeCommon.h:91
DataType
The type of weights and tensors.
Definition: NvInferRuntimeCommon.h:117
TensorFormat
Format of the input/output tensors.
Definition: NvInferRuntimeCommon.h:201