13#ifndef NV_INFER_SAFE_RUNTIME_H
14#define NV_INFER_SAFE_RUNTIME_H
42class IExecutionContext;
176 virtual std::int32_t getBindingIndex(
AsciiChar const* const name) const noexcept = 0;
192 virtual
AsciiChar const* getBindingName(std::int32_t const bindingIndex) const noexcept = 0;
206 virtual
bool bindingIsInput(std::int32_t const bindingIndex) const noexcept = 0;
220 virtual
Dims getBindingDimensions(std::int32_t const bindingIndex) const noexcept = 0;
234 virtual
DataType getBindingDataType(std::int32_t const bindingIndex) const noexcept = 0;
273 virtual
size_t getDeviceMemorySize() const noexcept = 0;
288 virtual std::int32_t getBindingBytesPerComponent(std::int32_t const bindingIndex) const noexcept = 0;
303 virtual std::int32_t getBindingComponentsPerElement(std::int32_t const bindingIndex) const noexcept = 0;
314 virtual
TensorFormat getBindingFormat(std::int32_t const bindingIndex) const noexcept = 0;
327 virtual std::int32_t getBindingVectorizedDim(std::int32_t const bindingIndex) const noexcept = 0;
443 virtual
void setName(
AsciiChar const* const name) noexcept = 0;
471 virtual
void setDeviceMemory(
void* const memory) noexcept = 0;
482 virtual
Dims getStrides(std::int32_t const bindingIndex) const noexcept = 0;
537 virtual
bool enqueueV2(
538 void* const* const bindings, cudaStream_t const stream, cudaEvent_t* const inputConsumed) noexcept
632#define REGISTER_SAFE_TENSORRT_PLUGIN(name) \
633 static nvinfer1::safe::PluginRegistrar<name> pluginRegistrar##name {}
#define TENSORRTAPI
Definition: NvInferRuntimeCommon.h:54
Definition: NvInferRuntimeCommon.h:153
Reference counted application-implemented error reporting interface for TensorRT objects.
Definition: NvInferRuntimeCommon.h:1665
Application-implemented class for controlling allocation on the GPU.
Definition: NvInferRuntimeCommon.h:1338
Application-implemented logging interface for the builder, refitter and runtime.
Definition: NvInferRuntimeCommon.h:1476
Single registration point for all plugins in an application. It is used to find plugin implementation...
Definition: NvInferRuntimeCommon.h:1210
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 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:416
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:616
PluginRegistrar()
Definition: NvInferSafeRuntime.h:618
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:88
DataType
The type of weights and tensors.
Definition: NvInferRuntimeCommon.h:114
TensorFormat
Format of the input/output tensors.
Definition: NvInferRuntimeCommon.h:183