TensorRT  7.2.0.9
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(int32_t d0, int32_t 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(int32_t height, int32_t width)
134  : Dims2(height, width)
135  {
137  }
138 
144  int32_t& h()
145  {
146  return d[0];
147  }
148 
154  int32_t h() const
155  {
156  return d[0];
157  }
158 
164  int32_t& w()
165  {
166  return d[1];
167  }
168 
174  int32_t w() const
175  {
176  return d[1];
177  }
178 };
179 
184 class Dims3 : public Dims
185 {
186 public:
191  {
192  nbDims = 3;
193  d[0] = d[1] = d[2] = 0;
194  }
195 
203  Dims3(int32_t d0, int32_t d1, int32_t d2)
204  {
205  nbDims = 3;
206  d[0] = d0;
207  d[1] = d1;
208  d[2] = d2;
209  }
210 };
211 
218 class TRT_DEPRECATED DimsCHW : public Dims3
219 {
220 public:
225  : Dims3()
226  {
227  type[0] = DimensionType::kCHANNEL;
228  type[1] = type[2] = DimensionType::kSPATIAL;
229  }
230 
238  DimsCHW(int32_t channels, int32_t height, int32_t width)
239  : Dims3(channels, height, width)
240  {
241  type[0] = DimensionType::kCHANNEL;
242  type[1] = type[2] = DimensionType::kSPATIAL;
243  }
244 
250  int32_t& c()
251  {
252  return d[0];
253  }
254 
260  int32_t c() const
261  {
262  return d[0];
263  }
264 
270  int32_t& h()
271  {
272  return d[1];
273  }
274 
280  int32_t h() const
281  {
282  return d[1];
283  }
284 
290  int32_t& w()
291  {
292  return d[2];
293  }
294 
300  int32_t w() const
301  {
302  return d[2];
303  }
304 };
305 
310 class Dims4 : public Dims
311 {
312 public:
317  {
318  nbDims = 4;
319  d[0] = d[1] = d[2] = d[3] = 0;
320  }
321 
330  Dims4(int32_t d0, int32_t d1, int32_t d2, int32_t d3)
331  {
332  nbDims = 4;
333  d[0] = d0;
334  d[1] = d1;
335  d[2] = d2;
336  d[3] = d3;
337  }
338 };
339 
346 class TRT_DEPRECATED DimsNCHW : public Dims4
347 {
348 public:
353  : Dims4()
354  {
355  type[0] = DimensionType::kINDEX;
356  type[1] = DimensionType::kCHANNEL;
357  type[2] = type[3] = DimensionType::kSPATIAL;
358  }
359 
368  DimsNCHW(int32_t batchSize, int32_t channels, int32_t height, int32_t width)
369  : Dims4(batchSize, channels, height, width)
370  {
371  type[0] = DimensionType::kINDEX;
372  type[1] = DimensionType::kCHANNEL;
373  type[2] = type[3] = DimensionType::kSPATIAL;
374  }
375 
381  int32_t& n()
382  {
383  return d[0];
384  }
385 
391  int32_t n() const
392  {
393  return d[0];
394  }
395 
401  int32_t& c()
402  {
403  return d[1];
404  }
405 
411  int32_t c() const
412  {
413  return d[1];
414  }
415 
421  int32_t& h()
422  {
423  return d[2];
424  }
425 
431  int32_t h() const
432  {
433  return d[2];
434  }
435 
441  int32_t& w()
442  {
443  return d[3];
444  }
445 
451  int32_t w() const
452  {
453  return d[3];
454  }
455 };
456 
464 enum class LayerType : int32_t
465 {
466  kCONVOLUTION = 0,
467  kFULLY_CONNECTED = 1,
468  kACTIVATION = 2,
469  kPOOLING = 3,
470  kLRN = 4,
471  kSCALE = 5,
472  kSOFTMAX = 6,
473  kDECONVOLUTION = 7,
474  kCONCATENATION = 8,
475  kELEMENTWISE = 9,
476  kPLUGIN = 10,
477  kRNN = 11,
478  kUNARY = 12,
479  kPADDING = 13,
480  kSHUFFLE = 14,
481  kREDUCE = 15,
482  kTOPK = 16,
483  kGATHER = 17,
484  kMATRIX_MULTIPLY = 18,
485  kRAGGED_SOFTMAX = 19,
486  kCONSTANT = 20,
487  kRNN_V2 = 21,
488  kIDENTITY = 22,
489  kPLUGIN_V2 = 23,
490  kSLICE = 24,
491  kSHAPE = 25,
492  kPARAMETRIC_RELU = 26,
493  kRESIZE = 27,
494  kTRIP_LIMIT = 28,
495  kRECURRENCE = 29,
496  kITERATOR = 30,
497  kLOOP_OUTPUT = 31,
498  kSELECT = 32,
499  kFILL = 33
500 };
501 
503 template <>
504 constexpr inline int32_t EnumMax<LayerType>()
505 {
506  return 34;
507 }
508 
522 class ITensor
523 {
524 public:
537  virtual void setName(const char* name) TRTNOEXCEPT = 0;
538 
546  virtual const char* getName() const TRTNOEXCEPT = 0;
547 
562  virtual void setDimensions(Dims dimensions) TRTNOEXCEPT = 0; // only valid for input tensors
563 
572  virtual Dims getDimensions() const TRTNOEXCEPT = 0;
573 
584  virtual void setType(DataType type) TRTNOEXCEPT = 0;
585 
593  virtual DataType getType() const TRTNOEXCEPT = 0;
594 
605  virtual bool setDynamicRange(float min, float max) TRTNOEXCEPT = 0;
606 
614  TRT_DEPRECATED virtual float getDynamicRange() const TRTNOEXCEPT = 0;
615 
619  virtual bool isNetworkInput() const TRTNOEXCEPT = 0;
620 
624  virtual bool isNetworkOutput() const TRTNOEXCEPT = 0;
625 
626 protected:
627  virtual ~ITensor() {}
628 
629 public:
647  virtual void setBroadcastAcrossBatch(bool broadcastAcrossBatch) TRTNOEXCEPT = 0;
648 
660  virtual bool getBroadcastAcrossBatch() const TRTNOEXCEPT = 0;
661 
667  virtual TensorLocation getLocation() const TRTNOEXCEPT = 0;
668 
679  virtual void setLocation(TensorLocation location) TRTNOEXCEPT = 0;
680 
686  virtual bool dynamicRangeIsSet() const TRTNOEXCEPT = 0;
687 
691  virtual void resetDynamicRange() TRTNOEXCEPT = 0;
692 
698  virtual float getDynamicRangeMin() const TRTNOEXCEPT = 0;
699 
705  virtual float getDynamicRangeMax() const TRTNOEXCEPT = 0;
706 
721  virtual void setAllowedFormats(TensorFormats formats) TRTNOEXCEPT = 0;
722 
731  virtual TensorFormats getAllowedFormats() const TRTNOEXCEPT = 0;
732 
762  virtual bool isShapeTensor() const TRTNOEXCEPT = 0;
763 
782  virtual bool isExecutionTensor() const TRTNOEXCEPT = 0;
783 };
784 
792 class ILayer
793 {
794 public:
800  virtual LayerType getType() const TRTNOEXCEPT = 0;
801 
809  virtual void setName(const char* name) TRTNOEXCEPT = 0;
810 
814 
817  virtual const char* getName() const TRTNOEXCEPT = 0;
818 
822  virtual int32_t getNbInputs() const TRTNOEXCEPT = 0;
823 
832  virtual ITensor* getInput(int32_t index) const TRTNOEXCEPT = 0;
833 
837  virtual int32_t getNbOutputs() const TRTNOEXCEPT = 0;
838 
845  virtual ITensor* getOutput(int32_t index) const TRTNOEXCEPT = 0;
846 
852  //
861  virtual void setInput(int32_t index, ITensor& tensor) TRTNOEXCEPT = 0;
862 
877 
878  virtual void setPrecision(DataType dataType) TRTNOEXCEPT = 0;
879 
886 
887  virtual DataType getPrecision() const TRTNOEXCEPT = 0;
888 
895 
896  virtual bool precisionIsSet() const TRTNOEXCEPT = 0;
897 
902 
903  virtual void resetPrecision() TRTNOEXCEPT = 0;
904 
930 
931  virtual void setOutputType(int32_t index, DataType dataType) TRTNOEXCEPT = 0;
932 
941 
942  virtual DataType getOutputType(int32_t index) const TRTNOEXCEPT = 0;
943 
951 
952  virtual bool outputTypeIsSet(int32_t index) const TRTNOEXCEPT = 0;
953 
960 
961  virtual void resetOutputType(int32_t index) TRTNOEXCEPT = 0;
962 
963 protected:
964  virtual ~ILayer() {}
965 };
966 
1189 enum class PaddingMode : int32_t
1190 {
1191  kEXPLICIT_ROUND_DOWN = 0,
1192  kEXPLICIT_ROUND_UP = 1,
1193  kSAME_UPPER = 2,
1194  kSAME_LOWER = 3,
1195  kCAFFE_ROUND_DOWN = 4,
1196  kCAFFE_ROUND_UP = 5
1197 };
1198 
1200 template <>
1201 constexpr inline int32_t EnumMax<PaddingMode>()
1202 {
1203  return 6;
1204 }
1205 
1219 {
1220 public:
1230  TRT_DEPRECATED virtual void setKernelSize(DimsHW kernelSize) TRTNOEXCEPT = 0;
1231 
1239  TRT_DEPRECATED virtual DimsHW getKernelSize() const TRTNOEXCEPT = 0;
1240 
1248  virtual void setNbOutputMaps(int32_t nbOutputMaps) TRTNOEXCEPT = 0;
1249 
1255  virtual int32_t getNbOutputMaps() const TRTNOEXCEPT = 0;
1256 
1268  TRT_DEPRECATED virtual void setStride(DimsHW stride) TRTNOEXCEPT = 0;
1269 
1275  TRT_DEPRECATED virtual DimsHW getStride() const TRTNOEXCEPT = 0;
1276 
1292  TRT_DEPRECATED virtual void setPadding(DimsHW padding) TRTNOEXCEPT = 0;
1293 
1301  TRT_DEPRECATED virtual DimsHW getPadding() const TRTNOEXCEPT = 0;
1302 
1318  virtual void setNbGroups(int32_t nbGroups) TRTNOEXCEPT = 0;
1319 
1325  virtual int32_t getNbGroups() const TRTNOEXCEPT = 0;
1326 
1336  virtual void setKernelWeights(Weights weights) TRTNOEXCEPT = 0;
1337 
1343  virtual Weights getKernelWeights() const TRTNOEXCEPT = 0;
1344 
1355  virtual void setBiasWeights(Weights weights) TRTNOEXCEPT = 0;
1356 
1362  virtual Weights getBiasWeights() const TRTNOEXCEPT = 0;
1363 
1375  TRT_DEPRECATED virtual void setDilation(DimsHW dilation) TRTNOEXCEPT = 0;
1376 
1384  TRT_DEPRECATED virtual DimsHW getDilation() const TRTNOEXCEPT = 0;
1385 
1386 protected:
1387  virtual ~IConvolutionLayer() {}
1388 
1389 public:
1402  virtual void setPrePadding(Dims padding) TRTNOEXCEPT = 0;
1403 
1409  virtual Dims getPrePadding() const TRTNOEXCEPT = 0;
1410 
1423  virtual void setPostPadding(Dims padding) TRTNOEXCEPT = 0;
1424 
1430  virtual Dims getPostPadding() const TRTNOEXCEPT = 0;
1431 
1441  virtual void setPaddingMode(PaddingMode paddingMode) TRTNOEXCEPT = 0;
1442 
1450  virtual PaddingMode getPaddingMode() const TRTNOEXCEPT = 0;
1451 
1460  virtual void setKernelSizeNd(Dims kernelSize) TRTNOEXCEPT = 0;
1461 
1467  virtual Dims getKernelSizeNd() const TRTNOEXCEPT = 0;
1468 
1478  virtual void setStrideNd(Dims stride) TRTNOEXCEPT = 0;
1479 
1485  virtual Dims getStrideNd() const TRTNOEXCEPT = 0;
1486 
1500  virtual void setPaddingNd(Dims padding) TRTNOEXCEPT = 0;
1501 
1509  virtual Dims getPaddingNd() const TRTNOEXCEPT = 0;
1510 
1520  virtual void setDilationNd(Dims dilation) TRTNOEXCEPT = 0;
1521 
1527  virtual Dims getDilationNd() const TRTNOEXCEPT = 0;
1528 
1547  void setInput(int32_t index, ITensor& tensor) _TENSORRT_OVERRIDE TRTNOEXCEPT = 0;
1548 };
1549 
1580 {
1581 public:
1589  virtual void setNbOutputChannels(int32_t nbOutputs) TRTNOEXCEPT = 0;
1590 
1596  virtual int32_t getNbOutputChannels() const TRTNOEXCEPT = 0;
1597 
1603  virtual void setKernelWeights(Weights weights) TRTNOEXCEPT = 0;
1604 
1610  virtual Weights getKernelWeights() const TRTNOEXCEPT = 0;
1611 
1619  virtual void setBiasWeights(Weights weights) TRTNOEXCEPT = 0;
1620 
1626  virtual Weights getBiasWeights() const TRTNOEXCEPT = 0;
1627 
1628 protected:
1629  virtual ~IFullyConnectedLayer() {}
1630 
1631 public:
1648  void setInput(int32_t index, ITensor& tensor) _TENSORRT_OVERRIDE TRTNOEXCEPT = 0;
1649 };
1650 
1662 class IActivationLayer : public ILayer
1663 {
1664 public:
1672  virtual void setActivationType(ActivationType type) TRTNOEXCEPT = 0;
1673 
1679  virtual ActivationType getActivationType() const TRTNOEXCEPT = 0;
1680 
1681 protected:
1682  virtual ~IActivationLayer() {}
1683 public:
1694  virtual void setAlpha(float alpha) TRTNOEXCEPT = 0;
1695 
1705  virtual void setBeta(float beta) TRTNOEXCEPT = 0;
1706 
1711  virtual float getAlpha() const TRTNOEXCEPT = 0;
1712 
1717  virtual float getBeta() const TRTNOEXCEPT = 0;
1718 };
1719 
1725 enum class PoolingType : int32_t
1726 {
1727  kMAX = 0, // Maximum over elements
1728  kAVERAGE = 1, // Average over elements. If the tensor is padded, the count includes the padding
1729  kMAX_AVERAGE_BLEND = 2 // Blending between max and average pooling: (1-blendFactor)*maxPool + blendFactor*avgPool
1730 };
1731 
1733 template <>
1734 constexpr inline int32_t EnumMax<PoolingType>()
1735 {
1736  return 3;
1737 }
1738 
1750 class IPoolingLayer : public ILayer
1751 {
1752 public:
1760  virtual void setPoolingType(PoolingType type) TRTNOEXCEPT = 0;
1761 
1767  virtual PoolingType getPoolingType() const TRTNOEXCEPT = 0;
1768 
1778  TRT_DEPRECATED virtual void setWindowSize(DimsHW windowSize) TRTNOEXCEPT = 0;
1779 
1787  TRT_DEPRECATED virtual DimsHW getWindowSize() const TRTNOEXCEPT = 0;
1788 
1800  TRT_DEPRECATED virtual void setStride(DimsHW stride) TRTNOEXCEPT = 0;
1801 
1809  TRT_DEPRECATED virtual DimsHW getStride() const TRTNOEXCEPT = 0;
1810 
1822  TRT_DEPRECATED virtual void setPadding(DimsHW padding) TRTNOEXCEPT = 0;
1823 
1833  TRT_DEPRECATED virtual DimsHW getPadding() const TRTNOEXCEPT = 0;
1834 
1845  virtual void setBlendFactor(float blendFactor) TRTNOEXCEPT = 0;
1846 
1855  virtual float getBlendFactor() const TRTNOEXCEPT = 0;
1856 
1870  virtual void setAverageCountExcludesPadding(bool exclusive) TRTNOEXCEPT = 0;
1871 
1878  virtual bool getAverageCountExcludesPadding() const TRTNOEXCEPT = 0;
1879 
1880 protected:
1881  virtual ~IPoolingLayer() {}
1882 
1883 public:
1896  virtual void setPrePadding(Dims padding) TRTNOEXCEPT = 0;
1897 
1903  virtual Dims getPrePadding() const TRTNOEXCEPT = 0;
1904 
1917  virtual void setPostPadding(Dims padding) TRTNOEXCEPT = 0;
1918 
1924  virtual Dims getPostPadding() const TRTNOEXCEPT = 0;
1925 
1934  virtual void setPaddingMode(PaddingMode paddingMode) TRTNOEXCEPT = 0;
1935 
1942  virtual PaddingMode getPaddingMode() const TRTNOEXCEPT = 0;
1943 
1951  virtual void setWindowSizeNd(Dims windowSize) TRTNOEXCEPT = 0;
1952 
1958  virtual Dims getWindowSizeNd() const TRTNOEXCEPT = 0;
1959 
1969  virtual void setStrideNd(Dims stride) TRTNOEXCEPT = 0;
1970 
1976  virtual Dims getStrideNd() const TRTNOEXCEPT = 0;
1977 
1991  virtual void setPaddingNd(Dims padding) TRTNOEXCEPT = 0;
1992 
2000  virtual Dims getPaddingNd() const TRTNOEXCEPT = 0;
2001 };
2002 
2012 class ILRNLayer : public ILayer
2013 {
2014 public:
2024  virtual void setWindowSize(int32_t windowSize) TRTNOEXCEPT = 0;
2025 
2031  virtual int32_t getWindowSize() const TRTNOEXCEPT = 0;
2032 
2039  virtual void setAlpha(float alpha) TRTNOEXCEPT = 0;
2040 
2046  virtual float getAlpha() const TRTNOEXCEPT = 0;
2047 
2054  virtual void setBeta(float beta) TRTNOEXCEPT = 0;
2055 
2061  virtual float getBeta() const TRTNOEXCEPT = 0;
2062 
2069  virtual void setK(float k) TRTNOEXCEPT = 0;
2070 
2076  virtual float getK() const TRTNOEXCEPT = 0;
2077 
2078 protected:
2079  virtual ~ILRNLayer() {}
2080 };
2081 
2087 enum class ScaleMode : int32_t
2088 {
2089  kUNIFORM = 0,
2090  kCHANNEL = 1,
2091  kELEMENTWISE = 2
2092 };
2093 
2095 template <>
2096 constexpr inline int32_t EnumMax<ScaleMode>()
2097 {
2098  return 3;
2099 }
2100 
2123 class IScaleLayer : public ILayer
2124 {
2125 public:
2131  virtual void setMode(ScaleMode mode) TRTNOEXCEPT = 0;
2132 
2138  virtual ScaleMode getMode() const TRTNOEXCEPT = 0;
2139 
2145  virtual void setShift(Weights shift) TRTNOEXCEPT = 0;
2146 
2152  virtual Weights getShift() const TRTNOEXCEPT = 0;
2153 
2159  virtual void setScale(Weights scale) TRTNOEXCEPT = 0;
2160 
2166  virtual Weights getScale() const TRTNOEXCEPT = 0;
2167 
2173  virtual void setPower(Weights power) TRTNOEXCEPT = 0;
2174 
2180  virtual Weights getPower() const TRTNOEXCEPT = 0;
2181 
2182 protected:
2183  virtual ~IScaleLayer() {}
2184 
2185 public:
2198  virtual int32_t getChannelAxis() const TRTNOEXCEPT = 0;
2199 };
2200 
2212 class ISoftMaxLayer : public ILayer
2213 {
2214 protected:
2215  virtual ~ISoftMaxLayer() {}
2216 public:
2246  virtual void setAxes(uint32_t axes) TRTNOEXCEPT = 0;
2247 
2253  virtual uint32_t getAxes() const TRTNOEXCEPT = 0;
2254 };
2255 
2268 {
2269 protected:
2270  virtual ~IConcatenationLayer() {}
2271 
2272 public:
2283  virtual void setAxis(int32_t axis) TRTNOEXCEPT = 0;
2284 
2290  virtual int32_t getAxis() const TRTNOEXCEPT = 0;
2291 };
2292 
2303 {
2304 public:
2316  TRT_DEPRECATED virtual void setKernelSize(DimsHW kernelSize) TRTNOEXCEPT = 0;
2317 
2325  TRT_DEPRECATED virtual DimsHW getKernelSize() const TRTNOEXCEPT = 0;
2326 
2334  virtual void setNbOutputMaps(int32_t nbOutputMaps) TRTNOEXCEPT = 0;
2335 
2341  virtual int32_t getNbOutputMaps() const TRTNOEXCEPT = 0;
2342 
2354  TRT_DEPRECATED virtual void setStride(DimsHW stride) TRTNOEXCEPT = 0;
2355 
2363  TRT_DEPRECATED virtual DimsHW getStride() const TRTNOEXCEPT = 0;
2364 
2380  TRT_DEPRECATED virtual void setPadding(DimsHW padding) TRTNOEXCEPT = 0;
2381 
2391  TRT_DEPRECATED virtual DimsHW getPadding() const TRTNOEXCEPT = 0;
2392 
2408  virtual void setNbGroups(int32_t nbGroups) TRTNOEXCEPT = 0;
2409 
2415  virtual int32_t getNbGroups() const TRTNOEXCEPT = 0;
2416 
2426  virtual void setKernelWeights(Weights weights) TRTNOEXCEPT = 0;
2427 
2433  virtual Weights getKernelWeights() const TRTNOEXCEPT = 0;
2434 
2445  virtual void setBiasWeights(Weights weights) TRTNOEXCEPT = 0;
2446 
2452  virtual Weights getBiasWeights() const TRTNOEXCEPT = 0;
2453 
2454 protected:
2455  virtual ~IDeconvolutionLayer() {}
2456 
2457 public:
2471  virtual void setPrePadding(Dims padding) TRTNOEXCEPT = 0;
2472 
2478  virtual Dims getPrePadding() const TRTNOEXCEPT = 0;
2479 
2493  virtual void setPostPadding(Dims padding) TRTNOEXCEPT = 0;
2494 
2500  virtual Dims getPostPadding() const TRTNOEXCEPT = 0;
2501 
2511  virtual void setPaddingMode(PaddingMode paddingMode) TRTNOEXCEPT = 0;
2512 
2520  virtual PaddingMode getPaddingMode() const TRTNOEXCEPT = 0;
2521 
2530  virtual void setKernelSizeNd(Dims kernelSize) TRTNOEXCEPT = 0;
2531 
2537  virtual Dims getKernelSizeNd() const TRTNOEXCEPT = 0;
2538 
2549  virtual void setStrideNd(Dims stride) TRTNOEXCEPT = 0;
2550 
2556  virtual Dims getStrideNd() const TRTNOEXCEPT = 0;
2557 
2571  virtual void setPaddingNd(Dims padding) TRTNOEXCEPT = 0;
2572 
2580  virtual Dims getPaddingNd() const TRTNOEXCEPT = 0;
2581 
2599  void setInput(int32_t index, ITensor& tensor) _TENSORRT_OVERRIDE TRTNOEXCEPT = 0;
2600 
2607  virtual void setDilationNd(Dims dilation) TRTNOEXCEPT = 0;
2608 
2614  virtual Dims getDilationNd() const TRTNOEXCEPT = 0;
2615 };
2616 
2624 enum class ElementWiseOperation : int32_t
2625 {
2626  kSUM = 0,
2627  kPROD = 1,
2628  kMAX = 2,
2629  kMIN = 3,
2630  kSUB = 4,
2631  kDIV = 5,
2632  kPOW = 6,
2633  kFLOOR_DIV = 7,
2634  kAND = 8,
2635  kOR = 9,
2636  kXOR = 10,
2637  kEQUAL = 11,
2638  kGREATER = 12,
2639  kLESS = 13
2640 };
2641 
2643 template <>
2644 constexpr inline int32_t EnumMax<ElementWiseOperation>()
2645 {
2646  return 14;
2647 }
2648 
2657 //!
2664 {
2665 public:
2675  virtual void setOperation(ElementWiseOperation op) TRTNOEXCEPT = 0;
2676 
2684  virtual ElementWiseOperation getOperation() const TRTNOEXCEPT = 0;
2685 
2686 protected:
2687  virtual ~IElementWiseLayer() {}
2688 };
2689 
2693 class IGatherLayer : public ILayer
2694 {
2695 public:
2702  virtual void setGatherAxis(int32_t axis) TRTNOEXCEPT = 0;
2703 
2709  virtual int32_t getGatherAxis() const TRTNOEXCEPT = 0;
2710 
2718  virtual void setNbElementWiseDims(int32_t k) TRTNOEXCEPT = 0;
2719 
2725  virtual int32_t getNbElementWiseDims() const TRTNOEXCEPT = 0;
2726 
2727 protected:
2728  virtual ~IGatherLayer() {}
2729 };
2730 
2810 enum class RNNOperation : int32_t
2811 {
2812  kRELU = 0,
2813  kTANH = 1,
2814  kLSTM = 2,
2815  kGRU = 3
2816 };
2817 
2819 template <>
2820 constexpr inline int32_t EnumMax<RNNOperation>()
2821 {
2822  return 4;
2823 }
2824 
2832 enum class RNNDirection : int32_t
2833 {
2834  kUNIDIRECTION = 0,
2835  kBIDIRECTION = 1
2836 };
2837 
2839 template <>
2840 constexpr inline int32_t EnumMax<RNNDirection>()
2841 {
2842  return 2;
2843 }
2844 
2860 enum class RNNInputMode : int32_t
2861 {
2862  kLINEAR = 0,
2863  kSKIP = 1
2864 };
2865 
2867 template <>
2868 constexpr inline int32_t EnumMax<RNNInputMode>()
2869 {
2870  return 2;
2871 }
2872 
2886 class TRT_DEPRECATED IRNNLayer : public ILayer
2887 {
2888 public:
2894  virtual uint32_t getLayerCount() const TRTNOEXCEPT = 0;
2895 
2904  virtual std::size_t getHiddenSize() const TRTNOEXCEPT = 0;
2905 
2914  virtual int32_t getSeqLength() const TRTNOEXCEPT = 0;
2915 
2921  virtual void setOperation(RNNOperation op) TRTNOEXCEPT = 0;
2922 
2928  virtual RNNOperation getOperation() const TRTNOEXCEPT = 0;
2929 
2935  virtual void setInputMode(RNNInputMode op) TRTNOEXCEPT = 0;
2936 
2942  virtual RNNInputMode getInputMode() const TRTNOEXCEPT = 0;
2943 
2955  virtual void setDirection(RNNDirection op) TRTNOEXCEPT = 0;
2956 
2962  virtual RNNDirection getDirection() const TRTNOEXCEPT = 0;
2963 
3078  virtual void setWeights(Weights weights) TRTNOEXCEPT = 0;
3079 
3085  virtual Weights getWeights() const TRTNOEXCEPT = 0;
3086 
3138  virtual void setBias(Weights bias) TRTNOEXCEPT = 0;
3139 
3145  virtual Weights getBias() const TRTNOEXCEPT = 0;
3146 
3153  virtual int32_t getDataLength() const TRTNOEXCEPT = 0;
3154 
3172  virtual void setHiddenState(ITensor& hidden) TRTNOEXCEPT = 0;
3173 
3179  virtual ITensor* getHiddenState() const TRTNOEXCEPT = 0;
3180 
3200  virtual void setCellState(ITensor& cell) TRTNOEXCEPT = 0;
3201 
3207  virtual ITensor* getCellState() const TRTNOEXCEPT = 0;
3208 
3209 protected:
3210  virtual ~IRNNLayer() {}
3211 };
3212 
3220 enum class RNNGateType : int32_t
3221 {
3222  kINPUT = 0,
3223  kOUTPUT = 1,
3224  kFORGET = 2,
3225  kUPDATE = 3,
3226  kRESET = 4,
3227  kCELL = 5,
3228  kHIDDEN = 6
3229 };
3230 
3232 template <>
3233 constexpr inline int32_t EnumMax<RNNGateType>()
3234 {
3235  return 7;
3236 }
3237 
3247 class IRNNv2Layer : public ILayer
3248 {
3249 public:
3250  virtual int32_t getLayerCount() const TRTNOEXCEPT = 0; //< Get the layer count of the RNN
3251  virtual int32_t getHiddenSize() const TRTNOEXCEPT = 0; //< Get the hidden size of the RNN
3252  virtual int32_t getMaxSeqLength() const TRTNOEXCEPT = 0; //< Get the maximum sequence length of the RNN
3253  virtual int32_t getDataLength() const TRTNOEXCEPT = 0; //< Get the maximum data length of the RNN
3254 
3269  virtual void setSequenceLengths(ITensor& seqLengths) TRTNOEXCEPT = 0;
3270 
3278  virtual ITensor* getSequenceLengths() const TRTNOEXCEPT = 0;
3279 
3284  virtual void setOperation(RNNOperation op) TRTNOEXCEPT = 0;
3285 
3290  virtual RNNOperation getOperation() const TRTNOEXCEPT = 0;
3291 
3296  virtual void setInputMode(RNNInputMode op) TRTNOEXCEPT = 0;
3297 
3302  virtual RNNInputMode getInputMode() const TRTNOEXCEPT = 0;
3303 
3308  virtual void setDirection(RNNDirection op) TRTNOEXCEPT = 0;
3309 
3314  virtual RNNDirection getDirection() const TRTNOEXCEPT = 0;
3315 
3333  virtual void setWeightsForGate(int32_t layerIndex, RNNGateType gate, bool isW, Weights weights) TRTNOEXCEPT = 0;
3334 
3339  virtual Weights getWeightsForGate(int32_t layerIndex, RNNGateType gate, bool isW) const TRTNOEXCEPT = 0;
3340 
3356  virtual void setBiasForGate(int32_t layerIndex, RNNGateType gate, bool isW, Weights bias) TRTNOEXCEPT = 0;
3357 
3362  virtual Weights getBiasForGate(int32_t layerIndex, RNNGateType gate, bool isW) const TRTNOEXCEPT = 0;
3363 
3376  virtual void setHiddenState(ITensor& hidden) TRTNOEXCEPT = 0;
3377 
3382  virtual ITensor* getHiddenState() const TRTNOEXCEPT = 0;
3383 
3398  virtual void setCellState(ITensor& cell) TRTNOEXCEPT = 0;
3399 
3404  virtual ITensor* getCellState() const TRTNOEXCEPT = 0;
3405 
3406 protected:
3407  virtual ~IRNNv2Layer() {}
3408 };
3409 
3417 class TRT_DEPRECATED IOutputDimensionsFormula
3418 {
3419 public:
3435  virtual DimsHW compute(DimsHW inputDims, DimsHW kernelSize, DimsHW stride, DimsHW padding, DimsHW dilation, const char* layerName) const TRTNOEXCEPT = 0;
3436 
3437  virtual ~IOutputDimensionsFormula() {}
3438 };
3439 
3451 class TRT_DEPRECATED IPluginLayer : public ILayer
3452 {
3453 public:
3459  virtual IPlugin& getPlugin() TRTNOEXCEPT = 0;
3460 
3461 protected:
3462  virtual ~IPluginLayer() {}
3463 };
3464 
3474 class IPluginV2Layer : public ILayer
3475 {
3476 public:
3482  virtual IPluginV2& getPlugin() TRTNOEXCEPT = 0;
3483 
3484 protected:
3485  virtual ~IPluginV2Layer() {}
3486 };
3487 
3495 enum class UnaryOperation : int32_t
3496 {
3497  kEXP = 0,
3498  kLOG = 1,
3499  kSQRT = 2,
3500  kRECIP = 3,
3501  kABS = 4,
3502  kNEG = 5,
3503  kSIN = 6,
3504  kCOS = 7,
3505  kTAN = 8,
3506  kSINH = 9,
3507  kCOSH = 10,
3508  kASIN = 11,
3509  kACOS = 12,
3510  kATAN = 13,
3511  kASINH = 14,
3512  kACOSH = 15,
3513  kATANH = 16,
3514  kCEIL = 17,
3515  kFLOOR = 18,
3516  kERF = 19,
3517  kNOT = 20
3518 };
3519 
3521 template <>
3522 constexpr inline int32_t EnumMax<UnaryOperation>()
3523 {
3524  return 21;
3525 }
3526 
3534 class IUnaryLayer : public ILayer
3535 {
3536 public:
3542  virtual void setOperation(UnaryOperation op) TRTNOEXCEPT = 0;
3543 
3549  virtual UnaryOperation getOperation() const TRTNOEXCEPT = 0;
3550 
3551 protected:
3552  virtual ~IUnaryLayer() {}
3553 };
3554 
3573 enum class ReduceOperation : int32_t
3574 {
3575  kSUM = 0,
3576  kPROD = 1,
3577  kMAX = 2,
3578  kMIN = 3,
3579  kAVG = 4
3580 };
3581 
3583 template <>
3584 constexpr inline int32_t EnumMax<ReduceOperation>()
3585 {
3586  return 5;
3587 }
3588 
3596 class IReduceLayer : public ILayer
3597 {
3598 public:
3604  virtual void setOperation(ReduceOperation op) TRTNOEXCEPT = 0;
3605 
3611  virtual ReduceOperation getOperation() const TRTNOEXCEPT = 0;
3612 
3618  virtual void setReduceAxes(uint32_t reduceAxes) TRTNOEXCEPT = 0;
3619 
3625  virtual uint32_t getReduceAxes() const TRTNOEXCEPT = 0;
3626 
3632  virtual void setKeepDimensions(bool keepDimensions) TRTNOEXCEPT = 0;
3633 
3639  virtual bool getKeepDimensions() const TRTNOEXCEPT = 0;
3640 
3641 protected:
3642  virtual ~IReduceLayer() {}
3643 };
3644 
3655 class IPaddingLayer : public ILayer
3656 {
3657 public:
3667  TRT_DEPRECATED virtual void setPrePadding(DimsHW padding) TRTNOEXCEPT = 0;
3668 
3676  TRT_DEPRECATED virtual DimsHW getPrePadding() const TRTNOEXCEPT = 0;
3677 
3687  TRT_DEPRECATED virtual void setPostPadding(DimsHW padding) TRTNOEXCEPT = 0;
3688 
3696  TRT_DEPRECATED virtual DimsHW getPostPadding() const TRTNOEXCEPT = 0;
3697 
3698 protected:
3699  virtual ~IPaddingLayer() {}
3700 
3701 public:
3711  virtual void setPrePaddingNd(Dims padding) TRTNOEXCEPT = 0;
3712 
3720  virtual Dims getPrePaddingNd() const TRTNOEXCEPT = 0;
3721 
3731  virtual void setPostPaddingNd(Dims padding) TRTNOEXCEPT = 0;
3732 
3740  virtual Dims getPostPaddingNd() const TRTNOEXCEPT = 0;
3741 };
3742 
3744 {
3752 };
3753 
3766 class IShuffleLayer : public ILayer
3767 {
3768 public:
3778  virtual void setFirstTranspose(Permutation permutation) TRTNOEXCEPT = 0;
3779 
3787  virtual Permutation getFirstTranspose() const TRTNOEXCEPT = 0;
3788 
3809  virtual void setReshapeDimensions(Dims dimensions) TRTNOEXCEPT = 0;
3810 
3819  virtual Dims getReshapeDimensions() const TRTNOEXCEPT = 0;
3820 
3826  //
3840  void setInput(int32_t index, ITensor& tensor) _TENSORRT_OVERRIDE TRTNOEXCEPT = 0;
3841 
3854  virtual void setSecondTranspose(Permutation permutation) TRTNOEXCEPT = 0;
3855 
3863  virtual Permutation getSecondTranspose() const TRTNOEXCEPT = 0;
3864 
3865 protected:
3866  virtual ~IShuffleLayer() {}
3867 
3868 public:
3880  virtual void setZeroIsPlaceholder(bool zeroIsPlaceholder) = 0;
3881 
3890  virtual bool getZeroIsPlaceholder() const = 0;
3891 };
3892 
3898 enum class SliceMode : int32_t
3899 {
3900  kDEFAULT = 0,
3901  kWRAP = 1,
3902 };
3903 
3905 template <>
3906 constexpr inline int32_t EnumMax<SliceMode>()
3907 {
3908  return 2;
3909 }
3910 
3939 class ISliceLayer : public ILayer
3940 {
3941 public:
3951  virtual void setStart(Dims start) TRTNOEXCEPT = 0;
3952 
3963  virtual Dims getStart() const TRTNOEXCEPT = 0;
3964 
3974  virtual void setSize(Dims size) TRTNOEXCEPT = 0;
3975 
3986  virtual Dims getSize() const TRTNOEXCEPT = 0;
3987 
3997  virtual void setStride(Dims stride) TRTNOEXCEPT = 0;
3998 
4009  virtual Dims getStride() const TRTNOEXCEPT = 0;
4010 
4016  virtual void setMode(SliceMode mode) TRTNOEXCEPT = 0;
4017 
4023  virtual SliceMode getMode() const TRTNOEXCEPT = 0;
4024 
4043  void setInput(int32_t index, ITensor& tensor) _TENSORRT_OVERRIDE TRTNOEXCEPT = 0;
4044 
4045 protected:
4046  virtual ~ISliceLayer() {}
4047 };
4048 
4061 class IShapeLayer : public ILayer
4062 {
4063 protected:
4064  virtual ~IShapeLayer() {}
4065 };
4066 
4072 enum class TopKOperation : int32_t
4073 {
4074  kMAX = 0,
4075  kMIN = 1,
4076 };
4077 
4079 template <>
4080 constexpr inline int32_t EnumMax<TopKOperation>()
4081 {
4082  return 2;
4083 }
4084 
4092 class ITopKLayer : public ILayer
4093 {
4094 public:
4100  virtual void setOperation(TopKOperation op) TRTNOEXCEPT = 0;
4101 
4107  virtual TopKOperation getOperation() const TRTNOEXCEPT = 0;
4108 
4116  virtual void setK(int32_t k) TRTNOEXCEPT = 0;
4117 
4123  virtual int32_t getK() const TRTNOEXCEPT = 0;
4124 
4130  virtual void setReduceAxes(uint32_t reduceAxes) TRTNOEXCEPT = 0;
4131 
4137  virtual uint32_t getReduceAxes() const TRTNOEXCEPT = 0;
4138 
4139 protected:
4140  virtual ~ITopKLayer() {}
4141 };
4142 
4149 enum class MatrixOperation : int32_t
4150 {
4154  kNONE,
4155 
4157  kTRANSPOSE,
4158 
4168  kVECTOR
4169 };
4170 
4172 template <>
4173 constexpr inline int32_t EnumMax<MatrixOperation>()
4174 {
4175  return 3;
4176 }
4177 
4204 {
4205 public:
4212  virtual void setOperation(int32_t index, MatrixOperation op) TRTNOEXCEPT = 0;
4213 
4219  virtual MatrixOperation getOperation(int32_t index) const TRTNOEXCEPT = 0;
4220 
4229  TRT_DEPRECATED virtual void setTranspose(int32_t index, bool val) TRTNOEXCEPT = 0;
4230 
4238  TRT_DEPRECATED virtual bool getTranspose(int32_t index) const TRTNOEXCEPT = 0;
4239 
4240 protected:
4241  virtual ~IMatrixMultiplyLayer() {}
4242 };
4243 
4259 {
4260 protected:
4261  virtual ~IRaggedSoftMaxLayer() {}
4262 };
4263 
4274 class IIdentityLayer : public ILayer
4275 {
4276 protected:
4277  virtual ~IIdentityLayer() {}
4278 };
4279 
4287 class IConstantLayer : public ILayer
4288 {
4289 public:
4299  virtual void setWeights(Weights weights) TRTNOEXCEPT = 0;
4300 
4306  virtual Weights getWeights() const TRTNOEXCEPT = 0;
4307 
4315  virtual void setDimensions(Dims dimensions) TRTNOEXCEPT = 0;
4316 
4324  virtual Dims getDimensions() const TRTNOEXCEPT = 0;
4325 
4326 protected:
4327  virtual ~IConstantLayer() {}
4328 };
4329 
4338 {
4339 protected:
4340  virtual ~IParametricReLULayer() noexcept {}
4341 };
4342 
4348 enum class ResizeMode : int32_t
4349 {
4350  kNEAREST = 0, // ND (0 < N <= 8) nearest neighbor resizing.
4351  kLINEAR = 1 // Can handle linear (1D), bilinear (2D), and trilinear (3D) resizing.
4352 };
4353 
4355 template <>
4356 constexpr inline int32_t EnumMax<ResizeMode>()
4357 {
4358  return 2;
4359 }
4360 
4381 class IResizeLayer : public ILayer
4382 {
4383 public:
4399  virtual void setOutputDimensions(Dims dimensions) TRTNOEXCEPT = 0;
4400 
4406  virtual Dims getOutputDimensions() const TRTNOEXCEPT = 0;
4407 
4426  virtual void setScales(const float* scales, int32_t nbScales) TRTNOEXCEPT = 0;
4427 
4442  virtual int32_t getScales(int32_t size, float* scales) const TRTNOEXCEPT = 0;
4443 
4451  virtual void setResizeMode(ResizeMode resizeMode) TRTNOEXCEPT = 0;
4452 
4458  virtual ResizeMode getResizeMode() const TRTNOEXCEPT = 0;
4459 
4469  virtual void setAlignCorners(bool alignCorners) TRTNOEXCEPT = 0;
4470 
4476  virtual bool getAlignCorners() const TRTNOEXCEPT = 0;
4477 
4497  void setInput(int32_t index, ITensor& tensor) _TENSORRT_OVERRIDE TRTNOEXCEPT = 0;
4498 
4499 protected:
4500  virtual ~IResizeLayer() {}
4501 };
4502 
4504 enum class LoopOutput : int32_t
4505 {
4507  kLAST_VALUE = 0,
4508 
4510  kCONCATENATE = 1,
4511 
4513  kREVERSE = 2
4514 };
4515 
4517 template <>
4518 constexpr inline int32_t EnumMax<LoopOutput>()
4519 {
4520  return 3;
4521 }
4522 
4524 enum class TripLimit : int32_t
4525 {
4526  // Tensor is scalar of type kINT32 that contains the trip count.
4527  kCOUNT = 0,
4528 
4529  // Tensor is a scalar of type kBOOL. Loop terminates when value is false.
4530  kWHILE = 1
4531 };
4532 
4534 template <>
4535 constexpr inline int32_t EnumMax<TripLimit>()
4536 {
4537  return 2;
4538 }
4539 
4540 class ILoop;
4541 
4543 {
4544 public:
4546  virtual ILoop* getLoop() const noexcept = 0;
4547 };
4548 
4550 {
4551 public:
4557  //
4570  void setInput(int32_t index, ITensor& tensor) _TENSORRT_OVERRIDE TRTNOEXCEPT = 0;
4571 };
4572 
4591 {
4592 public:
4593  virtual LoopOutput getLoopOutput() const noexcept = 0;
4594 
4607  virtual void setAxis(int32_t axis) noexcept = 0;
4608 
4610  virtual int32_t getAxis() const noexcept = 0;
4611 
4617  //
4632  void setInput(int32_t index, ITensor& tensor) _TENSORRT_OVERRIDE TRTNOEXCEPT = 0;
4633 };
4634 
4636 {
4637 public:
4638  virtual TripLimit getTripLimit() const noexcept = 0;
4639 };
4640 
4642 {
4643 public:
4645  virtual void setAxis(int32_t axis) noexcept = 0;
4646 
4648  virtual int32_t getAxis() const noexcept = 0;
4649 
4655  virtual void setReverse(bool reverse) noexcept = 0;
4656 
4658  virtual bool getReverse() const noexcept = 0;
4659 };
4660 
4664 class ILoop
4665 {
4666 public:
4672  //
4674  virtual IRecurrenceLayer* addRecurrence(ITensor& initialValue) noexcept = 0;
4675 
4692  virtual ITripLimitLayer* addTripLimit(ITensor& tensor, TripLimit limit) noexcept = 0;
4693 
4702  virtual IIteratorLayer* addIterator(ITensor& tensor, int32_t axis = 0, bool reverse = false) noexcept = 0;
4703 
4711  virtual ILoopOutputLayer* addLoopOutput(ITensor& tensor, LoopOutput outputKind, int32_t axis = 0) noexcept = 0;
4712 
4721  virtual void setName(const char* name) noexcept = 0;
4722 
4728  virtual const char* getName() const noexcept = 0;
4729 
4730 protected:
4731  virtual ~ILoop() {}
4732 };
4733 
4737 class ISelectLayer : public ILayer
4738 {
4739 protected:
4740  virtual ~ISelectLayer() {}
4741 };
4742 
4750 enum class FillOperation : int32_t
4751 {
4752  kLINSPACE = 0,
4753  kRANDOM_UNIFORM = 1
4754 };
4755 
4757 template <>
4758 constexpr inline int32_t EnumMax<FillOperation>()
4759 {
4760  return 2;
4761 }
4762 
4781 class IFillLayer : public ILayer
4782 {
4783 public:
4792  //
4793  virtual void setDimensions(Dims dimensions) noexcept = 0;
4794 
4805  virtual Dims getDimensions() const noexcept = 0;
4806 
4812  virtual void setOperation(FillOperation op) noexcept = 0;
4813 
4819  virtual FillOperation getOperation() const noexcept = 0;
4820 
4833  //
4834  virtual void setAlpha(double alpha) noexcept = 0;
4835 
4846  virtual double getAlpha() const noexcept = 0;
4847 
4861  virtual void setBeta(double beta) noexcept = 0;
4862 
4873  virtual double getBeta() const noexcept = 0;
4874 
4901  void setInput(int32_t index, ITensor& tensor) _TENSORRT_OVERRIDE TRTNOEXCEPT = 0;
4902 
4903 protected:
4904  virtual ~IFillLayer() {}
4905 };
4906 
4927 {
4928 public:
4934 
4964  virtual ITensor* addInput(const char* name, DataType type, Dims dimensions) TRTNOEXCEPT = 0;
4965 
4973  virtual void markOutput(ITensor& tensor) TRTNOEXCEPT = 0;
4974 
4993  TRT_DEPRECATED virtual IConvolutionLayer* addConvolution(ITensor& input, int32_t nbOutputMaps, DimsHW kernelSize,
4994  Weights kernelWeights, Weights biasWeights) TRTNOEXCEPT = 0;
4995 
5012  ITensor& input, int32_t nbOutputs, Weights kernelWeights, Weights biasWeights) TRTNOEXCEPT = 0;
5013 
5029 
5044  TRT_DEPRECATED virtual IPoolingLayer* addPooling(
5045  ITensor& input, PoolingType type, DimsHW windowSize) TRTNOEXCEPT = 0;
5046 
5061  virtual ILRNLayer* addLRN(ITensor& input, int32_t window, float alpha, float beta, float k) TRTNOEXCEPT = 0;
5062 
5083  virtual IScaleLayer* addScale(ITensor& input, ScaleMode mode, Weights shift, Weights scale, Weights power) TRTNOEXCEPT = 0;
5084 
5093  virtual ISoftMaxLayer* addSoftMax(ITensor& input) TRTNOEXCEPT = 0;
5094 
5107  virtual IConcatenationLayer* addConcatenation(ITensor* const* inputs, int32_t nbInputs) TRTNOEXCEPT = 0;
5108 
5127  TRT_DEPRECATED virtual IDeconvolutionLayer* addDeconvolution(ITensor& input, int32_t nbOutputMaps,
5128  DimsHW kernelSize, Weights kernelWeights, Weights biasWeights) TRTNOEXCEPT = 0;
5129 
5151 
5211  TRT_DEPRECATED virtual IRNNLayer* addRNN(ITensor& inputs, int32_t layerCount, std::size_t hiddenSize,
5212  int32_t maxSeqLen, RNNOperation op, RNNInputMode mode, RNNDirection dir, Weights weights,
5213  Weights bias) TRTNOEXCEPT = 0;
5214 
5231  TRT_DEPRECATED virtual IPluginLayer* addPlugin(
5232  ITensor* const* inputs, int32_t nbInputs, IPlugin& plugin) TRTNOEXCEPT = 0;
5233 
5248  virtual IUnaryLayer* addUnary(ITensor& input, UnaryOperation operation) TRTNOEXCEPT = 0;
5249 
5262  TRT_DEPRECATED virtual IPaddingLayer* addPadding(
5263  ITensor& input, DimsHW prePadding, DimsHW postPadding) TRTNOEXCEPT = 0;
5264 
5274  virtual IShuffleLayer* addShuffle(ITensor& input) TRTNOEXCEPT = 0;
5275 
5288  TRT_DEPRECATED virtual void setPoolingOutputDimensionsFormula(IOutputDimensionsFormula* formula) TRTNOEXCEPT = 0;
5289 
5299  TRT_DEPRECATED virtual IOutputDimensionsFormula& getPoolingOutputDimensionsFormula() const TRTNOEXCEPT = 0;
5300 
5315  TRT_DEPRECATED virtual void setConvolutionOutputDimensionsFormula(
5316  IOutputDimensionsFormula* formula) TRTNOEXCEPT = 0;
5317 
5330 
5345  TRT_DEPRECATED virtual void setDeconvolutionOutputDimensionsFormula(
5346  IOutputDimensionsFormula* formula) TRTNOEXCEPT = 0;
5347 
5360 
5368  virtual int32_t getNbLayers() const TRTNOEXCEPT = 0;
5369 
5379  virtual ILayer* getLayer(int32_t index) const TRTNOEXCEPT = 0;
5380 
5388  virtual int32_t getNbInputs() const TRTNOEXCEPT = 0;
5389 
5399  virtual ITensor* getInput(int32_t index) const TRTNOEXCEPT = 0; // adding inputs invalidates indexing here
5400 
5410  virtual int32_t getNbOutputs() const TRTNOEXCEPT = 0;
5411 
5421  virtual ITensor* getOutput(int32_t index) const TRTNOEXCEPT = 0; // adding outputs invalidates indexing here
5422 
5426  virtual void destroy() TRTNOEXCEPT = 0;
5427 
5428 protected:
5429  virtual ~INetworkDefinition() {}
5430 
5431 public:
5455  virtual IReduceLayer* addReduce(ITensor& input, ReduceOperation operation, uint32_t reduceAxes, bool keepDimensions) TRTNOEXCEPT = 0;
5456 
5485  virtual ITopKLayer* addTopK(ITensor& input, TopKOperation op, int32_t k, uint32_t reduceAxes) TRTNOEXCEPT = 0;
5486 
5498  virtual IGatherLayer* addGather(ITensor& data, ITensor& indices, int32_t axis) TRTNOEXCEPT = 0;
5499 
5513  virtual IRaggedSoftMaxLayer* addRaggedSoftMax(ITensor& input, ITensor& bounds) TRTNOEXCEPT = 0;
5514 
5530  ITensor& input0, MatrixOperation op0, ITensor& input1, MatrixOperation op1) TRTNOEXCEPT = 0;
5531 
5548  TRT_DEPRECATED virtual IMatrixMultiplyLayer* addMatrixMultiply(
5549  ITensor& input0, bool transpose0, ITensor& input1, bool transpose1) TRTNOEXCEPT = 0;
5550 
5571  virtual IConstantLayer* addConstant(Dims dimensions, Weights weights) TRTNOEXCEPT = 0;
5572 
5634  virtual IRNNv2Layer* addRNNv2(
5635  ITensor& input, int32_t layerCount, int32_t hiddenSize, int32_t maxSeqLen, RNNOperation op) TRTNOEXCEPT = 0;
5636 
5653  TRT_DEPRECATED virtual IPluginLayer* addPluginExt(
5654  ITensor* const* inputs, int32_t nbInputs, IPluginExt& plugin) TRTNOEXCEPT = 0;
5655 
5667  virtual IIdentityLayer* addIdentity(ITensor& input) TRTNOEXCEPT = 0;
5668 
5679  virtual void removeTensor(ITensor& tensor) TRTNOEXCEPT = 0;
5680 
5688  virtual void unmarkOutput(ITensor& tensor) TRTNOEXCEPT = 0;
5689 
5704  virtual IPluginV2Layer* addPluginV2(ITensor* const* inputs, int32_t nbInputs, IPluginV2& plugin) TRTNOEXCEPT = 0;
5705 
5720  virtual ISliceLayer* addSlice(ITensor& input, Dims start, Dims size, Dims stride) TRTNOEXCEPT = 0;
5721 
5739  virtual void setName(const char* name) TRTNOEXCEPT = 0;
5740 
5750  virtual const char* getName() const TRTNOEXCEPT = 0;
5751 
5765  virtual IShapeLayer* addShape(ITensor& input) TRTNOEXCEPT = 0;
5766 
5781  virtual bool hasImplicitBatchDimension() const TRTNOEXCEPT = 0;
5782 
5796  virtual bool markOutputForShapes(ITensor& tensor) TRTNOEXCEPT = 0;
5797 
5805  virtual bool unmarkOutputForShapes(ITensor& tensor) TRTNOEXCEPT = 0;
5806 
5820  virtual IParametricReLULayer* addParametricReLU(ITensor& input, ITensor& slope) noexcept = 0;
5821 
5839  virtual IConvolutionLayer* addConvolutionNd(ITensor& input, int32_t nbOutputMaps, Dims kernelSize,
5840  Weights kernelWeights, Weights biasWeights) TRTNOEXCEPT = 0;
5841 
5856  virtual IPoolingLayer* addPoolingNd(ITensor& input, PoolingType type, Dims windowSize) TRTNOEXCEPT = 0;
5857 
5872  //
5875  virtual IDeconvolutionLayer* addDeconvolutionNd(ITensor& input, int32_t nbOutputMaps, Dims kernelSize,
5876  Weights kernelWeights, Weights biasWeights) TRTNOEXCEPT = 0;
5877 
5904  virtual IScaleLayer* addScaleNd(ITensor& input, ScaleMode mode, Weights shift, Weights scale, Weights power,
5905  int32_t channelAxis) TRTNOEXCEPT = 0;
5906 
5917  virtual IResizeLayer* addResize(ITensor& input) TRTNOEXCEPT = 0;
5918 
5929  virtual bool hasExplicitPrecision() const TRTNOEXCEPT = 0;
5930 
5940  virtual ILoop* addLoop() noexcept = 0;
5941 
5951  virtual ISelectLayer* addSelect(ITensor& condition, ITensor& thenInput, ITensor& elseInput) TRTNOEXCEPT = 0;
5952 
5963  virtual IFillLayer* addFill(Dims dimensions, FillOperation op) noexcept = 0;
5964 
5975  virtual IPaddingLayer* addPaddingNd(
5976  ITensor& input, Dims prePadding, Dims postPadding) TRTNOEXCEPT = 0;
5977 };
5978 
5984 enum class CalibrationAlgoType : int32_t
5985 {
5986  kLEGACY_CALIBRATION = 0,
5987  kENTROPY_CALIBRATION = 1,
5988  kENTROPY_CALIBRATION_2 = 2,
5989  kMINMAX_CALIBRATION = 3,
5990 };
5991 
5993 template <>
5994 constexpr inline int32_t EnumMax<CalibrationAlgoType>()
5995 {
5996  return 4;
5997 }
5998 
6011 {
6012 public:
6018  virtual int32_t getBatchSize() const TRTNOEXCEPT = 0;
6019 
6033  virtual bool getBatch(void* bindings[], const char* names[], int32_t nbBindings) TRTNOEXCEPT = 0;
6034 
6049  virtual const void* readCalibrationCache(std::size_t& length) TRTNOEXCEPT = 0;
6050 
6059  virtual void writeCalibrationCache(const void* ptr, std::size_t length) TRTNOEXCEPT = 0;
6060 
6067 
6068  virtual ~IInt8Calibrator() {}
6069 };
6070 
6076 {
6077 public:
6081  CalibrationAlgoType getAlgorithm() TRTNOEXCEPT override { return CalibrationAlgoType::kENTROPY_CALIBRATION; }
6082 
6083  virtual ~IInt8EntropyCalibrator() {}
6084 };
6085 
6091 {
6092 public:
6096  CalibrationAlgoType getAlgorithm() TRTNOEXCEPT override { return CalibrationAlgoType::kENTROPY_CALIBRATION_2; }
6097 
6098  virtual ~IInt8EntropyCalibrator2() {}
6099 };
6100 
6106 {
6107 public:
6111  CalibrationAlgoType getAlgorithm() TRTNOEXCEPT override { return CalibrationAlgoType::kMINMAX_CALIBRATION; }
6112 
6113  virtual ~IInt8MinMaxCalibrator() {}
6114 };
6115 
6121 {
6122 public:
6126  CalibrationAlgoType getAlgorithm() TRTNOEXCEPT override { return CalibrationAlgoType::kLEGACY_CALIBRATION; }
6127 
6134  virtual double getQuantile() const TRTNOEXCEPT = 0;
6135 
6142  virtual double getRegressionCutoff() const TRTNOEXCEPT = 0;
6143 
6156  virtual const void* readHistogramCache(std::size_t& length) TRTNOEXCEPT = 0;
6157 
6166  virtual void writeHistogramCache(const void* ptr, std::size_t length) TRTNOEXCEPT = 0;
6167 
6168  virtual ~IInt8LegacyCalibrator() {}
6169 };
6170 
6182 {
6183 public:
6187  virtual TensorFormat getTensorFormat() const TRTNOEXCEPT = 0;
6188 
6192  virtual DataType getDataType() const TRTNOEXCEPT = 0;
6193 
6197  virtual Dims getStrides() const TRTNOEXCEPT = 0;
6198 
6199 protected:
6200  virtual ~IAlgorithmIOInfo() {}
6201 };
6202 
6215 {
6216 public:
6220  virtual int64_t getImplementation() const TRTNOEXCEPT = 0;
6221 
6225  virtual int64_t getTactic() const TRTNOEXCEPT = 0;
6226 
6227 protected:
6228  virtual ~IAlgorithmVariant() {}
6229 };
6230 
6240 {
6241 public:
6246  virtual const char* getName() const TRTNOEXCEPT = 0;
6247 
6254  virtual Dims getDimensions(int32_t index, OptProfileSelector select) const TRTNOEXCEPT = 0;
6255 
6259  virtual int32_t getNbInputs() const TRTNOEXCEPT = 0;
6260 
6264  virtual int32_t getNbOutputs() const TRTNOEXCEPT = 0;
6265 
6266 protected:
6267  virtual ~IAlgorithmContext() {}
6268 };
6269 
6280 {
6281 public:
6288  virtual const IAlgorithmIOInfo& getAlgorithmIOInfo(int32_t index) const TRTNOEXCEPT = 0;
6289 
6293  virtual const IAlgorithmVariant& getAlgorithmVariant() const TRTNOEXCEPT = 0;
6294 
6298  virtual float getTimingMSec() const TRTNOEXCEPT = 0;
6299 
6303  virtual std::size_t getWorkspaceSize() const TRTNOEXCEPT = 0;
6304 
6305 protected:
6306  virtual ~IAlgorithm() {}
6307 };
6308 
6318 {
6319 public:
6333  virtual int32_t selectAlgorithms(const IAlgorithmContext& context, const IAlgorithm* const* choices,
6334  int32_t nbChoices, int32_t* selection) TRTNOEXCEPT = 0;
6345  virtual void reportAlgorithms(const IAlgorithmContext* const* algoContexts, const IAlgorithm* const* algoChoices,
6346  int32_t nbAlgorithms) TRTNOEXCEPT = 0;
6347 
6348  virtual ~IAlgorithmSelector() {}
6349 };
6350 
6357 typedef uint32_t QuantizationFlags;
6358 
6366 enum class QuantizationFlag : int32_t
6367 {
6372 };
6373 
6375 template <>
6376 constexpr inline int32_t EnumMax<QuantizationFlag>()
6377 {
6378  return 1;
6379 }
6380 
6387 typedef uint32_t BuilderFlags;
6388 
6396 enum class BuilderFlag : int32_t
6397 {
6398  kFP16 = 0,
6399  kINT8 = 1,
6400  kDEBUG = 2,
6401  kGPU_FALLBACK = 3,
6402  kSTRICT_TYPES = 4,
6403  kREFIT = 5,
6404  kDISABLE_TIMING_CACHE = 6,
6405 
6409  kTF32 = 7
6410 };
6411 
6413 template <>
6414 constexpr inline int32_t EnumMax<BuilderFlag>()
6415 {
6416  return 8;
6417 }
6418 
6427 enum class ProfilingVerbosity : int32_t
6428 {
6429  kDEFAULT = 0,
6430  kNONE = 1,
6431  kVERBOSE = 2,
6432 };
6433 
6435 template <>
6436 constexpr inline int32_t EnumMax<ProfilingVerbosity>()
6437 {
6438  return 3;
6439 }
6440 
6441 
6449 enum class TacticSource : int32_t
6450 {
6452  kCUBLAS = 0,
6453  kCUBLAS_LT = 1
6454 };
6455 
6457 template <>
6458 constexpr inline int32_t EnumMax<TacticSource>()
6459 {
6460  return 2;
6461 }
6462 
6469 using TacticSources = uint32_t;
6470 
6477 {
6478 public:
6489  virtual void setMinTimingIterations(int32_t minTiming) TRTNOEXCEPT = 0;
6490 
6498  virtual int32_t getMinTimingIterations() const TRTNOEXCEPT = 0;
6499 
6508  virtual void setAvgTimingIterations(int32_t avgTiming) TRTNOEXCEPT = 0;
6509 
6517  virtual int32_t getAvgTimingIterations() const TRTNOEXCEPT = 0;
6518 
6527  virtual void setEngineCapability(EngineCapability capability) TRTNOEXCEPT = 0;
6528 
6536  virtual EngineCapability getEngineCapability() const TRTNOEXCEPT = 0;
6537 
6543  virtual void setInt8Calibrator(IInt8Calibrator* calibrator) TRTNOEXCEPT = 0;
6544 
6548  virtual IInt8Calibrator* getInt8Calibrator() const TRTNOEXCEPT = 0;
6549 
6557  virtual void setMaxWorkspaceSize(std::size_t workspaceSize) TRTNOEXCEPT = 0;
6558 
6568  virtual std::size_t getMaxWorkspaceSize() const TRTNOEXCEPT = 0;
6569 
6582  virtual void setFlags(BuilderFlags builderFlags) TRTNOEXCEPT = 0;
6583 
6591  virtual BuilderFlags getFlags() const TRTNOEXCEPT = 0;
6592 
6600  virtual void clearFlag(BuilderFlag builderFlag) TRTNOEXCEPT = 0;
6601 
6609  virtual void setFlag(BuilderFlag builderFlag) TRTNOEXCEPT = 0;
6610 
6618  virtual bool getFlag(BuilderFlag builderFlag) const TRTNOEXCEPT = 0;
6619 
6630  virtual void setDeviceType(const ILayer* layer, DeviceType deviceType) TRTNOEXCEPT = 0;
6631 
6636  virtual DeviceType getDeviceType(const ILayer* layer) const TRTNOEXCEPT = 0;
6637 
6643  virtual bool isDeviceTypeSet(const ILayer* layer) const TRTNOEXCEPT = 0;
6644 
6650  virtual void resetDeviceType(const ILayer* layer) TRTNOEXCEPT = 0;
6651 
6656  virtual bool canRunOnDLA(const ILayer* layer) const TRTNOEXCEPT = 0;
6657 
6668  virtual void setDLACore(int32_t dlaCore) TRTNOEXCEPT = 0;
6669 
6676  virtual int32_t getDLACore() const TRTNOEXCEPT = 0;
6677 
6683  virtual void setDefaultDeviceType(DeviceType deviceType) TRTNOEXCEPT = 0;
6684 
6690  virtual DeviceType getDefaultDeviceType() const TRTNOEXCEPT = 0;
6691 
6697  virtual void reset() TRTNOEXCEPT = 0;
6698 
6704  virtual void destroy() TRTNOEXCEPT = 0;
6705 
6713  virtual void setProfileStream(const cudaStream_t stream) TRTNOEXCEPT = 0;
6714 
6722  virtual cudaStream_t getProfileStream() const TRTNOEXCEPT = 0;
6723 
6735  virtual int32_t addOptimizationProfile(const IOptimizationProfile* profile) noexcept = 0;
6736 
6745  virtual int32_t getNbOptimizationProfiles() const noexcept = 0;
6746 
6747 protected:
6748  virtual ~IBuilderConfig() {}
6749 
6750 public:
6758  virtual void setProfilingVerbosity(ProfilingVerbosity verbosity) TRTNOEXCEPT = 0;
6759 
6769 
6774  virtual void setAlgorithmSelector(IAlgorithmSelector* selector) TRTNOEXCEPT = 0;
6775 
6780 
6790  virtual bool setCalibrationProfile(const IOptimizationProfile* profile) noexcept = 0;
6791 
6797  virtual const IOptimizationProfile* getCalibrationProfile() noexcept = 0;
6798 
6811  virtual void setQuantizationFlags(QuantizationFlags flags) TRTNOEXCEPT = 0;
6812 
6821 
6829  virtual void clearQuantizationFlag(QuantizationFlag flag) TRTNOEXCEPT = 0;
6830 
6838  virtual void setQuantizationFlag(QuantizationFlag flag) TRTNOEXCEPT = 0;
6839 
6847  virtual bool getQuantizationFlag(QuantizationFlag flag) const TRTNOEXCEPT = 0;
6848 
6869  virtual bool setTacticSources(TacticSources tacticSources) TRTNOEXCEPT = 0;
6870 
6881  virtual TacticSources getTacticSources() const TRTNOEXCEPT = 0;
6882 };
6883 
6893 
6903 enum class NetworkDefinitionCreationFlag : int32_t
6904 {
6909  kEXPLICIT_BATCH = 0,
6910 
6923  kEXPLICIT_PRECISION = 1,
6924 };
6925 
6927 template <>
6928 constexpr inline int32_t EnumMax<NetworkDefinitionCreationFlag>()
6929 {
6930  return 2;
6931 }
6932 
6941 {
6942 public:
6954  TRT_DEPRECATED virtual nvinfer1::INetworkDefinition* createNetwork() TRTNOEXCEPT = 0;
6955 
6964  virtual void setMaxBatchSize(int32_t batchSize) TRTNOEXCEPT = 0;
6965 
6974  virtual int32_t getMaxBatchSize() const TRTNOEXCEPT = 0;
6975 
6985  TRT_DEPRECATED virtual void setMaxWorkspaceSize(std::size_t workspaceSize) TRTNOEXCEPT = 0;
6986 
6996  TRT_DEPRECATED virtual std::size_t getMaxWorkspaceSize() const TRTNOEXCEPT = 0;
6997 
7010  TRT_DEPRECATED virtual void setHalf2Mode(bool mode) TRTNOEXCEPT = 0;
7011 
7019  TRT_DEPRECATED virtual bool getHalf2Mode() const TRTNOEXCEPT = 0;
7020 
7029  TRT_DEPRECATED virtual void setDebugSync(bool sync) TRTNOEXCEPT = 0;
7030 
7038  TRT_DEPRECATED virtual bool getDebugSync() const TRTNOEXCEPT = 0;
7039 
7050  TRT_DEPRECATED virtual void setMinFindIterations(int32_t minFind) TRTNOEXCEPT = 0;
7051 
7059  TRT_DEPRECATED virtual int32_t getMinFindIterations() const TRTNOEXCEPT = 0;
7060 
7071  TRT_DEPRECATED virtual void setAverageFindIterations(int32_t avgFind) TRTNOEXCEPT = 0;
7072 
7080  TRT_DEPRECATED virtual int32_t getAverageFindIterations() const TRTNOEXCEPT = 0;
7081 
7089  TRT_DEPRECATED virtual nvinfer1::ICudaEngine* buildCudaEngine(
7091 
7095  virtual bool platformHasFastFp16() const TRTNOEXCEPT = 0;
7096 
7100  virtual bool platformHasFastInt8() const TRTNOEXCEPT = 0;
7101 
7105  virtual void destroy() TRTNOEXCEPT = 0;
7106 
7118  TRT_DEPRECATED virtual void setInt8Mode(bool mode) TRTNOEXCEPT = 0;
7119 
7127  TRT_DEPRECATED virtual bool getInt8Mode() const TRTNOEXCEPT = 0;
7128 
7134  TRT_DEPRECATED virtual void setInt8Calibrator(IInt8Calibrator* calibrator) TRTNOEXCEPT = 0;
7135 
7148  TRT_DEPRECATED virtual void setDeviceType(ILayer* layer, DeviceType deviceType) TRTNOEXCEPT = 0;
7149 
7156  TRT_DEPRECATED virtual DeviceType getDeviceType(const ILayer* layer) const TRTNOEXCEPT = 0;
7157 
7165  TRT_DEPRECATED virtual bool isDeviceTypeSet(const ILayer* layer) const TRTNOEXCEPT = 0;
7166 
7174  TRT_DEPRECATED virtual void resetDeviceType(ILayer* layer) TRTNOEXCEPT = 0;
7175 
7182  TRT_DEPRECATED virtual bool canRunOnDLA(const ILayer* layer) const TRTNOEXCEPT = 0;
7183 
7191  TRT_DEPRECATED virtual void setDefaultDeviceType(DeviceType deviceType) TRTNOEXCEPT = 0;
7192 
7198  TRT_DEPRECATED virtual DeviceType getDefaultDeviceType() const TRTNOEXCEPT = 0;
7199 
7207  virtual int32_t getMaxDLABatchSize() const TRTNOEXCEPT = 0;
7208 
7218  TRT_DEPRECATED virtual void allowGPUFallback(bool setFallBackMode) TRTNOEXCEPT = 0;
7219 
7223  virtual int32_t getNbDLACores() const TRTNOEXCEPT = 0;
7224 
7235  TRT_DEPRECATED virtual void setDLACore(int32_t dlaCore) TRTNOEXCEPT = 0;
7236 
7243  TRT_DEPRECATED virtual int32_t getDLACore() const TRTNOEXCEPT = 0;
7244 
7250  TRT_DEPRECATED virtual void reset(nvinfer1::INetworkDefinition& network) TRTNOEXCEPT = 0;
7251 
7252 protected:
7253  virtual ~IBuilder()
7254  {
7255  }
7256 
7257 public:
7269  virtual void setGpuAllocator(IGpuAllocator* allocator) TRTNOEXCEPT = 0;
7270 
7282  TRT_DEPRECATED virtual void setFp16Mode(bool mode) TRTNOEXCEPT = 0;
7283 
7291  TRT_DEPRECATED virtual bool getFp16Mode() const TRTNOEXCEPT = 0;
7292 
7311  TRT_DEPRECATED virtual void setStrictTypeConstraints(bool mode) TRTNOEXCEPT = 0;
7312 
7320  TRT_DEPRECATED virtual bool getStrictTypeConstraints() const TRTNOEXCEPT = 0;
7321 
7327  TRT_DEPRECATED virtual void setRefittable(bool canRefit) TRTNOEXCEPT = 0;
7328 
7336  TRT_DEPRECATED virtual bool getRefittable() const TRTNOEXCEPT = 0;
7337 
7343  TRT_DEPRECATED virtual void setEngineCapability(EngineCapability capability) TRTNOEXCEPT = 0;
7344 
7352  TRT_DEPRECATED virtual EngineCapability getEngineCapability() const TRTNOEXCEPT = 0;
7353 
7360 
7368  INetworkDefinition& network, IBuilderConfig& config) TRTNOEXCEPT = 0;
7369 
7370 
7383 
7384 
7395 
7405  //
7408  virtual void setErrorRecorder(IErrorRecorder* recorder) TRTNOEXCEPT = 0;
7409 
7420  virtual IErrorRecorder* getErrorRecorder() const TRTNOEXCEPT = 0;
7421 
7425  virtual void reset() TRTNOEXCEPT = 0;
7426 
7430  virtual bool platformHasTf32() const TRTNOEXCEPT = 0;
7431 };
7432 
7433 } // namespace nvinfer1
7434 
7439 extern "C" TENSORRTAPI void* createInferBuilder_INTERNAL(void* logger, int32_t version);
7440 
7441 namespace nvinfer1
7442 {
7443 namespace
7444 {
7453 {
7454  return static_cast<IBuilder*>(createInferBuilder_INTERNAL(&logger, NV_TENSORRT_VERSION));
7455 }
7456 }
7457 }
7458 
7459 #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::IFullyConnectedLayer::setInput
void setInput(int32_t index, ITensor &tensor) _TENSORRT_OVERRIDE=0
Append or replace an input of this layer with a specific tensor.
nvinfer1::LoopOutput
LoopOutput
Enum that describes kinds of loop outputs.
Definition: NvInfer.h:4504
nvinfer1::IActivationLayer::getBeta
virtual float getBeta() const =0
Get the beta parameter.
nvinfer1::LayerType::kTOPK
TopK layer.
nvinfer1::IDeconvolutionLayer::setInput
void setInput(int32_t index, ITensor &tensor) _TENSORRT_OVERRIDE=0
Append or replace an input of this layer with a specific tensor.
nvinfer1::IBuilder::setHalf2Mode
virtual TRT_DEPRECATED void setHalf2Mode(bool mode)=0
Set whether half2 mode is used.
nvinfer1::LayerType::kPLUGIN
Plugin layer.
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:190
nvinfer1::ITensor::getLocation
virtual TensorLocation getLocation() const =0
Get the storage location of a tensor.
nvinfer1::EnumMax< ElementWiseOperation >
constexpr int32_t EnumMax< ElementWiseOperation >()
Maximum number of elements in ElementWiseOperation enum.
Definition: NvInfer.h:2644
nvinfer1::ITensor::getDynamicRangeMax
virtual float getDynamicRangeMax() const =0
Get maximum of dynamic range.
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::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::PaddingMode::kEXPLICIT_ROUND_UP
Use explicit padding, rounding output size up.
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::setDeviceType
virtual TRT_DEPRECATED void setDeviceType(ILayer *layer, DeviceType deviceType)=0
Set the device that this layer must execute on.
nvinfer1::SliceMode
SliceMode
Controls how ISliceLayer handles out of bounds coordinates.
Definition: NvInfer.h:3898
nvinfer1::PaddingMode::kSAME_LOWER
Use SAME padding, with prePadding >= postPadding.
nvinfer1::RNNGateType::kUPDATE
Update gate (z).
nvinfer1::IBuilder::setErrorRecorder
virtual void setErrorRecorder(IErrorRecorder *recorder)=0
Set the ErrorRecorder for this interface.
NvInferRuntime.h
nvinfer1::IConcatenationLayer::getAxis
virtual int32_t getAxis() const =0
Get the axis along which concatenation occurs.
nvinfer1::IRNNv2Layer::setInputMode
virtual void setInputMode(RNNInputMode op)=0
Set the input mode of the RNN layer.
nvinfer1::IMatrixMultiplyLayer::getTranspose
virtual TRT_DEPRECATED bool getTranspose(int32_t index) const =0
Get the transpose flag for an input tensor.
nvinfer1::DimsNCHW::n
int32_t n() const
Get the index count.
Definition: NvInfer.h:391
nvinfer1::IRNNv2Layer::getDirection
virtual RNNDirection getDirection() const =0
Get the direction of the RNN layer.
nvinfer1::INetworkDefinition::setName
virtual void setName(const char *name)=0
Sets the name of the network.
nvinfer1::IFullyConnectedLayer
A fully connected layer in a network definition. This layer expects an input tensor of three or more ...
Definition: NvInfer.h:1579
nvinfer1::Permutation
Definition: NvInfer.h:3743
nvinfer1::LayerType::kRNN
RNN layer.
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::RNNInputMode::kSKIP
No operation is performed on the first recurrent layer.
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::Dims::nbDims
int32_t nbDims
The number of dimensions.
Definition: NvInferRuntimeCommon.h:231
nvinfer1::IConstantLayer
Layer that represents a constant value.
Definition: NvInfer.h:4287
nvinfer1::PaddingMode::kCAFFE_ROUND_DOWN
Use CAFFE padding, rounding output size down, uses prePadding value.
nvinfer1::LayerType::kGATHER
Gather layer.
nvinfer1::Dims4::Dims4
Dims4()
Construct an empty Dims2 object.
Definition: NvInfer.h:316
nvinfer1::IActivationLayer::getAlpha
virtual float getAlpha() const =0
Get the alpha parameter.
nvinfer1::IParametricReLULayer
Layer that represents a parametric ReLU operation.
Definition: NvInfer.h:4337
nvinfer1::IBuilderConfig::clearQuantizationFlag
virtual void clearQuantizationFlag(QuantizationFlag flag)=0
clear a quantization flag.
nvinfer1::ILoop::addIterator
virtual IIteratorLayer * addIterator(ITensor &tensor, int32_t axis=0, bool reverse=false) noexcept=0
Return layer that subscripts tensor by loop iteration.
nvinfer1::IDeconvolutionLayer::getKernelWeights
virtual Weights getKernelWeights() const =0
Get the kernel weights for the deconvolution.
nvinfer1::IIteratorLayer::getAxis
virtual int32_t getAxis() const noexcept=0
Get axis being iterated over.
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::ElementWiseOperation::kMIN
Minimum of the two elements.
nvinfer1::IBuilder::resetDeviceType
virtual TRT_DEPRECATED void resetDeviceType(ILayer *layer)=0
reset the DeviceType for this layer
nvinfer1::UnaryOperation::kFLOOR
Floor.
nvinfer1::INetworkDefinition
A network definition for input to the builder.
Definition: NvInfer.h:4926
nvinfer1::IPluginLayer
Layer type for plugins.
Definition: NvInfer.h:3451
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::UnaryOperation::kABS
Absolute value.
nvinfer1::ScaleMode::kCHANNEL
Per-channel coefficients.
nvinfer1::Weights
An array of weights used as a layer parameter.
Definition: NvInferRuntime.h:110
nvinfer1::IAlgorithmVariant
provides a unique 128-bit identifier, which along with the input and output information denotes the v...
Definition: NvInfer.h:6214
nvinfer1::UnaryOperation::kASINH
Inverse hyperbolic sine.
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::IBuilder::getMinFindIterations
virtual TRT_DEPRECATED int32_t getMinFindIterations() const =0
Query the number of minimization iterations.
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:3655
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::DimsCHW
Descriptor for data with one channel dimension and two spatial dimensions.
Definition: NvInfer.h:218
nvinfer1::IConvolutionLayer
A convolution layer in a network definition.
Definition: NvInfer.h:1218
nvinfer1::IUnaryLayer::setOperation
virtual void setOperation(UnaryOperation op)=0
Set the unary operation for the layer.
nvinfer1::LayerType::kRNN_V2
RNNv2 layer.
nvinfer1::IBuilder::platformHasFastFp16
virtual bool platformHasFastFp16() const =0
Determine whether the platform has fast native fp16.
nvinfer1::INetworkDefinition::addDeconvolutionNd
virtual IDeconvolutionLayer * addDeconvolutionNd(ITensor &input, int32_t nbOutputMaps, Dims kernelSize, Weights kernelWeights, Weights biasWeights)=0
Add a multi-dimension deconvolution layer to the network.
nvinfer1::IIdentityLayer
A layer that represents the identity function.
Definition: NvInfer.h:4274
nvinfer1::ILayer::getOutput
virtual ITensor * getOutput(int32_t index) const =0
Get the layer output corresponding to the given index.
nvinfer1::DeviceType
DeviceType
The device that this layer/network will execute on.
Definition: NvInferRuntime.h:722
nvinfer1::IAlgorithm::getAlgorithmVariant
virtual const IAlgorithmVariant & getAlgorithmVariant() const =0
Returns the algorithm variant.
nvinfer1::RNNDirection::kBIDIRECTION
Network iterates from first to last and vice versa and outputs concatenated.
nvinfer1::IIteratorLayer::getReverse
virtual bool getReverse() const noexcept=0
True if and only if reversing input.
nvinfer1::IBuilderConfig::getMinTimingIterations
virtual int32_t getMinTimingIterations() const =0
Query the number of minimization iterations.
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:6427
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::IAlgorithmSelector
Interface implemented by application for selecting and reporting algorithms of a layer provided by th...
Definition: NvInfer.h:6317
nvinfer1::IFullyConnectedLayer::setNbOutputChannels
virtual void setNbOutputChannels(int32_t nbOutputs)=0
Set the number of output channels K from the fully connected layer.
nvinfer1::IConvolutionLayer::setKernelSizeNd
virtual void setKernelSizeNd(Dims kernelSize)=0
Set the multi-dimension kernel size of the convolution.
nvinfer1::RNNInputMode
RNNInputMode
Enumerates the RNN input modes that may occur with an RNN layer.
Definition: NvInfer.h:2860
nvinfer1::IDeconvolutionLayer::getPaddingNd
virtual Dims getPaddingNd() const =0
Get the multi-dimension padding of the deconvolution.
nvinfer1::UnaryOperation::kSQRT
Square root.
nvinfer1::EnumMax< PaddingMode >
constexpr int32_t EnumMax< PaddingMode >()
Maximum number of elements in PaddingMode enum.
Definition: NvInfer.h:1201
nvinfer1::NetworkDefinitionCreationFlags
uint32_t NetworkDefinitionCreationFlags
This bitset is capable of representing one or more NetworkDefinitionCreationFlag flags constructed wi...
Definition: NvInfer.h:6892
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::UnaryOperation::kRECIP
Reciprocal.
nvinfer1::IConvolutionLayer::getDilationNd
virtual Dims getDilationNd() const =0
Get the multi-dimension dilation of the convolution.
nvinfer1::IBuilder::setInt8Mode
virtual TRT_DEPRECATED void setInt8Mode(bool mode)=0
Set whether or not quantized 8-bit kernels are permitted.
nvinfer1::ITripLimitLayer
Definition: NvInfer.h:4635
nvinfer1::LayerType::kRAGGED_SOFTMAX
Ragged softmax layer.
nvinfer1::LayerType::kSCALE
Scale layer.
nvinfer1::IRNNv2Layer::getBiasForGate
virtual Weights getBiasForGate(int32_t layerIndex, RNNGateType gate, bool isW) const =0
Get the bias parameters for an individual gate in the RNN.
nvinfer1::IPluginV2
Plugin class for user-implemented layers.
Definition: NvInferRuntimeCommon.h:398
nvinfer1::IBuilder::platformHasFastInt8
virtual bool platformHasFastInt8() const =0
Determine whether the platform has fast native int8.
nvinfer1::IDeconvolutionLayer::setNbGroups
virtual void setNbGroups(int32_t nbGroups)=0
Set the number of groups for a deconvolution.
nvinfer1::IAlgorithmIOInfo
Carries information about input or output of the algorithm. IAlgorithmIOInfo for all the input and ou...
Definition: NvInfer.h:6181
nvinfer1::ITensor::setType
virtual void setType(DataType type)=0
Set the data type of a tensor.
nvinfer1::IBuilder::reset
virtual void reset()=0
Resets the builder state to default values.
nvinfer1::TacticSource
TacticSource
List of tactic sources for TensorRT.
Definition: NvInfer.h:6449
nvinfer1::ITopKLayer::getReduceAxes
virtual uint32_t getReduceAxes() const =0
Get the axes to reduce for the layer.
nvinfer1::IInt8MinMaxCalibrator
Definition: NvInfer.h:6105
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::IPoolingLayer::getPostPadding
virtual Dims getPostPadding() const =0
Get the padding.
nvinfer1::IShuffleLayer::setInput
void setInput(int32_t index, ITensor &tensor) _TENSORRT_OVERRIDE=0
Append or replace an input of this layer with a specific tensor.
nvinfer1::ITensor::setBroadcastAcrossBatch
virtual void setBroadcastAcrossBatch(bool broadcastAcrossBatch)=0
Set whether to enable broadcast of tensor across the batch.
nvinfer1::ILoop::addLoopOutput
virtual ILoopOutputLayer * addLoopOutput(ITensor &tensor, LoopOutput outputKind, int32_t axis=0) noexcept=0
Make an output for this loop, based on the given tensor.
nvinfer1::TensorFormats
uint32_t TensorFormats
It is capable of representing one or more TensorFormat by binary OR operations, e....
Definition: NvInferRuntimeCommon.h:242
nvinfer1::INetworkDefinition::addUnary
virtual IUnaryLayer * addUnary(ITensor &input, UnaryOperation operation)=0
Add a unary layer to the network.
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::IInt8Calibrator::getBatchSize
virtual int32_t getBatchSize() const =0
Get the batch size used for calibration batches.
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::ITensor::getDynamicRange
virtual TRT_DEPRECATED float getDynamicRange() const =0
Get dynamic range for the tensor.
nvinfer1::INetworkDefinition::addDeconvolution
virtual TRT_DEPRECATED IDeconvolutionLayer * addDeconvolution(ITensor &input, int32_t nbOutputMaps, DimsHW kernelSize, Weights kernelWeights, Weights biasWeights)=0
Add a deconvolution layer to the network.
nvinfer1::DimsCHW::h
int32_t h() const
Get the height.
Definition: NvInfer.h:280
nvinfer1::IConcatenationLayer::setAxis
virtual void setAxis(int32_t axis)=0
Set the axis along which concatenation occurs.
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::SliceMode::kDEFAULT
Fail with error when the coordinates are out of bounds. This is the default.
nvinfer1::DimsNCHW::DimsNCHW
DimsNCHW()
Construct an empty DimsNCHW object.
Definition: NvInfer.h:352
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::LayerType::kPADDING
Padding layer.
nvinfer1::MatrixOperation::kTRANSPOSE
Like kNONE, but transpose the matrix dimensions.
nvinfer1::EnumMax< ProfilingVerbosity >
constexpr int32_t EnumMax< ProfilingVerbosity >()
Maximum number of profile verbosity levels in ProfilingVerbosity enum.
Definition: NvInfer.h:6436
nvinfer1::IMatrixMultiplyLayer::setOperation
virtual void setOperation(int32_t index, MatrixOperation op)=0
Set the operation for an input tensor.
nvinfer1::BuilderFlag::kREFIT
Enable building a refittable engine.
nvinfer1::ISliceLayer::setStride
virtual void setStride(Dims stride)=0
Set the stride for computing the output slice data.
nvinfer1::DimsNCHW::n
int32_t & n()
Get the index count.
Definition: NvInfer.h:381
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::IConvolutionLayer::getPaddingNd
virtual Dims getPaddingNd() const =0
Get the multi-dimension padding of the convolution.
nvinfer1::IRNNv2Layer
An RNN layer in a network definition, version 2.
Definition: NvInfer.h:3247
nvinfer1::IBuilderConfig::getTacticSources
virtual TacticSources getTacticSources() const =0
Get tactic sources.
nvinfer1::IBuilder::setMinFindIterations
virtual TRT_DEPRECATED void setMinFindIterations(int32_t minFind)=0
Set the number of minimization iterations used when timing layers.
nvinfer1::IBuilderConfig::setAvgTimingIterations
virtual void setAvgTimingIterations(int32_t avgTiming)=0
Set the number of averaging iterations used when timing layers.
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::UnaryOperation::kCEIL
Ceiling.
nvinfer1::ElementWiseOperation::kAND
Logical AND of two elements.
nvinfer1::IBuilder::getDeviceType
virtual TRT_DEPRECATED DeviceType getDeviceType(const ILayer *layer) const =0
Get the device that this layer executes on.
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::IConvolutionLayer::setDilationNd
virtual void setDilationNd(Dims dilation)=0
Set the multi-dimension dilation of the convolution.
nvinfer1::ILoopOutputLayer::getAxis
virtual int32_t getAxis() const noexcept=0
Get axis being concatenated over.
nvinfer1::IRNNLayer
A RNN layer in a network definition.
Definition: NvInfer.h:2886
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::ILoop::addRecurrence
virtual IRecurrenceLayer * addRecurrence(ITensor &initialValue) noexcept=0
Create a recurrence layer for this loop with initialValue as its first input.
nvinfer1::INetworkDefinition::getNbInputs
virtual int32_t getNbInputs() const =0
Get the number of inputs in the network.
nvinfer1::IPoolingLayer::getStride
virtual TRT_DEPRECATED DimsHW getStride() const =0
Get the stride for pooling.
nvinfer1::EnumMax< QuantizationFlag >
constexpr int32_t EnumMax< QuantizationFlag >()
Maximum number of quantization flags in QuantizationFlag enum.
Definition: NvInfer.h:6376
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::EnumMax< CalibrationAlgoType >
constexpr int32_t EnumMax< CalibrationAlgoType >()
Maximum number of elements in CalibrationAlgoType enum.
Definition: NvInfer.h:5994
nvinfer1::INetworkDefinition::addScaleNd
virtual IScaleLayer * addScaleNd(ITensor &input, ScaleMode mode, Weights shift, Weights scale, Weights power, int32_t channelAxis)=0
Add a multi-dimension scale layer to the network.
nvinfer1::UnaryOperation::kASIN
Inverse sine.
nvinfer1::LayerType::kFILL
Fill layer.
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::ResizeMode
ResizeMode
Enumerates various modes of resize in the resize layer. Resize mode set using setResizeMode().
Definition: NvInfer.h:4348
nvinfer1::ITensor::resetDynamicRange
virtual void resetDynamicRange()=0
Undo effect of setDynamicRange.
nvinfer1::TensorFormat
TensorFormat
Format of the input/output tensors.
Definition: NvInferRuntimeCommon.h:257
nvinfer1::ILoopOutputLayer
Definition: NvInfer.h:4590
nvinfer1::ISliceLayer::getStride
virtual Dims getStride() const =0
Get the stride for the output slice.
nvinfer1::IReduceLayer::getReduceAxes
virtual uint32_t getReduceAxes() const =0
Get the axes over which to reduce for the layer.
nvinfer1::ITopKLayer::getOperation
virtual TopKOperation getOperation() const =0
Get the operation for the layer.
nvinfer1::IFillLayer::setOperation
virtual void setOperation(FillOperation op) noexcept=0
Set the fill operation for the layer.
nvinfer1::UnaryOperation::kSINH
Hyperbolic sine.
nvinfer1::IResizeLayer::getScales
virtual int32_t getScales(int32_t size, float *scales) const =0
Copies resize scales to scales[0, ..., nbScales-1], where nbScales is the number of scales that were ...
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::RNNGateType::kCELL
Cell gate (c).
nvinfer1::IBuilderConfig::clearFlag
virtual void clearFlag(BuilderFlag builderFlag)=0
clear a single build mode flag.
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:227
nvinfer1::INetworkDefinition::addPoolingNd
virtual IPoolingLayer * addPoolingNd(ITensor &input, PoolingType type, Dims windowSize)=0
Add a multi-dimension pooling layer to the network.
nvinfer1::IBuilderConfig::getQuantizationFlag
virtual bool getQuantizationFlag(QuantizationFlag flag) const =0
Returns true if the quantization flag is set.
nvinfer1::IDeconvolutionLayer::getNbOutputMaps
virtual int32_t getNbOutputMaps() const =0
Get the number of output feature maps for the deconvolution.
nvinfer1::RNNGateType::kRESET
Reset gate (r).
nvinfer1::IDeconvolutionLayer::getStride
virtual TRT_DEPRECATED DimsHW getStride() const =0
Get the stride of the deconvolution.
nvinfer1::IResizeLayer::setScales
virtual void setScales(const float *scales, int32_t nbScales)=0
Set the resize scales.
nvinfer1::DimsCHW::h
int32_t & h()
Get the height.
Definition: NvInfer.h:270
nvinfer1::Permutation::order
int32_t order[Dims::MAX_DIMS]
Definition: NvInfer.h:3751
nvinfer1::LoopOutput::kREVERSE
Output value is concatenation of values of tensor for each iteration, in reverse order.
nvinfer1::IConvolutionLayer::getPrePadding
virtual Dims getPrePadding() const =0
Get the pre-padding.
nvinfer1::ILogger
Application-implemented logging interface for the builder, engine and runtime.
Definition: NvInferRuntimeCommon.h:1066
nvinfer1::IBuilder::getFp16Mode
virtual TRT_DEPRECATED bool getFp16Mode() const =0
Query whether 16-bit kernels are permitted.
nvinfer1::IGatherLayer::setGatherAxis
virtual void setGatherAxis(int32_t axis)=0
Set the axis to gather on. The axis must be less than the number of dimensions in the data input.
nvinfer1::EnumMax< ScaleMode >
constexpr int32_t EnumMax< ScaleMode >()
Maximum number of elements in ScaleMode enum.
Definition: NvInfer.h:2096
nvinfer1::DimsCHW::c
int32_t & c()
Get the channel count.
Definition: NvInfer.h:250
nvinfer1::IAlgorithmContext
Describes the context and requirements, that could be fulfilled by one or more instances of IAlgorith...
Definition: NvInfer.h:6239
nvinfer1::IConvolutionLayer::setPaddingMode
virtual void setPaddingMode(PaddingMode paddingMode)=0
Set the padding mode.
nvinfer1::IScaleLayer::getScale
virtual Weights getScale() const =0
Get the scale value.
nvinfer1::IActivationLayer::setActivationType
virtual void setActivationType(ActivationType type)=0
Set the type of activation to be performed.
nvinfer1::DimsNCHW::c
int32_t & c()
Get the channel count.
Definition: NvInfer.h:401
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::IBuilderConfig::getDeviceType
virtual DeviceType getDeviceType(const ILayer *layer) const =0
Get the device that this layer executes on.
nvinfer1::QuantizationFlag::kCALIBRATE_BEFORE_FUSION
nvinfer1::ITensor::isShapeTensor
virtual bool isShapeTensor() const =0
Whether the tensor is a shape tensor.
nvinfer1::INetworkDefinition::getOutput
virtual ITensor * getOutput(int32_t index) const =0
Get the output tensor specified by the given index.
nvinfer1::IBuilder::getInt8Mode
virtual TRT_DEPRECATED bool getInt8Mode() const =0
Query whether Int8 mode is used.
nvinfer1::EnumMax< FillOperation >
constexpr int32_t EnumMax< FillOperation >()
Maximum number of elements in FillOperation enum.
Definition: NvInfer.h:4758
nvinfer1::IConvolutionLayer::setInput
void setInput(int32_t index, ITensor &tensor) _TENSORRT_OVERRIDE=0
Append or replace an input of this layer with a specific tensor.
nvinfer1::ICudaEngine
An engine for executing inference on a built network, with functionally unsafe features.
Definition: NvInferRuntime.h:1173
nvinfer1::QuantizationFlags
uint32_t QuantizationFlags
Represents a collection of one or more QuantizationFlag values using binary OR operations.
Definition: NvInfer.h:6357
nvinfer1::BuilderFlag::kFP16
Enable FP16 layer selection, with FP32 fallback.
nvinfer1::ActivationType
ActivationType
Enumerates the types of activation to perform in an activation layer.
Definition: NvInferRuntimeCommon.h:141
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::LayerType::kLOOP_OUTPUT
Loop output layer.
nvinfer1::IRaggedSoftMaxLayer
A RaggedSoftmax layer in a network definition.
Definition: NvInfer.h:4258
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::IInt8LegacyCalibrator::writeHistogramCache
virtual void writeHistogramCache(const void *ptr, std::size_t length)=0
Save a histogram cache.
nvinfer1::PaddingMode::kSAME_UPPER
Use SAME padding, with prePadding <= postPadding.
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 multi-dimension pre-padding of the deconvolution.
nvinfer1::ILRNLayer::setAlpha
virtual void setAlpha(float alpha)=0
Set the LRN alpha value.
TRTNOEXCEPT
#define TRTNOEXCEPT
Definition: NvInferRuntimeCommon.h:103
nvinfer1::DimsHW::DimsHW
DimsHW(int32_t height, int32_t width)
Construct a DimsHW given height and width.
Definition: NvInfer.h:133
nvinfer1::Dims::d
int32_t d[MAX_DIMS]
The extent of each dimension.
Definition: NvInferRuntimeCommon.h:232
nvinfer1::IScaleLayer::getChannelAxis
virtual int32_t getChannelAxis() const =0
Get the channel axis.
nvinfer1::IConvolutionLayer::setPrePadding
virtual void setPrePadding(Dims padding)=0
Set the multi-dimension pre-padding of the convolution.
nvinfer1::ILayer::getNbInputs
virtual int32_t getNbInputs() const =0
Get the number of inputs of a layer.
nvinfer1::ElementWiseOperation
ElementWiseOperation
Enumerates the binary operations that may be performed by an ElementWise layer.
Definition: NvInfer.h:2624
nvinfer1::IBuilderConfig::getNbOptimizationProfiles
virtual int32_t getNbOptimizationProfiles() const noexcept=0
Get number of optimization profiles.
nvinfer1::FillOperation::kRANDOM_UNIFORM
Generate a tensor with random values drawn from a uniform distribution.
nvinfer1::IBuilderConfig::setTacticSources
virtual bool setTacticSources(TacticSources tacticSources)=0
Set tactic sources.
nvinfer1::LayerType::kPLUGIN_V2
PluginV2 layer.
nvinfer1::ElementWiseOperation::kDIV
Divide the first element by the second.
nvinfer1::IInt8Calibrator::getBatch
virtual bool getBatch(void *bindings[], const char *names[], int32_t nbBindings)=0
Get a batch of input for calibration.
nvinfer1::RNNOperation::kRELU
Single gate RNN w/ ReLU activation function.
nvinfer1::ISliceLayer
Slices an input tensor into an output tensor based on the offset and strides.
Definition: NvInfer.h:3939
nvinfer1::INetworkDefinition::addPadding
virtual TRT_DEPRECATED IPaddingLayer * addPadding(ITensor &input, DimsHW prePadding, DimsHW postPadding)=0
Add a padding layer to the network.
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::EnumMax< RNNOperation >
constexpr int32_t EnumMax< RNNOperation >()
Maximum number of elements in RNNOperation enum.
Definition: NvInfer.h:2820
nvinfer1::LayerType::kSHAPE
Shape layer.
nvinfer1::ScaleMode
ScaleMode
Controls how shift, scale and power are applied in a Scale layer.
Definition: NvInfer.h:2087
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::PaddingMode::kEXPLICIT_ROUND_DOWN
Use explicit padding, rounding output size down.
nvinfer1::TacticSource::kCUBLAS
cuBLAS tactics.
nvinfer1::ITensor::dynamicRangeIsSet
virtual bool dynamicRangeIsSet() const =0
Query whether dynamic range is set.
nvinfer1::ElementWiseOperation::kOR
Logical OR of two elements.
nvinfer1::ILayer::setPrecision
virtual void setPrecision(DataType dataType)=0
Set the computational precision of this layer.
nvinfer1::LayerType::kRESIZE
Resize 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::IBuilderConfig::getAvgTimingIterations
virtual int32_t getAvgTimingIterations() const =0
Query the number of averaging iterations.
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:233
nvinfer1::ReduceOperation
ReduceOperation
Enumerates the reduce operations that may be performed by a Reduce layer.
Definition: NvInfer.h:3573
nvinfer1::IIteratorLayer
Definition: NvInfer.h:4641
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:7452
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:6396
nvinfer1::IGatherLayer::getNbElementWiseDims
virtual int32_t getNbElementWiseDims() const =0
Get the number of leading dimensions of indices tensor to be handled elementwise.
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::IIteratorLayer::setAxis
virtual void setAxis(int32_t axis) noexcept=0
Set axis to iterate over.
nvinfer1::ILRNLayer::setBeta
virtual void setBeta(float beta)=0
Set the LRN beta value.
nvinfer1::ElementWiseOperation::kPOW
The first element to the power of the second element.
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::IInt8MinMaxCalibrator::getAlgorithm
CalibrationAlgoType getAlgorithm() override
Definition: NvInfer.h:6111
nvinfer1::IConstantLayer::getWeights
virtual Weights getWeights() const =0
Get the weights for the layer.
nvinfer1::ITensor::setName
virtual void setName(const char *name)=0
Set the tensor name.
nvinfer1::IScaleLayer::getPower
virtual Weights getPower() const =0
Get the power value.
nvinfer1::IBuilder::getAverageFindIterations
virtual TRT_DEPRECATED int32_t getAverageFindIterations() const =0
Query the number of averaging iterations.
nvinfer1
The TensorRT API version 1 namespace.
nvinfer1::ILayer
Base class for all layer classes in a network definition.
Definition: NvInfer.h:792
nvinfer1::DimsNCHW::h
int32_t & h()
Get the height.
Definition: NvInfer.h:421
nvinfer1::INetworkDefinition::hasImplicitBatchDimension
virtual bool hasImplicitBatchDimension() const =0
Query whether the network was created with an implicit batch dimension.
nvinfer1::EnumMax< MatrixOperation >
constexpr int32_t EnumMax< MatrixOperation >()
Maximum number of elements in MatrixOperation enum.
Definition: NvInfer.h:4173
nvinfer1::IBuilderConfig::setFlag
virtual void setFlag(BuilderFlag builderFlag)=0
Set a single build mode flag.
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::INetworkDefinition::addTopK
virtual ITopKLayer * addTopK(ITensor &input, TopKOperation op, int32_t k, uint32_t reduceAxes)=0
Add a TopK layer to the network.
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::INetworkDefinition::addPlugin
virtual TRT_DEPRECATED IPluginLayer * addPlugin(ITensor *const *inputs, int32_t nbInputs, IPlugin &plugin)=0
Add a plugin layer to the network.
nvinfer1::IBuilderConfig::setMinTimingIterations
virtual void setMinTimingIterations(int32_t minTiming)=0
Set the number of minimization iterations used when timing layers.
nvinfer1::UnaryOperation::kATANH
Inverse hyperbolic tangent.
nvinfer1::ILayer::getPrecision
virtual DataType getPrecision() const =0
get the computational precision of this layer
nvinfer1::UnaryOperation::kEXP
Exponentiation.
nvinfer1::IShuffleLayer::setSecondTranspose
virtual void setSecondTranspose(Permutation permutation)=0
Set the permutation applied by the second transpose operation.
nvinfer1::INetworkDefinition::getLayer
virtual ILayer * getLayer(int32_t index) const =0
Get the layer 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::UnaryOperation::kATAN
Inverse tangent.
nvinfer1::ILoop
Definition: NvInfer.h:4664
nvinfer1::IPluginV2Layer
Layer type for pluginV2.
Definition: NvInfer.h:3474
nvinfer1::DimsHW::h
int32_t h() const
Get the height.
Definition: NvInfer.h:154
nvinfer1::INetworkDefinition::addActivation
virtual IActivationLayer * addActivation(ITensor &input, ActivationType type)=0
Add an activation layer to the network.
nvinfer1::LayerType::kIDENTITY
Identity layer.
nvinfer1::BuilderFlag::kSTRICT_TYPES
Enables strict type constraints.
nvinfer1::RNNGateType::kOUTPUT
Output gate (o).
nvinfer1::IBuilder::getErrorRecorder
virtual IErrorRecorder * getErrorRecorder() const =0
get the ErrorRecorder assigned to this interface.
nvinfer1::LayerType::kDECONVOLUTION
Deconvolution layer.
nvinfer1::Dims3::Dims3
Dims3(int32_t d0, int32_t d1, int32_t d2)
Construct a Dims3 from 3 elements.
Definition: NvInfer.h:203
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:2663
nvinfer1::RNNDirection::kUNIDIRECTION
Network iterations from first input to last input.
nvinfer1::IScaleLayer::getMode
virtual ScaleMode getMode() const =0
Get the scale mode.
nvinfer1::DimsNCHW::w
int32_t & w()
Get the width.
Definition: NvInfer.h:441
nvinfer1::ILRNLayer::getBeta
virtual float getBeta() const =0
Get the LRN beta value.
nvinfer1::INetworkDefinition::addRNN
virtual TRT_DEPRECATED IRNNLayer * addRNN(ITensor &inputs, int32_t layerCount, std::size_t hiddenSize, int32_t 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::UnaryOperation::kACOSH
Inverse hyperbolic cosine.
nvinfer1::ITopKLayer::setK
virtual void setK(int32_t k)=0
Set the k value for the layer.
nvinfer1::RNNGateType
RNNGateType
Identifies an individual gate within an RNN cell.
Definition: NvInfer.h:3220
nvinfer1::LayerType::kSELECT
Select layer.
nvinfer1::IRNNv2Layer::setWeightsForGate
virtual void setWeightsForGate(int32_t layerIndex, RNNGateType gate, bool isW, Weights weights)=0
Set the weight parameters for an individual gate in the RNN.
nvinfer1::IBuilder::setDLACore
virtual TRT_DEPRECATED void setDLACore(int32_t dlaCore)=0
Set the DLA core that the engine must execute on.
nvinfer1::ElementWiseOperation::kEQUAL
Check if two elements are equal.
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:115
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::IRecurrenceLayer::setInput
void setInput(int32_t index, ITensor &tensor) _TENSORRT_OVERRIDE=0
Append or replace an input of this layer with a specific tensor.
nvinfer1::IRNNv2Layer::setOperation
virtual void setOperation(RNNOperation op)=0
Set the operation of the RNN layer.
nvinfer1::NetworkDefinitionCreationFlag::kEXPLICIT_PRECISION
Mark the network to be an explicit precision network.
nvinfer1::ILayer::setName
virtual void setName(const char *name)=0
Set the name of a layer.
nvinfer1::IDeconvolutionLayer::getBiasWeights
virtual Weights getBiasWeights() const =0
Get the bias weights for the deconvolution.
nvinfer1::IBuilder::getNbDLACores
virtual int32_t getNbDLACores() const =0
Return the number of DLA engines available to this builder.
nvinfer1::ILayer::getType
virtual LayerType getType() const =0
Return the type of a layer.
nvinfer1::ILayer::getOutputType
virtual DataType getOutputType(int32_t index) const =0
get the output type of this layer
nvinfer1::UnaryOperation
UnaryOperation
Enumerates the unary operations that may be performed by a Unary layer.
Definition: NvInfer.h:3495
nvinfer1::IRNNv2Layer::getCellState
virtual ITensor * getCellState() const =0
Get the initial cell state of the RNN.
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::LoopOutput::kLAST_VALUE
Output value is value of tensor for last iteration.
nvinfer1::MatrixOperation::kNONE
nvinfer1::MatrixOperation::kVECTOR
nvinfer1::IDeconvolutionLayer::setDilationNd
virtual void setDilationNd(Dims dilation)=0
Set the multi-dimension dilation of the deconvolution.
nvinfer1::ILayer::setInput
virtual void setInput(int32_t index, ITensor &tensor)=0
Replace an input of this layer with a specific tensor.
nvinfer1::EnumMax< LayerType >
constexpr int32_t EnumMax< LayerType >()
Maximum number of elements in LayerType enum.
Definition: NvInfer.h:504
nvinfer1::IPoolingLayer::setPostPadding
virtual void setPostPadding(Dims padding)=0
Set the multi-dimension post-padding for pooling.
nvinfer1::IShapeLayer
Layer type for getting shape of a tensor.
Definition: NvInfer.h:4061
nvinfer1::IResizeLayer::setOutputDimensions
virtual void setOutputDimensions(Dims dimensions)=0
Set the output dimensions.
nvinfer1::SliceMode::kWRAP
Coordinates wrap around periodically.
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::ILayer::setOutputType
virtual void setOutputType(int32_t index, DataType dataType)=0
Set the output type of this layer.
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::NetworkDefinitionCreationFlag
NetworkDefinitionCreationFlag
List of immutable network properties expressed at network creation time. NetworkDefinitionCreationFla...
Definition: NvInfer.h:6903
nvinfer1::IDeconvolutionLayer::setKernelSize
virtual TRT_DEPRECATED void setKernelSize(DimsHW kernelSize)=0
Set the HW kernel size of the convolution.
nvinfer1::RNNGateType::kINPUT
Input gate (i).
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:6081
nvinfer1::IPaddingLayer::getPrePadding
virtual TRT_DEPRECATED DimsHW getPrePadding() const =0
Get the padding that is applied at the start of the tensor.
nvinfer1::ITensor::getName
virtual const char * getName() const =0
Get the tensor name.
nvinfer1::FillOperation::kLINSPACE
Generate evenly spaced numbers over a specified interval.
nvinfer1::UnaryOperation::kCOSH
Hyperbolic cosine.
nvinfer1::IInt8LegacyCalibrator::getAlgorithm
CalibrationAlgoType getAlgorithm() override
Definition: NvInfer.h:6126
nvinfer1::Dims4::Dims4
Dims4(int32_t d0, int32_t d1, int32_t d2, int32_t d3)
Construct a Dims4 from 4 elements.
Definition: NvInfer.h:330
nvinfer1::PaddingMode
PaddingMode
Enumerates the modes of padding to perform in convolution, deconvolution and pooling layer,...
Definition: NvInfer.h:1189
nvinfer1::IShuffleLayer::getFirstTranspose
virtual Permutation getFirstTranspose() const =0
Get the permutation applied by the first transpose operation.
nvinfer1::ILayer::outputTypeIsSet
virtual bool outputTypeIsSet(int32_t index) const =0
whether the output type has been set for this layer
nvinfer1::IBuilder::setRefittable
virtual TRT_DEPRECATED void setRefittable(bool canRefit)=0
nvinfer1::EnumMax< TopKOperation >
constexpr int32_t EnumMax< TopKOperation >()
Maximum number of elements in TopKOperation enum.
Definition: NvInfer.h:4080
nvinfer1::INetworkDefinition::addMatrixMultiply
virtual IMatrixMultiplyLayer * addMatrixMultiply(ITensor &input0, MatrixOperation op0, ITensor &input1, MatrixOperation op1)=0
Add a MatrixMultiply layer to the network.
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::IConvolutionLayer::setNbGroups
virtual void setNbGroups(int32_t nbGroups)=0
Set the number of groups for a convolution.
nvinfer1::IShuffleLayer::setReshapeDimensions
virtual void setReshapeDimensions(Dims dimensions)=0
Set the reshaped dimensions.
nvinfer1::RNNInputMode::kLINEAR
Perform the normal matrix multiplication in the first recurrent 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::DimsCHW::c
int32_t c() const
Get the channel count.
Definition: NvInfer.h:260
nvinfer1::IDeconvolutionLayer::getDilationNd
virtual Dims getDilationNd() const =0
Get the multi-dimension dilation of the deconvolution.
nvinfer1::INetworkDefinition::addPluginV2
virtual IPluginV2Layer * addPluginV2(ITensor *const *inputs, int32_t nbInputs, IPluginV2 &plugin)=0
Add a plugin layer to the network using the IPluginV2 interface.
nvinfer1::IPluginExt
Plugin class for user-implemented layers.
Definition: NvInferRuntime.h:256
nvinfer1::MatrixOperation
MatrixOperation
Enumerates the operations that may be performed on a tensor by IMatrixMultiplyLayer before multiplica...
Definition: NvInfer.h:4149
nvinfer1::IBuilder::getHalf2Mode
virtual TRT_DEPRECATED bool getHalf2Mode() const =0
Query whether half2 mode is used.
nvinfer1::EnumMax< NetworkDefinitionCreationFlag >
constexpr int32_t EnumMax< NetworkDefinitionCreationFlag >()
Maximum number of elements in NetworkDefinitionCreationFlag enum.
Definition: NvInfer.h:6928
nvinfer1::IRNNv2Layer::setBiasForGate
virtual void setBiasForGate(int32_t layerIndex, RNNGateType gate, bool isW, Weights bias)=0
Set the bias parameters for an individual gate in the RNN.
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:1050
nvinfer1::INetworkDefinition::getConvolutionOutputDimensionsFormula
virtual TRT_DEPRECATED IOutputDimensionsFormula & getConvolutionOutputDimensionsFormula() const =0
Get the convolution output dimensions formula.
nvinfer1::PoolingType
PoolingType
The type of pooling to perform in a pooling layer.
Definition: NvInfer.h:1725
nvinfer1::IPoolingLayer::setPaddingNd
virtual void setPaddingNd(Dims padding)=0
Set the multi-dimension padding for pooling.
nvinfer1::IFullyConnectedLayer::getNbOutputChannels
virtual int32_t getNbOutputChannels() const =0
Get the number of output channels K from the fully connected layer.
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::ILayer::getNbOutputs
virtual int32_t getNbOutputs() const =0
Get the number of outputs of a layer.
nvinfer1::LayerType::kSLICE
Slice layer.
nvinfer1::IBuilder::createOptimizationProfile
virtual nvinfer1::IOptimizationProfile * createOptimizationProfile() noexcept=0
Create a new optimization profile.
nvinfer1::ElementWiseOperation::kSUM
Sum of the two elements.
nvinfer1::LoopOutput::kCONCATENATE
Output value is concatenation of values of tensor for each iteration, in forward order.
nvinfer1::IBuilder::getDebugSync
virtual TRT_DEPRECATED bool getDebugSync() const =0
Query whether the builder will use debug synchronization.
nvinfer1::TacticSources
uint32_t TacticSources
Represents a collection of one or more TacticSource values combine using bitwise-OR operations.
Definition: NvInfer.h:6469
nvinfer1::DimsNCHW::w
int32_t w() const
Get the width.
Definition: NvInfer.h:451
nvinfer1::DataType
DataType
The type of weights and tensors.
Definition: NvInferRuntimeCommon.h:169
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:346
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:2267
nvinfer1::LayerType::kSOFTMAX
SoftMax layer.
nvinfer1::IShuffleLayer
Layer type for shuffling data.
Definition: NvInfer.h:3766
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::Dims2::Dims2
Dims2(int32_t d0, int32_t d1)
Construct a Dims2 from 2 elements.
Definition: NvInfer.h:103
nvinfer1::RNNOperation
RNNOperation
Enumerates the RNN operations that may be performed by an RNN layer.
Definition: NvInfer.h:2810
nvinfer1::ITensor
A tensor in a network definition.
Definition: NvInfer.h:522
nvinfer1::IBuilder::setAverageFindIterations
virtual TRT_DEPRECATED void setAverageFindIterations(int32_t avgFind)=0
Set the number of averaging iterations used when timing layers.
nvinfer1::IPoolingLayer::setPaddingMode
virtual void setPaddingMode(PaddingMode paddingMode)=0
Set the padding mode.
nvinfer1::IFillLayer::setInput
void setInput(int32_t index, ITensor &tensor) _TENSORRT_OVERRIDE=0
replace an input of this layer with a specific tensor.
nvinfer1::IBuilder::createNetworkV2
virtual nvinfer1::INetworkDefinition * createNetworkV2(NetworkDefinitionCreationFlags flags)=0
Create a network definition object.
nvinfer1::IRecurrenceLayer
Definition: NvInfer.h:4549
nvinfer1::IBuilder::isDeviceTypeSet
virtual TRT_DEPRECATED bool isDeviceTypeSet(const ILayer *layer) const =0
whether the DeviceType has been explicitly set for this 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::LayerType::kTRIP_LIMIT
Loop Trip limit layer.
nvinfer1::IBuilderConfig::reset
virtual void reset()=0
Resets the builder configuration to defaults.
nvinfer1::ElementWiseOperation::kFLOOR_DIV
Floor division of the first element by the second.
nvinfer1::IConvolutionLayer::getKernelSizeNd
virtual Dims getKernelSizeNd() const =0
Get the multi-dimension kernel size of the convolution.
nvinfer1::LayerType
LayerType
The type values of layer classes.
Definition: NvInfer.h:464
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::UnaryOperation::kTAN
Tangent.
nvinfer1::BuilderFlag::kTF32
nvinfer1::EnumMax< RNNGateType >
constexpr int32_t EnumMax< RNNGateType >()
Maximum number of elements in RNNGateType enum.
Definition: NvInfer.h:3233
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::Dims::MAX_DIMS
static const int32_t MAX_DIMS
The maximum number of dimensions supported for a tensor.
Definition: NvInferRuntimeCommon.h:230
nvinfer1::ScaleMode::kUNIFORM
Identical coefficients across all elements of the tensor.
nvinfer1::ILRNLayer
A LRN layer in a network definition.
Definition: NvInfer.h:2012
nvinfer1::RNNDirection
RNNDirection
Enumerates the RNN direction that may be performed by an RNN layer.
Definition: NvInfer.h:2832
nvinfer1::DimsHW::h
int32_t & h()
Get the height.
Definition: NvInfer.h:144
nvinfer1::ITensor::getType
virtual DataType getType() const =0
Get the data type of a tensor.
nvinfer1::RNNOperation::kLSTM
Four-gate LSTM network w/o peephole connections.
nvinfer1::ElementWiseOperation::kGREATER
Check if element in first tensor is greater than corresponding element in second tensor.
nvinfer1::IShuffleLayer::getZeroIsPlaceholder
virtual bool getZeroIsPlaceholder() const =0
Get meaning of 0 in reshape dimensions.
nvinfer1::TripLimit
TripLimit
Enum that describes kinds of trip limits.
Definition: NvInfer.h:4524
nvinfer1::IReduceLayer
Layer that represents a reduction operator across Shape, Int32, Float, and Half tensors.
Definition: NvInfer.h:3596
nvinfer1::DimsNCHW::DimsNCHW
DimsNCHW(int32_t batchSize, int32_t channels, int32_t height, int32_t width)
Construct a DimsNCHW given batch size, channel count, height and width.
Definition: NvInfer.h:368
nvinfer1::IMatrixMultiplyLayer
Layer that represents a Matrix Multiplication.
Definition: NvInfer.h:4203
nvinfer1::IBuilderConfig::setDeviceType
virtual void setDeviceType(const ILayer *layer, DeviceType deviceType)=0
Set the device that this layer must execute on.
nvinfer1::IBuilderConfig::getDLACore
virtual int32_t getDLACore() const =0
Get the DLA core that the engine executes on.
nvinfer1::INetworkDefinition::getName
virtual const char * getName() const =0
Returns the name associated with the network.
nvinfer1::ElementWiseOperation::kXOR
Logical XOR of two elements.
nvinfer1::ElementWiseOperation::kSUB
Substract the second element from the first.
nvinfer1::EnumMax< BuilderFlag >
constexpr int32_t EnumMax< BuilderFlag >()
Maximum number of builder flags in BuilderFlag enum.
Definition: NvInfer.h:6414
nvinfer1::DimsHW::w
int32_t & w()
Get the width.
Definition: NvInfer.h:164
nvinfer1::FillOperation
FillOperation
Enumerates the tensor fill operations that may performed by a fill layer.
Definition: NvInfer.h:4750
nvinfer1::IBuilderConfig::setDLACore
virtual void setDLACore(int32_t dlaCore)=0
Sets the DLA core used by the network.
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::INetworkDefinition::addRaggedSoftMax
virtual IRaggedSoftMaxLayer * addRaggedSoftMax(ITensor &input, ITensor &bounds)=0
Add a RaggedSoftMax layer to the network.
nvinfer1::IInt8EntropyCalibrator2
Definition: NvInfer.h:6090
nvinfer1::LayerType::kITERATOR
Loop Iterator layer.
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:4781
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 multi-dimension post-padding of the convolution.
nvinfer1::EnumMax< ResizeMode >
constexpr int32_t EnumMax< ResizeMode >()
Maximum number of elements in ResizeMode enum.
Definition: NvInfer.h:4356
nvinfer1::INetworkDefinition::addLRN
virtual ILRNLayer * addLRN(ITensor &input, int32_t window, float alpha, float beta, float k)=0
Add a LRN layer to the network.
nvinfer1::Dims3
Descriptor for three-dimensional data.
Definition: NvInfer.h:184
nvinfer1::LayerType::kCONSTANT
Constant layer.
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:6366
nvinfer1::IDeconvolutionLayer::setPostPadding
virtual void setPostPadding(Dims padding)=0
Set the multi-dimension post-padding of the deconvolution.
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:6096
nvinfer1::IInt8Calibrator
Application-implemented interface for calibration.
Definition: NvInfer.h:6010
nvinfer1::IErrorRecorder
Reference counted application-implemented error reporting interface for TensorRT objects.
Definition: NvInferRuntimeCommon.h:1223
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::ISliceLayer::setInput
void setInput(int32_t index, ITensor &tensor) _TENSORRT_OVERRIDE=0
Append or replace an input of this layer with a specific tensor.
nvinfer1::LayerType::kRECURRENCE
Loop Recurrence layer.
nvinfer1::INetworkDefinition::getNbLayers
virtual int32_t getNbLayers() const =0
Get the number of layers in the network.
nvinfer1::ITopKLayer
Layer that represents a TopK reduction.
Definition: NvInfer.h:4092
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::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::OptProfileSelector
OptProfileSelector
When setting or querying optimization profile parameters (such as shape tensor inputs or dynamic dime...
Definition: NvInferRuntime.h:1014
nvinfer1::INetworkDefinition::addFullyConnected
virtual IFullyConnectedLayer * addFullyConnected(ITensor &input, int32_t nbOutputs, Weights kernelWeights, Weights biasWeights)=0
Add a fully connected layer to the network.
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::PaddingMode::kCAFFE_ROUND_UP
Use CAFFE padding, rounding output size up, uses prePadding value.
nvinfer1::ISelectLayer
Definition: NvInfer.h:4737
nvinfer1::EnumMax< RNNDirection >
constexpr int32_t EnumMax< RNNDirection >()
Maximum number of elements in RNNDirection enum.
Definition: NvInfer.h:2840
nvinfer1::IConstantLayer::setWeights
virtual void setWeights(Weights weights)=0
Set the weights for the layer.
nvinfer1::IInt8Calibrator::getAlgorithm
virtual CalibrationAlgoType getAlgorithm()=0
Get the algorithm used by this calibrator.
nvinfer1::IMatrixMultiplyLayer::setTranspose
virtual TRT_DEPRECATED void setTranspose(int32_t index, bool val)=0
Set the transpose flag for an input tensor.
nvinfer1::INetworkDefinition::destroy
virtual void destroy()=0
Destroy this INetworkDefinition object.
nvinfer1::LayerType::kREDUCE
Reduce layer.
nvinfer1::IInt8EntropyCalibrator
Definition: NvInfer.h:6075
nvinfer1::ILRNLayer::getK
virtual float getK() const =0
Get the LRN K 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:2693
nvinfer1::IConvolutionLayer::getNbGroups
virtual int32_t getNbGroups() const =0
Get the number of groups of the convolution.
nvinfer1::UnaryOperation::kSIN
Sine.
nvinfer1::IPoolingLayer::getPoolingType
virtual PoolingType getPoolingType() const =0
Get the type of activation to be performed.
nvinfer1::EnumMax< TripLimit >
constexpr int32_t EnumMax< TripLimit >()
Maximum number of elements in TripLimit enum.
Definition: NvInfer.h:4535
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::IBuilder::getDLACore
virtual TRT_DEPRECATED int32_t getDLACore() const =0
Get the DLA core that the engine executes on.
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::IAlgorithmContext::getNbOutputs
virtual int32_t getNbOutputs() const =0
Return number of outputs of the algorithm.
nvinfer1::TacticSource::kCUBLAS_LT
cuBLAS LT tactics
nvinfer1::INetworkDefinition::addPooling
virtual TRT_DEPRECATED IPoolingLayer * addPooling(ITensor &input, PoolingType type, DimsHW windowSize)=0
Add a pooling layer to the network.
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::IAlgorithmIOInfo::getStrides
virtual Dims getStrides() const =0
Return strides of the input/output tensor of algorithm.
nvinfer1::IGatherLayer::setNbElementWiseDims
virtual void setNbElementWiseDims(int32_t k)=0
Set the number of leading dimensions of indices tensor to be handled elementwise. k must be 0 if ther...
nvinfer1::LayerType::kCONVOLUTION
Convolution layer.
nvinfer1::BuilderFlags
uint32_t BuilderFlags
Represents a collection of one or more QuantizationFlag values using binary OR operations,...
Definition: NvInfer.h:6387
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::ElementWiseOperation::kPROD
Product of the two elements.
nvinfer1::IReduceLayer::getOperation
virtual ReduceOperation getOperation() const =0
Get the reduce operation for the layer.
nvinfer1::EnumMax< LoopOutput >
constexpr int32_t EnumMax< LoopOutput >()
Maximum number of elements in LoopOutput enum.
Definition: NvInfer.h:4518
nvinfer1::IBuilderConfig::getCalibrationProfile
virtual const IOptimizationProfile * getCalibrationProfile() noexcept=0
Get the current calibration profile.
nvinfer1::INetworkDefinition::getInput
virtual ITensor * getInput(int32_t index) const =0
Get the input tensor specified by the given index.
nvinfer1::ILoopBoundaryLayer
Definition: NvInfer.h:4542
nvinfer1::UnaryOperation::kERF
Gauss error function.
nvinfer1::EngineCapability
EngineCapability
Forward declaration of IPluginFactory for use by other interfaces.
Definition: NvInferRuntime.h:82
nvinfer1::IAlgorithm
Describes a variation of execution of a layer. An algorithm is represented by IAlgorithmVariant and t...
Definition: NvInfer.h:6279
nvinfer1::IAlgorithmVariant::getTactic
virtual int64_t getTactic() const =0
Return tactic of the algorithm.
nvinfer1::UnaryOperation::kLOG
Log (base e).
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::LayerType::kLRN
LRN layer.
nvinfer1::IConvolutionLayer::setPaddingNd
virtual void setPaddingNd(Dims padding)=0
Set the multi-dimension padding of the convolution.
nvinfer1::EnumMax< UnaryOperation >
constexpr int32_t EnumMax< UnaryOperation >()
Maximum number of elements in UnaryOperation enum.
Definition: NvInfer.h:3522
nvinfer1::IPaddingLayer::setPrePaddingNd
virtual void setPrePaddingNd(Dims padding)=0
Set the padding that is applied at the start of the tensor.
nvinfer1::ILoopOutputLayer::setInput
void setInput(int32_t index, ITensor &tensor) _TENSORRT_OVERRIDE=0
Append or replace an input of this layer with a specific tensor.
nvinfer1::IRNNv2Layer::setHiddenState
virtual void setHiddenState(ITensor &hidden)=0
Set the initial hidden state of the RNN with the provided hidden ITensor.
nvinfer1::EnumMax< RNNInputMode >
constexpr int32_t EnumMax< RNNInputMode >()
Maximum number of elements in RNNInputMode enum.
Definition: NvInfer.h:2868
nvinfer1::IAlgorithmContext::getName
virtual const char * getName() const =0
Return name of the algorithm node. This is a unique identifier for the IAlgorithmContext.
nvinfer1::IGatherLayer::getGatherAxis
virtual int32_t getGatherAxis() const =0
Get the axis to gather on.
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::IDeconvolutionLayer::setNbOutputMaps
virtual void setNbOutputMaps(int32_t nbOutputMaps)=0
Set the number of output feature maps for the deconvolution.
nvinfer1::RNNGateType::kHIDDEN
Hidden gate (h).
nvinfer1::IBuilder::getMaxDLABatchSize
virtual int32_t getMaxDLABatchSize() const =0
Get the maximum batch size DLA can support. For any tensor the total volume of index dimensions combi...
nvinfer1::INetworkDefinition::getNbOutputs
virtual int32_t getNbOutputs() const =0
Get the number of outputs in the network.
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::LayerType::kUNARY
UnaryOp operation Layer.
nvinfer1::IInt8LegacyCalibrator
Definition: NvInfer.h:6120
nvinfer1::UnaryOperation::kNEG
Negation.
nvinfer1::EnumMax< TacticSource >
constexpr int32_t EnumMax< TacticSource >()
Maximum number of tactic sources in TacticSource enum.
Definition: NvInfer.h:6458
nvinfer1::ElementWiseOperation::kLESS
Check if element in first tensor is less than corresponding element in second tensor.
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::DimsCHW::w
int32_t & w()
Get the width.
Definition: NvInfer.h:290
nvinfer1::INetworkDefinition::addGather
virtual IGatherLayer * addGather(ITensor &data, ITensor &indices, int32_t axis)=0
Add a gather layer to the network.
nvinfer1::DimsCHW::DimsCHW
DimsCHW(int32_t channels, int32_t height, int32_t width)
Construct a DimsCHW given channel count, height and width.
Definition: NvInfer.h:238
nvinfer1::UnaryOperation::kACOS
Inverse cosine.
nvinfer1::UnaryOperation::kCOS
Cosine.
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::IScaleLayer
A Scale layer in a network definition.
Definition: NvInfer.h:2123
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::ISoftMaxLayer::getAxes
virtual uint32_t getAxes() const =0
Get the axis along which softmax occurs.
nvinfer1::RNNOperation::kGRU
Three-gate network consisting of Gated Recurrent Units.
nvinfer1::UnaryOperation::kNOT
Logical NOT.
nvinfer1::ISoftMaxLayer
A Softmax layer in a network definition.
Definition: NvInfer.h:2212
nvinfer1::IBuilderConfig::setFlags
virtual void setFlags(BuilderFlags builderFlags)=0
Set the build mode flags to turn on builder options for this network.
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::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:6476
nvinfer1::ILayer::resetPrecision
virtual void resetPrecision()=0
reset the computational precision for this layer
nvinfer1::EnumMax< SliceMode >
constexpr int32_t EnumMax< SliceMode >()
Maximum number of elements in SliceMode enum.
Definition: NvInfer.h:3906
nvinfer1::IConvolutionLayer::getNbOutputMaps
virtual int32_t getNbOutputMaps() const =0
Get the number of output maps for the convolution.
nvinfer1::IBuilder::setMaxBatchSize
virtual void setMaxBatchSize(int32_t batchSize)=0
Set the maximum batch size.
nvinfer1::IMatrixMultiplyLayer::getOperation
virtual MatrixOperation getOperation(int32_t index) const =0
Get the operation for an input tensor.
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::IScaleLayer::setShift
virtual void setShift(Weights shift)=0
Set the shift value.
nvinfer1::DimsNCHW::h
int32_t h() const
Get the height.
Definition: NvInfer.h:431
nvinfer1::IAlgorithmContext::getNbInputs
virtual int32_t getNbInputs() const =0
Return number of inputs of the algorithm.
nvinfer1::RNNOperation::kTANH
Single gate RNN w/ TANH activation function.
nvinfer1::IResizeLayer
A resize layer in a network definition.
Definition: NvInfer.h:4381
nvinfer1::DimsHW::DimsHW
DimsHW()
Construct an empty DimsHW object.
Definition: NvInfer.h:121
nvinfer1::IPlugin
Plugin class for user-implemented layers.
Definition: NvInferRuntime.h:146
nvinfer1::ISliceLayer::setStart
virtual void setStart(Dims start)=0
Set the start offset that the slice layer uses to create the output slice.
nvinfer1::LayerType::kELEMENTWISE
Elementwise layer.
nvinfer1::INetworkDefinition::setDeconvolutionOutputDimensionsFormula
virtual TRT_DEPRECATED void setDeconvolutionOutputDimensionsFormula(IOutputDimensionsFormula *formula)=0
Set the deconvolution output dimensions formula.
nvinfer1::ILayer::resetOutputType
virtual void resetOutputType(int32_t index)=0
reset the output type for this layer
nvinfer1::IUnaryLayer::getOperation
virtual UnaryOperation getOperation() const =0
Get the unary operation for the layer.
nvinfer1::IBuilderConfig::getFlags
virtual BuilderFlags getFlags() const =0
Get the build mode flags for this builder config. Defaults to 0.
nvinfer1::LayerType::kSHUFFLE
Shuffle layer.
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::IPoolingLayer::getPaddingNd
virtual Dims getPaddingNd() const =0
Get the multi-dimension padding for pooling.
nvinfer1::Dims4
Descriptor for four-dimensional data.
Definition: NvInfer.h:310
nvinfer1::IPoolingLayer
A Pooling layer in a network definition.
Definition: NvInfer.h:1750
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::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::ILRNLayer::setWindowSize
virtual void setWindowSize(int32_t windowSize)=0
Set the LRN window size.
nvinfer1::IGpuAllocator
Application-implemented class for controlling allocation on the GPU.
Definition: NvInferRuntimeCommon.h:1023
nvinfer1::IUnaryLayer
Layer that represents an unary operation.
Definition: NvInfer.h:3534
nvinfer1::DimsCHW::w
int32_t w() const
Get the width.
Definition: NvInfer.h:300
nvinfer1::ITopKLayer::getK
virtual int32_t getK() const =0
Get the k value for the layer.
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::IBuilder::setFp16Mode
virtual TRT_DEPRECATED void setFp16Mode(bool mode)=0
Set whether or not 16-bit kernels are permitted.
nvinfer1::IBuilder
Builds an engine from a network definition.
Definition: NvInfer.h:6940
nvinfer1::ITensor::isExecutionTensor
virtual bool isExecutionTensor() const =0
Whether the tensor is an execution tensor.
nvinfer1::DimsHW::w
int32_t w() const
Get the width.
Definition: NvInfer.h:174
nvinfer1::DimsCHW::DimsCHW
DimsCHW()
Construct an empty DimsCHW object.
Definition: NvInfer.h:224
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::ILoopOutputLayer::setAxis
virtual void setAxis(int32_t axis) noexcept=0
Set where to insert the contenation axis. Ignored if getLoopOutput() is kLAST_VALUE.
nvinfer1::DimensionType::kSPATIAL
Elements correspond to different spatial data.
nvinfer1::IResizeLayer::setInput
void setInput(int32_t index, ITensor &tensor) _TENSORRT_OVERRIDE=0
Append or replace an input of this layer with a specific tensor.
nvinfer1::LayerType::kCONCATENATION
Concatenation layer.
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::INetworkDefinition::addConvolution
virtual TRT_DEPRECATED IConvolutionLayer * addConvolution(ITensor &input, int32_t nbOutputMaps, DimsHW kernelSize, Weights kernelWeights, Weights biasWeights)=0
Add a convolution layer to the network.
nvinfer1::INetworkDefinition::addConvolutionNd
virtual IConvolutionLayer * addConvolutionNd(ITensor &input, int32_t nbOutputMaps, Dims kernelSize, Weights kernelWeights, Weights biasWeights)=0
Add a multi-dimension convolution layer to the network.
nvinfer1::ILayer::getName
virtual const char * getName() const =0
Return the name of a layer.
nvinfer1::LayerType::kACTIVATION
Activation layer.
nvinfer1::IPoolingLayer::getWindowSize
virtual TRT_DEPRECATED DimsHW getWindowSize() const =0
Get the window size for pooling.
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::ITensor::isNetworkInput
virtual bool isNetworkInput() const =0
Whether the tensor is a network input.
nvinfer1::IOutputDimensionsFormula
Application-implemented interface to compute layer output sizes.
Definition: NvInfer.h:3417
nvinfer1::EnumMax< PoolingType >
constexpr int32_t EnumMax< PoolingType >()
Maximum number of elements in PoolingType enum.
Definition: NvInfer.h:1734
nvinfer1::NetworkDefinitionCreationFlag::kEXPLICIT_BATCH
Mark the network to be an explicit batch network.
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::INetworkDefinition::addPluginExt
virtual TRT_DEPRECATED IPluginLayer * addPluginExt(ITensor *const *inputs, int32_t nbInputs, IPluginExt &plugin)=0
Add a plugin layer to the network using an IPluginExt interface.
nvinfer1::IBuilder::platformHasTf32
virtual bool platformHasTf32() const =0
Determine whether the platform has TF32 support.
nvinfer1::DimensionType::kINDEX
Elements correspond to different batch index.
nvinfer1::IBuilder::setGpuAllocator
virtual void setGpuAllocator(IGpuAllocator *allocator)=0
Set the GPU allocator.
nvinfer1::LayerType::kPARAMETRIC_RELU
Parametric ReLU layer.
nvinfer1::IBuilder::getMaxBatchSize
virtual int32_t getMaxBatchSize() const =0
Get the maximum batch size.
nvinfer1::TopKOperation
TopKOperation
Enumerates the operations that may be performed by a TopK layer.
Definition: NvInfer.h:4072
nvinfer1::ITensor::isNetworkOutput
virtual bool isNetworkOutput() const =0
Whether the tensor is a network output.
nvinfer1::TensorLocation
TensorLocation
The location for tensor data storage, device or host.
Definition: NvInferRuntimeCommon.h:1005
nvinfer1::ILoop::addTripLimit
virtual ITripLimitLayer * addTripLimit(ITensor &tensor, TripLimit limit) noexcept=0
Add a trip-count limiter, based on the given tensor.
nvinfer1::LayerType::kFULLY_CONNECTED
Fully connected layer.
nvinfer1::RNNGateType::kFORGET
Forget gate (f).
nvinfer1::IDeconvolutionLayer::getNbGroups
virtual int32_t getNbGroups() const =0
Get the number of groups for a deconvolution.
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::ILayer::getInput
virtual ITensor * getInput(int32_t index) const =0
Get the layer input corresponding to the given index.
nvinfer1::IConvolutionLayer::getDilation
virtual TRT_DEPRECATED DimsHW getDilation() const =0
Get the dilation for a convolution.
nvinfer1::IBuilderConfig::addOptimizationProfile
virtual int32_t addOptimizationProfile(const IOptimizationProfile *profile) noexcept=0
Add an optimization profile.
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::IBuilderConfig::getEngineCapability
virtual EngineCapability getEngineCapability() const =0
Query EngineCapability flow configured for the builder.
nvinfer1::INetworkDefinition::addConcatenation
virtual IConcatenationLayer * addConcatenation(ITensor *const *inputs, int32_t nbInputs)=0
Add a concatenation layer to the network.
nvinfer1::IRNNv2Layer::getWeightsForGate
virtual Weights getWeightsForGate(int32_t layerIndex, RNNGateType gate, bool isW) const =0
Get the weight parameters for an individual gate in the RNN.
nvinfer1::IPoolingLayer::setPrePadding
virtual void setPrePadding(Dims padding)=0
Set the multi-dimension pre-padding for pooling.
nvinfer1::LayerType::kMATRIX_MULTIPLY
Matrix multiply layer.
nvinfer1::INetworkDefinition::addShape
virtual IShapeLayer * addShape(ITensor &input)=0
Add a shape layer to the network.
nvinfer1::DimsNCHW::c
int32_t c() const
Get the channel count.
Definition: NvInfer.h:411
nvinfer1::EnumMax< ReduceOperation >
constexpr int32_t EnumMax< ReduceOperation >()
Maximum number of elements in ReduceOperation enum.
Definition: NvInfer.h:3584
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::IDeconvolutionLayer::getPostPadding
virtual Dims getPostPadding() const =0
Get the padding.
nvinfer1::IActivationLayer
An Activation layer in a network definition.
Definition: NvInfer.h:1662
nvinfer1::CalibrationAlgoType
CalibrationAlgoType
Version of calibration algorithm to use.
Definition: NvInfer.h:5984
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::IFillLayer::setBeta
virtual void setBeta(double beta) noexcept=0
Set the beta parameter.
nvinfer1::LayerType::kPOOLING
Pooling layer.
nvinfer1::ILRNLayer::getWindowSize
virtual int32_t getWindowSize() const =0
Get the LRN window size.
nvinfer1::IConvolutionLayer::setNbOutputMaps
virtual void setNbOutputMaps(int32_t nbOutputMaps)=0
Set the number of output maps for the convolution.
nvinfer1::IPaddingLayer::getPostPadding
virtual TRT_DEPRECATED DimsHW getPostPadding() const =0
Get the padding that is applied at the end of the tensor.
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:2302