TensorRT  7.1.3.0
NvInferRuntime.h
Go to the documentation of this file.
1 /*
2  * Copyright 1993-2020 NVIDIA Corporation. All rights reserved.
3  *
4  * NOTICE TO LICENSEE:
5  *
6  * This source code and/or documentation ("Licensed Deliverables") are
7  * subject to NVIDIA intellectual property rights under U.S. and
8  * international Copyright laws.
9  *
10  * These Licensed Deliverables contained herein is PROPRIETARY and
11  * CONFIDENTIAL to NVIDIA and is being provided under the terms and
12  * conditions of a form of NVIDIA software license agreement by and
13  * between NVIDIA and Licensee ("License Agreement") or electronically
14  * accepted by Licensee. Notwithstanding any terms or conditions to
15  * the contrary in the License Agreement, reproduction or disclosure
16  * of the Licensed Deliverables to any third party without the express
17  * written consent of NVIDIA is prohibited.
18  *
19  * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
20  * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
21  * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS
22  * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
23  * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
24  * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
25  * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
26  * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
27  * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
28  * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
29  * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
30  * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
31  * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
32  * OF THESE LICENSED DELIVERABLES.
33  *
34  * U.S. Government End Users. These Licensed Deliverables are a
35  * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
36  * 1995), consisting of "commercial computer software" and "commercial
37  * computer software documentation" as such terms are used in 48
38  * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
39  * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
40  * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
41  * U.S. Government End Users acquire the Licensed Deliverables with
42  * only those rights set forth herein.
43  *
44  * Any use of the Licensed Deliverables in individual and commercial
45  * software must include, in the user documentation and internal
46  * comments to the code, the above Disclaimer and U.S. Government End
47  * Users Notice.
48  */
49 
50 #ifndef NV_INFER_RUNTIME_H
51 #define NV_INFER_RUNTIME_H
52 
58 
59 #include "NvInferRuntimeCommon.h"
60 
61 namespace nvinfer1
62 {
63 
64 class IExecutionContext;
65 class ICudaEngine;
66 class IPluginFactory;
67 
82 enum class EngineCapability : int
83 {
84  kDEFAULT = 0,
85  kSAFE_GPU = 1,
86  kSAFE_DLA = 2,
87 };
88 
89 template <>
90 constexpr inline int EnumMax<EngineCapability>()
91 {
92  return 3;
93 }
94 
107 class Weights
108 {
109 public:
111  const void* values;
112  int64_t count;
113 };
114 
126 {
127 public:
128  virtual void* data() const noexcept = 0;
129  virtual std::size_t size() const noexcept = 0;
130  virtual DataType type() const noexcept = 0;
131  virtual void destroy() noexcept = 0;
132 protected:
133  virtual ~IHostMemory() {}
134 };
135 
143 class IPlugin
144 {
145 public:
153  virtual int getNbOutputs() const TRTNOEXCEPT = 0;
154 
164  virtual Dims getOutputDimensions(int index, const Dims* inputs, int nbInputDims) TRTNOEXCEPT = 0;
165 
182  virtual void configure(const Dims* inputDims, int nbInputs, const Dims* outputDims, int nbOutputs, int maxBatchSize) TRTNOEXCEPT = 0;
183 
189  virtual int initialize() TRTNOEXCEPT = 0;
190 
195  virtual void terminate() TRTNOEXCEPT = 0;
196 
205  virtual size_t getWorkspaceSize(int maxBatchSize) const TRTNOEXCEPT = 0;
206 
218  virtual int enqueue(int batchSize, const void* const* inputs, void** outputs, void* workspace, cudaStream_t stream) TRTNOEXCEPT = 0;
219 
225  virtual size_t getSerializationSize() TRTNOEXCEPT = 0;
226 
234  virtual void serialize(void* buffer) TRTNOEXCEPT = 0;
235 
236  virtual ~IPlugin() {}
237 };
238 
247 class IPluginExt : public IPlugin
248 {
249 public:
255  virtual int getTensorRTVersion() const TRTNOEXCEPT
256  {
257  return NV_TENSORRT_VERSION;
258  }
259 
272  virtual bool supportsFormat(DataType type, PluginFormat format) const TRTNOEXCEPT = 0;
273 
292  virtual void configureWithFormat(const Dims* inputDims, int nbInputs, const Dims* outputDims, int nbOutputs, DataType type, PluginFormat format, int maxBatchSize) TRTNOEXCEPT = 0;
293 
294  virtual ~IPluginExt() {}
295 
296 protected:
300  void configure(const Dims* /*inputDims*/, int /*nbInputs*/, const Dims* /*outputDims*/, int /*nbOutputs*/, int /*maxBatchSize*/) _TENSORRT_FINAL TRTNOEXCEPT {}
301 };
302 
313 enum class DimensionOperation : int
314 {
315  kSUM = 0,
316  kPROD = 1,
317  kMAX = 2,
318  kMIN = 3,
319  kSUB = 4,
320  kEQUAL = 5,
321  kLESS = 6,
322  kFLOOR_DIV = 7,
323  kCEIL_DIV = 8
324 };
325 
326 template <>
327 constexpr inline int EnumMax<DimensionOperation>()
328 {
329  return 9;
330 }
331 
343 {
344 public:
346  virtual bool isConstant() const = 0;
347 
350  virtual int getConstantValue() const = 0;
351 
352 protected:
353  virtual ~IDimensionExpr() {}
354 };
355 
374 {
375 public:
377  virtual const IDimensionExpr* constant(int value) = 0;
378 
381  virtual const IDimensionExpr* operation(DimensionOperation op, const IDimensionExpr& first, const IDimensionExpr& second) = 0;
382 
383 protected:
384  virtual ~IExprBuilder() {}
385 };
386 
393 {
394 public:
395  int nbDims;
397 };
398 
405 {
408 
411 
414 };
415 
436 {
437 public:
438  IPluginV2DynamicExt* clone() const _TENSORRT_OVERRIDE TRTNOEXCEPT = 0;
439 
464  virtual DimsExprs getOutputDimensions(int outputIndex, const DimsExprs* inputs, int nbInputs, IExprBuilder& exprBuilder) = 0;
465 
469  static constexpr int kFORMAT_COMBINATION_LIMIT = 100;
470 
502  virtual bool supportsFormatCombination(int pos, const PluginTensorDesc* inOut, int nbInputs, int nbOutputs) TRTNOEXCEPT = 0;
503 
517  virtual void configurePlugin(const DynamicPluginTensorDesc* in, int nbInputs, const DynamicPluginTensorDesc* out, int nbOutputs) TRTNOEXCEPT = 0;
518 
528  virtual size_t getWorkspaceSize(const PluginTensorDesc* inputs, int nbInputs, const PluginTensorDesc* outputs, int nbOutputs) const TRTNOEXCEPT = 0;
529 
542  virtual int enqueue(const PluginTensorDesc* inputDesc, const PluginTensorDesc* outputDesc, const void* const* inputs, void* const* outputs, void* workspace, cudaStream_t stream) TRTNOEXCEPT = 0;
543 
544 protected:
545  int getTensorRTVersion() const _TENSORRT_OVERRIDE TRTNOEXCEPT
546  {
547  return (static_cast<int>(PluginVersion::kV2_DYNAMICEXT) << 24 | (NV_TENSORRT_VERSION & 0xFFFFFF));
548  }
549 
550  virtual ~IPluginV2DynamicExt() {}
551 
552  // Rest of the methods below are obsolete inherited methods, and marked final when using a C++11 compiler.
553  // Derived classes should not override them.
554 
560  TRT_DEPRECATED
561  Dims getOutputDimensions(int /*index*/, const Dims* /*inputs*/, int /*nbInputDims*/) _TENSORRT_FINAL TRTNOEXCEPT
562  {
563  return Dims{-1, {}, {}};
564  }
565 
571  TRT_DEPRECATED
572  bool isOutputBroadcastAcrossBatch(int /*outputIndex*/, const bool* /*inputIsBroadcasted*/, int /*nbInputs*/) const _TENSORRT_FINAL TRTNOEXCEPT
573  {
574  return false;
575  }
576 
582  TRT_DEPRECATED
583  bool canBroadcastInputAcrossBatch(int /*inputIndex*/) const _TENSORRT_FINAL TRTNOEXCEPT
584  {
585  return true;
586  }
587 
596  TRT_DEPRECATED
597  bool supportsFormat(DataType /*type*/, PluginFormat /*format*/) const _TENSORRT_FINAL TRTNOEXCEPT { return false; }
598 
607  TRT_DEPRECATED
608  void configurePlugin(const Dims* /*inputDims*/, int /*nbInputs*/, const Dims* /*outputDims*/,
609  int /*nbOutputs*/, const DataType* /*inputTypes*/, const DataType* /*outputTypes*/,
610  const bool* /*inputIsBroadcast*/, const bool* /*outputIsBroadcast*/, PluginFormat /*floatFormat*/, int /*maxBatchSize*/) _TENSORRT_FINAL TRTNOEXCEPT {}
611 
621  TRT_DEPRECATED
622  size_t getWorkspaceSize(int /*maxBatchSize*/) const _TENSORRT_FINAL TRTNOEXCEPT { return 0; }
623 
631  TRT_DEPRECATED
632  int enqueue(int /*batchSize*/, const void* const* /*inputs*/, void** /*outputs*/, void* /*workspace*/, cudaStream_t /*stream*/) _TENSORRT_FINAL TRTNOEXCEPT
633  {
634  return 1;
635  }
636 };
637 
649 {
650 public:
657  virtual void reportLayerTime(const char* layerName, float ms) TRTNOEXCEPT = 0;
658 
659  virtual ~IProfiler() {}
660 };
661 
668 enum class WeightsRole : int
669 {
670  kKERNEL = 0,
671  kBIAS = 1,
672  kSHIFT = 2,
673  kSCALE = 3,
674  kCONSTANT = 4,
675 };
676 
677 template <>
678 constexpr inline int EnumMax<WeightsRole>()
679 {
680  return 5;
681 }
682 
688 enum class DeviceType : int
689 {
690  kGPU,
691  kDLA,
692 };
693 template <>
694 constexpr inline int EnumMax<DeviceType>()
695 {
696  return 2;
697 }
698 
699 
707 class IRuntime
708 {
709 public:
719  virtual nvinfer1::ICudaEngine* deserializeCudaEngine(const void* blob, std::size_t size, IPluginFactory* pluginFactory) noexcept = 0;
720 
728  virtual void setDLACore(int dlaCore) noexcept = 0;
729 
736  virtual int getDLACore() const noexcept = 0;
737 
741  virtual int getNbDLACores() const noexcept = 0;
742 
746  virtual void destroy() noexcept = 0;
747 
748 protected:
749  virtual ~IRuntime() {}
750 
751 public:
760  virtual void setGpuAllocator(IGpuAllocator* allocator) noexcept = 0;
761 
771  //
774  virtual void setErrorRecorder(IErrorRecorder* recorder) noexcept = 0;
775 
786  virtual IErrorRecorder* getErrorRecorder() const noexcept = 0;
787 
796  nvinfer1::ICudaEngine* deserializeCudaEngine(const void* blob, std::size_t size) noexcept
797  {
798  return deserializeCudaEngine(blob, size, nullptr);
799  }
800 };
801 
810 {
811 public:
822  virtual bool setWeights(const char* layerName, WeightsRole role, Weights weights) TRTNOEXCEPT = 0;
823 
829  virtual bool refitCudaEngine() TRTNOEXCEPT = 0;
830 
847  virtual int getMissing(int size, const char** layerNames, WeightsRole* roles) TRTNOEXCEPT = 0;
848 
861  virtual int getAll(int size, const char** layerNames, WeightsRole* roles) TRTNOEXCEPT = 0;
862 
863  virtual void destroy() TRTNOEXCEPT = 0;
864 
865 protected:
866  virtual ~IRefitter() {}
867 
868 public:
881  virtual bool setDynamicRange(const char* tensorName, float min, float max) TRTNOEXCEPT = 0;
882 
890  virtual float getDynamicRangeMin(const char* tensorName) const TRTNOEXCEPT = 0;
891 
899  virtual float getDynamicRangeMax(const char* tensorName) const TRTNOEXCEPT = 0;
900 
912  virtual int getTensorsWithDynamicRange(int size, const char** tensorNames) const TRTNOEXCEPT = 0;
913 
923  //
926  virtual void setErrorRecorder(IErrorRecorder* recorder) TRTNOEXCEPT = 0;
927 
938  virtual IErrorRecorder* getErrorRecorder() const TRTNOEXCEPT = 0;
939 };
940 
948 {
949 public:
964  virtual IPlugin* createPlugin(const char* layerName, const void* serialData, size_t serialLength) TRTNOEXCEPT = 0;
965 
966  virtual ~IPluginFactory() {}
967 };
968 
979 enum class OptProfileSelector : int
980 {
981  kMIN = 0,
982  kOPT = 1,
983  kMAX = 2
984 };
985 
986 template <>
987 constexpr inline int EnumMax<OptProfileSelector>()
988 {
989  return 3;
990 }
991 
1015 {
1016 public:
1042  virtual bool setDimensions(const char* inputName, OptProfileSelector select, Dims dims) noexcept = 0;
1043 
1049  virtual Dims getDimensions(const char* inputName, OptProfileSelector select) const noexcept = 0;
1050 
1074  virtual bool setShapeValues(
1075  const char* inputName, OptProfileSelector select, const int32_t* values, int nbValues) noexcept = 0;
1076 
1083  virtual int getNbShapeValues(const char* inputName) const noexcept = 0;
1084 
1090  virtual const int32_t* getShapeValues(const char* inputName, OptProfileSelector select) const noexcept = 0;
1091 
1105  virtual bool setExtraMemoryTarget(float target) noexcept = 0;
1106 
1110  virtual float getExtraMemoryTarget() const noexcept = 0;
1111 
1123  virtual bool isValid() const noexcept = 0;
1124 
1125 protected:
1126  ~IOptimizationProfile() noexcept = default;
1127 };
1128 
1137 {
1138 public:
1149  virtual int getNbBindings() const noexcept = 0;
1150 
1167  virtual int getBindingIndex(const char* name) const noexcept = 0;
1168 
1184  virtual const char* getBindingName(int bindingIndex) const noexcept = 0;
1185 
1194  virtual bool bindingIsInput(int bindingIndex) const noexcept = 0;
1195 
1216  virtual Dims getBindingDimensions(int bindingIndex) const noexcept = 0;
1217 
1226  virtual DataType getBindingDataType(int bindingIndex) const noexcept = 0;
1227 
1235  virtual int getMaxBatchSize() const noexcept = 0;
1236 
1245  virtual int getNbLayers() const noexcept = 0;
1246 
1253  TRT_DEPRECATED
1254  virtual std::size_t getWorkspaceSize() const noexcept = 0;
1255 
1265  virtual IHostMemory* serialize() const noexcept = 0;
1266 
1277  virtual IExecutionContext* createExecutionContext() noexcept = 0;
1278 
1282  virtual void destroy() noexcept = 0;
1283 
1294  virtual TensorLocation getLocation(int bindingIndex) const noexcept = 0;
1295 
1296 protected:
1297  virtual ~ICudaEngine() {}
1298 
1299 public:
1307 
1313  virtual size_t getDeviceMemorySize() const noexcept = 0;
1314 
1320  virtual bool isRefittable() const noexcept = 0;
1321 
1331  virtual int getBindingBytesPerComponent(int bindingIndex) const noexcept = 0;
1332 
1342  virtual int getBindingComponentsPerElement(int bindingIndex) const noexcept = 0;
1343 
1349  virtual TensorFormat getBindingFormat(int bindingIndex) const noexcept = 0;
1350 
1365  virtual const char* getBindingFormatDesc(int bindingIndex) const noexcept = 0;
1366 
1374  virtual int getBindingVectorizedDim(int bindingIndex) const noexcept = 0;
1375 
1386  virtual const char* getName() const noexcept = 0;
1387 
1394  virtual int getNbOptimizationProfiles() const noexcept = 0;
1395 
1418  virtual Dims getProfileDimensions(int bindingIndex, int profileIndex, OptProfileSelector select) const noexcept = 0;
1419 
1441  virtual const int32_t* getProfileShapeValues(int profileIndex, int inputIndex, OptProfileSelector select) const
1442  noexcept
1443  = 0;
1444 
1476  virtual bool isShapeBinding(int bindingIndex) const noexcept = 0;
1477 
1487  virtual bool isExecutionBinding(int bindingIndex) const noexcept = 0;
1488 
1498  virtual EngineCapability getEngineCapability() const noexcept = 0;
1499 
1508  //
1511  virtual void setErrorRecorder(IErrorRecorder* recorder) noexcept = 0;
1512 
1523  virtual IErrorRecorder* getErrorRecorder() const noexcept = 0;
1524 
1539  virtual bool hasImplicitBatchDimension() const TRTNOEXCEPT = 0;
1540 };
1541 
1553 {
1554 public:
1566  virtual bool execute(int batchSize, void** bindings) noexcept = 0;
1567 
1581  virtual bool enqueue(int batchSize, void** bindings, cudaStream_t stream, cudaEvent_t* inputConsumed) noexcept = 0;
1582 
1590  virtual void setDebugSync(bool sync) noexcept = 0;
1591 
1597  virtual bool getDebugSync() const noexcept = 0;
1598 
1604  virtual void setProfiler(IProfiler*) noexcept = 0;
1605 
1611  virtual IProfiler* getProfiler() const noexcept = 0;
1612 
1618  virtual const ICudaEngine& getEngine() const noexcept = 0;
1619 
1623  virtual void destroy() noexcept = 0;
1624 
1625 protected:
1626  virtual ~IExecutionContext() noexcept {}
1627 
1628 public:
1636  virtual void setName(const char* name) noexcept = 0;
1637 
1643  virtual const char* getName() const noexcept = 0;
1644 
1656  virtual void setDeviceMemory(void* memory) noexcept = 0;
1657 
1674  virtual Dims getStrides(int bindingIndex) const noexcept = 0;
1675 
1676 public:
1702  virtual bool setOptimizationProfile(int profileIndex) noexcept = 0;
1703 
1711  virtual int getOptimizationProfile() const noexcept = 0;
1712 
1734  virtual bool setBindingDimensions(int bindingIndex, Dims dimensions) noexcept = 0;
1735 
1761  virtual Dims getBindingDimensions(int bindingIndex) const noexcept = 0;
1762 
1778  virtual bool setInputShapeBinding(int bindingIndex, const int32_t* data) noexcept = 0;
1779 
1796  virtual bool getShapeBinding(int bindingIndex, int32_t* data) const noexcept = 0;
1797 
1808  virtual bool allInputDimensionsSpecified() const noexcept = 0;
1809 
1819  virtual bool allInputShapesSpecified() const noexcept = 0;
1820 
1830  //
1833  virtual void setErrorRecorder(IErrorRecorder* recorder) noexcept = 0;
1834 
1845  virtual IErrorRecorder* getErrorRecorder() const noexcept = 0;
1846 
1859  virtual bool executeV2(void** bindings) noexcept = 0;
1860 
1880  virtual bool enqueueV2(void** bindings, cudaStream_t stream, cudaEvent_t* inputConsumed) noexcept = 0;
1881 };
1882 }
1887 extern "C" TENSORRTAPI void* createInferRuntime_INTERNAL(void* logger, int version);
1888 
1893 extern "C" TENSORRTAPI void* createInferRefitter_INTERNAL(void* engine, void* logger, int version);
1894 
1895 namespace nvinfer1
1896 {
1897 namespace // unnamed namespace avoids linkage surprises when linking objects built with different versions of this header.
1898 {
1905 {
1906  return static_cast<IRuntime*>(createInferRuntime_INTERNAL(&logger, NV_TENSORRT_VERSION));
1907 }
1908 
1915 {
1916  return static_cast<IRefitter*>(createInferRefitter_INTERNAL(&engine, &logger, NV_TENSORRT_VERSION));
1917 }
1918 }
1919 }
1920 
1921 #endif // NV_INFER_RUNTIME_H
nvinfer1::IPluginFactory::createPlugin
virtual IPlugin * createPlugin(const char *layerName, const void *serialData, size_t serialLength)=0
Create a plugin from serialized data.
nvinfer1::IRefitter::getTensorsWithDynamicRange
virtual int getTensorsWithDynamicRange(int size, const char **tensorNames) const =0
Get names of all tensors that have refittable dynamic ranges.
nvinfer1::IExecutionContext::getProfiler
virtual IProfiler * getProfiler() const noexcept=0
Get the profiler.
nvinfer1::IRefitter::getDynamicRangeMin
virtual float getDynamicRangeMin(const char *tensorName) const =0
Get minimum of dynamic range.
nvinfer1::EnumMax< OptProfileSelector >
constexpr int EnumMax< OptProfileSelector >()
Number of different values of OptProfileSelector enum.
Definition: NvInferRuntime.h:987
nvinfer1::IExecutionContext::getDebugSync
virtual bool getDebugSync() const noexcept=0
Get the debug sync flag.
nvinfer1::IProfiler::reportLayerTime
virtual void reportLayerTime(const char *layerName, float ms)=0
Layer time reporting callback.
nvinfer1::IExecutionContext::destroy
virtual void destroy() noexcept=0
Destroy this object.
nvinfer1::IExecutionContext::getEngine
virtual const ICudaEngine & getEngine() const noexcept=0
Get the associated engine.
nvinfer1::DynamicPluginTensorDesc
Definition: NvInferRuntime.h:404
nvinfer1::IExprBuilder::constant
virtual const IDimensionExpr * constant(int value)=0
Return pointer to IDimensionExp for given value.
nvinfer1::IExecutionContext::setOptimizationProfile
virtual bool setOptimizationProfile(int profileIndex) noexcept=0
Select an optimization profile for the current context.
nvinfer1::IRefitter::setWeights
virtual bool setWeights(const char *layerName, WeightsRole role, Weights weights)=0
Specify new weights for a layer of given name. Returns true on success, or false if new weights are r...
nvinfer1::IPlugin::getOutputDimensions
virtual Dims getOutputDimensions(int index, const Dims *inputs, int nbInputDims)=0
Get the dimension of an output tensor.
nvinfer1::IHostMemory::destroy
virtual void destroy() noexcept=0
Destroy the allocated memory.
nvinfer1::DimsExprs::d
const IDimensionExpr * d[Dims::MAX_DIMS]
The extent of each dimension.
Definition: NvInferRuntime.h:396
nvinfer1::IHostMemory::size
virtual std::size_t size() const noexcept=0
The size in bytes of the data that was allocated.
nvinfer1::Weights
An array of weights used as a layer parameter.
Definition: NvInferRuntime.h:107
nvinfer1::anonymous_namespace{NvInferRuntime.h}::createInferRefitter
IRefitter * createInferRefitter(ICudaEngine &engine, ILogger &logger)
Create an instance of an IRefitter class.
Definition: NvInferRuntime.h:1914
nvinfer1::ICudaEngine::bindingIsInput
virtual bool bindingIsInput(int bindingIndex) const noexcept=0
Determine whether a binding is an input binding.
nvinfer1::IHostMemory
Class to handle library allocated memory that is accessible to the user.
Definition: NvInferRuntime.h:125
nvinfer1::IPlugin::getWorkspaceSize
virtual size_t getWorkspaceSize(int maxBatchSize) const =0
Find the workspace size required by the layer.
nvinfer1::IRefitter::refitCudaEngine
virtual bool refitCudaEngine()=0
Updates associated engine. Return true if successful.
nvinfer1::IPluginV2DynamicExt::canBroadcastInputAcrossBatch
TRT_DEPRECATED bool canBroadcastInputAcrossBatch(int) const _TENSORRT_FINAL
Derived classes should not implement this. In a C++11 API it would be override final.
Definition: NvInferRuntime.h:583
nvinfer1::DeviceType::kDLA
DLA Core.
nvinfer1::IPlugin::initialize
virtual int initialize()=0
Initialize the layer for execution. This is called when the engine is created.
nvinfer1::IPluginV2DynamicExt::getWorkspaceSize
TRT_DEPRECATED size_t getWorkspaceSize(int) const _TENSORRT_FINAL
Derived classes should not implement this. In a C++11 API it would be override final.
Definition: NvInferRuntime.h:622
nvinfer1::IPluginV2DynamicExt::enqueue
virtual int enqueue(const PluginTensorDesc *inputDesc, const PluginTensorDesc *outputDesc, const void *const *inputs, void *const *outputs, void *workspace, cudaStream_t stream)=0
Execute the layer.
nvinfer1::IHostMemory::type
virtual DataType type() const noexcept=0
The type of the memory that was allocated.
nvinfer1::IRefitter
Updates weights in an engine.
Definition: NvInferRuntime.h:809
nvinfer1::IPluginExt::getTensorRTVersion
virtual int getTensorRTVersion() const
Return the API version with which this plugin was built.
Definition: NvInferRuntime.h:255
nvinfer1::IRuntime::getDLACore
virtual int getDLACore() const noexcept=0
Get the DLA core that the engine executes on.
nvinfer1::TensorLocation
TensorLocation
The location for tensor data storage, device or host.
Definition: NvInferRuntimeCommon.h:960
nvinfer1::WeightsRole::kBIAS
bias for IConvolutionLayer, IDeconvolutionLayer, or IFullyConnectedLayer
nvinfer1::ElementWiseOperation::kSUB
Substract the second element from the first.
nvinfer1::EnumMax< WeightsRole >
constexpr int EnumMax< WeightsRole >()
Maximum number of elements in WeightsRole enum.
Definition: NvInferRuntime.h:678
nvinfer1::IExecutionContext::setDeviceMemory
virtual void setDeviceMemory(void *memory) noexcept=0
Set the device memory for use by this execution context.
nvinfer1::ICudaEngine::setErrorRecorder
virtual void setErrorRecorder(IErrorRecorder *recorder) noexcept=0
Set the ErrorRecorder for this interface.
nvinfer1::IPluginV2DynamicExt::configurePlugin
TRT_DEPRECATED void configurePlugin(const Dims *, int, const Dims *, int, const DataType *, const DataType *, const bool *, const bool *, PluginFormat, int) _TENSORRT_FINAL
Derived classes should not implement this. In a C++11 API it would be override final.
Definition: NvInferRuntime.h:608
nvinfer1::ICudaEngine::getProfileShapeValues
virtual const int32_t * getProfileShapeValues(int profileIndex, int inputIndex, OptProfileSelector select) const noexcept=0
Get minimum / optimum / maximum values for an input shape binding under an optimization profile.
nvinfer1::ICudaEngine::getBindingDimensions
virtual Dims getBindingDimensions(int bindingIndex) const noexcept=0
Get the dimensions of a binding.
nvinfer1::IRefitter::getErrorRecorder
virtual IErrorRecorder * getErrorRecorder() const =0
get the ErrorRecorder assigned to this interface.
nvinfer1::OptProfileSelector
OptProfileSelector
When setting or querying optimization profile parameters (such as shape tensor inputs or dynamic dime...
Definition: NvInferRuntime.h:979
nvinfer1::IOptimizationProfile::setShapeValues
virtual bool setShapeValues(const char *inputName, OptProfileSelector select, const int32_t *values, int nbValues) noexcept=0
Set the minimum / optimum / maximum values for an input shape tensor.
nvinfer1::PluginVersion::kV2_DYNAMICEXT
IPluginV2IOExt.
nvinfer1::IPluginV2DynamicExt::getTensorRTVersion
int getTensorRTVersion() const _TENSORRT_OVERRIDE
Return the API version with which this plugin was built.
Definition: NvInferRuntime.h:545
nvinfer1::IRefitter::getAll
virtual int getAll(int size, const char **layerNames, WeightsRole *roles)=0
Get description of all weights that could be refit.
nvinfer1::IRuntime::setErrorRecorder
virtual void setErrorRecorder(IErrorRecorder *recorder) noexcept=0
Set the ErrorRecorder for this interface.
nvinfer1::IPlugin::serialize
virtual void serialize(void *buffer)=0
Serialize the layer.
nvinfer1::ICudaEngine::hasImplicitBatchDimension
virtual bool hasImplicitBatchDimension() const =0
Query whether the engine was built with an implicit batch dimension.
nvinfer1::ElementWiseOperation::kFLOOR_DIV
Floor division of the first element by the second.
nvinfer1::Weights::count
int64_t count
The number of weights in the array.
Definition: NvInferRuntime.h:112
nvinfer1::IPlugin::configure
virtual void configure(const Dims *inputDims, int nbInputs, const Dims *outputDims, int nbOutputs, int maxBatchSize)=0
Configure the layer.
nvinfer1::Dims
Structure to define the dimensions of a tensor.
Definition: NvInferRuntimeCommon.h:219
nvinfer1::IExecutionContext::getErrorRecorder
virtual IErrorRecorder * getErrorRecorder() const noexcept=0
get the ErrorRecorder assigned to this interface.
nvinfer1::DimensionOperation::kCEIL_DIV
Division rounding up.
nvinfer1::IPluginExt::configure
void configure(const Dims *, int, const Dims *, int, int) _TENSORRT_FINAL
Derived classes should not implement this. In a C++11 API it would be override final.
Definition: NvInferRuntime.h:300
nvinfer1::IPluginV2DynamicExt::getOutputDimensions
TRT_DEPRECATED Dims getOutputDimensions(int, const Dims *, int) _TENSORRT_FINAL
Derived classes should not implement this. In a C++11 API it would be override final.
Definition: NvInferRuntime.h:561
nvinfer1::IRuntime::destroy
virtual void destroy() noexcept=0
Destroy this object.
nvinfer1::IPluginFactory
Plugin factory for deserialization.
Definition: NvInferRuntime.h:947
nvinfer1::ILogger
Application-implemented logging interface for the builder, engine and runtime.
Definition: NvInferRuntimeCommon.h:1020
nvinfer1::ICudaEngine::getProfileDimensions
virtual Dims getProfileDimensions(int bindingIndex, int profileIndex, OptProfileSelector select) const noexcept=0
Get the minimum / optimum / maximum dimensions for a particular binding under an optimization profile...
nvinfer1::IRuntime::setGpuAllocator
virtual void setGpuAllocator(IGpuAllocator *allocator) noexcept=0
Set the GPU allocator.
nvinfer1::ICudaEngine::isShapeBinding
virtual bool isShapeBinding(int bindingIndex) const noexcept=0
True if tensor is required as input for shape calculations or output from them.
nvinfer1::IDimensionExpr::getConstantValue
virtual int getConstantValue() const =0
nvinfer1::ICudaEngine
An engine for executing inference on a built network, with functionally unsafe features.
Definition: NvInferRuntime.h:1136
nvinfer1::IExecutionContext::allInputShapesSpecified
virtual bool allInputShapesSpecified() const noexcept=0
Whether all input shape bindings have been specified.
nvinfer1::OptProfileSelector::kOPT
This is used to set or get the value that is used in the optimization (kernel selection).
nvinfer1::ICudaEngine::createExecutionContextWithoutDeviceMemory
virtual IExecutionContext * createExecutionContextWithoutDeviceMemory() noexcept=0
create an execution context without any device memory allocated
nvinfer1::ICudaEngine::destroy
virtual void destroy() noexcept=0
Destroy this object;.
nvinfer1::DeviceType
DeviceType
The device that this layer/network will execute on.
Definition: NvInferRuntime.h:688
nvinfer1::IRuntime::deserializeCudaEngine
nvinfer1::ICudaEngine * deserializeCudaEngine(const void *blob, std::size_t size) noexcept
Deserialize an engine from a stream when plugin factory is not used.
Definition: NvInferRuntime.h:796
nvinfer1::LayerType::kCONSTANT
Constant layer.
nvinfer1::IPlugin::enqueue
virtual int enqueue(int batchSize, const void *const *inputs, void **outputs, void *workspace, cudaStream_t stream)=0
Execute the layer.
nvinfer1::IRefitter::getMissing
virtual int getMissing(int size, const char **layerNames, WeightsRole *roles)=0
Get description of missing weights.
nvinfer1::EnumMax< DeviceType >
constexpr int EnumMax< DeviceType >()
Maximum number of elements in DeviceType enum.
Definition: NvInferRuntime.h:694
nvinfer1::IPluginV2DynamicExt::getOutputDimensions
virtual DimsExprs getOutputDimensions(int outputIndex, const DimsExprs *inputs, int nbInputs, IExprBuilder &exprBuilder)=0
Get expressions for computing dimensions of an output tensor from dimensions of the input tensors.
nvinfer1::IOptimizationProfile::getDimensions
virtual Dims getDimensions(const char *inputName, OptProfileSelector select) const noexcept=0
Get the minimum / optimum / maximum dimensions for a dynamic input tensor.
nvinfer1::IRuntime::setDLACore
virtual void setDLACore(int dlaCore) noexcept=0
Set the DLA core that the deserialized engine must execute on.
nvinfer1::IExprBuilder::operation
virtual const IDimensionExpr * operation(DimensionOperation op, const IDimensionExpr &first, const IDimensionExpr &second)=0
nvinfer1::IPluginExt::configureWithFormat
virtual void configureWithFormat(const Dims *inputDims, int nbInputs, const Dims *outputDims, int nbOutputs, DataType type, PluginFormat format, int maxBatchSize)=0
Configure the layer.
nvinfer1::ICudaEngine::getErrorRecorder
virtual IErrorRecorder * getErrorRecorder() const noexcept=0
get the ErrorRecorder assigned to this interface.
nvinfer1::IRefitter::setErrorRecorder
virtual void setErrorRecorder(IErrorRecorder *recorder)=0
Set the ErrorRecorder for this interface.
nvinfer1::ElementWiseOperation::kPROD
Product of the two elements.
nvinfer1::IPluginV2DynamicExt::enqueue
TRT_DEPRECATED int enqueue(int, const void *const *, void **, void *, cudaStream_t) _TENSORRT_FINAL
Derived classes should not implement this. In a C++11 API it would be override final.
Definition: NvInferRuntime.h:632
nvinfer1::IExecutionContext::setDebugSync
virtual void setDebugSync(bool sync) noexcept=0
Set the debug sync flag.
nvinfer1::IExecutionContext::getName
virtual const char * getName() const noexcept=0
Return the name of the execution context.
nvinfer1
The TensorRT API version 1 namespace.
nvinfer1::TensorFormat
TensorFormat
Format of the input/output tensors.
Definition: NvInferRuntimeCommon.h:249
nvinfer1::IPluginV2DynamicExt
Definition: NvInferRuntime.h:435
nvinfer1::ElementWiseOperation::kSUM
Sum of the two elements.
nvinfer1::IPluginV2DynamicExt::clone
IPluginV2DynamicExt * clone() const _TENSORRT_OVERRIDE=0
Clone the plugin object. This copies over internal plugin parameters as well and returns a new plugin...
nvinfer1::ICudaEngine::getBindingComponentsPerElement
virtual int getBindingComponentsPerElement(int bindingIndex) const noexcept=0
Return the number of components included in one element.
nvinfer1::IOptimizationProfile::getExtraMemoryTarget
virtual float getExtraMemoryTarget() const noexcept=0
Get the extra memory target that has been defined for this profile.
nvinfer1::IOptimizationProfile::getShapeValues
virtual const int32_t * getShapeValues(const char *inputName, OptProfileSelector select) const noexcept=0
Get the minimum / optimum / maximum values for an input shape tensor.
nvinfer1::DynamicPluginTensorDesc::max
Dims max
Upper bounds on tensor’s dimensions.
Definition: NvInferRuntime.h:413
nvinfer1::ICudaEngine::getBindingName
virtual const char * getBindingName(int bindingIndex) const noexcept=0
Retrieve the name corresponding to a binding index.
nvinfer1::IRefitter::getDynamicRangeMax
virtual float getDynamicRangeMax(const char *tensorName) const =0
Get maximum of dynamic range.
cudaStream_t
struct CUstream_st * cudaStream_t
Forward declaration of cudaStream_t.
Definition: NvInferRuntimeCommon.h:112
nvinfer1::IRuntime::getErrorRecorder
virtual IErrorRecorder * getErrorRecorder() const noexcept=0
get the ErrorRecorder assigned to this interface.
nvinfer1::IExecutionContext::executeV2
virtual bool executeV2(void **bindings) noexcept=0
Synchronously execute inference a network.
nvinfer1::IPluginExt::supportsFormat
virtual bool supportsFormat(DataType type, PluginFormat format) const =0
Check format support.
nvinfer1::Weights::type
DataType type
The type of the weights.
Definition: NvInferRuntime.h:110
nvinfer1::ICudaEngine::getNbBindings
virtual int getNbBindings() const noexcept=0
Get the number of binding indices.
nvinfer1::ICudaEngine::getBindingIndex
virtual int getBindingIndex(const char *name) const noexcept=0
Retrieve the binding index for a named tensor.
nvinfer1::EnumMax< EngineCapability >
constexpr int EnumMax< EngineCapability >()
Maximum number of elements in EngineCapability enum.
Definition: NvInferRuntime.h:90
nvinfer1::IExecutionContext::getShapeBinding
virtual bool getShapeBinding(int bindingIndex, int32_t *data) const noexcept=0
Get values of an input tensor required for shape calculations or an output tensor produced by shape c...
nvinfer1::IPluginV2DynamicExt::isOutputBroadcastAcrossBatch
TRT_DEPRECATED bool isOutputBroadcastAcrossBatch(int, const bool *, int) const _TENSORRT_FINAL
Derived classes should not implement this. In a C++11 API it would be override final.
Definition: NvInferRuntime.h:572
_TENSORRT_OVERRIDE
#define _TENSORRT_OVERRIDE
Items that are marked as deprecated will be removed in a future release.
Definition: NvInferRuntimeCommon.h:62
cudaEvent_t
struct CUevent_st * cudaEvent_t
Forward declaration of cudaEvent_t.
Definition: NvInferRuntimeCommon.h:113
nvinfer1::DynamicPluginTensorDesc::min
Dims min
Lower bounds on tensor’s dimensions.
Definition: NvInferRuntime.h:410
nvinfer1::IRuntime::getNbDLACores
virtual int getNbDLACores() const noexcept=0
Returns number of DLA hardware cores accessible.
nvinfer1::ICudaEngine::isExecutionBinding
virtual bool isExecutionBinding(int bindingIndex) const noexcept=0
True if pointer to tensor data is required for execution phase, false if nullptr can be supplied.
nvinfer1::SliceMode::kDEFAULT
Fail with error when the coordinates are out of bounds. This is the default.
nvinfer1::DataType
DataType
The type of weights and tensors.
Definition: NvInferRuntimeCommon.h:163
nvinfer1::IPluginV2DynamicExt::supportsFormat
TRT_DEPRECATED bool supportsFormat(DataType, PluginFormat) const _TENSORRT_FINAL
Derived classes should not implement this. In a C++11 API it would be override final.
Definition: NvInferRuntime.h:597
nvinfer1::IPluginV2DynamicExt::supportsFormatCombination
virtual bool supportsFormatCombination(int pos, const PluginTensorDesc *inOut, int nbInputs, int nbOutputs)=0
Return true if plugin supports the format and datatype for the input/output indexed by pos.
nvinfer1::DeviceType::kGPU
GPU Device.
nvinfer1::IRuntime::deserializeCudaEngine
virtual nvinfer1::ICudaEngine * deserializeCudaEngine(const void *blob, std::size_t size, IPluginFactory *pluginFactory) noexcept=0
Deserialize an engine from a stream.
nvinfer1::IPluginExt
Plugin class for user-implemented layers.
Definition: NvInferRuntime.h:247
nvinfer1::IOptimizationProfile
Optimization profile for dynamic input dimensions and shape tensors.
Definition: NvInferRuntime.h:1014
nvinfer1::ElementWiseOperation::kEQUAL
Check if two elements are equal.
nvinfer1::IOptimizationProfile::isValid
virtual bool isValid() const noexcept=0
Check whether the optimization profile can be passed to an IBuilderConfig object.
nvinfer1::DimsExprs
Definition: NvInferRuntime.h:392
nvinfer1::IExecutionContext::setBindingDimensions
virtual bool setBindingDimensions(int bindingIndex, Dims dimensions) noexcept=0
Set the dynamic dimensions of a binding.
nvinfer1::DynamicPluginTensorDesc::desc
PluginTensorDesc desc
Information required to interpret a pointer to tensor data, except that desc.dims has -1 in place of ...
Definition: NvInferRuntime.h:407
nvinfer1::IExecutionContext::getOptimizationProfile
virtual int getOptimizationProfile() const noexcept=0
Get the index of the currently selected optimization profile.
nvinfer1::ICudaEngine::getNbOptimizationProfiles
virtual int getNbOptimizationProfiles() const noexcept=0
Get the number of optimization profiles defined for this engine.
nvinfer1::ICudaEngine::getBindingBytesPerComponent
virtual int getBindingBytesPerComponent(int bindingIndex) const noexcept=0
Return the number of bytes per component of an element.
nvinfer1::IPluginV2DynamicExt::kFORMAT_COMBINATION_LIMIT
static constexpr int kFORMAT_COMBINATION_LIMIT
Definition: NvInferRuntime.h:469
NvInferRuntimeCommon.h
nvinfer1::IExecutionContext::allInputDimensionsSpecified
virtual bool allInputDimensionsSpecified() const noexcept=0
Whether all dynamic dimensions of input tensors have been specified.
nvinfer1::IDimensionExpr::isConstant
virtual bool isConstant() const =0
Return true if expression is a build-time constant.
nvinfer1::IErrorRecorder
Reference counted application-implemented error reporting interface for TensorRT objects.
Definition: NvInferRuntimeCommon.h:1175
nvinfer1::EngineCapability::kSAFE_DLA
Safety restricted capability, TensorRT flow that can only run on DLA devices via NvMediaDLA APIs.
nvinfer1::IRefitter::setDynamicRange
virtual bool setDynamicRange(const char *tensorName, float min, float max)=0
nvinfer1::ICudaEngine::getLocation
virtual TensorLocation getLocation(int bindingIndex) const noexcept=0
Get location of binding.
nvinfer1::ICudaEngine::getBindingFormat
virtual TensorFormat getBindingFormat(int bindingIndex) const noexcept=0
Return the binding format.
nvinfer1::ElementWiseOperation::kMIN
Minimum of the two elements.
nvinfer1::IPlugin::getNbOutputs
virtual int getNbOutputs() const =0
Get the number of outputs from the layer.
nvinfer1::LayerType::kSCALE
Scale layer.
nvinfer1::anonymous_namespace{NvInferRuntime.h}::createInferRuntime
IRuntime * createInferRuntime(ILogger &logger)
Create an instance of an IRuntime class.
Definition: NvInferRuntime.h:1904
nvinfer1::IPluginV2Ext
Plugin class for user-implemented layers.
Definition: NvInferRuntimeCommon.h:545
nvinfer1::IOptimizationProfile::getNbShapeValues
virtual int getNbShapeValues(const char *inputName) const noexcept=0
Get the number of values for an input shape tensor.
nvinfer1::IDimensionExpr
Definition: NvInferRuntime.h:342
nvinfer1::IExecutionContext::getBindingDimensions
virtual Dims getBindingDimensions(int bindingIndex) const noexcept=0
Get the dynamic dimensions of a binding.
nvinfer1::Dims::MAX_DIMS
static const int MAX_DIMS
The maximum number of dimensions supported for a tensor.
Definition: NvInferRuntimeCommon.h:222
nvinfer1::IPlugin::terminate
virtual void terminate()=0
Release resources acquired during plugin layer initialization. This is called when the engine is dest...
nvinfer1::WeightsRole::kKERNEL
kernel for IConvolutionLayer, IDeconvolutionLayer, or IFullyConnectedLayer
nvinfer1::ICudaEngine::getName
virtual const char * getName() const noexcept=0
Returns the name of the network associated with the engine.
nvinfer1::IProfiler
Application-implemented interface for profiling.
Definition: NvInferRuntime.h:648
nvinfer1::IPluginV2DynamicExt::getWorkspaceSize
virtual size_t getWorkspaceSize(const PluginTensorDesc *inputs, int nbInputs, const PluginTensorDesc *outputs, int nbOutputs) const =0
Find the workspace size required by the layer.
nvinfer1::IExecutionContext::enqueue
virtual bool enqueue(int batchSize, void **bindings, cudaStream_t stream, cudaEvent_t *inputConsumed) noexcept=0
Asynchronously execute inference on a batch.
nvinfer1::IOptimizationProfile::setExtraMemoryTarget
virtual bool setExtraMemoryTarget(float target) noexcept=0
Set a target for extra GPU memory that may be used by this profile.
nvinfer1::IPlugin::getSerializationSize
virtual size_t getSerializationSize()=0
Find the size of the serialization buffer required.
nvinfer1::PluginTensorDesc
Fields that a plugin might see for an input or output.
Definition: NvInferRuntimeCommon.h:338
nvinfer1::Weights::values
const void * values
The weight values, in a contiguous array.
Definition: NvInferRuntime.h:111
nvinfer1::ICudaEngine::getBindingFormatDesc
virtual const char * getBindingFormatDesc(int bindingIndex) const noexcept=0
Return the human readable description of the tensor format.
nvinfer1::IPluginV2DynamicExt::configurePlugin
virtual void configurePlugin(const DynamicPluginTensorDesc *in, int nbInputs, const DynamicPluginTensorDesc *out, int nbOutputs)=0
Configure the layer.
nvinfer1::WeightsRole
WeightsRole
How a layer uses particular Weights.
Definition: NvInferRuntime.h:668
nvinfer1::ICudaEngine::getEngineCapability
virtual EngineCapability getEngineCapability() const noexcept=0
determine that execution capability this engine has.
nvinfer1::IPlugin
Plugin class for user-implemented layers.
Definition: NvInferRuntime.h:143
nvinfer1::DimsExprs::nbDims
int nbDims
The number of dimensions.
Definition: NvInferRuntime.h:395
nvinfer1::IOptimizationProfile::setDimensions
virtual bool setDimensions(const char *inputName, OptProfileSelector select, Dims dims) noexcept=0
Set the minimum / optimum / maximum dimensions for a dynamic input tensor.
nvinfer1::IExecutionContext::setName
virtual void setName(const char *name) noexcept=0
Set the name of the execution context.
nvinfer1::IGpuAllocator
Application-implemented class for controlling allocation on the GPU.
Definition: NvInferRuntimeCommon.h:977
nvinfer1::ICudaEngine::getNbLayers
virtual int getNbLayers() const noexcept=0
Get the number of layers in the network.
nvinfer1::IExecutionContext::execute
virtual bool execute(int batchSize, void **bindings) noexcept=0
Synchronously execute inference on a batch.
nvinfer1::IExecutionContext::getStrides
virtual Dims getStrides(int bindingIndex) const noexcept=0
Return the strides of the buffer for the given binding.
nvinfer1::EngineCapability::kSAFE_GPU
Safety restricted capability, TensorRT flow that can only run on GPU devices via TensorRT nvinfer1::s...
nvinfer1::IExecutionContext::setErrorRecorder
virtual void setErrorRecorder(IErrorRecorder *recorder) noexcept=0
Set the ErrorRecorder for this interface.
nvinfer1::ICudaEngine::getWorkspaceSize
virtual TRT_DEPRECATED std::size_t getWorkspaceSize() const noexcept=0
Get the amount of workspace the engine uses.
nvinfer1::IRuntime
Allows a serialized functionally unsafe engine to be deserialized.
Definition: NvInferRuntime.h:707
nvinfer1::WeightsRole::kSHIFT
shift part of IScaleLayer
nvinfer1::EngineCapability
EngineCapability
Forward declaration of IPluginFactory for use by other interfaces.
Definition: NvInferRuntime.h:82
nvinfer1::ICudaEngine::getBindingDataType
virtual DataType getBindingDataType(int bindingIndex) const noexcept=0
Determine the required data type for a buffer from its binding index.
nvinfer1::ICudaEngine::getBindingVectorizedDim
virtual int getBindingVectorizedDim(int bindingIndex) const noexcept=0
Return the dimension index that the buffer is vectorized.
nvinfer1::IExecutionContext
Context for executing inference using an engine, with functionally unsafe features.
Definition: NvInferRuntime.h:1552
nvinfer1::IHostMemory::data
virtual void * data() const noexcept=0
A pointer to the raw data that is owned by the library.
nvinfer1::ICudaEngine::getDeviceMemorySize
virtual size_t getDeviceMemorySize() const noexcept=0
Return the amount of device memory required by an execution context.
nvinfer1::ICudaEngine::createExecutionContext
virtual IExecutionContext * createExecutionContext() noexcept=0
Create an execution context.
nvinfer1::IExecutionContext::setInputShapeBinding
virtual bool setInputShapeBinding(int bindingIndex, const int32_t *data) noexcept=0
Set values of input tensor required by shape calculations.
nvinfer1::IExecutionContext::enqueueV2
virtual bool enqueueV2(void **bindings, cudaStream_t stream, cudaEvent_t *inputConsumed) noexcept=0
Asynchronously execute inference.
nvinfer1::ICudaEngine::serialize
virtual IHostMemory * serialize() const noexcept=0
Serialize the network to a stream.
nvinfer1::IExecutionContext::setProfiler
virtual void setProfiler(IProfiler *) noexcept=0
Set the profiler.
nvinfer1::ElementWiseOperation::kLESS
Check if element in first tensor is less than corresponding element in second tensor.
nvinfer1::EnumMax< DimensionOperation >
constexpr int EnumMax< DimensionOperation >()
Maximum number of elements in DimensionOperation enum.
Definition: NvInferRuntime.h:327
nvinfer1::DimensionOperation
DimensionOperation
An operation on two IDimensionExpr, which represent integer expressions used in dimension computation...
Definition: NvInferRuntime.h:313
nvinfer1::IExprBuilder
Definition: NvInferRuntime.h:373
nvinfer1::ICudaEngine::getMaxBatchSize
virtual int getMaxBatchSize() const noexcept=0
Get the maximum batch size which can be used for inference.
nvinfer1::ICudaEngine::isRefittable
virtual bool isRefittable() const noexcept=0
Return true if engine can be refit.