50#ifndef NV_INFER_SAFE_RUNTIME_H
51#define NV_INFER_SAFE_RUNTIME_H
79class IExecutionContext;
213 virtual std::int32_t getBindingIndex(
AsciiChar const* const name) const noexcept = 0;
229 virtual
AsciiChar const* getBindingName(std::int32_t const bindingIndex) const noexcept = 0;
243 virtual
bool bindingIsInput(std::int32_t const bindingIndex) const noexcept = 0;
257 virtual
Dims getBindingDimensions(std::int32_t const bindingIndex) const noexcept = 0;
271 virtual
DataType getBindingDataType(std::int32_t const bindingIndex) const noexcept = 0;
310 virtual
size_t getDeviceMemorySize() const noexcept = 0;
325 virtual std::int32_t getBindingBytesPerComponent(std::int32_t const bindingIndex) const noexcept = 0;
340 virtual std::int32_t getBindingComponentsPerElement(std::int32_t const bindingIndex) const noexcept = 0;
351 virtual
TensorFormat getBindingFormat(std::int32_t const bindingIndex) const noexcept = 0;
364 virtual std::int32_t getBindingVectorizedDim(std::int32_t const bindingIndex) const noexcept = 0;
480 virtual
void setName(
AsciiChar const* const name) noexcept = 0;
508 virtual
void setDeviceMemory(
void* const memory) noexcept = 0;
519 virtual
Dims getStrides(std::int32_t const bindingIndex) const noexcept = 0;
574 virtual
bool enqueueV2(
575 void* const* const bindings, cudaStream_t const stream, cudaEvent_t* const inputConsumed) noexcept
669#define REGISTER_SAFE_TENSORRT_PLUGIN(name) \
670 static nvinfer1::safe::PluginRegistrar<name> pluginRegistrar##name {}
#define TENSORRTAPI
Definition: NvInferRuntimeCommon.h:91
Definition: NvInferRuntimeCommon.h:190
Reference counted application-implemented error reporting interface for TensorRT objects.
Definition: NvInferRuntimeCommon.h:1699
Application-implemented class for controlling allocation on the GPU.
Definition: NvInferRuntimeCommon.h:1372
Application-implemented logging interface for the builder, refitter and runtime.
Definition: NvInferRuntimeCommon.h:1510
Single registration point for all plugins in an application. It is used to find plugin implementation...
Definition: NvInferRuntimeCommon.h:1244
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:180
virtual 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:453
virtual const ICudaEngine & getEngine() const noexcept=0
Get the associated engine.
Allows a serialized functionally safe engine to be deserialized.
Definition: NvInferSafeRuntime.h:92
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:653
PluginRegistrar()
Definition: NvInferSafeRuntime.h:655
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.
char_t AsciiChar
AsciiChar is the type used by TensorRT to represent valid ASCII characters.
Definition: NvInferRuntimeCommon.h:125
DataType
The type of weights and tensors.
Definition: NvInferRuntimeCommon.h:151
TensorFormat
Format of the input/output tensors.
Definition: NvInferRuntimeCommon.h:221