TensorRT  7.1.3.0
NvInfer.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_H
51 #define NV_INFER_H
52 
53 #include "NvInferRuntime.h"
54 
63 //
66 
72 
78 namespace nvinfer1
79 {
80 
85 class Dims2 : public Dims
86 {
87 public:
92  {
93  nbDims = 2;
94  d[0] = d[1] = 0;
95  }
96 
103  Dims2(int d0, int d1)
104  {
105  nbDims = 2;
106  d[0] = d0;
107  d[1] = d1;
108  }
109 };
110 
115 class DimsHW : public Dims2
116 {
117 public:
122  : Dims2()
123  {
125  }
126 
133  DimsHW(int height, int width)
134  : Dims2(height, width)
135  {
137  }
138 
144  int& h() { return d[0]; }
145 
151  int h() const { return d[0]; }
152 
158  int& w() { return d[1]; }
159 
165  int w() const { return d[1]; }
166 };
167 
172 class Dims3 : public Dims
173 {
174 public:
179  {
180  nbDims = 3;
181  d[0] = d[1] = d[2] = 0;
182  }
183 
191  Dims3(int d0, int d1, int d2)
192  {
193  nbDims = 3;
194  d[0] = d0;
195  d[1] = d1;
196  d[2] = d2;
197  }
198 };
199 
206 class TRT_DEPRECATED DimsCHW : public Dims3
207 {
208 public:
213  : Dims3()
214  {
215  type[0] = DimensionType::kCHANNEL;
216  type[1] = type[2] = DimensionType::kSPATIAL;
217  }
218 
226  DimsCHW(int channels, int height, int width)
227  : Dims3(channels, height, width)
228  {
229  type[0] = DimensionType::kCHANNEL;
230  type[1] = type[2] = DimensionType::kSPATIAL;
231  }
232 
238  int& c() { return d[0]; }
239 
245  int c() const { return d[0]; }
246 
252  int& h() { return d[1]; }
253 
259  int h() const { return d[1]; }
260 
266  int& w() { return d[2]; }
267 
273  int w() const { return d[2]; }
274 };
275 
280 class Dims4 : public Dims
281 {
282 public:
287  {
288  nbDims = 4;
289  d[0] = d[1] = d[2] = d[3] = 0;
290  }
291 
300  Dims4(int d0, int d1, int d2, int d3)
301  {
302  nbDims = 4;
303  d[0] = d0;
304  d[1] = d1;
305  d[2] = d2;
306  d[3] = d3;
307  }
308 };
309 
316 class TRT_DEPRECATED DimsNCHW : public Dims4
317 {
318 public:
323  : Dims4()
324  {
325  type[0] = DimensionType::kINDEX;
326  type[1] = DimensionType::kCHANNEL;
327  type[2] = type[3] = DimensionType::kSPATIAL;
328  }
329 
338  DimsNCHW(int batchSize, int channels, int height, int width)
339  : Dims4(batchSize, channels, height, width)
340  {
341  type[0] = DimensionType::kINDEX;
342  type[1] = DimensionType::kCHANNEL;
343  type[2] = type[3] = DimensionType::kSPATIAL;
344  }
345 
351  int& n() { return d[0]; }
352 
358  int n() const { return d[0]; }
359 
365  int& c() { return d[1]; }
366 
372  int c() const { return d[1]; }
373 
379  int& h() { return d[2]; }
380 
386  int h() const { return d[2]; }
387 
393  int& w() { return d[3]; }
394 
400  int w() const { return d[3]; }
401 };
402 
410 enum class LayerType : int
411 {
412  kCONVOLUTION = 0,
413  kFULLY_CONNECTED = 1,
414  kACTIVATION = 2,
415  kPOOLING = 3,
416  kLRN = 4,
417  kSCALE = 5,
418  kSOFTMAX = 6,
419  kDECONVOLUTION = 7,
420  kCONCATENATION = 8,
421  kELEMENTWISE = 9,
422  kPLUGIN = 10,
423  kRNN = 11,
424  kUNARY = 12,
425  kPADDING = 13,
426  kSHUFFLE = 14,
427  kREDUCE = 15,
428  kTOPK = 16,
429  kGATHER = 17,
430  kMATRIX_MULTIPLY = 18,
431  kRAGGED_SOFTMAX = 19,
432  kCONSTANT = 20,
433  kRNN_V2 = 21,
434  kIDENTITY = 22,
435  kPLUGIN_V2 = 23,
436  kSLICE = 24,
437  kSHAPE = 25,
438  kPARAMETRIC_RELU = 26,
439  kRESIZE = 27,
440  kTRIP_LIMIT = 28,
441  kRECURRENCE = 29,
442  kITERATOR = 30,
443  kLOOP_OUTPUT = 31,
444  kSELECT = 32,
445  kFILL = 33
446 };
447 
448 template <>
449 constexpr inline int EnumMax<LayerType>()
450 {
451  return 34;
452 }
453 
467 class ITensor
468 {
469 public:
482  virtual void setName(const char* name) TRTNOEXCEPT = 0;
483 
491  virtual const char* getName() const TRTNOEXCEPT = 0;
492 
507  virtual void setDimensions(Dims dimensions) TRTNOEXCEPT = 0; // only valid for input tensors
508 
517  virtual Dims getDimensions() const TRTNOEXCEPT = 0;
518 
529  virtual void setType(DataType type) TRTNOEXCEPT = 0;
530 
538  virtual DataType getType() const TRTNOEXCEPT = 0;
539 
550  virtual bool setDynamicRange(float min, float max) TRTNOEXCEPT = 0;
551 
559  TRT_DEPRECATED virtual float getDynamicRange() const TRTNOEXCEPT = 0;
560 
564  virtual bool isNetworkInput() const TRTNOEXCEPT = 0;
565 
569  virtual bool isNetworkOutput() const TRTNOEXCEPT = 0;
570 
571 protected:
572  virtual ~ITensor() {}
573 
574 public:
592  virtual void setBroadcastAcrossBatch(bool broadcastAcrossBatch) TRTNOEXCEPT = 0;
593 
605  virtual bool getBroadcastAcrossBatch() const TRTNOEXCEPT = 0;
606 
612  virtual TensorLocation getLocation() const TRTNOEXCEPT = 0;
613 
624  virtual void setLocation(TensorLocation location) TRTNOEXCEPT = 0;
625 
631  virtual bool dynamicRangeIsSet() const TRTNOEXCEPT = 0;
632 
636  virtual void resetDynamicRange() TRTNOEXCEPT = 0;
637 
643  virtual float getDynamicRangeMin() const TRTNOEXCEPT = 0;
644 
650  virtual float getDynamicRangeMax() const TRTNOEXCEPT = 0;
651 
660  virtual void setAllowedFormats(TensorFormats formats) TRTNOEXCEPT = 0;
661 
670  virtual TensorFormats getAllowedFormats() const TRTNOEXCEPT = 0;
671 
701  virtual bool isShapeTensor() const TRTNOEXCEPT = 0;
702 
721  virtual bool isExecutionTensor() const TRTNOEXCEPT = 0;
722 };
723 
731 class ILayer
732 {
733 public:
739  virtual LayerType getType() const TRTNOEXCEPT = 0;
740 
748  virtual void setName(const char* name) TRTNOEXCEPT = 0;
749 
753 
756  virtual const char* getName() const TRTNOEXCEPT = 0;
757 
761  virtual int getNbInputs() const TRTNOEXCEPT = 0;
762 
771  virtual ITensor* getInput(int index) const TRTNOEXCEPT = 0;
772 
776  virtual int getNbOutputs() const TRTNOEXCEPT = 0;
777 
784  virtual ITensor* getOutput(int index) const TRTNOEXCEPT = 0;
785 
791  //
800  virtual void setInput(int index, ITensor& tensor) TRTNOEXCEPT = 0;
801 
816 
817  virtual void setPrecision(DataType dataType) TRTNOEXCEPT = 0;
818 
825 
826  virtual DataType getPrecision() const TRTNOEXCEPT = 0;
827 
834 
835  virtual bool precisionIsSet() const TRTNOEXCEPT = 0;
836 
841 
842  virtual void resetPrecision() TRTNOEXCEPT = 0;
843 
868 
869  virtual void setOutputType(int index, DataType dataType) TRTNOEXCEPT = 0;
870 
879 
880  virtual DataType getOutputType(int index) const TRTNOEXCEPT = 0;
881 
889 
890  virtual bool outputTypeIsSet(int index) const TRTNOEXCEPT = 0;
891 
898 
899  virtual void resetOutputType(int index) TRTNOEXCEPT = 0;
900 
901 protected:
902  virtual ~ILayer() {}
903 };
904 
1127 enum class PaddingMode : int
1128 {
1129  kEXPLICIT_ROUND_DOWN = 0,
1130  kEXPLICIT_ROUND_UP = 1,
1131  kSAME_UPPER = 2,
1132  kSAME_LOWER = 3,
1133  kCAFFE_ROUND_DOWN = 4,
1134  kCAFFE_ROUND_UP = 5
1135 };
1136 
1137 template <>
1138 constexpr inline int EnumMax<PaddingMode>()
1139 {
1140  return 6;
1141 }
1142 
1156 {
1157 public:
1167  TRT_DEPRECATED virtual void setKernelSize(DimsHW kernelSize) TRTNOEXCEPT = 0;
1168 
1176  TRT_DEPRECATED virtual DimsHW getKernelSize() const TRTNOEXCEPT = 0;
1177 
1185  virtual void setNbOutputMaps(int nbOutputMaps) TRTNOEXCEPT = 0;
1186 
1192  virtual int getNbOutputMaps() const TRTNOEXCEPT = 0;
1193 
1205  TRT_DEPRECATED virtual void setStride(DimsHW stride) TRTNOEXCEPT = 0;
1206 
1212  TRT_DEPRECATED virtual DimsHW getStride() const TRTNOEXCEPT = 0;
1213 
1229  TRT_DEPRECATED virtual void setPadding(DimsHW padding) TRTNOEXCEPT = 0;
1230 
1238  TRT_DEPRECATED virtual DimsHW getPadding() const TRTNOEXCEPT = 0;
1239 
1255  virtual void setNbGroups(int nbGroups) TRTNOEXCEPT = 0;
1256 
1262  virtual int getNbGroups() const TRTNOEXCEPT = 0;
1263 
1273  virtual void setKernelWeights(Weights weights) TRTNOEXCEPT = 0;
1274 
1280  virtual Weights getKernelWeights() const TRTNOEXCEPT = 0;
1281 
1292  virtual void setBiasWeights(Weights weights) TRTNOEXCEPT = 0;
1293 
1299  virtual Weights getBiasWeights() const TRTNOEXCEPT = 0;
1300 
1312  TRT_DEPRECATED virtual void setDilation(DimsHW dilation) TRTNOEXCEPT = 0;
1313 
1321  TRT_DEPRECATED virtual DimsHW getDilation() const TRTNOEXCEPT = 0;
1322 
1323 protected:
1324  virtual ~IConvolutionLayer() {}
1325 
1326 public:
1339  virtual void setPrePadding(Dims padding) TRTNOEXCEPT = 0;
1340 
1346  virtual Dims getPrePadding() const TRTNOEXCEPT = 0;
1347 
1360  virtual void setPostPadding(Dims padding) TRTNOEXCEPT = 0;
1361 
1367  virtual Dims getPostPadding() const TRTNOEXCEPT = 0;
1368 
1378  virtual void setPaddingMode(PaddingMode paddingMode) TRTNOEXCEPT = 0;
1379 
1387  virtual PaddingMode getPaddingMode() const TRTNOEXCEPT = 0;
1388 
1397  virtual void setKernelSizeNd(Dims kernelSize) TRTNOEXCEPT = 0;
1398 
1404  virtual Dims getKernelSizeNd() const TRTNOEXCEPT = 0;
1405 
1415  virtual void setStrideNd(Dims stride) TRTNOEXCEPT = 0;
1416 
1422  virtual Dims getStrideNd() const TRTNOEXCEPT = 0;
1423 
1437  virtual void setPaddingNd(Dims padding) TRTNOEXCEPT = 0;
1438 
1446  virtual Dims getPaddingNd() const TRTNOEXCEPT = 0;
1447 
1457  virtual void setDilationNd(Dims dilation) TRTNOEXCEPT = 0;
1458 
1464  virtual Dims getDilationNd() const TRTNOEXCEPT = 0;
1465 
1483  void setInput(int index, ITensor& tensor) _TENSORRT_OVERRIDE TRTNOEXCEPT = 0;
1484 };
1485 
1516 {
1517 public:
1525  virtual void setNbOutputChannels(int nbOutputs) TRTNOEXCEPT = 0;
1526 
1532  virtual int getNbOutputChannels() const TRTNOEXCEPT = 0;
1533 
1539  virtual void setKernelWeights(Weights weights) TRTNOEXCEPT = 0;
1540 
1546  virtual Weights getKernelWeights() const TRTNOEXCEPT = 0;
1547 
1555  virtual void setBiasWeights(Weights weights) TRTNOEXCEPT = 0;
1556 
1562  virtual Weights getBiasWeights() const TRTNOEXCEPT = 0;
1563 
1564 protected:
1565  virtual ~IFullyConnectedLayer() {}
1566 
1567 public:
1585  void setInput(int index, ITensor& tensor) _TENSORRT_OVERRIDE TRTNOEXCEPT = 0;
1586 };
1587 
1599 class IActivationLayer : public ILayer
1600 {
1601 public:
1609  virtual void setActivationType(ActivationType type) TRTNOEXCEPT = 0;
1610 
1616  virtual ActivationType getActivationType() const TRTNOEXCEPT = 0;
1617 
1618 protected:
1619  virtual ~IActivationLayer() {}
1620 public:
1631  virtual void setAlpha(float alpha) TRTNOEXCEPT = 0;
1632 
1642  virtual void setBeta(float beta) TRTNOEXCEPT = 0;
1643 
1648  virtual float getAlpha() const TRTNOEXCEPT = 0;
1649 
1654  virtual float getBeta() const TRTNOEXCEPT = 0;
1655 };
1656 
1662 enum class PoolingType : int
1663 {
1664  kMAX = 0, // Maximum over elements
1665  kAVERAGE = 1, // Average over elements. If the tensor is padded, the count includes the padding
1666  kMAX_AVERAGE_BLEND = 2 // Blending between max and average pooling: (1-blendFactor)*maxPool + blendFactor*avgPool
1667 };
1668 
1669 template <>
1670 constexpr inline int EnumMax<PoolingType>()
1671 {
1672  return 3;
1673 }
1674 
1686 class IPoolingLayer : public ILayer
1687 {
1688 public:
1696  virtual void setPoolingType(PoolingType type) TRTNOEXCEPT = 0;
1697 
1703  virtual PoolingType getPoolingType() const TRTNOEXCEPT = 0;
1704 
1714  TRT_DEPRECATED virtual void setWindowSize(DimsHW windowSize) TRTNOEXCEPT = 0;
1715 
1723  TRT_DEPRECATED virtual DimsHW getWindowSize() const TRTNOEXCEPT = 0;
1724 
1736  TRT_DEPRECATED virtual void setStride(DimsHW stride) TRTNOEXCEPT = 0;
1737 
1745  TRT_DEPRECATED virtual DimsHW getStride() const TRTNOEXCEPT = 0;
1746 
1758  TRT_DEPRECATED virtual void setPadding(DimsHW padding) TRTNOEXCEPT = 0;
1759 
1769  TRT_DEPRECATED virtual DimsHW getPadding() const TRTNOEXCEPT = 0;
1770 
1781  virtual void setBlendFactor(float blendFactor) TRTNOEXCEPT = 0;
1782 
1791  virtual float getBlendFactor() const TRTNOEXCEPT = 0;
1792 
1806  virtual void setAverageCountExcludesPadding(bool exclusive) TRTNOEXCEPT = 0;
1807 
1814  virtual bool getAverageCountExcludesPadding() const TRTNOEXCEPT = 0;
1815 
1816 protected:
1817  virtual ~IPoolingLayer() {}
1818 
1819 public:
1831  virtual void setPrePadding(Dims padding) TRTNOEXCEPT = 0;
1832 
1838  virtual Dims getPrePadding() const TRTNOEXCEPT = 0;
1839 
1851  virtual void setPostPadding(Dims padding) TRTNOEXCEPT = 0;
1852 
1858  virtual Dims getPostPadding() const TRTNOEXCEPT = 0;
1859 
1868  virtual void setPaddingMode(PaddingMode paddingMode) TRTNOEXCEPT = 0;
1869 
1876  virtual PaddingMode getPaddingMode() const TRTNOEXCEPT = 0;
1877 
1885  virtual void setWindowSizeNd(Dims windowSize) TRTNOEXCEPT = 0;
1886 
1892  virtual Dims getWindowSizeNd() const TRTNOEXCEPT = 0;
1893 
1903  virtual void setStrideNd(Dims stride) TRTNOEXCEPT = 0;
1904 
1910  virtual Dims getStrideNd() const TRTNOEXCEPT = 0;
1911 
1924  virtual void setPaddingNd(Dims padding) TRTNOEXCEPT = 0;
1925 
1933  virtual Dims getPaddingNd() const TRTNOEXCEPT = 0;
1934 };
1935 
1945 class ILRNLayer : public ILayer
1946 {
1947 public:
1957  virtual void setWindowSize(int windowSize) TRTNOEXCEPT = 0;
1958 
1964  virtual int getWindowSize() const TRTNOEXCEPT = 0;
1965 
1972  virtual void setAlpha(float alpha) TRTNOEXCEPT = 0;
1973 
1979  virtual float getAlpha() const TRTNOEXCEPT = 0;
1980 
1987  virtual void setBeta(float beta) TRTNOEXCEPT = 0;
1988 
1994  virtual float getBeta() const TRTNOEXCEPT = 0;
1995 
2002  virtual void setK(float k) TRTNOEXCEPT = 0;
2003 
2009  virtual float getK() const TRTNOEXCEPT = 0;
2010 
2011 protected:
2012  virtual ~ILRNLayer() {}
2013 };
2014 
2020 enum class ScaleMode : int
2021 {
2022  kUNIFORM = 0,
2023  kCHANNEL = 1,
2024  kELEMENTWISE = 2
2025 };
2026 
2027 template <>
2028 constexpr inline int EnumMax<ScaleMode>()
2029 {
2030  return 3;
2031 }
2032 
2055 class IScaleLayer : public ILayer
2056 {
2057 public:
2063  virtual void setMode(ScaleMode mode) TRTNOEXCEPT = 0;
2064 
2070  virtual ScaleMode getMode() const TRTNOEXCEPT = 0;
2071 
2077  virtual void setShift(Weights shift) TRTNOEXCEPT = 0;
2078 
2084  virtual Weights getShift() const TRTNOEXCEPT = 0;
2085 
2091  virtual void setScale(Weights scale) TRTNOEXCEPT = 0;
2092 
2098  virtual Weights getScale() const TRTNOEXCEPT = 0;
2099 
2105  virtual void setPower(Weights power) TRTNOEXCEPT = 0;
2106 
2112  virtual Weights getPower() const TRTNOEXCEPT = 0;
2113 
2114 protected:
2115  virtual ~IScaleLayer() {}
2116 
2117 public:
2130  virtual int getChannelAxis() const TRTNOEXCEPT = 0;
2131 };
2132 
2144 class ISoftMaxLayer : public ILayer
2145 {
2146 protected:
2147  virtual ~ISoftMaxLayer() {}
2148 public:
2178  virtual void setAxes(uint32_t axes) TRTNOEXCEPT = 0;
2179 
2185  virtual uint32_t getAxes() const TRTNOEXCEPT = 0;
2186 };
2187 
2200 {
2201 protected:
2202  virtual ~IConcatenationLayer() {}
2203 
2204 public:
2215  virtual void setAxis(int axis) TRTNOEXCEPT = 0;
2216 
2222  virtual int getAxis() const TRTNOEXCEPT = 0;
2223 };
2224 
2235 {
2236 public:
2248  TRT_DEPRECATED virtual void setKernelSize(DimsHW kernelSize) TRTNOEXCEPT = 0;
2249 
2257  TRT_DEPRECATED virtual DimsHW getKernelSize() const TRTNOEXCEPT = 0;
2258 
2266  virtual void setNbOutputMaps(int nbOutputMaps) TRTNOEXCEPT = 0;
2267 
2273  virtual int getNbOutputMaps() const TRTNOEXCEPT = 0;
2274 
2286  TRT_DEPRECATED virtual void setStride(DimsHW stride) TRTNOEXCEPT = 0;
2287 
2295  TRT_DEPRECATED virtual DimsHW getStride() const TRTNOEXCEPT = 0;
2296 
2312  TRT_DEPRECATED virtual void setPadding(DimsHW padding) TRTNOEXCEPT = 0;
2313 
2323  TRT_DEPRECATED virtual DimsHW getPadding() const TRTNOEXCEPT = 0;
2324 
2340  virtual void setNbGroups(int nbGroups) TRTNOEXCEPT = 0;
2341 
2347  virtual int getNbGroups() const TRTNOEXCEPT = 0;
2348 
2358  virtual void setKernelWeights(Weights weights) TRTNOEXCEPT = 0;
2359 
2365  virtual Weights getKernelWeights() const TRTNOEXCEPT = 0;
2366 
2377  virtual void setBiasWeights(Weights weights) TRTNOEXCEPT = 0;
2378 
2384  virtual Weights getBiasWeights() const TRTNOEXCEPT = 0;
2385 
2386 protected:
2387  virtual ~IDeconvolutionLayer() {}
2388 
2389 public:
2401  virtual void setPrePadding(Dims padding) TRTNOEXCEPT = 0;
2402 
2408  virtual Dims getPrePadding() const TRTNOEXCEPT = 0;
2409 
2421  virtual void setPostPadding(Dims padding) TRTNOEXCEPT = 0;
2422 
2428  virtual Dims getPostPadding() const TRTNOEXCEPT = 0;
2429 
2439  virtual void setPaddingMode(PaddingMode paddingMode) TRTNOEXCEPT = 0;
2440 
2448  virtual PaddingMode getPaddingMode() const TRTNOEXCEPT = 0;
2449 
2458  virtual void setKernelSizeNd(Dims kernelSize) TRTNOEXCEPT = 0;
2459 
2465  virtual Dims getKernelSizeNd() const TRTNOEXCEPT = 0;
2466 
2477  virtual void setStrideNd(Dims stride) TRTNOEXCEPT = 0;
2478 
2484  virtual Dims getStrideNd() const TRTNOEXCEPT = 0;
2485 
2498  virtual void setPaddingNd(Dims padding) TRTNOEXCEPT = 0;
2499 
2507  virtual Dims getPaddingNd() const TRTNOEXCEPT = 0;
2508 
2515  virtual void setDilationNd(Dims dilation) TRTNOEXCEPT = 0;
2516 
2522  virtual Dims getDilationNd() const TRTNOEXCEPT = 0;
2523 
2542  void setInput(int index, ITensor& tensor) _TENSORRT_OVERRIDE TRTNOEXCEPT = 0;
2543 };
2544 
2552 enum class ElementWiseOperation : int
2553 {
2554  kSUM = 0,
2555  kPROD = 1,
2556  kMAX = 2,
2557  kMIN = 3,
2558  kSUB = 4,
2559  kDIV = 5,
2560  kPOW = 6,
2561  kFLOOR_DIV = 7,
2562  kAND = 8,
2563  kOR = 9,
2564  kXOR = 10,
2565  kEQUAL = 11,
2566  kGREATER = 12,
2567  kLESS = 13
2568 };
2569 
2570 template <>
2571 constexpr inline int EnumMax<ElementWiseOperation>()
2572 {
2573  return 14;
2574 }
2575 
2584 //!
2591 {
2592 public:
2602  virtual void setOperation(ElementWiseOperation op) TRTNOEXCEPT = 0;
2603 
2611  virtual ElementWiseOperation getOperation() const TRTNOEXCEPT = 0;
2612 
2613 protected:
2614  virtual ~IElementWiseLayer() {}
2615 };
2616 
2620 class IGatherLayer : public ILayer
2621 {
2622 public:
2629  virtual void setGatherAxis(int axis) TRTNOEXCEPT = 0;
2630 
2636  virtual int getGatherAxis() const TRTNOEXCEPT = 0;
2637 
2644  virtual void setNbElementWiseDims(int k) TRTNOEXCEPT = 0;
2645 
2651  virtual int getNbElementWiseDims() const TRTNOEXCEPT = 0;
2652 
2653 protected:
2654  virtual ~IGatherLayer() {}
2655 };
2656 
2736 enum class RNNOperation : int
2737 {
2738  kRELU = 0,
2739  kTANH = 1,
2740  kLSTM = 2,
2741  kGRU = 3
2742 };
2743 
2744 template <>
2745 constexpr inline int EnumMax<RNNOperation>()
2746 {
2747  return 4;
2748 }
2749 
2757 enum class RNNDirection : int
2758 {
2759  kUNIDIRECTION = 0,
2760  kBIDIRECTION = 1
2761 };
2762 
2763 template <>
2764 constexpr inline int EnumMax<RNNDirection>()
2765 {
2766  return 2;
2767 }
2768 
2784 enum class RNNInputMode : int
2785 {
2786  kLINEAR = 0,
2787  kSKIP = 1
2788 };
2789 
2790 template <>
2791 constexpr inline int EnumMax<RNNInputMode>()
2792 {
2793  return 2;
2794 }
2795 
2809 class TRT_DEPRECATED IRNNLayer : public ILayer
2810 {
2811 public:
2817  virtual unsigned getLayerCount() const TRTNOEXCEPT = 0;
2818 
2827  virtual std::size_t getHiddenSize() const TRTNOEXCEPT = 0;
2828 
2837  virtual int getSeqLength() const TRTNOEXCEPT = 0;
2838 
2844  virtual void setOperation(RNNOperation op) TRTNOEXCEPT = 0;
2845 
2851  virtual RNNOperation getOperation() const TRTNOEXCEPT = 0;
2852 
2858  virtual void setInputMode(RNNInputMode op) TRTNOEXCEPT = 0;
2859 
2865  virtual RNNInputMode getInputMode() const TRTNOEXCEPT = 0;
2866 
2878  virtual void setDirection(RNNDirection op) TRTNOEXCEPT = 0;
2879 
2885  virtual RNNDirection getDirection() const TRTNOEXCEPT = 0;
2886 
3001  virtual void setWeights(Weights weights) TRTNOEXCEPT = 0;
3002 
3008  virtual Weights getWeights() const TRTNOEXCEPT = 0;
3009 
3061  virtual void setBias(Weights bias) TRTNOEXCEPT = 0;
3062 
3068  virtual Weights getBias() const TRTNOEXCEPT = 0;
3069 
3076  virtual int getDataLength() const TRTNOEXCEPT = 0;
3077 
3095  virtual void setHiddenState(ITensor& hidden) TRTNOEXCEPT = 0;
3096 
3102  virtual ITensor* getHiddenState() const TRTNOEXCEPT = 0;
3103 
3123  virtual void setCellState(ITensor& cell) TRTNOEXCEPT = 0;
3124 
3130  virtual ITensor* getCellState() const TRTNOEXCEPT = 0;
3131 
3132 protected:
3133  virtual ~IRNNLayer() {}
3134 };
3135 
3143 enum class RNNGateType : int
3144 {
3145  kINPUT = 0,
3146  kOUTPUT = 1,
3147  kFORGET = 2,
3148  kUPDATE = 3,
3149  kRESET = 4,
3150  kCELL = 5,
3151  kHIDDEN = 6
3152 };
3153 
3154 template <>
3155 constexpr inline int EnumMax<RNNGateType>()
3156 {
3157  return 7;
3158 }
3159 
3169 class IRNNv2Layer : public ILayer
3170 {
3171 public:
3172  virtual int32_t getLayerCount() const TRTNOEXCEPT = 0; //< Get the layer count of the RNN
3173  virtual int32_t getHiddenSize() const TRTNOEXCEPT = 0; //< Get the hidden size of the RNN
3174  virtual int32_t getMaxSeqLength() const TRTNOEXCEPT = 0; //< Get the maximum sequence length of the RNN
3175  virtual int32_t getDataLength() const TRTNOEXCEPT = 0; //< Get the maximum data length of the RNN
3176 
3191  virtual void setSequenceLengths(ITensor& seqLengths) TRTNOEXCEPT = 0;
3192 
3200  virtual ITensor* getSequenceLengths() const TRTNOEXCEPT = 0;
3201 
3206  virtual void setOperation(RNNOperation op) TRTNOEXCEPT = 0;
3207 
3212  virtual RNNOperation getOperation() const TRTNOEXCEPT = 0;
3213 
3218  virtual void setInputMode(RNNInputMode op) TRTNOEXCEPT = 0;
3219 
3224  virtual RNNInputMode getInputMode() const TRTNOEXCEPT = 0;
3225 
3230  virtual void setDirection(RNNDirection op) TRTNOEXCEPT = 0;
3231 
3236  virtual RNNDirection getDirection() const TRTNOEXCEPT = 0;
3237 
3255  virtual void setWeightsForGate(int layerIndex, RNNGateType gate, bool isW, Weights weights) TRTNOEXCEPT = 0;
3256 
3261  virtual Weights getWeightsForGate(int layerIndex, RNNGateType gate, bool isW) const TRTNOEXCEPT = 0;
3262 
3278  virtual void setBiasForGate(int layerIndex, RNNGateType gate, bool isW, Weights bias) TRTNOEXCEPT = 0;
3279 
3284  virtual Weights getBiasForGate(int layerIndex, RNNGateType gate, bool isW) const TRTNOEXCEPT = 0;
3285 
3298  virtual void setHiddenState(ITensor& hidden) TRTNOEXCEPT = 0;
3299 
3304  virtual ITensor* getHiddenState() const TRTNOEXCEPT = 0;
3305 
3320  virtual void setCellState(ITensor& cell) TRTNOEXCEPT = 0;
3321 
3326  virtual ITensor* getCellState() const TRTNOEXCEPT = 0;
3327 
3328 protected:
3329  virtual ~IRNNv2Layer() {}
3330 };
3331 
3339 class TRT_DEPRECATED IOutputDimensionsFormula
3340 {
3341 public:
3357  virtual DimsHW compute(DimsHW inputDims, DimsHW kernelSize, DimsHW stride, DimsHW padding, DimsHW dilation, const char* layerName) const TRTNOEXCEPT = 0;
3358 
3359  virtual ~IOutputDimensionsFormula() {}
3360 };
3361 
3373 class TRT_DEPRECATED IPluginLayer : public ILayer
3374 {
3375 public:
3381  virtual IPlugin& getPlugin() TRTNOEXCEPT = 0;
3382 
3383 protected:
3384  virtual ~IPluginLayer() {}
3385 };
3386 
3396 class IPluginV2Layer : public ILayer
3397 {
3398 public:
3404  virtual IPluginV2& getPlugin() TRTNOEXCEPT = 0;
3405 
3406 protected:
3407  virtual ~IPluginV2Layer() {}
3408 };
3409 
3417 enum class UnaryOperation : int
3418 {
3419  kEXP = 0,
3420  kLOG = 1,
3421  kSQRT = 2,
3422  kRECIP = 3,
3423  kABS = 4,
3424  kNEG = 5,
3425  kSIN = 6,
3426  kCOS = 7,
3427  kTAN = 8,
3428  kSINH = 9,
3429  kCOSH = 10,
3430  kASIN = 11,
3431  kACOS = 12,
3432  kATAN = 13,
3433  kASINH = 14,
3434  kACOSH = 15,
3435  kATANH = 16,
3436  kCEIL = 17,
3437  kFLOOR = 18,
3438  kERF = 19,
3439  kNOT = 20
3440 };
3441 
3442 template <>
3443 constexpr inline int EnumMax<UnaryOperation>()
3444 {
3445  return 21;
3446 }
3447 
3455 class IUnaryLayer : public ILayer
3456 {
3457 public:
3463  virtual void setOperation(UnaryOperation op) TRTNOEXCEPT = 0;
3464 
3470  virtual UnaryOperation getOperation() const TRTNOEXCEPT = 0;
3471 
3472 protected:
3473  virtual ~IUnaryLayer() {}
3474 };
3475 
3494 enum class ReduceOperation : int
3495 {
3496  kSUM = 0,
3497  kPROD = 1,
3498  kMAX = 2,
3499  kMIN = 3,
3500  kAVG = 4
3501 };
3502 
3503 template <>
3504 constexpr inline int EnumMax<ReduceOperation>()
3505 {
3506  return 5;
3507 }
3508 
3516 class IReduceLayer : public ILayer
3517 {
3518 public:
3524  virtual void setOperation(ReduceOperation op) TRTNOEXCEPT = 0;
3525 
3531  virtual ReduceOperation getOperation() const TRTNOEXCEPT = 0;
3532 
3538  virtual void setReduceAxes(uint32_t reduceAxes) TRTNOEXCEPT = 0;
3539 
3545  virtual uint32_t getReduceAxes() const TRTNOEXCEPT = 0;
3546 
3552  virtual void setKeepDimensions(bool keepDimensions) TRTNOEXCEPT = 0;
3553 
3559  virtual bool getKeepDimensions() const TRTNOEXCEPT = 0;
3560 
3561 protected:
3562  virtual ~IReduceLayer() {}
3563 };
3564 
3575 class IPaddingLayer : public ILayer
3576 {
3577 public:
3587  TRT_DEPRECATED virtual void setPrePadding(DimsHW padding) TRTNOEXCEPT = 0;
3588 
3596  TRT_DEPRECATED virtual DimsHW getPrePadding() const TRTNOEXCEPT = 0;
3597 
3607  TRT_DEPRECATED virtual void setPostPadding(DimsHW padding) TRTNOEXCEPT = 0;
3608 
3616  TRT_DEPRECATED virtual DimsHW getPostPadding() const TRTNOEXCEPT = 0;
3617 
3618 protected:
3619  virtual ~IPaddingLayer() {}
3620 
3621 public:
3631  virtual void setPrePaddingNd(Dims padding) TRTNOEXCEPT = 0;
3632 
3640  virtual Dims getPrePaddingNd() const TRTNOEXCEPT = 0;
3641 
3651  virtual void setPostPaddingNd(Dims padding) TRTNOEXCEPT = 0;
3652 
3660  virtual Dims getPostPaddingNd() const TRTNOEXCEPT = 0;
3661 };
3662 
3664 {
3672 };
3673 
3686 class IShuffleLayer : public ILayer
3687 {
3688 public:
3698  virtual void setFirstTranspose(Permutation permutation) TRTNOEXCEPT = 0;
3699 
3707  virtual Permutation getFirstTranspose() const TRTNOEXCEPT = 0;
3708 
3729  virtual void setReshapeDimensions(Dims dimensions) TRTNOEXCEPT = 0;
3730 
3739  virtual Dims getReshapeDimensions() const TRTNOEXCEPT = 0;
3740 
3746  //
3761  void setInput(int index, ITensor& tensor) _TENSORRT_OVERRIDE TRTNOEXCEPT = 0;
3762 
3775  virtual void setSecondTranspose(Permutation permutation) TRTNOEXCEPT = 0;
3776 
3784  virtual Permutation getSecondTranspose() const TRTNOEXCEPT = 0;
3785 
3786 protected:
3787  virtual ~IShuffleLayer() {}
3788 
3789 public:
3801  virtual void setZeroIsPlaceholder(bool zeroIsPlaceholder) = 0;
3802 
3811  virtual bool getZeroIsPlaceholder() const = 0;
3812 };
3813 
3819 enum class SliceMode : int
3820 {
3821  kDEFAULT = 0,
3822  kWRAP = 1,
3823 };
3824 
3825 template <>
3826 constexpr inline int EnumMax<SliceMode>()
3827 {
3828  return 2;
3829 }
3830 
3859 class ISliceLayer : public ILayer
3860 {
3861 public:
3871  virtual void setStart(Dims start) TRTNOEXCEPT = 0;
3872 
3883  virtual Dims getStart() const TRTNOEXCEPT = 0;
3884 
3894  virtual void setSize(Dims size) TRTNOEXCEPT = 0;
3895 
3906  virtual Dims getSize() const TRTNOEXCEPT = 0;
3907 
3917  virtual void setStride(Dims stride) TRTNOEXCEPT = 0;
3918 
3929  virtual Dims getStride() const TRTNOEXCEPT = 0;
3930 
3936  virtual void setMode(SliceMode mode) TRTNOEXCEPT = 0;
3937 
3943  virtual SliceMode getMode() const TRTNOEXCEPT = 0;
3944 
3964  void setInput(int index, ITensor& tensor) _TENSORRT_OVERRIDE TRTNOEXCEPT = 0;
3965 
3966 protected:
3967  virtual ~ISliceLayer() {}
3968 };
3969 
3982 class IShapeLayer : public ILayer
3983 {
3984 protected:
3985  virtual ~IShapeLayer() {}
3986 };
3987 
3993 enum class TopKOperation : int
3994 {
3995  kMAX = 0,
3996  kMIN = 1,
3997 };
3998 
3999 template <>
4000 constexpr inline int EnumMax<TopKOperation>()
4001 {
4002  return 2;
4003 }
4004 
4012 class ITopKLayer : public ILayer
4013 {
4014 public:
4020  virtual void setOperation(TopKOperation op) TRTNOEXCEPT = 0;
4021 
4027  virtual TopKOperation getOperation() const TRTNOEXCEPT = 0;
4028 
4036  virtual void setK(int k) TRTNOEXCEPT = 0;
4037 
4043  virtual int getK() const TRTNOEXCEPT = 0;
4044 
4050  virtual void setReduceAxes(uint32_t reduceAxes) TRTNOEXCEPT = 0;
4051 
4057  virtual uint32_t getReduceAxes() const TRTNOEXCEPT = 0;
4058 
4059 protected:
4060  virtual ~ITopKLayer() {}
4061 };
4062 
4069 enum class MatrixOperation : int
4070 {
4074  kNONE,
4075 
4077  kTRANSPOSE,
4078 
4088  kVECTOR
4089 };
4090 
4091 template <>
4092 constexpr inline int EnumMax<MatrixOperation>()
4093 {
4094  return 3;
4095 }
4096 
4123 {
4124 public:
4131  virtual void setOperation(int index, MatrixOperation op) TRTNOEXCEPT = 0;
4132 
4138  virtual MatrixOperation getOperation(int index) const TRTNOEXCEPT = 0;
4139 
4148  TRT_DEPRECATED virtual void setTranspose(int index, bool val) TRTNOEXCEPT = 0;
4149 
4157  TRT_DEPRECATED virtual bool getTranspose(int index) const TRTNOEXCEPT = 0;
4158 
4159 protected:
4160  virtual ~IMatrixMultiplyLayer() {}
4161 };
4162 
4178 {
4179 protected:
4180  virtual ~IRaggedSoftMaxLayer() {}
4181 };
4182 
4191 class IIdentityLayer : public ILayer
4192 {
4193 protected:
4194  virtual ~IIdentityLayer() {}
4195 };
4196 
4204 class IConstantLayer : public ILayer
4205 {
4206 public:
4216  virtual void setWeights(Weights weights) TRTNOEXCEPT = 0;
4217 
4223  virtual Weights getWeights() const TRTNOEXCEPT = 0;
4224 
4232  virtual void setDimensions(Dims dimensions) TRTNOEXCEPT = 0;
4233 
4241  virtual Dims getDimensions() const TRTNOEXCEPT = 0;
4242 
4243 protected:
4244  virtual ~IConstantLayer() {}
4245 };
4246 
4255 {
4256 protected:
4257  virtual ~IParametricReLULayer() noexcept {}
4258 };
4259 
4265 enum class ResizeMode : int
4266 {
4267  kNEAREST = 0, // ND (0 < N <= 8) nearest neighbor resizing.
4268  kLINEAR = 1 // Can handle linear (1D), bilinear (2D), and trilinear (3D) resizing.
4269 };
4270 
4271 template <>
4272 constexpr inline int EnumMax<ResizeMode>()
4273 {
4274  return 2;
4275 }
4276 
4297 class IResizeLayer : public ILayer
4298 {
4299 public:
4315  virtual void setOutputDimensions(Dims dimensions) TRTNOEXCEPT = 0;
4316 
4322  virtual Dims getOutputDimensions() const TRTNOEXCEPT = 0;
4323 
4342  virtual void setScales(const float* scales, int nbScales) TRTNOEXCEPT = 0;
4343 
4358  virtual int getScales(int size, float* scales) const TRTNOEXCEPT = 0;
4359 
4367  virtual void setResizeMode(ResizeMode resizeMode) TRTNOEXCEPT = 0;
4368 
4374  virtual ResizeMode getResizeMode() const TRTNOEXCEPT = 0;
4375 
4385  virtual void setAlignCorners(bool alignCorners) TRTNOEXCEPT = 0;
4386 
4392  virtual bool getAlignCorners() const TRTNOEXCEPT = 0;
4393 
4414  void setInput(int index, ITensor& tensor) _TENSORRT_OVERRIDE TRTNOEXCEPT = 0;
4415 
4416 protected:
4417  virtual ~IResizeLayer() {}
4418 };
4419 
4421 enum class LoopOutput : int
4422 {
4424  kLAST_VALUE = 0,
4425 
4427  kCONCATENATE = 1,
4428 
4430  kREVERSE = 2
4431 };
4432 
4433 template <>
4434 constexpr inline int EnumMax<LoopOutput>()
4435 {
4436  return 3;
4437 }
4438 
4440 enum class TripLimit : int
4441 {
4442  // Tensor is scalar of type kINT32 that contains the trip count.
4443  kCOUNT = 0,
4444 
4445  // Tensor is a scalar of type kBOOL. Loop terminates when value is false.
4446  kWHILE = 1
4447 };
4448 
4449 template <>
4450 constexpr inline int EnumMax<TripLimit>()
4451 {
4452  return 2;
4453 }
4454 
4455 class ILoop;
4456 
4458 {
4459 public:
4461  virtual ILoop* getLoop() const noexcept = 0;
4462 };
4463 
4465 {
4466 public:
4472  //
4485  void setInput(int index, ITensor& tensor) _TENSORRT_OVERRIDE TRTNOEXCEPT = 0;
4486 };
4487 
4506 {
4507 public:
4508  virtual LoopOutput getLoopOutput() const noexcept = 0;
4509 
4522  virtual void setAxis(int axis) noexcept = 0;
4523 
4525  virtual int getAxis() const noexcept = 0;
4526 
4532  //
4547  void setInput(int index, ITensor& tensor) _TENSORRT_OVERRIDE TRTNOEXCEPT = 0;
4548 };
4549 
4551 {
4552 public:
4553  virtual TripLimit getTripLimit() const noexcept = 0;
4554 };
4555 
4557 {
4558 public:
4560  virtual void setAxis(int axis) noexcept = 0;
4561 
4563  virtual int getAxis() const noexcept = 0;
4564 
4570  virtual void setReverse(bool reverse) noexcept = 0;
4571 
4573  virtual bool getReverse() const noexcept = 0;
4574 };
4575 
4579 class ILoop
4580 {
4581 public:
4587  //
4589  virtual IRecurrenceLayer* addRecurrence(ITensor& initialValue) noexcept = 0;
4590 
4607  virtual ITripLimitLayer* addTripLimit(ITensor& tensor, TripLimit limit) noexcept = 0;
4608 
4617  virtual IIteratorLayer* addIterator(ITensor& tensor, int axis = 0, bool reverse = false) noexcept = 0;
4618 
4626  virtual ILoopOutputLayer* addLoopOutput(ITensor& tensor, LoopOutput outputKind, int axis = 0) noexcept = 0;
4627 
4636  virtual void setName(const char* name) noexcept = 0;
4637 
4643  virtual const char* getName() const noexcept = 0;
4644 
4645 protected:
4646  virtual ~ILoop() {}
4647 };
4648 
4652 class ISelectLayer : public ILayer
4653 {
4654 protected:
4655  virtual ~ISelectLayer() {}
4656 };
4657 
4665 enum class FillOperation : int
4666 {
4667  kLINSPACE = 0,
4668  kRANDOM_UNIFORM = 1
4669 };
4670 
4671 template <>
4672 constexpr inline int EnumMax<FillOperation>()
4673 {
4674  return 2;
4675 }
4676 
4695 class IFillLayer : public ILayer
4696 {
4697 public:
4706  //
4707  virtual void setDimensions(Dims dimensions) noexcept = 0;
4708 
4719  virtual Dims getDimensions() const noexcept = 0;
4720 
4726  virtual void setOperation(FillOperation op) noexcept = 0;
4727 
4733  virtual FillOperation getOperation() const noexcept = 0;
4734 
4747  //
4748  virtual void setAlpha(double alpha) noexcept = 0;
4749 
4760  virtual double getAlpha() const noexcept = 0;
4761 
4775  virtual void setBeta(double beta) noexcept = 0;
4776 
4787  virtual double getBeta() const noexcept = 0;
4788 
4813  void setInput(int index, ITensor& tensor) _TENSORRT_OVERRIDE TRTNOEXCEPT = 0;
4814 
4815 protected:
4816  virtual ~IFillLayer() {}
4817 };
4818 
4839 {
4840 public:
4846 
4876  virtual ITensor* addInput(const char* name, DataType type, Dims dimensions) TRTNOEXCEPT = 0;
4877 
4885  virtual void markOutput(ITensor& tensor) TRTNOEXCEPT = 0;
4886 
4905  TRT_DEPRECATED virtual IConvolutionLayer* addConvolution(ITensor& input, int nbOutputMaps, DimsHW kernelSize,
4906  Weights kernelWeights, Weights biasWeights) TRTNOEXCEPT = 0;
4907 
4924  ITensor& input, int nbOutputs, Weights kernelWeights, Weights biasWeights) TRTNOEXCEPT = 0;
4925 
4940  virtual IActivationLayer* addActivation(ITensor& input, ActivationType type) TRTNOEXCEPT = 0;
4941 
4956  TRT_DEPRECATED virtual IPoolingLayer* addPooling(
4957  ITensor& input, PoolingType type, DimsHW windowSize) TRTNOEXCEPT = 0;
4958 
4973  virtual ILRNLayer* addLRN(ITensor& input, int window, float alpha, float beta, float k) TRTNOEXCEPT = 0;
4974 
4995  virtual IScaleLayer* addScale(ITensor& input, ScaleMode mode, Weights shift, Weights scale, Weights power) TRTNOEXCEPT = 0;
4996 
5005  virtual ISoftMaxLayer* addSoftMax(ITensor& input) TRTNOEXCEPT = 0;
5006 
5019  virtual IConcatenationLayer* addConcatenation(ITensor* const* inputs, int nbInputs) TRTNOEXCEPT = 0;
5020 
5039  TRT_DEPRECATED virtual IDeconvolutionLayer* addDeconvolution(ITensor& input, int nbOutputMaps, DimsHW kernelSize,
5040  Weights kernelWeights, Weights biasWeights) TRTNOEXCEPT = 0;
5041 
5062  virtual IElementWiseLayer* addElementWise(ITensor& input1, ITensor& input2, ElementWiseOperation op) TRTNOEXCEPT = 0;
5063 
5123  TRT_DEPRECATED virtual IRNNLayer* addRNN(ITensor& inputs, int layerCount, std::size_t hiddenSize, int maxSeqLen,
5124  RNNOperation op, RNNInputMode mode, RNNDirection dir, Weights weights, Weights bias) TRTNOEXCEPT = 0;
5125 
5142  TRT_DEPRECATED virtual IPluginLayer* addPlugin(
5143  ITensor* const* inputs, int nbInputs, IPlugin& plugin) TRTNOEXCEPT = 0;
5144 
5159  virtual IUnaryLayer* addUnary(ITensor& input, UnaryOperation operation) TRTNOEXCEPT = 0;
5160 
5173  TRT_DEPRECATED virtual IPaddingLayer* addPadding(
5174  ITensor& input, DimsHW prePadding, DimsHW postPadding) TRTNOEXCEPT = 0;
5175 
5185  virtual IShuffleLayer* addShuffle(ITensor& input) TRTNOEXCEPT = 0;
5186 
5199  TRT_DEPRECATED virtual void setPoolingOutputDimensionsFormula(IOutputDimensionsFormula* formula) TRTNOEXCEPT = 0;
5200 
5210  TRT_DEPRECATED virtual IOutputDimensionsFormula& getPoolingOutputDimensionsFormula() const TRTNOEXCEPT = 0;
5211 
5226  TRT_DEPRECATED virtual void setConvolutionOutputDimensionsFormula(
5227  IOutputDimensionsFormula* formula) TRTNOEXCEPT = 0;
5228 
5240  TRT_DEPRECATED virtual IOutputDimensionsFormula& getConvolutionOutputDimensionsFormula() const TRTNOEXCEPT = 0;
5241 
5256  TRT_DEPRECATED virtual void setDeconvolutionOutputDimensionsFormula(
5257  IOutputDimensionsFormula* formula) TRTNOEXCEPT = 0;
5258 
5270  TRT_DEPRECATED virtual IOutputDimensionsFormula& getDeconvolutionOutputDimensionsFormula() const TRTNOEXCEPT = 0;
5271 
5279  virtual int getNbLayers() const TRTNOEXCEPT = 0;
5280 
5290  virtual ILayer* getLayer(int index) const TRTNOEXCEPT = 0;
5291 
5299  virtual int getNbInputs() const TRTNOEXCEPT = 0;
5300 
5310  virtual ITensor* getInput(int index) const TRTNOEXCEPT = 0; // adding inputs invalidates indexing here
5311 
5321  virtual int getNbOutputs() const TRTNOEXCEPT = 0;
5322 
5332  virtual ITensor* getOutput(int index) const TRTNOEXCEPT = 0; // adding outputs invalidates indexing here
5333 
5337  virtual void destroy() TRTNOEXCEPT = 0;
5338 
5339 protected:
5340  virtual ~INetworkDefinition() {}
5341 
5342 public:
5366  virtual IReduceLayer* addReduce(ITensor& input, ReduceOperation operation, uint32_t reduceAxes, bool keepDimensions) TRTNOEXCEPT = 0;
5367 
5396  virtual ITopKLayer* addTopK(ITensor& input, TopKOperation op, int k, uint32_t reduceAxes) TRTNOEXCEPT = 0;
5397 
5409  virtual IGatherLayer* addGather(ITensor& data, ITensor& indices, int axis) TRTNOEXCEPT = 0;
5410 
5424  virtual IRaggedSoftMaxLayer* addRaggedSoftMax(ITensor& input, ITensor& bounds) TRTNOEXCEPT = 0;
5425 
5441  ITensor& input0, MatrixOperation op0, ITensor& input1, MatrixOperation op1) TRTNOEXCEPT = 0;
5442 
5459  TRT_DEPRECATED virtual IMatrixMultiplyLayer* addMatrixMultiply(
5460  ITensor& input0, bool transpose0, ITensor& input1, bool transpose1) TRTNOEXCEPT = 0;
5461 
5482  virtual IConstantLayer* addConstant(Dims dimensions, Weights weights) TRTNOEXCEPT = 0;
5483 
5545  virtual IRNNv2Layer* addRNNv2(
5546  ITensor& input, int32_t layerCount, int32_t hiddenSize, int32_t maxSeqLen, RNNOperation op) TRTNOEXCEPT = 0;
5547 
5564  TRT_DEPRECATED virtual IPluginLayer* addPluginExt(
5565  ITensor* const* inputs, int nbInputs, IPluginExt& plugin) TRTNOEXCEPT = 0;
5566 
5578  virtual IIdentityLayer* addIdentity(ITensor& input) TRTNOEXCEPT = 0;
5579 
5590  virtual void removeTensor(ITensor& tensor) TRTNOEXCEPT = 0;
5591 
5599  virtual void unmarkOutput(ITensor& tensor) TRTNOEXCEPT = 0;
5600 
5615  virtual IPluginV2Layer* addPluginV2(ITensor* const* inputs, int nbInputs, IPluginV2& plugin) TRTNOEXCEPT = 0;
5616 
5631  virtual ISliceLayer* addSlice(ITensor& input, Dims start, Dims size, Dims stride) TRTNOEXCEPT = 0;
5632 
5650  virtual void setName(const char* name) TRTNOEXCEPT = 0;
5651 
5661  virtual const char* getName() const TRTNOEXCEPT = 0;
5662 
5676  virtual IShapeLayer* addShape(ITensor& input) TRTNOEXCEPT = 0;
5677 
5692  virtual bool hasImplicitBatchDimension() const TRTNOEXCEPT = 0;
5693 
5707  virtual bool markOutputForShapes(ITensor& tensor) TRTNOEXCEPT = 0;
5708 
5716  virtual bool unmarkOutputForShapes(ITensor& tensor) TRTNOEXCEPT = 0;
5717 
5731  virtual IParametricReLULayer* addParametricReLU(ITensor& input, ITensor& slope) noexcept = 0;
5732 
5751  ITensor& input, int nbOutputMaps, Dims kernelSize, Weights kernelWeights, Weights biasWeights) TRTNOEXCEPT = 0;
5752 
5767  virtual IPoolingLayer* addPoolingNd(ITensor& input, PoolingType type, Dims windowSize) TRTNOEXCEPT = 0;
5768 
5783  //
5787  ITensor& input, int nbOutputMaps, Dims kernelSize, Weights kernelWeights, Weights biasWeights) TRTNOEXCEPT = 0;
5788 
5815  virtual IScaleLayer* addScaleNd(ITensor& input, ScaleMode mode, Weights shift, Weights scale, Weights power, int channelAxis) TRTNOEXCEPT = 0;
5816 
5827  virtual IResizeLayer* addResize(ITensor& input) TRTNOEXCEPT = 0;
5828 
5839  virtual bool hasExplicitPrecision() const TRTNOEXCEPT = 0;
5840 
5850  virtual ILoop* addLoop() noexcept = 0;
5851 
5861  virtual ISelectLayer* addSelect(ITensor& condition, ITensor& thenInput, ITensor& elseInput) TRTNOEXCEPT = 0;
5862 
5873  virtual IFillLayer* addFill(Dims dimensions, FillOperation op) noexcept = 0;
5874 
5885  virtual IPaddingLayer* addPaddingNd(
5886  ITensor& input, Dims prePadding, Dims postPadding) TRTNOEXCEPT = 0;
5887 };
5888 
5894 enum class CalibrationAlgoType : int
5895 {
5896  kLEGACY_CALIBRATION = 0,
5897  kENTROPY_CALIBRATION = 1,
5898  kENTROPY_CALIBRATION_2 = 2,
5899  kMINMAX_CALIBRATION = 3,
5900 };
5901 
5902 template <>
5903 constexpr inline int EnumMax<CalibrationAlgoType>()
5904 {
5905  return 4;
5906 }
5907 
5920 {
5921 public:
5927  virtual int getBatchSize() const TRTNOEXCEPT = 0;
5928 
5942  virtual bool getBatch(void* bindings[], const char* names[], int nbBindings) TRTNOEXCEPT = 0;
5943 
5958  virtual const void* readCalibrationCache(std::size_t& length) TRTNOEXCEPT = 0;
5959 
5968  virtual void writeCalibrationCache(const void* ptr, std::size_t length) TRTNOEXCEPT = 0;
5969 
5975  virtual CalibrationAlgoType getAlgorithm() TRTNOEXCEPT = 0;
5976 
5977  virtual ~IInt8Calibrator() {}
5978 };
5979 
5985 {
5986 public:
5990  CalibrationAlgoType getAlgorithm() TRTNOEXCEPT override { return CalibrationAlgoType::kENTROPY_CALIBRATION; }
5991 
5992  virtual ~IInt8EntropyCalibrator() {}
5993 };
5994 
6000 {
6001 public:
6005  CalibrationAlgoType getAlgorithm() TRTNOEXCEPT override { return CalibrationAlgoType::kENTROPY_CALIBRATION_2; }
6006 
6007  virtual ~IInt8EntropyCalibrator2() {}
6008 };
6009 
6015 {
6016 public:
6020  CalibrationAlgoType getAlgorithm() TRTNOEXCEPT override { return CalibrationAlgoType::kMINMAX_CALIBRATION; }
6021 
6022  virtual ~IInt8MinMaxCalibrator() {}
6023 };
6024 
6030 {
6031 public:
6035  CalibrationAlgoType getAlgorithm() TRTNOEXCEPT override { return CalibrationAlgoType::kLEGACY_CALIBRATION; }
6036 
6043  virtual double getQuantile() const TRTNOEXCEPT = 0;
6044 
6051  virtual double getRegressionCutoff() const TRTNOEXCEPT = 0;
6052 
6065  virtual const void* readHistogramCache(std::size_t& length) TRTNOEXCEPT = 0;
6066 
6075  virtual void writeHistogramCache(const void* ptr, std::size_t length) TRTNOEXCEPT = 0;
6076 
6077  virtual ~IInt8LegacyCalibrator() {}
6078 };
6079 
6091 {
6092 public:
6096  virtual TensorFormat getTensorFormat() const TRTNOEXCEPT = 0;
6097 
6101  virtual DataType getDataType() const TRTNOEXCEPT = 0;
6102 
6106  virtual Dims getStrides() const TRTNOEXCEPT = 0;
6107 
6108 protected:
6109  virtual ~IAlgorithmIOInfo() {}
6110 };
6111 
6124 {
6125 public:
6129  virtual int64_t getImplementation() const TRTNOEXCEPT = 0;
6130 
6134  virtual int64_t getTactic() const TRTNOEXCEPT = 0;
6135 
6136 protected:
6137  virtual ~IAlgorithmVariant() {}
6138 };
6139 
6149 {
6150 public:
6155  virtual const char* getName() const TRTNOEXCEPT = 0;
6156 
6163  virtual Dims getDimensions(int32_t index, OptProfileSelector select) const TRTNOEXCEPT = 0;
6164 
6168  virtual int32_t getNbInputs() const TRTNOEXCEPT = 0;
6169 
6173  virtual int32_t getNbOutputs() const TRTNOEXCEPT = 0;
6174 
6175 protected:
6176  virtual ~IAlgorithmContext() {}
6177 };
6178 
6189 {
6190 public:
6197  virtual const IAlgorithmIOInfo& getAlgorithmIOInfo(int32_t index) const TRTNOEXCEPT = 0;
6198 
6202  virtual const IAlgorithmVariant& getAlgorithmVariant() const TRTNOEXCEPT = 0;
6203 
6207  virtual float getTimingMSec() const TRTNOEXCEPT = 0;
6208 
6212  virtual std::size_t getWorkspaceSize() const TRTNOEXCEPT = 0;
6213 
6214 protected:
6215  virtual ~IAlgorithm() {}
6216 };
6217 
6227 {
6228 public:
6242  virtual int32_t selectAlgorithms(const IAlgorithmContext& context, const IAlgorithm* const* choices,
6243  int32_t nbChoices, int32_t* selection) TRTNOEXCEPT = 0;
6254  virtual void reportAlgorithms(const IAlgorithmContext* const* algoContexts, const IAlgorithm* const* algoChoices,
6255  int32_t nbAlgorithms) TRTNOEXCEPT = 0;
6256 
6257  virtual ~IAlgorithmSelector() {}
6258 };
6259 
6266 typedef uint32_t QuantizationFlags;
6267 
6275 enum class QuantizationFlag : int32_t
6276 {
6281 };
6282 
6283 template <>
6284 constexpr inline int EnumMax<QuantizationFlag>()
6285 {
6286  return 1;
6287 }
6288 
6295 typedef uint32_t BuilderFlags;
6296 
6304 enum class BuilderFlag : int32_t
6305 {
6306  kFP16 = 0,
6307  kINT8 = 1,
6308  kDEBUG = 2,
6309  kGPU_FALLBACK = 3,
6310  kSTRICT_TYPES = 4,
6311  kREFIT = 5,
6312  kDISABLE_TIMING_CACHE = 6,
6313 
6317  kTF32 = 7
6318 };
6319 
6320 template <>
6321 constexpr inline int EnumMax<BuilderFlag>()
6322 {
6323  return 8;
6324 }
6325 
6334 enum class ProfilingVerbosity : int32_t
6335 {
6336  kDEFAULT = 0,
6337  kNONE = 1,
6338  kVERBOSE = 2,
6339 };
6340 
6341 template <>
6342 constexpr inline int32_t EnumMax<ProfilingVerbosity>()
6343 {
6344  return 3;
6345 }
6346 
6353 {
6354 public:
6365  virtual void setMinTimingIterations(int minTiming) TRTNOEXCEPT = 0;
6366 
6374  virtual int getMinTimingIterations() const TRTNOEXCEPT = 0;
6375 
6384  virtual void setAvgTimingIterations(int avgTiming) TRTNOEXCEPT = 0;
6385 
6393  virtual int getAvgTimingIterations() const TRTNOEXCEPT = 0;
6394 
6403  virtual void setEngineCapability(EngineCapability capability) TRTNOEXCEPT = 0;
6404 
6412  virtual EngineCapability getEngineCapability() const TRTNOEXCEPT = 0;
6413 
6419  virtual void setInt8Calibrator(IInt8Calibrator* calibrator) TRTNOEXCEPT = 0;
6420 
6424  virtual IInt8Calibrator* getInt8Calibrator() const TRTNOEXCEPT = 0;
6425 
6433  virtual void setMaxWorkspaceSize(std::size_t workspaceSize) TRTNOEXCEPT = 0;
6434 
6444  virtual std::size_t getMaxWorkspaceSize() const TRTNOEXCEPT = 0;
6445 
6458  virtual void setFlags(BuilderFlags builderFlags) TRTNOEXCEPT = 0;
6459 
6467  virtual BuilderFlags getFlags() const TRTNOEXCEPT = 0;
6468 
6476  virtual void clearFlag(BuilderFlag builderFlag) TRTNOEXCEPT = 0;
6477 
6485  virtual void setFlag(BuilderFlag builderFlag) TRTNOEXCEPT = 0;
6486 
6494  virtual bool getFlag(BuilderFlag builderFlag) const TRTNOEXCEPT = 0;
6495 
6508  virtual void setQuantizationFlags(QuantizationFlags flags) TRTNOEXCEPT = 0;
6509 
6517  virtual QuantizationFlags getQuantizationFlags() const TRTNOEXCEPT = 0;
6518 
6526  virtual void clearQuantizationFlag(QuantizationFlag flag) TRTNOEXCEPT = 0;
6527 
6535  virtual void setQuantizationFlag(QuantizationFlag flag) TRTNOEXCEPT = 0;
6536 
6544  virtual bool getQuantizationFlag(QuantizationFlag flag) const TRTNOEXCEPT = 0;
6545 
6556  virtual void setDeviceType(const ILayer* layer, DeviceType deviceType) TRTNOEXCEPT = 0;
6557 
6562  virtual DeviceType getDeviceType(const ILayer* layer) const TRTNOEXCEPT = 0;
6563 
6569  virtual bool isDeviceTypeSet(const ILayer* layer) const TRTNOEXCEPT = 0;
6570 
6576  virtual void resetDeviceType(const ILayer* layer) TRTNOEXCEPT = 0;
6577 
6582  virtual bool canRunOnDLA(const ILayer* layer) const TRTNOEXCEPT = 0;
6583 
6594  virtual void setDLACore(int dlaCore) TRTNOEXCEPT = 0;
6595 
6602  virtual int getDLACore() const TRTNOEXCEPT = 0;
6603 
6609  virtual void setDefaultDeviceType(DeviceType deviceType) TRTNOEXCEPT = 0;
6610 
6616  virtual DeviceType getDefaultDeviceType() const TRTNOEXCEPT = 0;
6617 
6623  virtual void reset() TRTNOEXCEPT = 0;
6624 
6630  virtual void destroy() TRTNOEXCEPT = 0;
6631 
6639  virtual void setProfileStream(const cudaStream_t stream) TRTNOEXCEPT = 0;
6640 
6648  virtual cudaStream_t getProfileStream() const TRTNOEXCEPT = 0;
6649 
6661  virtual int addOptimizationProfile(const IOptimizationProfile* profile) noexcept = 0;
6662 
6672  virtual bool setCalibrationProfile(const IOptimizationProfile* profile) noexcept = 0;
6673 
6679  virtual const IOptimizationProfile* getCalibrationProfile() noexcept = 0;
6680 
6689  virtual int getNbOptimizationProfiles() const noexcept = 0;
6690 
6691 protected:
6692  virtual ~IBuilderConfig()
6693  {
6694  }
6695 
6696 public:
6704  virtual void setProfilingVerbosity(ProfilingVerbosity verbosity) TRTNOEXCEPT = 0;
6705 
6714  virtual ProfilingVerbosity getProfilingVerbosity() const TRTNOEXCEPT = 0;
6715 
6720  virtual void setAlgorithmSelector(IAlgorithmSelector* selector) TRTNOEXCEPT = 0;
6721 
6725  virtual IAlgorithmSelector* getAlgorithmSelector() const TRTNOEXCEPT = 0;
6726 
6727 };
6728 
6729 
6739 
6750 {
6755  kEXPLICIT_BATCH = 0,
6756 
6769  kEXPLICIT_PRECISION = 1,
6770 };
6771 template <>
6772 constexpr inline int EnumMax<NetworkDefinitionCreationFlag>()
6773 {
6774  return 2;
6775 }
6776 
6777 
6786 {
6787 public:
6799  TRT_DEPRECATED virtual nvinfer1::INetworkDefinition* createNetwork() TRTNOEXCEPT = 0;
6800 
6809  virtual void setMaxBatchSize(int batchSize) TRTNOEXCEPT = 0;
6810 
6819  virtual int getMaxBatchSize() const TRTNOEXCEPT = 0;
6820 
6830  TRT_DEPRECATED virtual void setMaxWorkspaceSize(std::size_t workspaceSize) TRTNOEXCEPT = 0;
6831 
6841  TRT_DEPRECATED virtual std::size_t getMaxWorkspaceSize() const TRTNOEXCEPT = 0;
6842 
6855  TRT_DEPRECATED virtual void setHalf2Mode(bool mode) TRTNOEXCEPT = 0;
6856 
6864  TRT_DEPRECATED virtual bool getHalf2Mode() const TRTNOEXCEPT = 0;
6865 
6874  TRT_DEPRECATED virtual void setDebugSync(bool sync) TRTNOEXCEPT = 0;
6875 
6883  TRT_DEPRECATED virtual bool getDebugSync() const TRTNOEXCEPT = 0;
6884 
6895  TRT_DEPRECATED virtual void setMinFindIterations(int minFind) TRTNOEXCEPT = 0;
6896 
6904  TRT_DEPRECATED virtual int getMinFindIterations() const TRTNOEXCEPT = 0;
6905 
6916  TRT_DEPRECATED virtual void setAverageFindIterations(int avgFind) TRTNOEXCEPT = 0;
6917 
6925  TRT_DEPRECATED virtual int getAverageFindIterations() const TRTNOEXCEPT = 0;
6926 
6934  TRT_DEPRECATED virtual nvinfer1::ICudaEngine* buildCudaEngine(
6935  nvinfer1::INetworkDefinition& network) TRTNOEXCEPT = 0;
6936 
6940  virtual bool platformHasFastFp16() const TRTNOEXCEPT = 0;
6941 
6945  virtual bool platformHasFastInt8() const TRTNOEXCEPT = 0;
6946 
6950  virtual void destroy() TRTNOEXCEPT = 0;
6951 
6963  TRT_DEPRECATED virtual void setInt8Mode(bool mode) TRTNOEXCEPT = 0;
6964 
6972  TRT_DEPRECATED virtual bool getInt8Mode() const TRTNOEXCEPT = 0;
6973 
6979  TRT_DEPRECATED virtual void setInt8Calibrator(IInt8Calibrator* calibrator) TRTNOEXCEPT = 0;
6980 
6993  TRT_DEPRECATED virtual void setDeviceType(ILayer* layer, DeviceType deviceType) TRTNOEXCEPT = 0;
6994 
7001  TRT_DEPRECATED virtual DeviceType getDeviceType(const ILayer* layer) const TRTNOEXCEPT = 0;
7002 
7010  TRT_DEPRECATED virtual bool isDeviceTypeSet(const ILayer* layer) const TRTNOEXCEPT = 0;
7011 
7019  TRT_DEPRECATED virtual void resetDeviceType(ILayer* layer) TRTNOEXCEPT = 0;
7020 
7027  TRT_DEPRECATED virtual bool canRunOnDLA(const ILayer* layer) const TRTNOEXCEPT = 0;
7028 
7036  TRT_DEPRECATED virtual void setDefaultDeviceType(DeviceType deviceType) TRTNOEXCEPT = 0;
7037 
7043  TRT_DEPRECATED virtual DeviceType getDefaultDeviceType() const TRTNOEXCEPT = 0;
7044 
7052  virtual int getMaxDLABatchSize() const TRTNOEXCEPT = 0;
7053 
7063  TRT_DEPRECATED virtual void allowGPUFallback(bool setFallBackMode) TRTNOEXCEPT = 0;
7064 
7068  virtual int getNbDLACores() const TRTNOEXCEPT = 0;
7069 
7080  TRT_DEPRECATED virtual void setDLACore(int dlaCore) TRTNOEXCEPT = 0;
7081 
7088  TRT_DEPRECATED virtual int getDLACore() const TRTNOEXCEPT = 0;
7089 
7095  TRT_DEPRECATED virtual void reset(nvinfer1::INetworkDefinition& network) TRTNOEXCEPT = 0;
7096 
7097 protected:
7098  virtual ~IBuilder()
7099  {
7100  }
7101 
7102 public:
7114  virtual void setGpuAllocator(IGpuAllocator* allocator) TRTNOEXCEPT = 0;
7115 
7127  TRT_DEPRECATED virtual void setFp16Mode(bool mode) TRTNOEXCEPT = 0;
7128 
7136  TRT_DEPRECATED virtual bool getFp16Mode() const TRTNOEXCEPT = 0;
7137 
7156  TRT_DEPRECATED virtual void setStrictTypeConstraints(bool mode) TRTNOEXCEPT = 0;
7157 
7165  TRT_DEPRECATED virtual bool getStrictTypeConstraints() const TRTNOEXCEPT = 0;
7166 
7172  TRT_DEPRECATED virtual void setRefittable(bool canRefit) TRTNOEXCEPT = 0;
7173 
7181  TRT_DEPRECATED virtual bool getRefittable() const TRTNOEXCEPT = 0;
7182 
7188  TRT_DEPRECATED virtual void setEngineCapability(EngineCapability capability) TRTNOEXCEPT = 0;
7189 
7197  TRT_DEPRECATED virtual EngineCapability getEngineCapability() const TRTNOEXCEPT = 0;
7198 
7204  virtual nvinfer1::IBuilderConfig* createBuilderConfig() TRTNOEXCEPT = 0;
7205 
7213  INetworkDefinition& network, IBuilderConfig& config) TRTNOEXCEPT = 0;
7214 
7215 
7228 
7229 
7240 
7250  //
7253  virtual void setErrorRecorder(IErrorRecorder* recorder) TRTNOEXCEPT = 0;
7254 
7265  virtual IErrorRecorder* getErrorRecorder() const TRTNOEXCEPT = 0;
7266 
7270  virtual void reset() TRTNOEXCEPT = 0;
7271 
7275  virtual bool platformHasTf32() const TRTNOEXCEPT = 0;
7276 };
7277 
7278 } // namespace nvinfer1
7279 
7284 extern "C" TENSORRTAPI void* createInferBuilder_INTERNAL(void* logger, int version);
7285 
7286 namespace nvinfer1
7287 {
7288 namespace
7289 {
7298 {
7299  return static_cast<IBuilder*>(createInferBuilder_INTERNAL(&logger, NV_TENSORRT_VERSION));
7300 }
7301 }
7302 }
7303 
7304 #endif
nvinfer1::IAlgorithmSelector::reportAlgorithms
virtual void reportAlgorithms(const IAlgorithmContext *const *algoContexts, const IAlgorithm *const *algoChoices, int32_t nbAlgorithms)=0
Called by TensorRT to report choices it made.
nvinfer1::IActivationLayer::getBeta
virtual float getBeta() const =0
Get the beta parameter.
nvinfer1::IDeconvolutionLayer::getNbGroups
virtual int getNbGroups() const =0
Get the number of groups for a deconvolution.
nvinfer1::DimsHW::w
int w() const
Get the width.
Definition: NvInfer.h:165
nvinfer1::LayerType::kTOPK
TopK layer.
nvinfer1::IBuilder::getAverageFindIterations
virtual TRT_DEPRECATED int getAverageFindIterations() const =0
Query the number of averaging iterations.
nvinfer1::IBuilder::setHalf2Mode
virtual TRT_DEPRECATED void setHalf2Mode(bool mode)=0
Set whether half2 mode is used.
nvinfer1::IAlgorithm::getAlgorithmIOInfo
virtual const IAlgorithmIOInfo & getAlgorithmIOInfo(int32_t index) const =0
Returns the format of an Algorithm input or output. Algorithm inputs are incrementally numbered first...
nvinfer1::Dims3::Dims3
Dims3()
Construct an empty Dims3 object.
Definition: NvInfer.h:178
nvinfer1::ITensor::getLocation
virtual TensorLocation getLocation() const =0
Get the storage location of a tensor.
nvinfer1::ITensor::getDynamicRangeMax
virtual float getDynamicRangeMax() const =0
Get maximum of dynamic range.
nvinfer1::PaddingMode::kEXPLICIT_ROUND_UP
Use explicit padding, rounding output size up.
nvinfer1::IConvolutionLayer::setKernelSize
virtual TRT_DEPRECATED void setKernelSize(DimsHW kernelSize)=0
Set the HW kernel size of the convolution.
nvinfer1::IBuilder::setInt8Calibrator
virtual TRT_DEPRECATED void setInt8Calibrator(IInt8Calibrator *calibrator)=0
Set Int8 Calibration interface.
nvinfer1::DimsNCHW::h
int & h()
Get the height.
Definition: NvInfer.h:379
nvinfer1::IBuilderConfig::setProfileStream
virtual void setProfileStream(const cudaStream_t stream)=0
Set the cudaStream that is used to profile this network.
nvinfer1::IConvolutionLayer::setDilation
virtual TRT_DEPRECATED void setDilation(DimsHW dilation)=0
Set the dilation for a convolution.
nvinfer1::INetworkDefinition::addLoop
virtual ILoop * addLoop() noexcept=0
Add a loop to the network.
nvinfer1::IPluginV2Layer::getPlugin
virtual IPluginV2 & getPlugin()=0
Get the plugin for the layer.
nvinfer1::LoopOutput::kREVERSE
Output value is concatenation of values of tensor for each iteration, in reverse order.
nvinfer1::ISliceLayer::getSize
virtual Dims getSize() const =0
Get dimensions of the output slice.
nvinfer1::IBuilder::canRunOnDLA
virtual TRT_DEPRECATED bool canRunOnDLA(const ILayer *layer) const =0
Checks if a layer can run on DLA.
nvinfer1::IBuilder::setMaxBatchSize
virtual void setMaxBatchSize(int batchSize)=0
Set the maximum batch size.
nvinfer1::IBuilder::setDeviceType
virtual TRT_DEPRECATED void setDeviceType(ILayer *layer, DeviceType deviceType)=0
Set the device that this layer must execute on.
nvinfer1::ActivationType
ActivationType
Forward declare IGpuAllocator for use in other interfaces.
Definition: NvInferRuntimeCommon.h:133
nvinfer1::IBuilder::setErrorRecorder
virtual void setErrorRecorder(IErrorRecorder *recorder)=0
Set the ErrorRecorder for this interface.
NvInferRuntime.h
nvinfer1::IBuilder::getMaxDLABatchSize
virtual int getMaxDLABatchSize() const =0
Get the maximum batch size DLA can support. For any tensor the total volume of index dimensions combi...
nvinfer1::LayerType::kSHAPE
Shape layer.
nvinfer1::IRNNv2Layer::setInputMode
virtual void setInputMode(RNNInputMode op)=0
Set the input mode of the RNN layer.
nvinfer1::IRNNv2Layer::getDirection
virtual RNNDirection getDirection() const =0
Get the direction of the RNN layer.
nvinfer1::ILoop::addIterator
virtual IIteratorLayer * addIterator(ITensor &tensor, int axis=0, bool reverse=false) noexcept=0
Return layer that subscripts tensor by loop iteration.
nvinfer1::INetworkDefinition::setName
virtual void setName(const char *name)=0
Sets the name of the network.
nvinfer1::FillOperation::kRANDOM_UNIFORM
Generate a tensor with random values drawn from a uniform distribution.
nvinfer1::IFullyConnectedLayer
A fully connected layer in a network definition. This layer expects an input tensor of three or more ...
Definition: NvInfer.h:1515
nvinfer1::Permutation
Definition: NvInfer.h:3663
nvinfer1::IBuilder::setDefaultDeviceType
virtual TRT_DEPRECATED void setDefaultDeviceType(DeviceType deviceType)=0
Sets the default DeviceType to be used by the builder. It ensures that all the layers that can run on...
nvinfer1::ITensor::setLocation
virtual void setLocation(TensorLocation location)=0
Set the storage location of a tensor.
nvinfer1::IBuilder::setEngineCapability
virtual TRT_DEPRECATED void setEngineCapability(EngineCapability capability)=0
Configure the builder to target specified EngineCapability flow.
nvinfer1::IConstantLayer
Layer that represents a constant value.
Definition: NvInfer.h:4204
nvinfer1::IFullyConnectedLayer::setInput
void setInput(int index, ITensor &tensor) _TENSORRT_OVERRIDE=0
Append or replace an input of this layer with a specific tensor.
nvinfer1::Dims4::Dims4
Dims4()
Construct an empty Dims2 object.
Definition: NvInfer.h:286
nvinfer1::IActivationLayer::getAlpha
virtual float getAlpha() const =0
Get the alpha parameter.
nvinfer1::IParametricReLULayer
Layer that represents a parametric ReLU operation.
Definition: NvInfer.h:4254
nvinfer1::IBuilderConfig::clearQuantizationFlag
virtual void clearQuantizationFlag(QuantizationFlag flag)=0
clear a quantization flag.
nvinfer1::RNNInputMode::kSKIP
No operation is performed on the first recurrent layer.
nvinfer1::IDeconvolutionLayer::getKernelWeights
virtual Weights getKernelWeights() const =0
Get the kernel weights for the deconvolution.
nvinfer1::IAlgorithmVariant::getImplementation
virtual int64_t getImplementation() const =0
Return implementation of the algorithm.
nvinfer1::INetworkDefinition::addResize
virtual IResizeLayer * addResize(ITensor &input)=0
Add a resize layer to the network.
nvinfer1::IRNNv2Layer::setDirection
virtual void setDirection(RNNDirection op)=0
Set the direction of the RNN layer.
nvinfer1::IBuilder::resetDeviceType
virtual TRT_DEPRECATED void resetDeviceType(ILayer *layer)=0
reset the DeviceType for this layer
nvinfer1::RNNGateType::kOUTPUT
Output gate (o).
nvinfer1::INetworkDefinition
A network definition for input to the builder.
Definition: NvInfer.h:4838
nvinfer1::RNNGateType::kHIDDEN
Hidden gate (h).
nvinfer1::IPluginLayer
Layer type for plugins.
Definition: NvInfer.h:3373
nvinfer1::IShuffleLayer::setFirstTranspose
virtual void setFirstTranspose(Permutation permutation)=0
Set the permutation applied by the first transpose operation.
nvinfer1::IReduceLayer::setReduceAxes
virtual void setReduceAxes(uint32_t reduceAxes)=0
Set the axes over which to reduce.
nvinfer1::EnumMax< PaddingMode >
constexpr int EnumMax< PaddingMode >()
Maximum number of elements in PaddingMode enum.
Definition: NvInfer.h:1138
nvinfer1::Weights
An array of weights used as a layer parameter.
Definition: NvInferRuntime.h:107
nvinfer1::IAlgorithmVariant
provides a unique 128-bit identifier, which along with the input and output information denotes the v...
Definition: NvInfer.h:6123
nvinfer1::LayerType::kPADDING
Padding layer.
nvinfer1::LoopOutput::kCONCATENATE
Output value is concatenation of values of tensor for each iteration, in forward order.
nvinfer1::INetworkDefinition::setConvolutionOutputDimensionsFormula
virtual TRT_DEPRECATED void setConvolutionOutputDimensionsFormula(IOutputDimensionsFormula *formula)=0
Set the convolution output dimensions formula.
nvinfer1::INetworkDefinition::unmarkOutputForShapes
virtual bool unmarkOutputForShapes(ITensor &tensor)=0
Undo markOutputForShapes.
nvinfer1::INetworkDefinition::addLRN
virtual ILRNLayer * addLRN(ITensor &input, int window, float alpha, float beta, float k)=0
Add a LRN layer to the network.
nvinfer1::IPaddingLayer::setPrePadding
virtual TRT_DEPRECATED void setPrePadding(DimsHW padding)=0
Set the padding that is applied at the start of the tensor.
nvinfer1::IPaddingLayer
Layer that represents a padding operation.
Definition: NvInfer.h:3575
nvinfer1::ISliceLayer::setMode
virtual void setMode(SliceMode mode)=0
Set the slice mode.
nvinfer1::INetworkDefinition::addSelect
virtual ISelectLayer * addSelect(ITensor &condition, ITensor &thenInput, ITensor &elseInput)=0
Add a select layer to the network.
nvinfer1::ITopKLayer::getK
virtual int getK() const =0
Get the k value for the layer.
nvinfer1::DimsCHW
Descriptor for data with one channel dimension and two spatial dimensions.
Definition: NvInfer.h:206
nvinfer1::IConvolutionLayer
A convolution layer in a network definition.
Definition: NvInfer.h:1155
nvinfer1::IUnaryLayer::setOperation
virtual void setOperation(UnaryOperation op)=0
Set the unary operation for the layer.
nvinfer1::IScaleLayer::getChannelAxis
virtual int getChannelAxis() const =0
Get the channel axis.
nvinfer1::IBuilderConfig::setDLACore
virtual void setDLACore(int dlaCore)=0
Sets the DLA core used by the network.
nvinfer1::EnumMax< LoopOutput >
constexpr int EnumMax< LoopOutput >()
Maximum number of elements in LoopOutput enum.
Definition: NvInfer.h:4434
nvinfer1::UnaryOperation
UnaryOperation
Enumerates the unary operations that may be performed by a Unary layer.
Definition: NvInfer.h:3417
nvinfer1::IBuilder::platformHasFastFp16
virtual bool platformHasFastFp16() const =0
Determine whether the platform has fast native fp16.
nvinfer1::ElementWiseOperation::kAND
Logical AND of two elements.
nvinfer1::EnumMax< RNNOperation >
constexpr int EnumMax< RNNOperation >()
Maximum number of elements in RNNOperation enum.
Definition: NvInfer.h:2745
nvinfer1::IIdentityLayer
A layer that represents the identity function.
Definition: NvInfer.h:4191
nvinfer1::IAlgorithm::getAlgorithmVariant
virtual const IAlgorithmVariant & getAlgorithmVariant() const =0
Returns the algorithm variant.
nvinfer1::RNNGateType
RNNGateType
Identifies an individual gate within an RNN cell.
Definition: NvInfer.h:3143
nvinfer1::IIteratorLayer::getReverse
virtual bool getReverse() const noexcept=0
True if and only if reversing input.
nvinfer1::IGatherLayer::setGatherAxis
virtual void setGatherAxis(int axis)=0
Set the axis to gather on. The axis must be less than the number of dimensions in the data input.
nvinfer1::IFullyConnectedLayer::setNbOutputChannels
virtual void setNbOutputChannels(int nbOutputs)=0
Set the number of output channels K from the fully connected layer.
nvinfer1::IShuffleLayer::setInput
void setInput(int index, ITensor &tensor) _TENSORRT_OVERRIDE=0
Append or replace an input of this layer with a specific tensor.
nvinfer1::IDeconvolutionLayer::setKernelWeights
virtual void setKernelWeights(Weights weights)=0
Set the kernel weights for the deconvolution.
nvinfer1::IInt8Calibrator::writeCalibrationCache
virtual void writeCalibrationCache(const void *ptr, std::size_t length)=0
Save a calibration cache.
nvinfer1::ProfilingVerbosity
ProfilingVerbosity
List of verbosity levels of layer information exposed in NVTX annotations.
Definition: NvInfer.h:6334
nvinfer1::ITensor::getDynamicRangeMin
virtual float getDynamicRangeMin() const =0
Get minimum of dynamic range.
nvinfer1::ProfilingVerbosity::kVERBOSE
Register layer names in NVTX message field and register layer detail in NVTX JSON payload field.
nvinfer1::IConvolutionLayer::setPadding
virtual TRT_DEPRECATED void setPadding(DimsHW padding)=0
Set the padding of the convolution.
nvinfer1::IBuilder::createNetwork
virtual TRT_DEPRECATED nvinfer1::INetworkDefinition * createNetwork()=0
Create a network definition object where all tensors have an implicit batch dimension.
nvinfer1::INetworkDefinition::addRNN
virtual TRT_DEPRECATED IRNNLayer * addRNN(ITensor &inputs, int layerCount, std::size_t hiddenSize, int maxSeqLen, RNNOperation op, RNNInputMode mode, RNNDirection dir, Weights weights, Weights bias)=0
Add an layerCount deep RNN layer to the network with a sequence length of maxSeqLen and hiddenSize in...
nvinfer1::IAlgorithmSelector
Interface implemented by application for selecting and reporting algorithms of a layer provided by th...
Definition: NvInfer.h:6226
nvinfer1::IBuilderConfig::getAvgTimingIterations
virtual int getAvgTimingIterations() const =0
Query the number of averaging iterations.
nvinfer1::ElementWiseOperation::kOR
Logical OR of two elements.
nvinfer1::NetworkDefinitionCreationFlag::kEXPLICIT_PRECISION
Mark the network to be an explicit precision network.
nvinfer1::IConvolutionLayer::setKernelSizeNd
virtual void setKernelSizeNd(Dims kernelSize)=0
Set the multi-dimension kernel size of the convolution.
nvinfer1::IDeconvolutionLayer::getPaddingNd
virtual Dims getPaddingNd() const =0
Get the multi-dimension padding of the deconvolution.
nvinfer1::UnaryOperation::kLOG
Log (base e).
nvinfer1::LayerType::kPLUGIN
Plugin layer.
nvinfer1::EnumMax< UnaryOperation >
constexpr int EnumMax< UnaryOperation >()
Maximum number of elements in UnaryOperation enum.
Definition: NvInfer.h:3443
nvinfer1::NetworkDefinitionCreationFlags
uint32_t NetworkDefinitionCreationFlags
This bitset is capable of representing one or more NetworkDefinitionCreationFlag flags constructed wi...
Definition: NvInfer.h:6738
nvinfer1::IAlgorithm::getTimingMSec
virtual float getTimingMSec() const =0
The time in milliseconds to execute the algorithm.
nvinfer1::IRNNv2Layer::setCellState
virtual void setCellState(ITensor &cell)=0
Set the initial cell state of the LSTM with the provided cell ITensor.
nvinfer1::IDeconvolutionLayer::setPadding
virtual TRT_DEPRECATED void setPadding(DimsHW padding)=0
Set the padding of the deconvolution.
nvinfer1::INetworkDefinition::markOutputForShapes
virtual bool markOutputForShapes(ITensor &tensor)=0
Enable tensor's value to be computed by IExecutionContext::getShapeBinding.
nvinfer1::IBuilder::setStrictTypeConstraints
virtual TRT_DEPRECATED void setStrictTypeConstraints(bool mode)=0
Set whether or not type constraints are strict.
nvinfer1::ITensor::setDimensions
virtual void setDimensions(Dims dimensions)=0
Set the dimensions of a tensor.
nvinfer1::IConvolutionLayer::getDilationNd
virtual Dims getDilationNd() const =0
Get the multi-dimension dilation of the convolution.
nvinfer1::IBuilder::getDLACore
virtual TRT_DEPRECATED int getDLACore() const =0
Get the DLA core that the engine executes on.
nvinfer1::RNNOperation
RNNOperation
Enumerates the RNN operations that may be performed by an RNN layer.
Definition: NvInfer.h:2736
nvinfer1::IBuilder::setInt8Mode
virtual TRT_DEPRECATED void setInt8Mode(bool mode)=0
Set whether or not quantized 8-bit kernels are permitted.
nvinfer1::UnaryOperation::kSINH
Hyperbolic sine.
nvinfer1::ITripLimitLayer
Definition: NvInfer.h:4550
nvinfer1::UnaryOperation::kSIN
Sine.
nvinfer1::LoopOutput::kLAST_VALUE
Output value is value of tensor for last iteration.
nvinfer1::IPluginV2
Plugin class for user-implemented layers.
Definition: NvInferRuntimeCommon.h:371
nvinfer1::IConvolutionLayer::setNbGroups
virtual void setNbGroups(int nbGroups)=0
Set the number of groups for a convolution.
nvinfer1::IBuilder::platformHasFastInt8
virtual bool platformHasFastInt8() const =0
Determine whether the platform has fast native int8.
nvinfer1::IAlgorithmIOInfo
Carries information about input or output of the algorithm. IAlgorithmIOInfo for all the input and ou...
Definition: NvInfer.h:6090
nvinfer1::ITensor::setType
virtual void setType(DataType type)=0
Set the data type of a tensor.
nvinfer1::INetworkDefinition::addScaleNd
virtual IScaleLayer * addScaleNd(ITensor &input, ScaleMode mode, Weights shift, Weights scale, Weights power, int channelAxis)=0
Add a multi-dimension scale layer to the network.
nvinfer1::MatrixOperation
MatrixOperation
Enumerates the operations that may be performed on a tensor by IMatrixMultiplyLayer before multiplica...
Definition: NvInfer.h:4069
nvinfer1::IBuilder::reset
virtual void reset()=0
Resets the builder state to default values.
nvinfer1::MatrixOperation::kTRANSPOSE
Like kNONE, but transpose the matrix dimensions.
nvinfer1::ITopKLayer::getReduceAxes
virtual uint32_t getReduceAxes() const =0
Get the axes to reduce for the layer.
nvinfer1::IInt8MinMaxCalibrator
Definition: NvInfer.h:6014
nvinfer1::LayerType::kSLICE
Slice layer.
nvinfer1::ILoop::getName
virtual const char * getName() const noexcept=0
Return the name of the loop.
nvinfer1::INetworkDefinition::hasExplicitPrecision
virtual bool hasExplicitPrecision() const =0
True if network is an explicit precision network.
nvinfer1::TensorLocation
TensorLocation
The location for tensor data storage, device or host.
Definition: NvInferRuntimeCommon.h:960
nvinfer1::IMatrixMultiplyLayer::getOperation
virtual MatrixOperation getOperation(int index) const =0
Get the operation for an input tensor.
nvinfer1::SliceMode::kWRAP
Coordinates wrap around periodically.
nvinfer1::IPoolingLayer::getPostPadding
virtual Dims getPostPadding() const =0
Get the padding.
nvinfer1::ITensor::setBroadcastAcrossBatch
virtual void setBroadcastAcrossBatch(bool broadcastAcrossBatch)=0
Set whether to enable broadcast of tensor across the batch.
nvinfer1::TensorFormats
uint32_t TensorFormats
It is capable of representing one or more TensorFormat by binary OR operations, e....
Definition: NvInferRuntimeCommon.h:234
nvinfer1::INetworkDefinition::addUnary
virtual IUnaryLayer * addUnary(ITensor &input, UnaryOperation operation)=0
Add a unary layer to the network.
nvinfer1::Dims4::Dims4
Dims4(int d0, int d1, int d2, int d3)
Construct a Dims4 from 4 elements.
Definition: NvInfer.h:300
nvinfer1::UnaryOperation::kACOSH
Inverse hyperbolic cosine.
nvinfer1::ElementWiseOperation::kSUB
Substract the second element from the first.
nvinfer1::IFillLayer::getDimensions
virtual Dims getDimensions() const noexcept=0
Get the output tensor's dimensions.
nvinfer1::IPaddingLayer::setPostPadding
virtual TRT_DEPRECATED void setPostPadding(DimsHW padding)=0
Set the padding that is applied at the end of the tensor.
nvinfer1::IBuilderConfig::setEngineCapability
virtual void setEngineCapability(EngineCapability capability)=0
Configure the builder to target specified EngineCapability flow.
nvinfer1::IFillLayer::getBeta
virtual double getBeta() const noexcept=0
Get the value of beta parameter.
nvinfer1::ILayer::resetOutputType
virtual void resetOutputType(int index)=0
reset the output type for this layer
nvinfer1::IConvolutionLayer::getNbOutputMaps
virtual int getNbOutputMaps() const =0
Get the number of output maps for the convolution.
nvinfer1::ITensor::getDynamicRange
virtual TRT_DEPRECATED float getDynamicRange() const =0
Get dynamic range for the tensor.
nvinfer1::IBuilderConfig::getProfileStream
virtual cudaStream_t getProfileStream() const =0
Get the cudaStream that is used to profile this network.
nvinfer1::INetworkDefinition::markOutput
virtual void markOutput(ITensor &tensor)=0
Mark a tensor as a network output.
nvinfer1::BuilderFlag::kGPU_FALLBACK
Enable layers marked to execute on GPU if layer cannot execute on DLA.
nvinfer1::RNNOperation::kLSTM
Four-gate LSTM network w/o peephole connections.
nvinfer1::DimsNCHW::DimsNCHW
DimsNCHW()
Construct an empty DimsNCHW object.
Definition: NvInfer.h:322
nvinfer1::RNNGateType::kUPDATE
Update gate (z).
nvinfer1::INetworkDefinition::addFullyConnected
virtual IFullyConnectedLayer * addFullyConnected(ITensor &input, int nbOutputs, Weights kernelWeights, Weights biasWeights)=0
Add a fully connected layer to the network.
nvinfer1::IElementWiseLayer::getOperation
virtual ElementWiseOperation getOperation() const =0
Get the binary operation for the layer.
nvinfer1::IShuffleLayer::setZeroIsPlaceholder
virtual void setZeroIsPlaceholder(bool zeroIsPlaceholder)=0
Set meaning of 0 in reshape dimensions.
nvinfer1::ISliceLayer::getMode
virtual SliceMode getMode() const =0
Get the slice mode.
nvinfer1::EnumMax< ProfilingVerbosity >
constexpr int32_t EnumMax< ProfilingVerbosity >()
Maximum number of profile verbosity levels in ProfilingVerbosity enum.
Definition: NvInfer.h:6342
nvinfer1::BuilderFlag::kREFIT
Enable building a refittable engine.
nvinfer1::LayerType::kCONCATENATION
Concatenation layer.
nvinfer1::IResizeLayer::setInput
void setInput(int index, ITensor &tensor) _TENSORRT_OVERRIDE=0
Append or replace an input of this layer with a specific tensor.
nvinfer1::EnumMax< ScaleMode >
constexpr int EnumMax< ScaleMode >()
Maximum number of elements in ScaleMode enum.
Definition: NvInfer.h:2028
nvinfer1::ISliceLayer::setStride
virtual void setStride(Dims stride)=0
Set the stride for computing the output slice data.
nvinfer1::UnaryOperation::kEXP
Exponentiation.
nvinfer1::IConvolutionLayer::getPostPadding
virtual Dims getPostPadding() const =0
Get the post-padding.
nvinfer1::INetworkDefinition::addPaddingNd
virtual IPaddingLayer * addPaddingNd(ITensor &input, Dims prePadding, Dims postPadding)=0
Add a padding layer to the network. Only 2D padding is currently supported.
nvinfer1::Dims::nbDims
int nbDims
The number of dimensions.
Definition: NvInferRuntimeCommon.h:223
nvinfer1::IConvolutionLayer::getPaddingNd
virtual Dims getPaddingNd() const =0
Get the multi-dimension padding of the convolution.
nvinfer1::TopKOperation
TopKOperation
Enumerates the operations that may be performed by a TopK layer.
Definition: NvInfer.h:3993
nvinfer1::LoopOutput
LoopOutput
Enum that describes kinds of loop outputs.
Definition: NvInfer.h:4421
nvinfer1::IRNNv2Layer
An RNN layer in a network definition, version 2.
Definition: NvInfer.h:3169
nvinfer1::OptProfileSelector
OptProfileSelector
When setting or querying optimization profile parameters (such as shape tensor inputs or dynamic dime...
Definition: NvInferRuntime.h:979
nvinfer1::MatrixOperation::kVECTOR
nvinfer1::ISliceLayer::setSize
virtual void setSize(Dims size)=0
Set the dimensions of the output slice.
nvinfer1::ITensor::getAllowedFormats
virtual TensorFormats getAllowedFormats() const =0
Get a bitmask of TensorFormat values that the tensor supports. For a shape tensor,...
nvinfer1::IBuilder::getDeviceType
virtual TRT_DEPRECATED DeviceType getDeviceType(const ILayer *layer) const =0
Get the device that this layer executes on.
nvinfer1::EnumMax< ResizeMode >
constexpr int EnumMax< ResizeMode >()
Maximum number of elements in ResizeMode enum.
Definition: NvInfer.h:4272
nvinfer1::BuilderFlag::kINT8
Enable Int8 layer selection, with FP32 fallback with FP16 fallback if kFP16 also specified.
nvinfer1::IFillLayer::getOperation
virtual FillOperation getOperation() const noexcept=0
Get the fill operation for the layer.
nvinfer1::IBuilderConfig::resetDeviceType
virtual void resetDeviceType(const ILayer *layer)=0
reset the DeviceType for this layer
nvinfer1::IInt8Calibrator::getBatchSize
virtual int getBatchSize() const =0
Get the batch size used for calibration batches.
nvinfer1::IConvolutionLayer::setDilationNd
virtual void setDilationNd(Dims dilation)=0
Set the multi-dimension dilation of the convolution.
nvinfer1::IRNNLayer
A RNN layer in a network definition.
Definition: NvInfer.h:2809
nvinfer1::IBuilder::getRefittable
virtual TRT_DEPRECATED bool getRefittable() const =0
Query whether or not engines will be refittable.
nvinfer1::IConvolutionLayer::setBiasWeights
virtual void setBiasWeights(Weights weights)=0
Set the bias weights for the convolution.
nvinfer1::INetworkDefinition::addPluginExt
virtual TRT_DEPRECATED IPluginLayer * addPluginExt(ITensor *const *inputs, int nbInputs, IPluginExt &plugin)=0
Add a plugin layer to the network using an IPluginExt interface.
nvinfer1::ILoop::addRecurrence
virtual IRecurrenceLayer * addRecurrence(ITensor &initialValue) noexcept=0
Create a recurrence layer for this loop with initialValue as its first input.
nvinfer1::IPoolingLayer::getStride
virtual TRT_DEPRECATED DimsHW getStride() const =0
Get the stride for pooling.
nvinfer1::INetworkDefinition::addConstant
virtual IConstantLayer * addConstant(Dims dimensions, Weights weights)=0
Add a constant layer to the network.
nvinfer1::DimsHW
Descriptor for two-dimensional spatial data.
Definition: NvInfer.h:115
nvinfer1::IInt8LegacyCalibrator::getQuantile
virtual double getQuantile() const =0
The quantile (between 0 and 1) that will be used to select the region maximum when the quantile metho...
nvinfer1::IBuilder::getMinFindIterations
virtual TRT_DEPRECATED int getMinFindIterations() const =0
Query the number of minimization iterations.
nvinfer1::IBuilderConfig::getMinTimingIterations
virtual int getMinTimingIterations() const =0
Query the number of minimization iterations.
nvinfer1::ElementWiseOperation::kDIV
Divide the first element by the second.
nvinfer1::IBuilderConfig::isDeviceTypeSet
virtual bool isDeviceTypeSet(const ILayer *layer) const =0
whether the DeviceType has been explicitly set for this layer
nvinfer1::IPoolingLayer::setWindowSize
virtual TRT_DEPRECATED void setWindowSize(DimsHW windowSize)=0
Set the window size for pooling.
nvinfer1::ITensor::resetDynamicRange
virtual void resetDynamicRange()=0
Undo effect of setDynamicRange.
nvinfer1::ILoopOutputLayer
Definition: NvInfer.h:4505
nvinfer1::ISliceLayer::getStride
virtual Dims getStride() const =0
Get the stride for the output slice.
nvinfer1::ElementWiseOperation::kFLOOR_DIV
Floor division of the first element by the second.
nvinfer1::IReduceLayer::getReduceAxes
virtual uint32_t getReduceAxes() const =0
Get the axes over which to reduce for the layer.
nvinfer1::IBuilder::setDLACore
virtual TRT_DEPRECATED void setDLACore(int dlaCore)=0
Set the DLA core that the engine must execute on.
nvinfer1::DimsCHW::c
int c() const
Get the channel count.
Definition: NvInfer.h:245
nvinfer1::ITopKLayer::getOperation
virtual TopKOperation getOperation() const =0
Get the operation for the layer.
nvinfer1::ILayer::getNbOutputs
virtual int getNbOutputs() const =0
Get the number of outputs of a layer.
nvinfer1::IFillLayer::setOperation
virtual void setOperation(FillOperation op) noexcept=0
Set the fill operation for the layer.
nvinfer1::INetworkDefinition::addInput
virtual ITensor * addInput(const char *name, DataType type, Dims dimensions)=0
Add an input tensor to the network.
nvinfer1::INetworkDefinition::addFill
virtual IFillLayer * addFill(Dims dimensions, FillOperation op) noexcept=0
Add a fill layer to the network.
nvinfer1::IBuilderConfig::clearFlag
virtual void clearFlag(BuilderFlag builderFlag)=0
clear a single build mode flag.
nvinfer1::ILayer::getOutput
virtual ITensor * getOutput(int index) const =0
Get the layer output corresponding to the given index.
nvinfer1::ILRNLayer::setK
virtual void setK(float k)=0
Set the LRN K value.
nvinfer1::Dims
Structure to define the dimensions of a tensor.
Definition: NvInferRuntimeCommon.h:219
nvinfer1::INetworkDefinition::addPoolingNd
virtual IPoolingLayer * addPoolingNd(ITensor &input, PoolingType type, Dims windowSize)=0
Add a multi-dimension pooling layer to the network.
nvinfer1::RNNDirection::kUNIDIRECTION
Network iterations from first input to last input.
nvinfer1::IBuilderConfig::getQuantizationFlag
virtual bool getQuantizationFlag(QuantizationFlag flag) const =0
Returns true if the quantization flag is set.
nvinfer1::IDeconvolutionLayer::getStride
virtual TRT_DEPRECATED DimsHW getStride() const =0
Get the stride of the deconvolution.
nvinfer1::PaddingMode::kCAFFE_ROUND_UP
Use CAFFE padding, rounding output size up, uses prePadding value.
nvinfer1::ILRNLayer::getWindowSize
virtual int getWindowSize() const =0
Get the LRN window size.
nvinfer1::IConvolutionLayer::getPrePadding
virtual Dims getPrePadding() const =0
Get the pre-padding.
nvinfer1::EnumMax< RNNGateType >
constexpr int EnumMax< RNNGateType >()
Maximum number of elements in RNNGateType enum.
Definition: NvInfer.h:3155
nvinfer1::DimsCHW::w
int w() const
Get the width.
Definition: NvInfer.h:273
nvinfer1::ILogger
Application-implemented logging interface for the builder, engine and runtime.
Definition: NvInferRuntimeCommon.h:1020
nvinfer1::IBuilder::getFp16Mode
virtual TRT_DEPRECATED bool getFp16Mode() const =0
Query whether 16-bit kernels are permitted.
nvinfer1::IAlgorithmContext
Describes the context and requirements, that could be fulfilled by one or more instances of IAlgorith...
Definition: NvInfer.h:6148
nvinfer1::IConvolutionLayer::setPaddingMode
virtual void setPaddingMode(PaddingMode paddingMode)=0
Set the padding mode.
nvinfer1::RNNGateType::kRESET
Reset gate (r).
nvinfer1::IScaleLayer::getScale
virtual Weights getScale() const =0
Get the scale value.
nvinfer1::LayerType::kRNN
RNN layer.
nvinfer1::IActivationLayer::setActivationType
virtual void setActivationType(ActivationType type)=0
Set the type of activation to be performed.
nvinfer1::EnumMax< LayerType >
constexpr int EnumMax< LayerType >()
Maximum number of elements in LayerType enum.
Definition: NvInfer.h:449
nvinfer1::IDeconvolutionLayer::setPaddingMode
virtual void setPaddingMode(PaddingMode paddingMode)=0
Set the padding mode.
nvinfer1::IPoolingLayer::setWindowSizeNd
virtual void setWindowSizeNd(Dims windowSize)=0
Set the multi-dimension window size for pooling.
nvinfer1::IBuilder::setMaxWorkspaceSize
virtual TRT_DEPRECATED void setMaxWorkspaceSize(std::size_t workspaceSize)=0
Set the maximum workspace size.
nvinfer1::RNNDirection::kBIDIRECTION
Network iterates from first to last and vice versa and outputs concatenated.
nvinfer1::IBuilderConfig::getDeviceType
virtual DeviceType getDeviceType(const ILayer *layer) const =0
Get the device that this layer executes on.
nvinfer1::ScaleMode
ScaleMode
Controls how shift, scale and power are applied in a Scale layer.
Definition: NvInfer.h:2020
nvinfer1::DimsNCHW::w
int & w()
Get the width.
Definition: NvInfer.h:393
nvinfer1::QuantizationFlag::kCALIBRATE_BEFORE_FUSION
nvinfer1::UnaryOperation::kATAN
Inverse tangent.
nvinfer1::PaddingMode::kSAME_UPPER
Use SAME padding, with prePadding <= postPadding.
nvinfer1::ITensor::isShapeTensor
virtual bool isShapeTensor() const =0
Whether the tensor is a shape tensor.
nvinfer1::IBuilder::getInt8Mode
virtual TRT_DEPRECATED bool getInt8Mode() const =0
Query whether Int8 mode is used.
nvinfer1::INetworkDefinition::addPluginV2
virtual IPluginV2Layer * addPluginV2(ITensor *const *inputs, int nbInputs, IPluginV2 &plugin)=0
Add a plugin layer to the network using the IPluginV2 interface.
nvinfer1::ICudaEngine
An engine for executing inference on a built network, with functionally unsafe features.
Definition: NvInferRuntime.h:1136
nvinfer1::QuantizationFlags
uint32_t QuantizationFlags
Represents a collection of one or more QuantizationFlag values using binary OR operations.
Definition: NvInfer.h:6266
nvinfer1::BuilderFlag::kFP16
Enable FP16 layer selection, with FP32 fallback.
nvinfer1::IFullyConnectedLayer::setBiasWeights
virtual void setBiasWeights(Weights weights)=0
Set the bias weights.
nvinfer1::IBuilder::buildCudaEngine
virtual TRT_DEPRECATED nvinfer1::ICudaEngine * buildCudaEngine(nvinfer1::INetworkDefinition &network)=0
Build a CUDA engine from a network definition.
nvinfer1::ILayer::precisionIsSet
virtual bool precisionIsSet() const =0
whether the computational precision has been set for this layer
nvinfer1::IRaggedSoftMaxLayer
A RaggedSoftmax layer in a network definition.
Definition: NvInfer.h:4177
nvinfer1::INetworkDefinition::addSlice
virtual ISliceLayer * addSlice(ITensor &input, Dims start, Dims size, Dims stride)=0
Add a slice layer to the network.
nvinfer1::IBuilderConfig::getProfilingVerbosity
virtual ProfilingVerbosity getProfilingVerbosity() const =0
Get verbosity level of layer information exposed in NVTX annotations.
nvinfer1::INetworkDefinition::getPoolingOutputDimensionsFormula
virtual TRT_DEPRECATED IOutputDimensionsFormula & getPoolingOutputDimensionsFormula() const =0
Get the pooling output dimensions formula.
nvinfer1::IPaddingLayer::getPostPaddingNd
virtual Dims getPostPaddingNd() const =0
Get the padding that is applied at the end of the tensor.
nvinfer1::INetworkDefinition::getOutput
virtual ITensor * getOutput(int index) const =0
Get the output tensor specified by the given index.
nvinfer1::IInt8LegacyCalibrator::writeHistogramCache
virtual void writeHistogramCache(const void *ptr, std::size_t length)=0
Save a histogram cache.
nvinfer1::IBuilder::buildEngineWithConfig
virtual nvinfer1::ICudaEngine * buildEngineWithConfig(INetworkDefinition &network, IBuilderConfig &config)=0
Builds an engine for the given INetworkDefinition and given IBuilderConfig.
nvinfer1::IDeconvolutionLayer::getPadding
virtual TRT_DEPRECATED DimsHW getPadding() const =0
Get the padding of the deconvolution.
nvinfer1::IBuilderConfig::setInt8Calibrator
virtual void setInt8Calibrator(IInt8Calibrator *calibrator)=0
Set Int8 Calibration interface.
nvinfer1::IDeconvolutionLayer::setPrePadding
virtual void setPrePadding(Dims padding)=0
Set the pre-padding.
nvinfer1::ILRNLayer::setAlpha
virtual void setAlpha(float alpha)=0
Set the LRN alpha value.
nvinfer1::IBuilderConfig::setAvgTimingIterations
virtual void setAvgTimingIterations(int avgTiming)=0
Set the number of averaging iterations used when timing layers.
nvinfer1::DeviceType
DeviceType
The device that this layer/network will execute on.
Definition: NvInferRuntime.h:688
nvinfer1::IConvolutionLayer::setPrePadding
virtual void setPrePadding(Dims padding)=0
Set the pre-padding.
nvinfer1::LayerType::kCONSTANT
Constant layer.
nvinfer1::IFullyConnectedLayer::getNbOutputChannels
virtual int getNbOutputChannels() const =0
Get the number of output channels K from the fully connected layer.
nvinfer1::ISliceLayer
Slices an input tensor into an output tensor based on the offset and strides.
Definition: NvInfer.h:3859
nvinfer1::INetworkDefinition::addPadding
virtual TRT_DEPRECATED IPaddingLayer * addPadding(ITensor &input, DimsHW prePadding, DimsHW postPadding)=0
Add a padding layer to the network.
nvinfer1::DimsNCHW::h
int h() const
Get the height.
Definition: NvInfer.h:386
nvinfer1::IReduceLayer::getKeepDimensions
virtual bool getKeepDimensions() const =0
Get the boolean that specifies whether or not to keep the reduced dimensions for the layer.
nvinfer1::ISliceLayer::setInput
void setInput(int index, ITensor &tensor) _TENSORRT_OVERRIDE=0
Append or replace an input of this layer with a specific tensor.
nvinfer1::IDeconvolutionLayer::getNbOutputMaps
virtual int getNbOutputMaps() const =0
Get the number of output feature maps for the deconvolution.
nvinfer1::IAlgorithmSelector::selectAlgorithms
virtual int32_t selectAlgorithms(const IAlgorithmContext &context, const IAlgorithm *const *choices, int32_t nbChoices, int32_t *selection)=0
Select Algorithms for a layer from the given list of algorithm choices.
nvinfer1::UnaryOperation::kASIN
Inverse sine.
nvinfer1::IConcatenationLayer::setAxis
virtual void setAxis(int axis)=0
Set the axis along which concatenation occurs.
nvinfer1::ITensor::dynamicRangeIsSet
virtual bool dynamicRangeIsSet() const =0
Query whether dynamic range is set.
nvinfer1::ILayer::setPrecision
virtual void setPrecision(DataType dataType)=0
Set the computational precision of this layer.
nvinfer1::IBuilder::getEngineCapability
virtual TRT_DEPRECATED EngineCapability getEngineCapability() const =0
Query EngineCapability flow configured for the builder.
nvinfer1::IPoolingLayer::getPaddingMode
virtual PaddingMode getPaddingMode() const =0
Get the padding mode.
nvinfer1::IBuilderConfig::setQuantizationFlag
virtual void setQuantizationFlag(QuantizationFlag flag)=0
Set a single quantization flag.
nvinfer1::UnaryOperation::kNEG
Negation.
nvinfer1::IConstantLayer::getDimensions
virtual Dims getDimensions() const =0
Get the dimensions for the layer.
nvinfer1::Dims::type
TRT_DEPRECATED DimensionType type[MAX_DIMS]
The type of each dimension.
Definition: NvInferRuntimeCommon.h:225
nvinfer1::LayerType::kGATHER
Gather layer.
nvinfer1::IIteratorLayer
Definition: NvInfer.h:4556
nvinfer1::IDeconvolutionLayer::getPrePadding
virtual Dims getPrePadding() const =0
Get the pre-padding.
nvinfer1::anonymous_namespace{NvInfer.h}::createInferBuilder
IBuilder * createInferBuilder(ILogger &logger)
Create an instance of an IBuilder class.
Definition: NvInfer.h:7297
nvinfer1::IResizeLayer::getAlignCorners
virtual bool getAlignCorners() const =0
True if align corners has been set.
nvinfer1::IBuilderConfig::getFlag
virtual bool getFlag(BuilderFlag builderFlag) const =0
Returns true if the build mode flag is set.
nvinfer1::BuilderFlag
BuilderFlag
List of valid modes that the builder can enable when creating an engine from a network definition.
Definition: NvInfer.h:6304
nvinfer1::RNNInputMode::kLINEAR
Perform the normal matrix multiplication in the first recurrent layer.
nvinfer1::INetworkDefinition::setPoolingOutputDimensionsFormula
virtual TRT_DEPRECATED void setPoolingOutputDimensionsFormula(IOutputDimensionsFormula *formula)=0
Set the pooling output dimensions formula.
nvinfer1::IResizeLayer::setAlignCorners
virtual void setAlignCorners(bool alignCorners)=0
Set whether to align corners while resizing.
nvinfer1::IPoolingLayer::setStride
virtual TRT_DEPRECATED void setStride(DimsHW stride)=0
Set the stride for pooling.
nvinfer1::ILRNLayer::setBeta
virtual void setBeta(float beta)=0
Set the LRN beta value.
nvinfer1::IScaleLayer::setPower
virtual void setPower(Weights power)=0
Set the power value.
nvinfer1::IAlgorithmContext::getDimensions
virtual Dims getDimensions(int32_t index, OptProfileSelector select) const =0
Get the minimum / optimum / maximum dimensions for input or output tensor.
nvinfer1::IScaleLayer::setScale
virtual void setScale(Weights scale)=0
Set the scale value.
nvinfer1::IMatrixMultiplyLayer::setTranspose
virtual TRT_DEPRECATED void setTranspose(int index, bool val)=0
Set the transpose flag for an input tensor.
nvinfer1::IInt8MinMaxCalibrator::getAlgorithm
CalibrationAlgoType getAlgorithm() override
Definition: NvInfer.h:6020
nvinfer1::IConstantLayer::getWeights
virtual Weights getWeights() const =0
Get the weights for the layer.
nvinfer1::UnaryOperation::kNOT
Logical NOT.
nvinfer1::ITensor::setName
virtual void setName(const char *name)=0
Set the tensor name.
nvinfer1::ElementWiseOperation::kPROD
Product of the two elements.
nvinfer1::IScaleLayer::getPower
virtual Weights getPower() const =0
Get the power value.
nvinfer1::LayerType::kTRIP_LIMIT
Loop Trip limit layer.
nvinfer1::IConcatenationLayer::getAxis
virtual int getAxis() const =0
Get the axis along which concatenation occurs.
nvinfer1::ScaleMode::kCHANNEL
Per-channel coefficients.
nvinfer1::ILayer::getNbInputs
virtual int getNbInputs() const =0
Get the number of inputs of a layer.
nvinfer1
The TensorRT API version 1 namespace.
nvinfer1::TensorFormat
TensorFormat
Format of the input/output tensors.
Definition: NvInferRuntimeCommon.h:249
nvinfer1::LayerType::kREDUCE
Reduce layer.
nvinfer1::ILayer
Base class for all layer classes in a network definition.
Definition: NvInfer.h:731
nvinfer1::INetworkDefinition::hasImplicitBatchDimension
virtual bool hasImplicitBatchDimension() const =0
Query whether the network was created with an implicit batch dimension.
nvinfer1::DimsHW::h
int h() const
Get the height.
Definition: NvInfer.h:151
nvinfer1::IBuilderConfig::setFlag
virtual void setFlag(BuilderFlag builderFlag)=0
Set a single build mode flag.
nvinfer1::IRecurrenceLayer::setInput
void setInput(int index, ITensor &tensor) _TENSORRT_OVERRIDE=0
Append or replace an input of this layer with a specific tensor.
nvinfer1::EnumMax< SliceMode >
constexpr int EnumMax< SliceMode >()
Maximum number of elements in SliceMode enum.
Definition: NvInfer.h:3826
nvinfer1::ElementWiseOperation::kSUM
Sum of the two elements.
nvinfer1::IPoolingLayer::getWindowSizeNd
virtual Dims getWindowSizeNd() const =0
Get the multi-dimension window size for pooling.
nvinfer1::INetworkDefinition::addShuffle
virtual IShuffleLayer * addShuffle(ITensor &input)=0
Add a shuffle layer to the network.
nvinfer1::DimsNCHW::c
int c() const
Get the channel count.
Definition: NvInfer.h:372
nvinfer1::EnumMax< ReduceOperation >
constexpr int EnumMax< ReduceOperation >()
Maximum number of elements in ReduceOperation enum.
Definition: NvInfer.h:3504
nvinfer1::IBuilderConfig::getQuantizationFlags
virtual QuantizationFlags getQuantizationFlags() const =0
Get the quantization flags.
nvinfer1::INetworkDefinition::removeTensor
virtual void removeTensor(ITensor &tensor)=0
remove a tensor from the network definition.
nvinfer1::ILayer::getPrecision
virtual DataType getPrecision() const =0
get the computational precision of this layer
nvinfer1::IBuilder::getNbDLACores
virtual int getNbDLACores() const =0
Return the number of DLA engines available to this builder.
nvinfer1::EnumMax< CalibrationAlgoType >
constexpr int EnumMax< CalibrationAlgoType >()
Maximum number of elements in CalibrationAlgoType enum.
Definition: NvInfer.h:5903
nvinfer1::IShuffleLayer::setSecondTranspose
virtual void setSecondTranspose(Permutation permutation)=0
Set the permutation applied by the second transpose operation.
nvinfer1::INetworkDefinition::getInput
virtual ITensor * getInput(int index) const =0
Get the input tensor specified by the given index.
nvinfer1::IRNNv2Layer::getHiddenState
virtual ITensor * getHiddenState() const =0
Get the initial hidden state of the RNN.
nvinfer1::IBuilderConfig::setMaxWorkspaceSize
virtual void setMaxWorkspaceSize(std::size_t workspaceSize)=0
Set the maximum workspace size.
nvinfer1::ILoop
Definition: NvInfer.h:4579
nvinfer1::IPluginV2Layer
Layer type for pluginV2.
Definition: NvInfer.h:3396
nvinfer1::INetworkDefinition::addActivation
virtual IActivationLayer * addActivation(ITensor &input, ActivationType type)=0
Add an activation layer to the network.
nvinfer1::BuilderFlag::kSTRICT_TYPES
Enables strict type constraints.
nvinfer1::INetworkDefinition::getNbOutputs
virtual int getNbOutputs() const =0
Get the number of outputs in the network.
nvinfer1::IBuilder::getErrorRecorder
virtual IErrorRecorder * getErrorRecorder() const =0
get the ErrorRecorder assigned to this interface.
nvinfer1::IPoolingLayer::setPoolingType
virtual void setPoolingType(PoolingType type)=0
Set the type of activation to be performed.
nvinfer1::IShuffleLayer::getSecondTranspose
virtual Permutation getSecondTranspose() const =0
Get the permutation applied by the second transpose operation.
nvinfer1::IFullyConnectedLayer::setKernelWeights
virtual void setKernelWeights(Weights weights)=0
Set the kernel weights, given as a KxC matrix in row-major order.
nvinfer1::IElementWiseLayer
A elementwise layer in a network definition.
Definition: NvInfer.h:2590
nvinfer1::IScaleLayer::getMode
virtual ScaleMode getMode() const =0
Get the scale mode.
nvinfer1::LayerType::kPOOLING
Pooling layer.
nvinfer1::ILRNLayer::getBeta
virtual float getBeta() const =0
Get the LRN beta value.
nvinfer1::INetworkDefinition::addPlugin
virtual TRT_DEPRECATED IPluginLayer * addPlugin(ITensor *const *inputs, int nbInputs, IPlugin &plugin)=0
Add a plugin layer to the network.
nvinfer1::IGatherLayer::setNbElementWiseDims
virtual void setNbElementWiseDims(int k)=0
Set the number of leading dimensions of indices tensor to be handled elementwise. k must be 0 if ther...
nvinfer1::LayerType
LayerType
The type values of layer classes.
Definition: NvInfer.h:410
nvinfer1::DimsHW::h
int & h()
Get the height.
Definition: NvInfer.h:144
nvinfer1::LayerType::kCONVOLUTION
Convolution layer.
nvinfer1::LayerType::kELEMENTWISE
Elementwise layer.
nvinfer1::IFullyConnectedLayer::getBiasWeights
virtual Weights getBiasWeights() const =0
Get the bias weights.
nvinfer1::IPoolingLayer::setPadding
virtual TRT_DEPRECATED void setPadding(DimsHW padding)=0
Set the padding for pooling.
nvinfer1::IDeconvolutionLayer::getKernelSize
virtual TRT_DEPRECATED DimsHW getKernelSize() const =0
Get the HW kernel size of the deconvolution.
cudaStream_t
struct CUstream_st * cudaStream_t
Forward declaration of cudaStream_t.
Definition: NvInferRuntimeCommon.h:112
nvinfer1::INetworkDefinition::addSoftMax
virtual ISoftMaxLayer * addSoftMax(ITensor &input)=0
Add a SoftMax layer to the network.
nvinfer1::ITensor::setDynamicRange
virtual bool setDynamicRange(float min, float max)=0
Set dynamic range for the tensor.
nvinfer1::IRNNv2Layer::setOperation
virtual void setOperation(RNNOperation op)=0
Set the operation of the RNN layer.
nvinfer1::ILayer::setName
virtual void setName(const char *name)=0
Set the name of a layer.
nvinfer1::IConvolutionLayer::setInput
void setInput(int index, ITensor &tensor) _TENSORRT_OVERRIDE=0
Append or replace an input of this layer with a specific tensor.
nvinfer1::IBuilder::setMinFindIterations
virtual TRT_DEPRECATED void setMinFindIterations(int minFind)=0
Set the number of minimization iterations used when timing layers.
nvinfer1::IDeconvolutionLayer::getBiasWeights
virtual Weights getBiasWeights() const =0
Get the bias weights for the deconvolution.
nvinfer1::DimsCHW::c
int & c()
Get the channel count.
Definition: NvInfer.h:238
nvinfer1::IDeconvolutionLayer::setInput
void setInput(int index, ITensor &tensor) _TENSORRT_OVERRIDE=0
Append or replace an input of this layer with a specific tensor.
nvinfer1::ILayer::getType
virtual LayerType getType() const =0
Return the type of a layer.
nvinfer1::IRNNv2Layer::getCellState
virtual ITensor * getCellState() const =0
Get the initial cell state of the RNN.
nvinfer1::RNNGateType::kCELL
Cell gate (c).
nvinfer1::ITensor::getDimensions
virtual Dims getDimensions() const =0
Get the dimensions of a tensor.
nvinfer1::BuilderFlag::kDISABLE_TIMING_CACHE
Disable reuse of timing information across identical layers.
nvinfer1::IBuilderConfig::setCalibrationProfile
virtual bool setCalibrationProfile(const IOptimizationProfile *profile) noexcept=0
Add a calibration profile.
nvinfer1::EnumMax< TopKOperation >
constexpr int EnumMax< TopKOperation >()
Maximum number of elements in TopKOperation enum.
Definition: NvInfer.h:4000
nvinfer1::IDeconvolutionLayer::setDilationNd
virtual void setDilationNd(Dims dilation)=0
Set the multi-dimension dilation of the deconvolution.
nvinfer1::UnaryOperation::kFLOOR
Floor.
nvinfer1::DimsNCHW::c
int & c()
Get the channel count.
Definition: NvInfer.h:365
nvinfer1::IPoolingLayer::setPostPadding
virtual void setPostPadding(Dims padding)=0
Set the post-padding.
nvinfer1::IShapeLayer
Layer type for getting shape of a tensor.
Definition: NvInfer.h:3982
nvinfer1::IResizeLayer::setOutputDimensions
virtual void setOutputDimensions(Dims dimensions)=0
Set the output dimensions.
nvinfer1::IRNNv2Layer::setWeightsForGate
virtual void setWeightsForGate(int layerIndex, RNNGateType gate, bool isW, Weights weights)=0
Set the weight parameters for an individual gate in the RNN.
nvinfer1::INetworkDefinition::addParametricReLU
virtual IParametricReLULayer * addParametricReLU(ITensor &input, ITensor &slope) noexcept=0
Add a parametric ReLU layer to the network.
nvinfer1::IConvolutionLayer::setKernelWeights
virtual void setKernelWeights(Weights weights)=0
Set the kernel weights for the convolution.
nvinfer1::IConvolutionLayer::setStrideNd
virtual void setStrideNd(Dims stride)=0
Set the multi-dimension stride of the convolution.
nvinfer1::IBuilderConfig::getInt8Calibrator
virtual IInt8Calibrator * getInt8Calibrator() const =0
Get Int8 Calibration interface.
_TENSORRT_OVERRIDE
#define _TENSORRT_OVERRIDE
Items that are marked as deprecated will be removed in a future release.
Definition: NvInferRuntimeCommon.h:62
nvinfer1::ILoopOutputLayer::getAxis
virtual int getAxis() const noexcept=0
Get axis being concatenated over.
nvinfer1::IDeconvolutionLayer::setKernelSize
virtual TRT_DEPRECATED void setKernelSize(DimsHW kernelSize)=0
Set the HW kernel size of the convolution.
nvinfer1::IBuilderConfig::setDefaultDeviceType
virtual void setDefaultDeviceType(DeviceType deviceType)=0
Sets the default DeviceType to be used by the builder. It ensures that all the layers that can run on...
nvinfer1::IFillLayer::setDimensions
virtual void setDimensions(Dims dimensions) noexcept=0
Set the output tensor's dimensions.
nvinfer1::IInt8EntropyCalibrator::getAlgorithm
CalibrationAlgoType getAlgorithm() override
Definition: NvInfer.h:5990
nvinfer1::IPaddingLayer::getPrePadding
virtual TRT_DEPRECATED DimsHW getPrePadding() const =0
Get the padding that is applied at the start of the tensor.
nvinfer1::ElementWiseOperation
ElementWiseOperation
Enumerates the binary operations that may be performed by an ElementWise layer.
Definition: NvInfer.h:2552
nvinfer1::ITensor::getName
virtual const char * getName() const =0
Get the tensor name.
nvinfer1::DimsNCHW::n
int & n()
Get the index count.
Definition: NvInfer.h:351
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::IInt8LegacyCalibrator::getAlgorithm
CalibrationAlgoType getAlgorithm() override
Definition: NvInfer.h:6035
nvinfer1::IShuffleLayer::getFirstTranspose
virtual Permutation getFirstTranspose() const =0
Get the permutation applied by the first transpose operation.
nvinfer1::IGatherLayer::getGatherAxis
virtual int getGatherAxis() const =0
Get the axis to gather on.
nvinfer1::IBuilder::setRefittable
virtual TRT_DEPRECATED void setRefittable(bool canRefit)=0
nvinfer1::INetworkDefinition::addMatrixMultiply
virtual IMatrixMultiplyLayer * addMatrixMultiply(ITensor &input0, MatrixOperation op0, ITensor &input1, MatrixOperation op1)=0
Add a MatrixMultiply layer to the network.
nvinfer1::LayerType::kFILL
Fill layer.
nvinfer1::IBuilderConfig::destroy
virtual void destroy()=0
De-allocates any internally allocated memory.
nvinfer1::INetworkDefinition::addReduce
virtual IReduceLayer * addReduce(ITensor &input, ReduceOperation operation, uint32_t reduceAxes, bool keepDimensions)=0
Add a reduce layer to the network.
nvinfer1::UnaryOperation::kABS
Absolute value.
nvinfer1::IBuilder::getMaxBatchSize
virtual int getMaxBatchSize() const =0
Get the maximum batch size.
nvinfer1::IShuffleLayer::setReshapeDimensions
virtual void setReshapeDimensions(Dims dimensions)=0
Set the reshaped dimensions.
nvinfer1::RNNOperation::kRELU
Single gate RNN w/ ReLU activation function.
nvinfer1::INetworkDefinition::addConvolution
virtual TRT_DEPRECATED IConvolutionLayer * addConvolution(ITensor &input, int nbOutputMaps, DimsHW kernelSize, Weights kernelWeights, Weights biasWeights)=0
Add a convolution layer to the network.
nvinfer1::LayerType::kFULLY_CONNECTED
Fully connected layer.
nvinfer1::IActivationLayer::setBeta
virtual void setBeta(float beta)=0
Set the beta parameter (must be finite).
nvinfer1::IBuilder::getMaxWorkspaceSize
virtual TRT_DEPRECATED std::size_t getMaxWorkspaceSize() const =0
Get the maximum workspace size.
nvinfer1::IConstantLayer::setDimensions
virtual void setDimensions(Dims dimensions)=0
Set the dimensions for the layer.
nvinfer1::IReduceLayer::setKeepDimensions
virtual void setKeepDimensions(bool keepDimensions)=0
Set the boolean that specifies whether or not to keep the reduced dimensions for the layer.
nvinfer1::IDeconvolutionLayer::getPaddingMode
virtual PaddingMode getPaddingMode() const =0
Get the padding mode.
nvinfer1::NetworkDefinitionCreationFlag::kEXPLICIT_BATCH
Mark the network to be an explicit batch network.
nvinfer1::IDeconvolutionLayer::getDilationNd
virtual Dims getDilationNd() const =0
Get the multi-dimension dilation of the deconvolution.
nvinfer1::IIteratorLayer::getAxis
virtual int getAxis() const noexcept=0
Get axis being iterated over.
nvinfer1::UnaryOperation::kTAN
Tangent.
nvinfer1::IPluginExt
Plugin class for user-implemented layers.
Definition: NvInferRuntime.h:247
nvinfer1::DimsNCHW::w
int w() const
Get the width.
Definition: NvInfer.h:400
nvinfer1::IBuilder::getHalf2Mode
virtual TRT_DEPRECATED bool getHalf2Mode() const =0
Query whether half2 mode is used.
nvinfer1::IPoolingLayer::getPrePadding
virtual Dims getPrePadding() const =0
Get the pre-padding.
nvinfer1::IOptimizationProfile
Optimization profile for dynamic input dimensions and shape tensors.
Definition: NvInferRuntime.h:1014
nvinfer1::INetworkDefinition::getConvolutionOutputDimensionsFormula
virtual TRT_DEPRECATED IOutputDimensionsFormula & getConvolutionOutputDimensionsFormula() const =0
Get the convolution output dimensions formula.
nvinfer1::ResizeMode
ResizeMode
Enumerates various modes of resize in the resize layer. Resize mode set using setResizeMode().
Definition: NvInfer.h:4265
nvinfer1::IPoolingLayer::setPaddingNd
virtual void setPaddingNd(Dims padding)=0
Set the multi-dimension padding for pooling.
nvinfer1::IRNNv2Layer::getOperation
virtual RNNOperation getOperation() const =0
Get the operation of the RNN layer.
nvinfer1::IFullyConnectedLayer::getKernelWeights
virtual Weights getKernelWeights() const =0
Get the kernel weights.
nvinfer1::IBuilderConfig::getDLACore
virtual int getDLACore() const =0
Get the DLA core that the engine executes on.
nvinfer1::IBuilder::createOptimizationProfile
virtual nvinfer1::IOptimizationProfile * createOptimizationProfile() noexcept=0
Create a new optimization profile.
nvinfer1::ElementWiseOperation::kEQUAL
Check if two elements are equal.
nvinfer1::LayerType::kDECONVOLUTION
Deconvolution layer.
nvinfer1::IBuilder::getDebugSync
virtual TRT_DEPRECATED bool getDebugSync() const =0
Query whether the builder will use debug synchronization.
nvinfer1::EnumMax< BuilderFlag >
constexpr int EnumMax< BuilderFlag >()
Maximum number of builder flags in BuilderFlag enum.
Definition: NvInfer.h:6321
nvinfer1::ElementWiseOperation::kXOR
Logical XOR of two elements.
nvinfer1::EnumMax< MatrixOperation >
constexpr int EnumMax< MatrixOperation >()
Maximum number of elements in MatrixOperation enum.
Definition: NvInfer.h:4092
nvinfer1::IScaleLayer::getShift
virtual Weights getShift() const =0
Get the shift value.
nvinfer1::DimsNCHW
Descriptor for data with one index dimension, one channel dimension and two spatial dimensions.
Definition: NvInfer.h:316
nvinfer1::DimsNCHW::DimsNCHW
DimsNCHW(int batchSize, int channels, int height, int width)
Construct a DimsNCHW given batch size, channel count, height and width.
Definition: NvInfer.h:338
nvinfer1::IBuilderConfig::getMaxWorkspaceSize
virtual std::size_t getMaxWorkspaceSize() const =0
Get the maximum workspace size.
nvinfer1::IConcatenationLayer
A concatenation layer in a network definition.
Definition: NvInfer.h:2199
nvinfer1::IShuffleLayer
Layer type for shuffling data.
Definition: NvInfer.h:3686
nvinfer1::ISliceLayer::getStart
virtual Dims getStart() const =0
Get the start offset for the slice layer.
nvinfer1::IPoolingLayer::setStrideNd
virtual void setStrideNd(Dims stride)=0
Set the multi-dimension stride for pooling.
nvinfer1::IBuilder::destroy
virtual void destroy()=0
Destroy this object.
nvinfer1::ITensor
A tensor in a network definition.
Definition: NvInfer.h:467
nvinfer1::IPoolingLayer::setPaddingMode
virtual void setPaddingMode(PaddingMode paddingMode)=0
Set the padding mode.
nvinfer1::IBuilder::createNetworkV2
virtual nvinfer1::INetworkDefinition * createNetworkV2(NetworkDefinitionCreationFlags flags)=0
Create a network definition object.
nvinfer1::IRecurrenceLayer
Definition: NvInfer.h:4464
nvinfer1::ILayer::setOutputType
virtual void setOutputType(int index, DataType dataType)=0
Set the output type of this layer.
nvinfer1::RNNDirection
RNNDirection
Enumerates the RNN direction that may be performed by an RNN layer.
Definition: NvInfer.h:2757
nvinfer1::IDeconvolutionLayer::setNbOutputMaps
virtual void setNbOutputMaps(int nbOutputMaps)=0
Set the number of output feature maps for the deconvolution.
nvinfer1::LayerType::kSHUFFLE
Shuffle layer.
nvinfer1::IBuilder::isDeviceTypeSet
virtual TRT_DEPRECATED bool isDeviceTypeSet(const ILayer *layer) const =0
whether the DeviceType has been explicitly set for this layer
nvinfer1::LayerType::kSELECT
Select layer.
nvinfer1::IPoolingLayer::setBlendFactor
virtual void setBlendFactor(float blendFactor)=0
Set the blending factor for the max_average_blend mode: max_average_blendPool = (1-blendFactor)*maxPo...
nvinfer1::ILoop::setName
virtual void setName(const char *name) noexcept=0
Set the name of the loop.
nvinfer1::IBuilderConfig::reset
virtual void reset()=0
Resets the builder configuration to defaults.
nvinfer1::IConvolutionLayer::getKernelSizeNd
virtual Dims getKernelSizeNd() const =0
Get the multi-dimension kernel size of the convolution.
nvinfer1::IAlgorithmIOInfo::getTensorFormat
virtual TensorFormat getTensorFormat() const =0
Return TensorFormat of the input/output of algorithm.
nvinfer1::IIteratorLayer::setReverse
virtual void setReverse(bool reverse) noexcept=0
nvinfer1::INetworkDefinition::addConcatenation
virtual IConcatenationLayer * addConcatenation(ITensor *const *inputs, int nbInputs)=0
Add a concatenation layer to the network.
nvinfer1::BuilderFlag::kTF32
nvinfer1::IDeconvolutionLayer::setBiasWeights
virtual void setBiasWeights(Weights weights)=0
Set the bias weights for the deconvolution.
nvinfer1::ILoopBoundaryLayer::getLoop
virtual ILoop * getLoop() const noexcept=0
Return pointer to ILoop associated with this boundary layer.
nvinfer1::ITopKLayer::setOperation
virtual void setOperation(TopKOperation op)=0
Set the operation for the layer.
nvinfer1::ILRNLayer
A LRN layer in a network definition.
Definition: NvInfer.h:1945
nvinfer1::ITensor::getType
virtual DataType getType() const =0
Get the data type of a tensor.
nvinfer1::IShuffleLayer::getZeroIsPlaceholder
virtual bool getZeroIsPlaceholder() const =0
Get meaning of 0 in reshape dimensions.
nvinfer1::IReduceLayer
Layer that represents a reduction operator across Shape, Int32, Float, and Half tensors.
Definition: NvInfer.h:3516
nvinfer1::INetworkDefinition::addTopK
virtual ITopKLayer * addTopK(ITensor &input, TopKOperation op, int k, uint32_t reduceAxes)=0
Add a TopK layer to the network.
nvinfer1::IMatrixMultiplyLayer
Layer that represents a Matrix Multiplication.
Definition: NvInfer.h:4122
nvinfer1::IBuilderConfig::setDeviceType
virtual void setDeviceType(const ILayer *layer, DeviceType deviceType)=0
Set the device that this layer must execute on.
nvinfer1::RNNOperation::kTANH
Single gate RNN w/ TANH activation function.
nvinfer1::INetworkDefinition::getName
virtual const char * getName() const =0
Returns the name associated with the network.
nvinfer1::PaddingMode
PaddingMode
Enumerates the modes of padding to perform in convolution, deconvolution and pooling layer,...
Definition: NvInfer.h:1127
nvinfer1::Dims::d
int d[MAX_DIMS]
The extent of each dimension.
Definition: NvInferRuntimeCommon.h:224
nvinfer1::ElementWiseOperation::kGREATER
Check if element in first tensor is greater than corresponding element in second tensor.
nvinfer1::LayerType::kUNARY
UnaryOp operation Layer.
nvinfer1::IBuilder::createBuilderConfig
virtual nvinfer1::IBuilderConfig * createBuilderConfig()=0
Create a builder configuration object.
nvinfer1::INetworkDefinition::addIdentity
virtual IIdentityLayer * addIdentity(ITensor &input)=0
Add an identity layer.
nvinfer1::PoolingType
PoolingType
The type of pooling to perform in a pooling layer.
Definition: NvInfer.h:1662
nvinfer1::INetworkDefinition::addRaggedSoftMax
virtual IRaggedSoftMaxLayer * addRaggedSoftMax(ITensor &input, ITensor &bounds)=0
Add a RaggedSoftMax layer to the network.
nvinfer1::INetworkDefinition::getNbInputs
virtual int getNbInputs() const =0
Get the number of inputs in the network.
nvinfer1::IInt8EntropyCalibrator2
Definition: NvInfer.h:5999
nvinfer1::IDeconvolutionLayer::setKernelSizeNd
virtual void setKernelSizeNd(Dims kernelSize)=0
Set the multi-dimension kernel size of the deconvolution.
nvinfer1::IFillLayer
Generate an output tensor with specified mode.
Definition: NvInfer.h:4695
nvinfer1::IRNNv2Layer::getSequenceLengths
virtual ITensor * getSequenceLengths() const =0
Get the sequence lengths specified for the RNN.
nvinfer1::IConvolutionLayer::setPostPadding
virtual void setPostPadding(Dims padding)=0
Set the post-padding.
nvinfer1::UnaryOperation::kCEIL
Ceiling.
nvinfer1::PaddingMode::kSAME_LOWER
Use SAME padding, with prePadding >= postPadding.
nvinfer1::Dims3
Descriptor for three-dimensional data.
Definition: NvInfer.h:172
nvinfer1::IInt8Calibrator::readCalibrationCache
virtual const void * readCalibrationCache(std::size_t &length)=0
Load a calibration cache.
nvinfer1::QuantizationFlag
QuantizationFlag
List of valid flags for quantizing the network to int8.
Definition: NvInfer.h:6275
nvinfer1::IDeconvolutionLayer::setPostPadding
virtual void setPostPadding(Dims padding)=0
Set the post-padding.
nvinfer1::ITensor::getBroadcastAcrossBatch
virtual bool getBroadcastAcrossBatch() const =0
Check if tensor is broadcast across the batch.
nvinfer1::IInt8EntropyCalibrator2::getAlgorithm
CalibrationAlgoType getAlgorithm() override
Definition: NvInfer.h:6005
nvinfer1::UnaryOperation::kRECIP
Reciprocal.
nvinfer1::IInt8Calibrator
Application-implemented interface for calibration.
Definition: NvInfer.h:5919
nvinfer1::IErrorRecorder
Reference counted application-implemented error reporting interface for TensorRT objects.
Definition: NvInferRuntimeCommon.h:1175
nvinfer1::IConvolutionLayer::setStride
virtual TRT_DEPRECATED void setStride(DimsHW stride)=0
Get the stride of the convolution.
nvinfer1::IActivationLayer::setAlpha
virtual void setAlpha(float alpha)=0
Set the alpha parameter (must be finite).
nvinfer1::ITopKLayer
Layer that represents a TopK reduction.
Definition: NvInfer.h:4012
nvinfer1::ITensor::setAllowedFormats
virtual void setAllowedFormats(TensorFormats formats)=0
Set allowed formats for this tensor. By default all formats are allowed. Shape tensors (for which isS...
nvinfer1::INetworkDefinition::addConvolutionNd
virtual IConvolutionLayer * addConvolutionNd(ITensor &input, int nbOutputMaps, Dims kernelSize, Weights kernelWeights, Weights biasWeights)=0
Add a multi-dimension convolution layer to the network.
nvinfer1::IBuilderConfig::getDefaultDeviceType
virtual DeviceType getDefaultDeviceType() const =0
Get the default DeviceType which was set by setDefaultDeviceType.
nvinfer1::IBuilder::getDefaultDeviceType
virtual TRT_DEPRECATED DeviceType getDefaultDeviceType() const =0
Get the default DeviceType which was set by setDefaultDeviceType.
nvinfer1::IBuilderConfig::setQuantizationFlags
virtual void setQuantizationFlags(QuantizationFlags flags)=0
Set the quantization flags.
nvinfer1::IConvolutionLayer::getStride
virtual TRT_DEPRECATED DimsHW getStride() const =0
Get the stride of the convolution.
nvinfer1::ElementWiseOperation::kMIN
Minimum of the two elements.
nvinfer1::PaddingMode::kCAFFE_ROUND_DOWN
Use CAFFE padding, rounding output size down, uses prePadding value.
nvinfer1::IBuilderConfig::setMinTimingIterations
virtual void setMinTimingIterations(int minTiming)=0
Set the number of minimization iterations used when timing layers.
nvinfer1::UnaryOperation::kASINH
Inverse hyperbolic sine.
nvinfer1::ILayer::setInput
virtual void setInput(int index, ITensor &tensor)=0
Replace an input of this layer with a specific tensor.
nvinfer1::ISelectLayer
Definition: NvInfer.h:4652
nvinfer1::LayerType::kSCALE
Scale layer.
nvinfer1::IConstantLayer::setWeights
virtual void setWeights(Weights weights)=0
Set the weights for the layer.
nvinfer1::IBuilderConfig::addOptimizationProfile
virtual int addOptimizationProfile(const IOptimizationProfile *profile) noexcept=0
Add an optimization profile.
nvinfer1::IInt8Calibrator::getAlgorithm
virtual CalibrationAlgoType getAlgorithm()=0
Get the algorithm used by this calibrator.
nvinfer1::EnumMax< PoolingType >
constexpr int EnumMax< PoolingType >()
Maximum number of elements in PoolingType enum.
Definition: NvInfer.h:1670
nvinfer1::LayerType::kSOFTMAX
SoftMax layer.
nvinfer1::SliceMode
SliceMode
Controls how ISliceLayer handles out of bounds coordinates.
Definition: NvInfer.h:3819
nvinfer1::INetworkDefinition::destroy
virtual void destroy()=0
Destroy this INetworkDefinition object.
nvinfer1::IInt8EntropyCalibrator
Definition: NvInfer.h:5984
nvinfer1::ILRNLayer::getK
virtual float getK() const =0
Get the LRN K value.
nvinfer1::LayerType::kRECURRENCE
Loop Recurrence layer.
nvinfer1::ILoopOutputLayer::setAxis
virtual void setAxis(int axis) noexcept=0
Set where to insert the contenation axis. Ignored if getLoopOutput() is kLAST_VALUE.
nvinfer1::ITopKLayer::setReduceAxes
virtual void setReduceAxes(uint32_t reduceAxes)=0
Set which axes to reduce for the layer.
nvinfer1::IElementWiseLayer::setOperation
virtual void setOperation(ElementWiseOperation op)=0
Set the binary operation for the layer.
nvinfer1::IGatherLayer
Definition: NvInfer.h:2620
nvinfer1::DimsHW::DimsHW
DimsHW(int height, int width)
Construct a DimsHW given height and width.
Definition: NvInfer.h:133
nvinfer1::IPoolingLayer::getPoolingType
virtual PoolingType getPoolingType() const =0
Get the type of activation to be performed.
nvinfer1::RNNInputMode
RNNInputMode
Enumerates the RNN input modes that may occur with an RNN layer.
Definition: NvInfer.h:2784
nvinfer1::IActivationLayer::getActivationType
virtual ActivationType getActivationType() const =0
Get the type of activation to be performed.
nvinfer1::Dims2
Descriptor for two-dimensional data.
Definition: NvInfer.h:85
nvinfer1::IInt8LegacyCalibrator::getRegressionCutoff
virtual double getRegressionCutoff() const =0
The fraction (between 0 and 1) of the maximum used to define the regression cutoff when using regress...
nvinfer1::IScaleLayer::setMode
virtual void setMode(ScaleMode mode)=0
Set the scale mode.
nvinfer1::IConvolutionLayer::getKernelSize
virtual TRT_DEPRECATED DimsHW getKernelSize() const =0
Get the HW kernel size of the convolution.
nvinfer1::FillOperation
FillOperation
Enumerates the tensor fill operations that may performed by a fill layer.
Definition: NvInfer.h:4665
nvinfer1::IAlgorithmContext::getNbOutputs
virtual int32_t getNbOutputs() const =0
Return number of outputs of the algorithm.
nvinfer1::ReduceOperation
ReduceOperation
Enumerates the reduce operations that may be performed by a Reduce layer.
Definition: NvInfer.h:3494
nvinfer1::IIteratorLayer::setAxis
virtual void setAxis(int axis) noexcept=0
Set axis to iterate over.
nvinfer1::INetworkDefinition::addPooling
virtual TRT_DEPRECATED IPoolingLayer * addPooling(ITensor &input, PoolingType type, DimsHW windowSize)=0
Add a pooling layer to the network.
nvinfer1::UnaryOperation::kCOS
Cosine.
nvinfer1::IDeconvolutionLayer::getKernelSizeNd
virtual Dims getKernelSizeNd() const =0
Get the multi-dimension kernel size of the deconvolution.
nvinfer1::IBuilderConfig::canRunOnDLA
virtual bool canRunOnDLA(const ILayer *layer) const =0
Checks if a layer can run on DLA.
nvinfer1::IMatrixMultiplyLayer::getTranspose
virtual TRT_DEPRECATED bool getTranspose(int index) const =0
Get the transpose flag for an input tensor.
nvinfer1::IAlgorithmIOInfo::getStrides
virtual Dims getStrides() const =0
Return strides of the input/output tensor of algorithm.
nvinfer1::UnaryOperation::kATANH
Inverse hyperbolic tangent.
nvinfer1::BuilderFlags
uint32_t BuilderFlags
Represents a collection of one or more QuantizationFlag values using binary OR operations,...
Definition: NvInfer.h:6295
nvinfer1::IResizeLayer::getOutputDimensions
virtual Dims getOutputDimensions() const =0
Get the output dimensions.
nvinfer1::IPaddingLayer::setPostPaddingNd
virtual void setPostPaddingNd(Dims padding)=0
Set the padding that is applied at the end of the tensor.
nvinfer1::IReduceLayer::getOperation
virtual ReduceOperation getOperation() const =0
Get the reduce operation for the layer.
nvinfer1::IBuilderConfig::getCalibrationProfile
virtual const IOptimizationProfile * getCalibrationProfile() noexcept=0
Get the current calibration profile.
nvinfer1::Dims::MAX_DIMS
static const int MAX_DIMS
The maximum number of dimensions supported for a tensor.
Definition: NvInferRuntimeCommon.h:222
nvinfer1::ILoopBoundaryLayer
Definition: NvInfer.h:4457
nvinfer1::IAlgorithm
Describes a variation of execution of a layer. An algorithm is represented by IAlgorithmVariant and t...
Definition: NvInfer.h:6188
nvinfer1::IAlgorithmVariant::getTactic
virtual int64_t getTactic() const =0
Return tactic of the algorithm.
nvinfer1::LayerType::kIDENTITY
Identity layer.
nvinfer1::DimsCHW::DimsCHW
DimsCHW(int channels, int height, int width)
Construct a DimsCHW given channel count, height and width.
Definition: NvInfer.h:226
nvinfer1::IPoolingLayer::getBlendFactor
virtual float getBlendFactor() const =0
Get the blending factor for the max_average_blend mode: max_average_blendPool = (1-blendFactor)*maxPo...
nvinfer1::EnumMax< RNNDirection >
constexpr int EnumMax< RNNDirection >()
Maximum number of elements in RNNDirection enum.
Definition: NvInfer.h:2764
nvinfer1::LayerType::kPLUGIN_V2
PluginV2 layer.
nvinfer1::IConvolutionLayer::setPaddingNd
virtual void setPaddingNd(Dims padding)=0
Set the multi-dimension padding of the convolution.
nvinfer1::IPaddingLayer::setPrePaddingNd
virtual void setPrePaddingNd(Dims padding)=0
Set the padding that is applied at the start of the tensor.
nvinfer1::DimsCHW::h
int h() const
Get the height.
Definition: NvInfer.h:259
nvinfer1::INetworkDefinition::addDeconvolutionNd
virtual IDeconvolutionLayer * addDeconvolutionNd(ITensor &input, int nbOutputMaps, Dims kernelSize, Weights kernelWeights, Weights biasWeights)=0
Add a multi-dimension deconvolution layer to the network.
nvinfer1::IRNNv2Layer::getBiasForGate
virtual Weights getBiasForGate(int layerIndex, RNNGateType gate, bool isW) const =0
Get the bias parameters for an individual gate in the RNN.
nvinfer1::FillOperation::kLINSPACE
Generate evenly spaced numbers over a specified interval.
nvinfer1::IRNNv2Layer::setHiddenState
virtual void setHiddenState(ITensor &hidden)=0
Set the initial hidden state of the RNN with the provided hidden ITensor.
nvinfer1::UnaryOperation::kCOSH
Hyperbolic cosine.
nvinfer1::IAlgorithmContext::getName
virtual const char * getName() const =0
Return name of the algorithm node. This is a unique identifier for the IAlgorithmContext.
nvinfer1::INetworkDefinition::getDeconvolutionOutputDimensionsFormula
virtual TRT_DEPRECATED IOutputDimensionsFormula & getDeconvolutionOutputDimensionsFormula() const =0
Get the deconvolution output dimensions formula.
nvinfer1::IConvolutionLayer::getKernelWeights
virtual Weights getKernelWeights() const =0
Get the kernel weights of the convolution.
nvinfer1::UnaryOperation::kACOS
Inverse cosine.
nvinfer1::IAlgorithmIOInfo::getDataType
virtual DataType getDataType() const =0
Return DataType of the input/output of algorithm.
nvinfer1::IResizeLayer::setResizeMode
virtual void setResizeMode(ResizeMode resizeMode)=0
Set resize mode for an input tensor.
nvinfer1::IInt8LegacyCalibrator
Definition: NvInfer.h:6029
nvinfer1::ElementWiseOperation::kPOW
The first element to the power of the second element.
nvinfer1::ISoftMaxLayer::setAxes
virtual void setAxes(uint32_t axes)=0
Set the axis along which softmax is computed. Currently, only one axis can be set.
nvinfer1::RNNGateType::kINPUT
Input gate (i).
nvinfer1::ILRNLayer::getAlpha
virtual float getAlpha() const =0
Get the LRN alpha value.
nvinfer1::IDeconvolutionLayer::getStrideNd
virtual Dims getStrideNd() const =0
Get the multi-dimension stride of the deconvolution.
nvinfer1::EnumMax< TripLimit >
constexpr int EnumMax< TripLimit >()
Maximum number of elements in TripLimit enum.
Definition: NvInfer.h:4450
nvinfer1::IScaleLayer
A Scale layer in a network definition.
Definition: NvInfer.h:2055
nvinfer1::IBuilder::allowGPUFallback
virtual TRT_DEPRECATED void allowGPUFallback(bool setFallBackMode)=0
Sets the builder to use GPU if a layer that was supposed to run on DLA can not run on DLA.
nvinfer1::IFillLayer::setInput
void setInput(int index, ITensor &tensor) _TENSORRT_OVERRIDE=0
replace an input of this layer with a specific tensor.
nvinfer1::ISoftMaxLayer::getAxes
virtual uint32_t getAxes() const =0
Get the axis along which softmax occurs.
nvinfer1::ILayer::getOutputType
virtual DataType getOutputType(int index) const =0
get the output type of this layer
nvinfer1::DimsCHW::w
int & w()
Get the width.
Definition: NvInfer.h:266
nvinfer1::TripLimit
TripLimit
Enum that describes kinds of trip limits.
Definition: NvInfer.h:4440
nvinfer1::DimensionType::kINDEX
Elements correspond to different batch index.
nvinfer1::LayerType::kACTIVATION
Activation layer.
nvinfer1::ILayer::getInput
virtual ITensor * getInput(int index) const =0
Get the layer input corresponding to the given index.
nvinfer1::ISoftMaxLayer
A Softmax layer in a network definition.
Definition: NvInfer.h:2144
nvinfer1::IBuilderConfig::setFlags
virtual void setFlags(BuilderFlags builderFlags)=0
Set the build mode flags to turn on builder options for this network.
nvinfer1::MatrixOperation::kNONE
nvinfer1::IInt8Calibrator::getBatch
virtual bool getBatch(void *bindings[], const char *names[], int nbBindings)=0
Get a batch of input for calibration.
nvinfer1::LayerType::kMATRIX_MULTIPLY
Matrix multiply layer.
nvinfer1::IRNNv2Layer::setSequenceLengths
virtual void setSequenceLengths(ITensor &seqLengths)=0
Specify individual sequence lengths in the batch with the ITensor pointed to by seqLengths.
nvinfer1::IDeconvolutionLayer::setPaddingNd
virtual void setPaddingNd(Dims padding)=0
Set the multi-dimension padding of the deconvolution.
nvinfer1::NetworkDefinitionCreationFlag
NetworkDefinitionCreationFlag
List of immutable network properties expressed at network creation time. NetworkDefinitionCreationFla...
Definition: NvInfer.h:6749
nvinfer1::INetworkDefinition::unmarkOutput
virtual void unmarkOutput(ITensor &tensor)=0
unmark a tensor as a network output.
nvinfer1::IBuilderConfig
Holds properties for configuring a builder to produce an engine.
Definition: NvInfer.h:6352
nvinfer1::ILayer::resetPrecision
virtual void resetPrecision()=0
reset the computational precision for this layer
nvinfer1::IBuilderConfig::getNbOptimizationProfiles
virtual int getNbOptimizationProfiles() const noexcept=0
Get number of optimization profiles.
nvinfer1::IBuilder::setAverageFindIterations
virtual TRT_DEPRECATED void setAverageFindIterations(int avgFind)=0
Set the number of averaging iterations used when timing layers.
nvinfer1::IDeconvolutionLayer::setStrideNd
virtual void setStrideNd(Dims stride)=0
Set the multi-dimension stride of the deconvolution.
nvinfer1::IBuilderConfig::getAlgorithmSelector
virtual IAlgorithmSelector * getAlgorithmSelector() const =0
Get Algorithm Selector.
nvinfer1::IBuilder::setDebugSync
virtual TRT_DEPRECATED void setDebugSync(bool sync)=0
Set whether the builder should use debug synchronization.
nvinfer1::IFillLayer::getAlpha
virtual double getAlpha() const noexcept=0
Get the value of alpha parameter.
nvinfer1::DimsHW::w
int & w()
Get the width.
Definition: NvInfer.h:158
nvinfer1::Dims3::Dims3
Dims3(int d0, int d1, int d2)
Construct a Dims3 from 3 elements.
Definition: NvInfer.h:191
nvinfer1::UnaryOperation::kSQRT
Square root.
nvinfer1::IDeconvolutionLayer::setNbGroups
virtual void setNbGroups(int nbGroups)=0
Set the number of groups for a deconvolution.
nvinfer1::LayerType::kRNN_V2
RNNv2 layer.
nvinfer1::IScaleLayer::setShift
virtual void setShift(Weights shift)=0
Set the shift value.
nvinfer1::LayerType::kRAGGED_SOFTMAX
Ragged softmax layer.
nvinfer1::IAlgorithmContext::getNbInputs
virtual int32_t getNbInputs() const =0
Return number of inputs of the algorithm.
nvinfer1::IRNNv2Layer::setBiasForGate
virtual void setBiasForGate(int layerIndex, RNNGateType gate, bool isW, Weights bias)=0
Set the bias parameters for an individual gate in the RNN.
nvinfer1::INetworkDefinition::addDeconvolution
virtual TRT_DEPRECATED IDeconvolutionLayer * addDeconvolution(ITensor &input, int nbOutputMaps, DimsHW kernelSize, Weights kernelWeights, Weights biasWeights)=0
Add a deconvolution layer to the network.
nvinfer1::IResizeLayer
A resize layer in a network definition.
Definition: NvInfer.h:4297
nvinfer1::IConvolutionLayer::setNbOutputMaps
virtual void setNbOutputMaps(int nbOutputMaps)=0
Set the number of output maps for the convolution.
nvinfer1::DimsHW::DimsHW
DimsHW()
Construct an empty DimsHW object.
Definition: NvInfer.h:121
nvinfer1::IPlugin
Plugin class for user-implemented layers.
Definition: NvInferRuntime.h:143
nvinfer1::ISliceLayer::setStart
virtual void setStart(Dims start)=0
Set the start offset that the slice layer uses to create the output slice.
nvinfer1::INetworkDefinition::setDeconvolutionOutputDimensionsFormula
virtual TRT_DEPRECATED void setDeconvolutionOutputDimensionsFormula(IOutputDimensionsFormula *formula)=0
Set the deconvolution output dimensions formula.
nvinfer1::IUnaryLayer::getOperation
virtual UnaryOperation getOperation() const =0
Get the unary operation for the layer.
nvinfer1::Dims2::Dims2
Dims2(int d0, int d1)
Construct a Dims2 from 2 elements.
Definition: NvInfer.h:103
nvinfer1::IBuilderConfig::getFlags
virtual BuilderFlags getFlags() const =0
Get the build mode flags for this builder config. Defaults to 0.
nvinfer1::BuilderFlag::kDEBUG
Enable debugging of layers via synchronizing after every layer.
nvinfer1::INetworkDefinition::addRNNv2
virtual IRNNv2Layer * addRNNv2(ITensor &input, int32_t layerCount, int32_t hiddenSize, int32_t maxSeqLen, RNNOperation op)=0
Add an layerCount deep RNN layer to the network with hiddenSize internal states that can take a batch...
nvinfer1::IPoolingLayer::getStrideNd
virtual Dims getStrideNd() const =0
Get the multi-dimension stride for pooling.
nvinfer1::IMatrixMultiplyLayer::setOperation
virtual void setOperation(int index, MatrixOperation op)=0
Set the operation for an input tensor.
nvinfer1::IPoolingLayer::getPaddingNd
virtual Dims getPaddingNd() const =0
Get the multi-dimension padding for pooling.
nvinfer1::RNNGateType::kFORGET
Forget gate (f).
nvinfer1::Dims4
Descriptor for four-dimensional data.
Definition: NvInfer.h:280
nvinfer1::IPoolingLayer
A Pooling layer in a network definition.
Definition: NvInfer.h:1686
nvinfer1::IBuilderConfig::setAlgorithmSelector
virtual void setAlgorithmSelector(IAlgorithmSelector *selector)=0
Set Algorithm Selector.
nvinfer1::IShuffleLayer::getReshapeDimensions
virtual Dims getReshapeDimensions() const =0
Get the reshaped dimensions.
nvinfer1::ILRNLayer::setWindowSize
virtual void setWindowSize(int windowSize)=0
Set the LRN window size.
nvinfer1::IAlgorithm::getWorkspaceSize
virtual std::size_t getWorkspaceSize() const =0
The size of the GPU temporary memory in bytes which the algorithm uses at execution time.
nvinfer1::IGpuAllocator
Application-implemented class for controlling allocation on the GPU.
Definition: NvInferRuntimeCommon.h:977
nvinfer1::IUnaryLayer
Layer that represents an unary operation.
Definition: NvInfer.h:3455
nvinfer1::IFillLayer::setAlpha
virtual void setAlpha(double alpha) noexcept=0
Set the alpha parameter.
nvinfer1::IResizeLayer::getResizeMode
virtual ResizeMode getResizeMode() const =0
Get resize mode for an input tensor.
nvinfer1::LayerType::kLOOP_OUTPUT
Loop output layer.
nvinfer1::IBuilder::setFp16Mode
virtual TRT_DEPRECATED void setFp16Mode(bool mode)=0
Set whether or not 16-bit kernels are permitted.
nvinfer1::INetworkDefinition::getLayer
virtual ILayer * getLayer(int index) const =0
Get the layer specified by the given index.
nvinfer1::IBuilder
Builds an engine from a network definition.
Definition: NvInfer.h:6785
nvinfer1::ITensor::isExecutionTensor
virtual bool isExecutionTensor() const =0
Whether the tensor is an execution tensor.
nvinfer1::DimsCHW::DimsCHW
DimsCHW()
Construct an empty DimsCHW object.
Definition: NvInfer.h:212
nvinfer1::IRNNv2Layer::getInputMode
virtual RNNInputMode getInputMode() const =0
Get the input mode of the RNN layer.
nvinfer1::IPoolingLayer::getPadding
virtual TRT_DEPRECATED DimsHW getPadding() const =0
Get the padding for pooling.
nvinfer1::Dims2::Dims2
Dims2()
Construct an empty Dims2 object.
Definition: NvInfer.h:91
nvinfer1::INetworkDefinition::addElementWise
virtual IElementWiseLayer * addElementWise(ITensor &input1, ITensor &input2, ElementWiseOperation op)=0
Add an elementwise layer to the network.
nvinfer1::IBuilderConfig::setProfilingVerbosity
virtual void setProfilingVerbosity(ProfilingVerbosity verbosity)=0
Set verbosity level of layer information exposed in NVTX annotations.
nvinfer1::IPoolingLayer::getAverageCountExcludesPadding
virtual bool getAverageCountExcludesPadding() const =0
Get whether exclusive pooling uses as a denominator the overlap area betwen the window and the unpadd...
nvinfer1::CalibrationAlgoType
CalibrationAlgoType
Version of calibration algorithm to use.
Definition: NvInfer.h:5894
nvinfer1::INetworkDefinition::addGather
virtual IGatherLayer * addGather(ITensor &data, ITensor &indices, int axis)=0
Add a gather layer to the network.
nvinfer1::ILayer::getName
virtual const char * getName() const =0
Return the name of a layer.
nvinfer1::IPoolingLayer::getWindowSize
virtual TRT_DEPRECATED DimsHW getWindowSize() const =0
Get the window size for pooling.
nvinfer1::RNNOperation::kGRU
Three-gate network consisting of Gated Recurrent Units.
nvinfer1::IConvolutionLayer::getStrideNd
virtual Dims getStrideNd() const =0
Get the multi-dimension stride of the convolution.
nvinfer1::IConvolutionLayer::getBiasWeights
virtual Weights getBiasWeights() const =0
Get the bias weights for the convolution.
nvinfer1::EngineCapability
EngineCapability
Forward declaration of IPluginFactory for use by other interfaces.
Definition: NvInferRuntime.h:82
nvinfer1::ITensor::isNetworkInput
virtual bool isNetworkInput() const =0
Whether the tensor is a network input.
nvinfer1::ILoopOutputLayer::setInput
void setInput(int index, ITensor &tensor) _TENSORRT_OVERRIDE=0
Append or replace an input of this layer with a specific tensor.
nvinfer1::IOutputDimensionsFormula
Application-implemented interface to compute layer output sizes.
Definition: NvInfer.h:3339
nvinfer1::IGatherLayer::getNbElementWiseDims
virtual int getNbElementWiseDims() const =0
Get the number of leading dimensions of indices tensor to be handled elementwise.
nvinfer1::LayerType::kRESIZE
Resize Layer.
nvinfer1::IPaddingLayer::getPrePaddingNd
virtual Dims getPrePaddingNd() const =0
Get the padding that is applied at the start of the tensor.
nvinfer1::IReduceLayer::setOperation
virtual void setOperation(ReduceOperation op)=0
Set the reduce operation for the layer.
nvinfer1::IConvolutionLayer::getPaddingMode
virtual PaddingMode getPaddingMode() const =0
Get the padding mode.
nvinfer1::IBuilder::platformHasTf32
virtual bool platformHasTf32() const =0
Determine whether the platform has TF32 support.
nvinfer1::IBuilder::setGpuAllocator
virtual void setGpuAllocator(IGpuAllocator *allocator)=0
Set the GPU allocator.
nvinfer1::DimsNCHW::n
int n() const
Get the index count.
Definition: NvInfer.h:358
nvinfer1::ITensor::isNetworkOutput
virtual bool isNetworkOutput() const =0
Whether the tensor is a network output.
nvinfer1::EnumMax< FillOperation >
constexpr int EnumMax< FillOperation >()
Maximum number of elements in FillOperation enum.
Definition: NvInfer.h:4672
nvinfer1::ILoop::addTripLimit
virtual ITripLimitLayer * addTripLimit(ITensor &tensor, TripLimit limit) noexcept=0
Add a trip-count limiter, based on the given tensor.
nvinfer1::EnumMax< ElementWiseOperation >
constexpr int EnumMax< ElementWiseOperation >()
Maximum number of elements in ElementWiseOperation enum.
Definition: NvInfer.h:2571
nvinfer1::ILayer::outputTypeIsSet
virtual bool outputTypeIsSet(int index) const =0
whether the output type has been set for this layer
nvinfer1::IConvolutionLayer::getNbGroups
virtual int getNbGroups() const =0
Get the number of groups of the convolution.
nvinfer1::INetworkDefinition::getNbLayers
virtual int getNbLayers() const =0
Get the number of layers in the network.
nvinfer1::LayerType::kLRN
LRN layer.
nvinfer1::IPoolingLayer::setAverageCountExcludesPadding
virtual void setAverageCountExcludesPadding(bool exclusive)=0
Set whether average pooling uses as a denominator the overlap area between the window and the unpadde...
nvinfer1::PaddingMode::kEXPLICIT_ROUND_DOWN
Use explicit padding, rounding output size down.
nvinfer1::IConvolutionLayer::getDilation
virtual TRT_DEPRECATED DimsHW getDilation() const =0
Get the dilation for a convolution.
nvinfer1::IConvolutionLayer::getPadding
virtual TRT_DEPRECATED DimsHW getPadding() const =0
Get the padding of the convolution. If the padding is asymmetric, the pre-padding is returned.
nvinfer1::IResizeLayer::getScales
virtual int getScales(int size, float *scales) const =0
Copies resize scales to scales[0, ..., nbScales-1], where nbScales is the number of scales that were ...
nvinfer1::ILoop::addLoopOutput
virtual ILoopOutputLayer * addLoopOutput(ITensor &tensor, LoopOutput outputKind, int axis=0) noexcept=0
Make an output for this loop, based on the given tensor.
nvinfer1::IBuilderConfig::getEngineCapability
virtual EngineCapability getEngineCapability() const =0
Query EngineCapability flow configured for the builder.
nvinfer1::IPoolingLayer::setPrePadding
virtual void setPrePadding(Dims padding)=0
Set the pre-padding.
nvinfer1::EnumMax< RNNInputMode >
constexpr int EnumMax< RNNInputMode >()
Maximum number of elements in RNNInputMode enum.
Definition: NvInfer.h:2791
nvinfer1::INetworkDefinition::addShape
virtual IShapeLayer * addShape(ITensor &input)=0
Add a shape layer to the network.
nvinfer1::ElementWiseOperation::kLESS
Check if element in first tensor is less than corresponding element in second tensor.
nvinfer1::IDeconvolutionLayer::setStride
virtual TRT_DEPRECATED void setStride(DimsHW stride)=0
Get the stride of the deconvolution.
nvinfer1::IInt8LegacyCalibrator::readHistogramCache
virtual const void * readHistogramCache(std::size_t &length)=0
Load a histogram.
nvinfer1::DimensionType::kSPATIAL
Elements correspond to different spatial data.
nvinfer1::IDeconvolutionLayer::getPostPadding
virtual Dims getPostPadding() const =0
Get the padding.
nvinfer1::IResizeLayer::setScales
virtual void setScales(const float *scales, int nbScales)=0
Set the resize scales.
nvinfer1::IActivationLayer
An Activation layer in a network definition.
Definition: NvInfer.h:1599
nvinfer1::INetworkDefinition::addScale
virtual IScaleLayer * addScale(ITensor &input, ScaleMode mode, Weights shift, Weights scale, Weights power)=0
Add a Scale layer to the network.
nvinfer1::LayerType::kITERATOR
Loop Iterator layer.
nvinfer1::IFillLayer::setBeta
virtual void setBeta(double beta) noexcept=0
Set the beta parameter.
nvinfer1::ScaleMode::kUNIFORM
Identical coefficients across all elements of the tensor.
nvinfer1::DimsCHW::h
int & h()
Get the height.
Definition: NvInfer.h:252
nvinfer1::UnaryOperation::kERF
Gauss error function.
nvinfer1::ITopKLayer::setK
virtual void setK(int k)=0
Set the k value for the layer.
nvinfer1::Permutation::order
int order[Dims::MAX_DIMS]
Definition: NvInfer.h:3671
nvinfer1::EnumMax< QuantizationFlag >
constexpr int EnumMax< QuantizationFlag >()
Maximum number of quantization flags in QuantizationFlag enum.
Definition: NvInfer.h:6284
nvinfer1::IPaddingLayer::getPostPadding
virtual TRT_DEPRECATED DimsHW getPostPadding() const =0
Get the padding that is applied at the end of the tensor.
nvinfer1::IRNNv2Layer::getWeightsForGate
virtual Weights getWeightsForGate(int layerIndex, RNNGateType gate, bool isW) const =0
Get the weight parameters for an individual gate in the RNN.
nvinfer1::IBuilder::getStrictTypeConstraints
virtual TRT_DEPRECATED bool getStrictTypeConstraints() const =0
Query whether or not type constraints are strict.
nvinfer1::IDeconvolutionLayer
A deconvolution layer in a network definition.
Definition: NvInfer.h:2234
nvinfer1::LayerType::kPARAMETRIC_RELU
Parametric ReLU layer.