TensorRT  8.2.0
NvInfer.h
Go to the documentation of this file.
1 /*
2  * Copyright 1993-2021 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 "NvInferLegacyDims.h"
54 #include "NvInferRuntime.h"
55 
64 //
67 
73 
79 namespace nvinfer1
80 {
81 
89 enum class LayerType : int32_t
90 {
91  kCONVOLUTION = 0,
92  kFULLY_CONNECTED = 1,
93  kACTIVATION = 2,
94  kPOOLING = 3,
95  kLRN = 4,
96  kSCALE = 5,
97  kSOFTMAX = 6,
98  kDECONVOLUTION = 7,
99  kCONCATENATION = 8,
100  kELEMENTWISE = 9,
101  kPLUGIN = 10,
102  kUNARY = 11,
103  kPADDING = 12,
104  kSHUFFLE = 13,
105  kREDUCE = 14,
106  kTOPK = 15,
107  kGATHER = 16,
108  kMATRIX_MULTIPLY = 17,
109  kRAGGED_SOFTMAX = 18,
110  kCONSTANT = 19,
111  kRNN_V2 = 20,
112  kIDENTITY = 21,
113  kPLUGIN_V2 = 22,
114  kSLICE = 23,
115  kSHAPE = 24,
116  kPARAMETRIC_RELU = 25,
117  kRESIZE = 26,
118  kTRIP_LIMIT = 27,
119  kRECURRENCE = 28,
120  kITERATOR = 29,
121  kLOOP_OUTPUT = 30,
122  kSELECT = 31,
123  kFILL = 32,
124  kQUANTIZE = 33,
125  kDEQUANTIZE = 34,
126  kCONDITION = 35,
127  kCONDITIONAL_INPUT = 36,
128  kCONDITIONAL_OUTPUT = 37,
129  kSCATTER = 38,
130  kEINSUM = 39,
131  kASSERTION = 40,
132 };
133 
135 template <>
136 constexpr inline int32_t EnumMax<LayerType>() noexcept
137 {
138  return 41;
139 }
140 
147 using TensorFormats = uint32_t;
148 
154 enum class ActivationType : int32_t
155 {
156  kRELU = 0,
157  kSIGMOID = 1,
158  kTANH = 2,
159  kLEAKY_RELU = 3,
160  kELU = 4,
161  kSELU = 5,
162  kSOFTSIGN = 6,
163  kSOFTPLUS = 7,
164  kCLIP = 8,
165  kHARD_SIGMOID = 9,
166  kSCALED_TANH = 10,
167  kTHRESHOLDED_RELU = 11
168 };
169 
170 namespace impl
171 {
173 template <>
175 {
176  static constexpr int32_t kVALUE = 12;
177 };
178 } // namespace impl
179 
193 class ITensor : public INoCopy
194 {
195 public:
208  void setName(const char* name) noexcept
209  {
210  mImpl->setName(name);
211  }
212 
220  const char* getName() const noexcept
221  {
222  return mImpl->getName();
223  }
224 
239  void setDimensions(Dims dimensions) noexcept
240  {
241  mImpl->setDimensions(dimensions);
242  }
243 
252  Dims getDimensions() const noexcept
253  {
254  return mImpl->getDimensions();
255  }
256 
267  void setType(DataType type) noexcept
268  {
269  mImpl->setType(type);
270  }
271 
279  DataType getType() const noexcept
280  {
281  return mImpl->getType();
282  }
283 
294  bool setDynamicRange(float min, float max) noexcept
295  {
296  return mImpl->setDynamicRange(min, max);
297  }
298 
302  bool isNetworkInput() const noexcept
303  {
304  return mImpl->isNetworkInput();
305  }
306 
310  bool isNetworkOutput() const noexcept
311  {
312  return mImpl->isNetworkOutput();
313  }
314 
332  void setBroadcastAcrossBatch(bool broadcastAcrossBatch) noexcept
333  {
334  mImpl->setBroadcastAcrossBatch(broadcastAcrossBatch);
335  }
336 
348  bool getBroadcastAcrossBatch() const noexcept
349  {
350  return mImpl->getBroadcastAcrossBatch();
351  }
352 
358  TensorLocation getLocation() const noexcept
359  {
360  return mImpl->getLocation();
361  }
362 
373  void setLocation(TensorLocation location) noexcept
374  {
375  mImpl->setLocation(location);
376  }
377 
383  bool dynamicRangeIsSet() const noexcept
384  {
385  return mImpl->dynamicRangeIsSet();
386  }
387 
391  void resetDynamicRange() noexcept
392  {
393  mImpl->resetDynamicRange();
394  }
395 
401  float getDynamicRangeMin() const noexcept
402  {
403  return mImpl->getDynamicRangeMin();
404  }
405 
411  float getDynamicRangeMax() const noexcept
412  {
413  return mImpl->getDynamicRangeMax();
414  }
415 
430  void setAllowedFormats(TensorFormats formats) noexcept
431  {
432  mImpl->setAllowedFormats(formats);
433  }
434 
444  {
445  return mImpl->getAllowedFormats();
446  }
447 
477  bool isShapeTensor() const noexcept
478  {
479  return mImpl->isShapeTensor();
480  }
481 
500  bool isExecutionTensor() const noexcept
501  {
502  return mImpl->isExecutionTensor();
503  }
504 
505 protected:
506  apiv::VTensor* mImpl;
507  virtual ~ITensor() noexcept = default;
508 };
509 
517 class ILayer : public INoCopy
518 {
519 public:
525  LayerType getType() const noexcept
526  {
527  return mLayer->getType();
528  }
529 
537  void setName(const char* name) noexcept
538  {
539  mLayer->setName(name);
540  }
541 
545 
548  const char* getName() const noexcept
549  {
550  return mLayer->getName();
551  }
552 
556  int32_t getNbInputs() const noexcept
557  {
558  return mLayer->getNbInputs();
559  }
560 
569  ITensor* getInput(int32_t index) const noexcept
570  {
571  return mLayer->getInput(index);
572  }
573 
577  int32_t getNbOutputs() const noexcept
578  {
579  return mLayer->getNbOutputs();
580  }
581 
588  ITensor* getOutput(int32_t index) const noexcept
589  {
590  return mLayer->getOutput(index);
591  }
592 
605  void setInput(int32_t index, ITensor& tensor) noexcept
606  {
607  return mLayer->setInput(index, tensor);
608  }
609 
625  void setPrecision(DataType dataType) noexcept
626  {
627  mLayer->setPrecision(dataType);
628  }
629 
637  DataType getPrecision() const noexcept
638  {
639  return mLayer->getPrecision();
640  }
641 
649  bool precisionIsSet() const noexcept
650  {
651  return mLayer->precisionIsSet();
652  }
653 
659  void resetPrecision() noexcept
660  {
661  mLayer->resetPrecision();
662  }
663 
690  void setOutputType(int32_t index, DataType dataType) noexcept
691  {
692  mLayer->setOutputType(index, dataType);
693  }
694 
704  DataType getOutputType(int32_t index) const noexcept
705  {
706  return mLayer->getOutputType(index);
707  }
708 
717  bool outputTypeIsSet(int32_t index) const noexcept
718  {
719  return mLayer->outputTypeIsSet(index);
720  }
721 
729  void resetOutputType(int32_t index) noexcept
730  {
731  return mLayer->resetOutputType(index);
732  }
733 
734 protected:
735  virtual ~ILayer() noexcept = default;
736  apiv::VLayer* mLayer;
737 };
738 
961 enum class PaddingMode : int32_t
962 {
964  kEXPLICIT_ROUND_UP = 1,
965  kSAME_UPPER = 2,
966  kSAME_LOWER = 3,
967  kCAFFE_ROUND_DOWN = 4,
968  kCAFFE_ROUND_UP = 5
969 };
970 
971 namespace impl
972 {
974 template <>
976 {
977  static constexpr int32_t kVALUE = 6;
978 };
979 } // namespace impl
980 
993 class IConvolutionLayer : public ILayer
994 {
995 public:
1005  TRT_DEPRECATED void setKernelSize(DimsHW kernelSize) noexcept
1006  {
1007  mImpl->setKernelSize(kernelSize);
1008  }
1009 
1018  {
1019  return mImpl->getKernelSize();
1020  }
1021 
1029  void setNbOutputMaps(int32_t nbOutputMaps) noexcept
1030  {
1031  mImpl->setNbOutputMaps(nbOutputMaps);
1032  }
1033 
1039  int32_t getNbOutputMaps() const noexcept
1040  {
1041  return mImpl->getNbOutputMaps();
1042  }
1043 
1055  TRT_DEPRECATED void setStride(DimsHW stride) noexcept
1056  {
1057  mImpl->setStride(stride);
1058  }
1059 
1066  {
1067  return mImpl->getStride();
1068  }
1069 
1085  TRT_DEPRECATED void setPadding(DimsHW padding) noexcept
1086  {
1087  return mImpl->setPadding(padding);
1088  }
1089 
1098  {
1099  return mImpl->getPadding();
1100  }
1101 
1117  void setNbGroups(int32_t nbGroups) noexcept
1118  {
1119  mImpl->setNbGroups(nbGroups);
1120  }
1121 
1127  int32_t getNbGroups() const noexcept
1128  {
1129  return mImpl->getNbGroups();
1130  }
1131 
1141  void setKernelWeights(Weights weights) noexcept
1142  {
1143  mImpl->setKernelWeights(weights);
1144  }
1145 
1151  Weights getKernelWeights() const noexcept
1152  {
1153  return mImpl->getKernelWeights();
1154  }
1155 
1166  void setBiasWeights(Weights weights) noexcept
1167  {
1168  mImpl->setBiasWeights(weights);
1169  }
1170 
1176  Weights getBiasWeights() const noexcept
1177  {
1178  return mImpl->getBiasWeights();
1179  }
1180 
1192  TRT_DEPRECATED void setDilation(DimsHW dilation) noexcept
1193  {
1194  return mImpl->setDilation(dilation);
1195  }
1196 
1205  {
1206  return mImpl->getDilation();
1207  }
1208 
1221  void setPrePadding(Dims padding) noexcept
1222  {
1223  mImpl->setPrePadding(padding);
1224  }
1225 
1231  Dims getPrePadding() const noexcept
1232  {
1233  return mImpl->getPrePadding();
1234  }
1235 
1248  void setPostPadding(Dims padding) noexcept
1249  {
1250  mImpl->setPostPadding(padding);
1251  }
1252 
1258  Dims getPostPadding() const noexcept
1259  {
1260  return mImpl->getPostPadding();
1261  }
1262 
1272  void setPaddingMode(PaddingMode paddingMode) noexcept
1273  {
1274  mImpl->setPaddingMode(paddingMode);
1275  }
1276 
1284  PaddingMode getPaddingMode() const noexcept
1285  {
1286  return mImpl->getPaddingMode();
1287  }
1288 
1297  void setKernelSizeNd(Dims kernelSize) noexcept
1298  {
1299  mImpl->setKernelSizeNd(kernelSize);
1300  }
1301 
1307  Dims getKernelSizeNd() const noexcept
1308  {
1309  return mImpl->getKernelSizeNd();
1310  }
1311 
1322  void setStrideNd(Dims stride) noexcept
1323  {
1324  mImpl->setStrideNd(stride);
1325  }
1326 
1332  Dims getStrideNd() const noexcept
1333  {
1334  return mImpl->getStrideNd();
1335  }
1336 
1350  void setPaddingNd(Dims padding) noexcept
1351  {
1352  mImpl->setPaddingNd(padding);
1353  }
1354 
1362  Dims getPaddingNd() const noexcept
1363  {
1364  return mImpl->getPaddingNd();
1365  }
1366 
1376  void setDilationNd(Dims dilation) noexcept
1377  {
1378  mImpl->setDilationNd(dilation);
1379  }
1380 
1386  Dims getDilationNd() const noexcept
1387  {
1388  return mImpl->getDilationNd();
1389  }
1390 
1412  using ILayer::setInput;
1413 
1414 protected:
1415  virtual ~IConvolutionLayer() noexcept = default;
1416  apiv::VConvolutionLayer* mImpl;
1417 };
1418 
1449 {
1450 public:
1458  void setNbOutputChannels(int32_t nbOutputs) noexcept
1459  {
1460  mImpl->setNbOutputChannels(nbOutputs);
1461  }
1462 
1468  int32_t getNbOutputChannels() const noexcept
1469  {
1470  return mImpl->getNbOutputChannels();
1471  }
1472 
1478  void setKernelWeights(Weights weights) noexcept
1479  {
1480  mImpl->setKernelWeights(weights);
1481  }
1482 
1488  Weights getKernelWeights() const noexcept
1489  {
1490  return mImpl->getKernelWeights();
1491  }
1492 
1500  void setBiasWeights(Weights weights) noexcept
1501  {
1502  mImpl->setBiasWeights(weights);
1503  }
1504 
1510  Weights getBiasWeights() const noexcept
1511  {
1512  return mImpl->getBiasWeights();
1513  }
1514 
1536  using ILayer::setInput;
1537 
1538 protected:
1539  virtual ~IFullyConnectedLayer() noexcept = default;
1540  apiv::VFullyConnectedLayer* mImpl;
1541 };
1542 
1554 class IActivationLayer : public ILayer
1555 {
1556 public:
1564  void setActivationType(ActivationType type) noexcept
1565  {
1566  mImpl->setActivationType(type);
1567  }
1568 
1575  {
1576  return mImpl->getActivationType();
1577  }
1578 
1589  void setAlpha(float alpha) noexcept
1590  {
1591  mImpl->setAlpha(alpha);
1592  }
1593 
1603  void setBeta(float beta) noexcept
1604  {
1605  mImpl->setBeta(beta);
1606  }
1607 
1612  float getAlpha() const noexcept
1613  {
1614  return mImpl->getAlpha();
1615  }
1616 
1621  float getBeta() const noexcept
1622  {
1623  return mImpl->getBeta();
1624  }
1625 
1626 protected:
1627  virtual ~IActivationLayer() noexcept = default;
1628  apiv::VActivationLayer* mImpl;
1629 };
1630 
1636 enum class PoolingType : int32_t
1637 {
1638  kMAX = 0, // Maximum over elements
1639  kAVERAGE = 1, // Average over elements. If the tensor is padded, the count includes the padding
1640  kMAX_AVERAGE_BLEND = 2 // Blending between max and average pooling: (1-blendFactor)*maxPool + blendFactor*avgPool
1641 };
1642 
1643 namespace impl
1644 {
1646 template <>
1648 {
1649  static constexpr int32_t kVALUE = 3;
1650 };
1651 } // namespace impl
1652 
1664 class IPoolingLayer : public ILayer
1665 {
1666 public:
1674  void setPoolingType(PoolingType type) noexcept
1675  {
1676  mImpl->setPoolingType(type);
1677  }
1678 
1684  PoolingType getPoolingType() const noexcept
1685  {
1686  return mImpl->getPoolingType();
1687  }
1688 
1698  TRT_DEPRECATED void setWindowSize(DimsHW windowSize) noexcept
1699  {
1700  mImpl->setWindowSize(windowSize);
1701  }
1702 
1711  {
1712  return mImpl->getWindowSize();
1713  }
1714 
1726  TRT_DEPRECATED void setStride(DimsHW stride) noexcept
1727  {
1728  mImpl->setStride(stride);
1729  }
1730 
1739  {
1740  return mImpl->getStride();
1741  }
1742 
1754  TRT_DEPRECATED void setPadding(DimsHW padding) noexcept
1755  {
1756  mImpl->setPadding(padding);
1757  }
1758 
1769  {
1770  return mImpl->getPadding();
1771  }
1772 
1783  void setBlendFactor(float blendFactor) noexcept
1784  {
1785  mImpl->setBlendFactor(blendFactor);
1786  }
1787 
1796  float getBlendFactor() const noexcept
1797  {
1798  return mImpl->getBlendFactor();
1799  }
1800 
1813  void setAverageCountExcludesPadding(bool exclusive) noexcept
1814  {
1815  mImpl->setAverageCountExcludesPadding(exclusive);
1816  }
1817 
1824  bool getAverageCountExcludesPadding() const noexcept
1825  {
1826  return mImpl->getAverageCountExcludesPadding();
1827  }
1828 
1842  void setPrePadding(Dims padding) noexcept
1843  {
1844  mImpl->setPrePadding(padding);
1845  }
1846 
1852  Dims getPrePadding() const noexcept
1853  {
1854  return mImpl->getPrePadding();
1855  }
1856 
1870  void setPostPadding(Dims padding) noexcept
1871  {
1872  mImpl->setPostPadding(padding);
1873  }
1874 
1880  Dims getPostPadding() const noexcept
1881  {
1882  return mImpl->getPostPadding();
1883  }
1884 
1893  void setPaddingMode(PaddingMode paddingMode) noexcept
1894  {
1895  mImpl->setPaddingMode(paddingMode);
1896  }
1897 
1904  PaddingMode getPaddingMode() const noexcept
1905  {
1906  return mImpl->getPaddingMode();
1907  }
1908 
1917  void setWindowSizeNd(Dims windowSize) noexcept
1918  {
1919  mImpl->setWindowSizeNd(windowSize);
1920  }
1921 
1927  Dims getWindowSizeNd() const noexcept
1928  {
1929  return mImpl->getWindowSizeNd();
1930  }
1931 
1942  void setStrideNd(Dims stride) noexcept
1943  {
1944  mImpl->setStrideNd(stride);
1945  }
1946 
1952  Dims getStrideNd() const noexcept
1953  {
1954  return mImpl->getStrideNd();
1955  }
1956 
1971  void setPaddingNd(Dims padding) noexcept
1972  {
1973  mImpl->setPaddingNd(padding);
1974  }
1975 
1983  Dims getPaddingNd() const noexcept
1984  {
1985  return mImpl->getPaddingNd();
1986  }
1987 
1988 protected:
1989  virtual ~IPoolingLayer() noexcept = default;
1990  apiv::VPoolingLayer* mImpl;
1991 };
1992 
2002 class ILRNLayer : public ILayer
2003 {
2004 public:
2014  void setWindowSize(int32_t windowSize) noexcept
2015  {
2016  mImpl->setWindowSize(windowSize);
2017  }
2018 
2024  int32_t getWindowSize() const noexcept
2025  {
2026  return mImpl->getWindowSize();
2027  }
2028 
2035  void setAlpha(float alpha) noexcept
2036  {
2037  mImpl->setAlpha(alpha);
2038  }
2039 
2045  float getAlpha() const noexcept
2046  {
2047  return mImpl->getAlpha();
2048  }
2049 
2056  void setBeta(float beta) noexcept
2057  {
2058  mImpl->setBeta(beta);
2059  }
2060 
2066  float getBeta() const noexcept
2067  {
2068  return mImpl->getBeta();
2069  }
2070 
2077  void setK(float k) noexcept
2078  {
2079  mImpl->setK(k);
2080  }
2081 
2087  float getK() const noexcept
2088  {
2089  return mImpl->getK();
2090  }
2091 
2092 protected:
2093  virtual ~ILRNLayer() noexcept = default;
2094  apiv::VLRNLayer* mImpl;
2095 };
2096 
2102 enum class ScaleMode : int32_t
2103 {
2104  kUNIFORM = 0,
2105  kCHANNEL = 1,
2106  kELEMENTWISE = 2
2107 };
2108 
2110 template <>
2111 constexpr inline int32_t EnumMax<ScaleMode>() noexcept
2112 {
2113  return 3;
2114 }
2115 
2142 class IScaleLayer : public ILayer
2143 {
2144 public:
2150  void setMode(ScaleMode mode) noexcept
2151  {
2152  mImpl->setMode(mode);
2153  }
2154 
2160  ScaleMode getMode() const noexcept
2161  {
2162  return mImpl->getMode();
2163  }
2164 
2170  void setShift(Weights shift) noexcept
2171  {
2172  mImpl->setShift(shift);
2173  }
2174 
2180  Weights getShift() const noexcept
2181  {
2182  return mImpl->getShift();
2183  }
2184 
2190  void setScale(Weights scale) noexcept
2191  {
2192  mImpl->setScale(scale);
2193  }
2194 
2200  Weights getScale() const noexcept
2201  {
2202  return mImpl->getScale();
2203  }
2204 
2210  void setPower(Weights power) noexcept
2211  {
2212  mImpl->setPower(power);
2213  }
2214 
2220  Weights getPower() const noexcept
2221  {
2222  return mImpl->getPower();
2223  }
2224 
2235  int32_t getChannelAxis() const noexcept
2236  {
2237  return mImpl->getChannelAxis();
2238  }
2239 
2256  void setChannelAxis(int32_t channelAxis) noexcept
2257  {
2258  mImpl->setChannelAxis(channelAxis);
2259  }
2260 
2261 protected:
2262  virtual ~IScaleLayer() noexcept = default;
2263  apiv::VScaleLayer* mImpl;
2264 };
2265 
2277 class ISoftMaxLayer : public ILayer
2278 {
2279 public:
2310  void setAxes(uint32_t axes) noexcept
2311  {
2312  mImpl->setAxes(axes);
2313  }
2314 
2320  uint32_t getAxes() const noexcept
2321  {
2322  return mImpl->getAxes();
2323  }
2324 
2325 protected:
2326  virtual ~ISoftMaxLayer() noexcept = default;
2327  apiv::VSoftMaxLayer* mImpl;
2328 };
2329 
2343 {
2344 public:
2355  void setAxis(int32_t axis) noexcept
2356  {
2357  mImpl->setAxis(axis);
2358  }
2359 
2365  int32_t getAxis() const noexcept
2366  {
2367  return mImpl->getAxis();
2368  }
2369 
2370 protected:
2371  virtual ~IConcatenationLayer() noexcept = default;
2372  apiv::VConcatenationLayer* mImpl;
2373 };
2374 
2383 {
2384 public:
2396  TRT_DEPRECATED void setKernelSize(DimsHW kernelSize) noexcept
2397  {
2398  mImpl->setKernelSize(kernelSize);
2399  }
2400 
2409  {
2410  return mImpl->getKernelSize();
2411  }
2412 
2420  void setNbOutputMaps(int32_t nbOutputMaps) noexcept
2421  {
2422  mImpl->setNbOutputMaps(nbOutputMaps);
2423  }
2424 
2430  int32_t getNbOutputMaps() const noexcept
2431  {
2432  return mImpl->getNbOutputMaps();
2433  }
2434 
2447  TRT_DEPRECATED void setStride(DimsHW stride) noexcept
2448  {
2449  mImpl->setStride(stride);
2450  }
2451 
2460  {
2461  return mImpl->getStride();
2462  }
2463 
2479  TRT_DEPRECATED void setPadding(DimsHW padding) noexcept
2480  {
2481  mImpl->setPadding(padding);
2482  }
2483 
2494  {
2495  return mImpl->getPadding();
2496  }
2497 
2513  void setNbGroups(int32_t nbGroups) noexcept
2514  {
2515  mImpl->setNbGroups(nbGroups);
2516  }
2517 
2523  int32_t getNbGroups() const noexcept
2524  {
2525  return mImpl->getNbGroups();
2526  }
2527 
2537  void setKernelWeights(Weights weights) noexcept
2538  {
2539  mImpl->setKernelWeights(weights);
2540  }
2541 
2547  Weights getKernelWeights() const noexcept
2548  {
2549  return mImpl->getKernelWeights();
2550  }
2551 
2562  void setBiasWeights(Weights weights) noexcept
2563  {
2564  mImpl->setBiasWeights(weights);
2565  }
2566 
2572  Weights getBiasWeights() const noexcept
2573  {
2574  return mImpl->getBiasWeights();
2575  }
2576 
2590  void setPrePadding(Dims padding) noexcept
2591  {
2592  mImpl->setPrePadding(padding);
2593  }
2594 
2600  Dims getPrePadding() const noexcept
2601  {
2602  return mImpl->getPrePadding();
2603  }
2604 
2618  void setPostPadding(Dims padding) noexcept
2619  {
2620  mImpl->setPostPadding(padding);
2621  }
2622 
2628  Dims getPostPadding() const noexcept
2629  {
2630  return mImpl->getPostPadding();
2631  }
2632 
2642  void setPaddingMode(PaddingMode paddingMode) noexcept
2643  {
2644  mImpl->setPaddingMode(paddingMode);
2645  }
2646 
2654  PaddingMode getPaddingMode() const noexcept
2655  {
2656  return mImpl->getPaddingMode();
2657  }
2658 
2669  void setKernelSizeNd(Dims kernelSize) noexcept
2670  {
2671  mImpl->setKernelSizeNd(kernelSize);
2672  }
2673 
2679  Dims getKernelSizeNd() const noexcept
2680  {
2681  return mImpl->getKernelSizeNd();
2682  }
2683 
2697  void setStrideNd(Dims stride) noexcept
2698  {
2699  mImpl->setStrideNd(stride);
2700  }
2701 
2707  Dims getStrideNd() const noexcept
2708  {
2709  return mImpl->getStrideNd();
2710  }
2711 
2725  void setPaddingNd(Dims padding) noexcept
2726  {
2727  mImpl->setPaddingNd(padding);
2728  }
2729 
2737  Dims getPaddingNd() const noexcept
2738  {
2739  return mImpl->getPaddingNd();
2740  }
2741 
2763  using ILayer::setInput;
2764 
2771  void setDilationNd(Dims dilation) noexcept
2772  {
2773  mImpl->setDilationNd(dilation);
2774  }
2775 
2781  Dims getDilationNd() const noexcept
2782  {
2783  return mImpl->getDilationNd();
2784  }
2785 
2786 protected:
2787  virtual ~IDeconvolutionLayer() noexcept = default;
2788  apiv::VDeconvolutionLayer* mImpl;
2789 };
2790 
2798 enum class ElementWiseOperation : int32_t
2799 {
2800  kSUM = 0,
2801  kPROD = 1,
2802  kMAX = 2,
2803  kMIN = 3,
2804  kSUB = 4,
2805  kDIV = 5,
2806  kPOW = 6,
2807  kFLOOR_DIV = 7,
2808  kAND = 8,
2809  kOR = 9,
2810  kXOR = 10,
2811  kEQUAL = 11,
2812  kGREATER = 12,
2813  kLESS = 13
2814 };
2815 
2816 namespace impl
2817 {
2819 template <>
2821 {
2822  static constexpr int32_t kVALUE = 14;
2823 };
2824 } // namespace impl
2825 
2839 //!
2846 {
2847 public:
2858  {
2859  return mImpl->setOperation(op);
2860  }
2861 
2870  {
2871  return mImpl->getOperation();
2872  }
2873 
2874 protected:
2875  apiv::VElementWiseLayer* mImpl;
2876  virtual ~IElementWiseLayer() noexcept = default;
2877 };
2878 
2884 enum class GatherMode : int32_t
2885 {
2886  kDEFAULT = 0,
2887  kELEMENT = 1,
2888  kND = 2
2889 };
2890 
2892 template <>
2893 constexpr inline int32_t EnumMax<GatherMode>() noexcept
2894 {
2895  return 3;
2896 }
2897 
2976 class IGatherLayer : public ILayer
2977 {
2978 public:
2988  void setGatherAxis(int32_t axis) noexcept
2989  {
2990  mImpl->setGatherAxis(axis);
2991  }
2992 
2999  int32_t getGatherAxis() const noexcept
3000  {
3001  return mImpl->getGatherAxis();
3002  }
3003 
3018  void setNbElementWiseDims(int32_t elementWiseDims) noexcept
3019  {
3020  mImpl->setNbElementWiseDims(elementWiseDims);
3021  }
3022 
3028  int32_t getNbElementWiseDims() const noexcept
3029  {
3030  return mImpl->getNbElementWiseDims();
3031  }
3032 
3038  void setMode(GatherMode mode) noexcept
3039  {
3040  mImpl->setMode(mode);
3041  }
3042 
3048  GatherMode getMode() const noexcept
3049  {
3050  return mImpl->getMode();
3051  }
3052 
3053 protected:
3054  apiv::VGatherLayer* mImpl;
3055  virtual ~IGatherLayer() noexcept = default;
3056 };
3057 
3137 enum class RNNOperation : int32_t
3138 {
3139  kRELU = 0,
3140  kTANH = 1,
3141  kLSTM = 2,
3142  kGRU = 3
3143 };
3144 
3146 template <>
3147 constexpr inline int32_t EnumMax<RNNOperation>() noexcept
3148 {
3149  return 4;
3150 }
3151 
3159 enum class RNNDirection : int32_t
3160 {
3161  kUNIDIRECTION = 0,
3162  kBIDIRECTION = 1
3163 };
3164 
3166 template <>
3167 constexpr inline int32_t EnumMax<RNNDirection>() noexcept
3168 {
3169  return 2;
3170 }
3171 
3187 enum class RNNInputMode : int32_t
3188 {
3189  kLINEAR = 0,
3190  kSKIP = 1
3191 };
3192 
3194 template <>
3195 constexpr inline int32_t EnumMax<RNNInputMode>() noexcept
3196 {
3197  return 2;
3198 }
3199 
3207 enum class RNNGateType : int32_t
3208 {
3209  kINPUT = 0,
3210  kOUTPUT = 1,
3211  kFORGET = 2,
3212  kUPDATE = 3,
3213  kRESET = 4,
3214  kCELL = 5,
3215  kHIDDEN = 6
3216 };
3217 
3218 template <>
3219 constexpr inline int32_t EnumMax<RNNGateType>() noexcept
3220 {
3221  return 7;
3222 }
3223 
3236 {
3237 public:
3238  int32_t getLayerCount() const noexcept
3239  {
3240  return mImpl->getLayerCount();
3241  }
3242  int32_t getHiddenSize() const noexcept
3243  {
3244  return mImpl->getHiddenSize();
3245  }
3246  int32_t getMaxSeqLength() const noexcept
3247  {
3248  return mImpl->getMaxSeqLength();
3249  }
3250  int32_t getDataLength() const noexcept
3251  {
3252  return mImpl->getDataLength();
3253  }
3254 
3269  void setSequenceLengths(ITensor& seqLengths) noexcept
3270  {
3271  return mImpl->setSequenceLengths(seqLengths);
3272  }
3273 
3281  ITensor* getSequenceLengths() const noexcept
3282  {
3283  return mImpl->getSequenceLengths();
3284  }
3285 
3290  void setOperation(RNNOperation op) noexcept
3291  {
3292  mImpl->setOperation(op);
3293  }
3294 
3299  RNNOperation getOperation() const noexcept
3300  {
3301  return mImpl->getOperation();
3302  }
3303 
3308  void setInputMode(RNNInputMode op) noexcept
3309  {
3310  mImpl->setInputMode(op);
3311  }
3312 
3317  RNNInputMode getInputMode() const noexcept
3318  {
3319  return mImpl->getInputMode();
3320  }
3321 
3332  void setDirection(RNNDirection op) noexcept
3333  {
3334  mImpl->setDirection(op);
3335  }
3336 
3341  RNNDirection getDirection() const noexcept
3342  {
3343  return mImpl->getDirection();
3344  }
3345 
3400  void setWeightsForGate(int32_t layerIndex, RNNGateType gate, bool isW, Weights weights) noexcept
3401  {
3402  mImpl->setWeightsForGate(layerIndex, gate, isW, weights);
3403  }
3404 
3409  Weights getWeightsForGate(int32_t layerIndex, RNNGateType gate, bool isW) const noexcept
3410  {
3411  return mImpl->getWeightsForGate(layerIndex, gate, isW);
3412  }
3413 
3434  void setBiasForGate(int32_t layerIndex, RNNGateType gate, bool isW, Weights bias) noexcept
3435  {
3436  mImpl->setBiasForGate(layerIndex, gate, isW, bias);
3437  }
3438 
3443  Weights getBiasForGate(int32_t layerIndex, RNNGateType gate, bool isW) const noexcept
3444  {
3445  return mImpl->getBiasForGate(layerIndex, gate, isW);
3446  }
3447 
3460  void setHiddenState(ITensor& hidden) noexcept
3461  {
3462  mImpl->setHiddenState(hidden);
3463  }
3464 
3469  ITensor* getHiddenState() const noexcept
3470  {
3471  return mImpl->getHiddenState();
3472  }
3473 
3488  void setCellState(ITensor& cell) noexcept
3489  {
3490  mImpl->setCellState(cell);
3491  }
3492 
3497  ITensor* getCellState() const noexcept
3498  {
3499  return mImpl->getCellState();
3500  }
3501 
3502 protected:
3503  apiv::VRNNv2Layer* mImpl;
3504  virtual ~IRNNv2Layer() noexcept = default;
3505 };
3506 
3516 class IPluginV2Layer : public ILayer
3517 {
3518 public:
3524  IPluginV2& getPlugin() noexcept
3525  {
3526  return mImpl->getPlugin();
3527  }
3528 
3529 protected:
3530  apiv::VPluginV2Layer* mImpl;
3531  virtual ~IPluginV2Layer() noexcept = default;
3532 };
3533 
3541 enum class UnaryOperation : int32_t
3542 {
3543  kEXP = 0,
3544  kLOG = 1,
3545  kSQRT = 2,
3546  kRECIP = 3,
3547  kABS = 4,
3548  kNEG = 5,
3549  kSIN = 6,
3550  kCOS = 7,
3551  kTAN = 8,
3552  kSINH = 9,
3553  kCOSH = 10,
3554  kASIN = 11,
3555  kACOS = 12,
3556  kATAN = 13,
3557  kASINH = 14,
3558  kACOSH = 15,
3559  kATANH = 16,
3560  kCEIL = 17,
3561  kFLOOR = 18,
3562  kERF = 19,
3563  kNOT = 20,
3564  kSIGN = 21,
3565  kROUND = 22
3566 };
3567 
3569 template <>
3570 constexpr inline int32_t EnumMax<UnaryOperation>() noexcept
3571 {
3572  return 23;
3573 }
3574 
3582 class IUnaryLayer : public ILayer
3583 {
3584 public:
3590  void setOperation(UnaryOperation op) noexcept
3591  {
3592  mImpl->setOperation(op);
3593  }
3594 
3600  UnaryOperation getOperation() const noexcept
3601  {
3602  return mImpl->getOperation();
3603  }
3604 
3605 protected:
3606  apiv::VUnaryLayer* mImpl;
3607  virtual ~IUnaryLayer() noexcept = default;
3608 };
3609 
3628 enum class ReduceOperation : int32_t
3629 {
3630  kSUM = 0,
3631  kPROD = 1,
3632  kMAX = 2,
3633  kMIN = 3,
3634  kAVG = 4
3635 };
3636 
3638 template <>
3639 constexpr inline int32_t EnumMax<ReduceOperation>() noexcept
3640 {
3641  return 5;
3642 }
3643 
3651 class IReduceLayer : public ILayer
3652 {
3653 public:
3659  void setOperation(ReduceOperation op) noexcept
3660  {
3661  mImpl->setOperation(op);
3662  }
3663 
3670  {
3671  return mImpl->getOperation();
3672  }
3673 
3679  void setReduceAxes(uint32_t reduceAxes) noexcept
3680  {
3681  mImpl->setReduceAxes(reduceAxes);
3682  }
3683 
3689  uint32_t getReduceAxes() const noexcept
3690  {
3691  return mImpl->getReduceAxes();
3692  }
3693 
3699  void setKeepDimensions(bool keepDimensions) noexcept
3700  {
3701  mImpl->setKeepDimensions(keepDimensions);
3702  }
3703 
3709  bool getKeepDimensions() const noexcept
3710  {
3711  return mImpl->getKeepDimensions();
3712  }
3713 
3714 protected:
3715  apiv::VReduceLayer* mImpl;
3716  virtual ~IReduceLayer() noexcept = default;
3717 };
3718 
3729 class IPaddingLayer : public ILayer
3730 {
3731 public:
3741  TRT_DEPRECATED void setPrePadding(DimsHW padding) noexcept
3742  {
3743  mImpl->setPrePadding(padding);
3744  }
3745 
3754  {
3755  return mImpl->getPrePadding();
3756  }
3757 
3767  TRT_DEPRECATED void setPostPadding(DimsHW padding) noexcept
3768  {
3769  mImpl->setPostPadding(padding);
3770  }
3771 
3780  {
3781  return mImpl->getPostPadding();
3782  }
3783 
3793  void setPrePaddingNd(Dims padding) noexcept
3794  {
3795  mImpl->setPrePaddingNd(padding);
3796  }
3797 
3805  Dims getPrePaddingNd() const noexcept
3806  {
3807  return mImpl->getPrePaddingNd();
3808  }
3809 
3819  void setPostPaddingNd(Dims padding) noexcept
3820  {
3821  mImpl->setPostPaddingNd(padding);
3822  }
3823 
3831  Dims getPostPaddingNd() const noexcept
3832  {
3833  return mImpl->getPostPaddingNd();
3834  }
3835 
3836 protected:
3837  apiv::VPaddingLayer* mImpl;
3838  virtual ~IPaddingLayer() noexcept = default;
3839 };
3840 
3842 {
3849  int32_t order[Dims::MAX_DIMS];
3850 };
3851 
3864 class IShuffleLayer : public ILayer
3865 {
3866 public:
3876  void setFirstTranspose(Permutation permutation) noexcept
3877  {
3878  mImpl->setFirstTranspose(permutation);
3879  }
3880 
3889  {
3890  return mImpl->getFirstTranspose();
3891  }
3892 
3913  void setReshapeDimensions(Dims dimensions) noexcept
3914  {
3915  mImpl->setReshapeDimensions(dimensions);
3916  }
3917 
3926  Dims getReshapeDimensions() const noexcept
3927  {
3928  return mImpl->getReshapeDimensions();
3929  }
3930 
3936  //
3959  using ILayer::setInput;
3960 
3973  void setSecondTranspose(Permutation permutation) noexcept
3974  {
3975  mImpl->setSecondTranspose(permutation);
3976  }
3977 
3986  {
3987  return mImpl->getSecondTranspose();
3988  }
3989 
4001  void setZeroIsPlaceholder(bool zeroIsPlaceholder) noexcept
4002  {
4003  return mImpl->setZeroIsPlaceholder(zeroIsPlaceholder);
4004  }
4005 
4014  bool getZeroIsPlaceholder() const noexcept
4015  {
4016  return mImpl->getZeroIsPlaceholder();
4017  }
4018 
4019 protected:
4020  apiv::VShuffleLayer* mImpl;
4021  virtual ~IShuffleLayer() noexcept = default;
4022 };
4023 
4029 enum class SliceMode : int32_t
4030 {
4031  kDEFAULT = 0,
4032  kWRAP = 1,
4033  kCLAMP = 2,
4034  kFILL = 3,
4035  kREFLECT = 4,
4036 };
4039 
4041 template <>
4042 constexpr inline int32_t EnumMax<SliceMode>() noexcept
4043 {
4044  return 5;
4045 }
4046 
4077 class ISliceLayer : public ILayer
4078 {
4079 public:
4089  void setStart(Dims start) noexcept
4090  {
4091  mImpl->setStart(start);
4092  }
4093 
4104  Dims getStart() const noexcept
4105  {
4106  return mImpl->getStart();
4107  }
4108 
4118  void setSize(Dims size) noexcept
4119  {
4120  return mImpl->setSize(size);
4121  }
4122 
4133  Dims getSize() const noexcept
4134  {
4135  return mImpl->getSize();
4136  }
4137 
4147  void setStride(Dims stride) noexcept
4148  {
4149  mImpl->setStride(stride);
4150  }
4151 
4162  Dims getStride() const noexcept
4163  {
4164  return mImpl->getStride();
4165  }
4166 
4172  void setMode(SliceMode mode) noexcept
4173  {
4174  mImpl->setMode(mode);
4175  }
4176 
4182  SliceMode getMode() const noexcept
4183  {
4184  return mImpl->getMode();
4185  }
4186 
4208  using ILayer::setInput;
4209 
4210 protected:
4211  apiv::VSliceLayer* mImpl;
4212  virtual ~ISliceLayer() noexcept = default;
4213 };
4214 
4227 class IShapeLayer : public ILayer
4228 {
4229 protected:
4230  apiv::VShapeLayer* mImpl;
4231  virtual ~IShapeLayer() noexcept = default;
4232 };
4233 
4239 enum class TopKOperation : int32_t
4240 {
4241  kMAX = 0,
4242  kMIN = 1,
4243 };
4244 
4246 template <>
4247 constexpr inline int32_t EnumMax<TopKOperation>() noexcept
4248 {
4249  return 2;
4250 }
4251 
4259 class ITopKLayer : public ILayer
4260 {
4261 public:
4267  void setOperation(TopKOperation op) noexcept
4268  {
4269  mImpl->setOperation(op);
4270  }
4271 
4277  TopKOperation getOperation() const noexcept
4278  {
4279  return mImpl->getOperation();
4280  }
4281 
4289  void setK(int32_t k) noexcept
4290  {
4291  mImpl->setK(k);
4292  }
4293 
4299  int32_t getK() const noexcept
4300  {
4301  return mImpl->getK();
4302  }
4303 
4309  void setReduceAxes(uint32_t reduceAxes) noexcept
4310  {
4311  mImpl->setReduceAxes(reduceAxes);
4312  }
4313 
4319  uint32_t getReduceAxes() const noexcept
4320  {
4321  return mImpl->getReduceAxes();
4322  }
4323 
4324 protected:
4325  apiv::VTopKLayer* mImpl;
4326  virtual ~ITopKLayer() noexcept = default;
4327 };
4328 
4335 enum class MatrixOperation : int32_t
4336 {
4340  kNONE,
4341 
4343  kTRANSPOSE,
4344 
4354  kVECTOR
4355 };
4356 
4358 template <>
4359 constexpr inline int32_t EnumMax<MatrixOperation>() noexcept
4360 {
4361  return 3;
4362 }
4363 
4390 {
4391 public:
4398  void setOperation(int32_t index, MatrixOperation op) noexcept
4399  {
4400  mImpl->setOperation(index, op);
4401  }
4402 
4408  MatrixOperation getOperation(int32_t index) const noexcept
4409  {
4410  return mImpl->getOperation(index);
4411  }
4412 
4413 protected:
4414  apiv::VMatrixMultiplyLayer* mImpl;
4415  virtual ~IMatrixMultiplyLayer() noexcept = default;
4416 };
4417 
4433 {
4434 protected:
4435  apiv::VRaggedSoftMaxLayer* mImpl;
4436  virtual ~IRaggedSoftMaxLayer() noexcept = default;
4437 };
4438 
4451 class IIdentityLayer : public ILayer
4452 {
4453 protected:
4454  apiv::VIdentityLayer* mImpl;
4455  virtual ~IIdentityLayer() noexcept = default;
4456 };
4457 
4465 class IConstantLayer : public ILayer
4466 {
4467 public:
4477  void setWeights(Weights weights) noexcept
4478  {
4479  mImpl->setWeights(weights);
4480  }
4481 
4487  Weights getWeights() const noexcept
4488  {
4489  return mImpl->getWeights();
4490  }
4491 
4499  void setDimensions(Dims dimensions) noexcept
4500  {
4501  mImpl->setDimensions(dimensions);
4502  }
4503 
4511  Dims getDimensions() const noexcept
4512  {
4513  return mImpl->getDimensions();
4514  }
4515 
4516 protected:
4517  apiv::VConstantLayer* mImpl;
4518  virtual ~IConstantLayer() noexcept = default;
4519 };
4520 
4529 {
4530 protected:
4531  apiv::VParametricReLULayer* mImpl;
4532  virtual ~IParametricReLULayer() noexcept = default;
4533 };
4534 
4540 enum class ResizeMode : int32_t
4541 {
4542  kNEAREST = 0,
4543  kLINEAR = 1
4544 };
4545 
4546 namespace impl
4547 {
4549 template <>
4551 {
4552  static constexpr int32_t kVALUE = 2;
4553 };
4554 } // namespace impl
4555 
4564 {
4577  kALIGN_CORNERS = 0,
4578 
4585  kASYMMETRIC = 1,
4586 
4593  kHALF_PIXEL = 2,
4594 };
4595 
4596 namespace impl
4597 {
4599 template <>
4601 {
4602  static constexpr int32_t kVALUE = 3;
4603 };
4604 } // namespace impl
4605 
4613 enum class ResizeSelector : int32_t
4614 {
4616  kFORMULA = 0,
4617 
4619  kUPPER = 1,
4620 };
4621 
4622 namespace impl
4623 {
4625 template <>
4627 {
4628  static constexpr int32_t kVALUE = 2;
4629 };
4630 } // namespace impl
4631 
4639 enum class ResizeRoundMode : int32_t
4640 {
4642  kHALF_UP = 0,
4643 
4645  kHALF_DOWN = 1,
4646 
4648  kFLOOR = 2,
4649 
4651  kCEIL = 3,
4652 };
4653 
4654 namespace impl
4655 {
4657 template <>
4659 {
4660  static constexpr int32_t kVALUE = 4;
4661 };
4662 } // namespace impl
4663 
4685 class IResizeLayer : public ILayer
4686 {
4687 public:
4706  void setOutputDimensions(Dims dimensions) noexcept
4707  {
4708  return mImpl->setOutputDimensions(dimensions);
4709  }
4710 
4716  Dims getOutputDimensions() const noexcept
4717  {
4718  return mImpl->getOutputDimensions();
4719  }
4720 
4746  void setScales(const float* scales, int32_t nbScales) noexcept
4747  {
4748  mImpl->setScales(scales, nbScales);
4749  }
4750 
4765  int32_t getScales(int32_t size, float* scales) const noexcept
4766  {
4767  return mImpl->getScales(size, scales);
4768  }
4769 
4779  void setResizeMode(ResizeMode resizeMode) noexcept
4780  {
4781  mImpl->setResizeMode(resizeMode);
4782  }
4783 
4789  ResizeMode getResizeMode() const noexcept
4790  {
4791  return mImpl->getResizeMode();
4792  }
4793 
4806  TRT_DEPRECATED void setAlignCorners(bool alignCorners) noexcept
4807  {
4808  mImpl->setAlignCorners(alignCorners);
4809  }
4810 
4819  TRT_DEPRECATED bool getAlignCorners() const noexcept
4820  {
4821  return mImpl->getAlignCorners();
4822  }
4823 
4843  using ILayer::setInput;
4844 
4857  {
4858  mImpl->setCoordinateTransformation(coordTransform);
4859  }
4860 
4867  {
4868  return mImpl->getCoordinateTransformation();
4869  }
4870 
4884  {
4885  mImpl->setSelectorForSinglePixel(selector);
4886  }
4887 
4894  {
4895  return mImpl->getSelectorForSinglePixel();
4896  }
4897 
4910  {
4911  mImpl->setNearestRounding(value);
4912  }
4913 
4920  {
4921  return mImpl->getNearestRounding();
4922  }
4923 
4924 protected:
4925  virtual ~IResizeLayer() noexcept = default;
4926  apiv::VResizeLayer* mImpl;
4927 };
4928 
4930 enum class LoopOutput : int32_t
4931 {
4933  kLAST_VALUE = 0,
4934 
4936  kCONCATENATE = 1,
4937 
4939  kREVERSE = 2
4940 };
4941 
4943 template <>
4944 constexpr inline int32_t EnumMax<LoopOutput>() noexcept
4945 {
4946  return 3;
4947 }
4948 
4950 enum class TripLimit : int32_t
4951 {
4952 
4953  kCOUNT = 0,
4954  kWHILE = 1
4955 };
4956 
4958 template <>
4959 constexpr inline int32_t EnumMax<TripLimit>() noexcept
4960 {
4961  return 2;
4962 }
4963 
4964 class ILoop;
4965 
4967 {
4968 public:
4970  ILoop* getLoop() const noexcept
4971  {
4972  return mBoundary->getLoop();
4973  }
4974 
4975 protected:
4976  virtual ~ILoopBoundaryLayer() noexcept = default;
4977  apiv::VLoopBoundaryLayer* mBoundary;
4978 };
4979 
4986 {
4987 public:
4989  IIfConditional* getConditional() const noexcept
4990  {
4991  return mBoundary->getConditional();
4992  }
4993 
4994 protected:
4995  virtual ~IIfConditionalBoundaryLayer() noexcept = default;
4996  apiv::VConditionalBoundaryLayer* mBoundary;
4997 };
4998 
5003 {
5004 public:
5005 protected:
5006  virtual ~IConditionLayer() noexcept = default;
5007  apiv::VConditionLayer* mImpl;
5008 };
5009 
5016 {
5017 public:
5018 protected:
5019  virtual ~IIfConditionalOutputLayer() noexcept = default;
5020  apiv::VConditionalOutputLayer* mImpl;
5021 };
5022 
5027 {
5028 public:
5029 protected:
5030  virtual ~IIfConditionalInputLayer() noexcept = default;
5031  apiv::VConditionalInputLayer* mImpl;
5032 };
5033 
5055 class IIfConditional : public INoCopy
5056 {
5057 public:
5067  IConditionLayer* setCondition(ITensor& condition) noexcept
5068  {
5069  return mImpl->setCondition(condition);
5070  }
5071 
5083  IIfConditionalOutputLayer* addOutput(ITensor& trueSubgraphOutput, ITensor& falseSubgraphOutput) noexcept
5084  {
5085  return mImpl->addOutput(trueSubgraphOutput, falseSubgraphOutput);
5086  }
5087 
5096  {
5097  return mImpl->addInput(input);
5098  }
5099 
5108  void setName(const char* name) noexcept
5109  {
5110  mImpl->setName(name);
5111  }
5112 
5118  const char* getName() const noexcept
5119  {
5120  return mImpl->getName();
5121  }
5122 
5123 protected:
5124  virtual ~IIfConditional() noexcept = default;
5125  apiv::VIfConditional* mImpl;
5126 };
5127 
5128 
5130 {
5131 public:
5137  //
5150  using ILayer::setInput;
5151 
5152 protected:
5153  virtual ~IRecurrenceLayer() noexcept = default;
5154  apiv::VRecurrenceLayer* mImpl;
5155 };
5156 
5175 {
5176 public:
5177  LoopOutput getLoopOutput() const noexcept
5178  {
5179  return mImpl->getLoopOutput();
5180  }
5181 
5194  void setAxis(int32_t axis) noexcept
5195  {
5196  mImpl->setAxis(axis);
5197  }
5198 
5200  int32_t getAxis() const noexcept
5201  {
5202  return mImpl->getAxis();
5203  }
5204 
5210  //
5225  using ILayer::setInput;
5226 
5227 protected:
5228  virtual ~ILoopOutputLayer() noexcept = default;
5229  apiv::VLoopOutputLayer* mImpl;
5230 };
5231 
5233 {
5234 public:
5235  TripLimit getTripLimit() const noexcept
5236  {
5237  return mImpl->getTripLimit();
5238  }
5239 
5240 protected:
5241  virtual ~ITripLimitLayer() noexcept = default;
5242  apiv::VTripLimitLayer* mImpl;
5243 };
5244 
5246 {
5247 public:
5249  void setAxis(int32_t axis) noexcept
5250  {
5251  mImpl->setAxis(axis);
5252  }
5253 
5255  int32_t getAxis() const noexcept
5256  {
5257  return mImpl->getAxis();
5258  }
5259 
5265  void setReverse(bool reverse) noexcept
5266  {
5267  mImpl->setReverse(reverse);
5268  }
5269 
5271  bool getReverse() const noexcept
5272  {
5273  return mImpl->getReverse();
5274  }
5275 
5276 protected:
5277  virtual ~IIteratorLayer() noexcept = default;
5278  apiv::VIteratorLayer* mImpl;
5279 };
5280 
5286 class ILoop : public INoCopy
5287 {
5288 public:
5295  IRecurrenceLayer* addRecurrence(ITensor& initialValue) noexcept
5296  {
5297  return mImpl->addRecurrence(initialValue);
5298  }
5299 
5316  ITripLimitLayer* addTripLimit(ITensor& tensor, TripLimit limit) noexcept
5317  {
5318  return mImpl->addTripLimit(tensor, limit);
5319  }
5320 
5329  IIteratorLayer* addIterator(ITensor& tensor, int32_t axis = 0, bool reverse = false) noexcept
5330  {
5331  return mImpl->addIterator(tensor, axis, reverse);
5332  }
5333 
5341  ILoopOutputLayer* addLoopOutput(ITensor& tensor, LoopOutput outputKind, int32_t axis = 0) noexcept
5342  {
5343  return mImpl->addLoopOutput(tensor, outputKind, axis);
5344  }
5345 
5354  void setName(const char* name) noexcept
5355  {
5356  mImpl->setName(name);
5357  }
5358 
5364  const char* getName() const noexcept
5365  {
5366  return mImpl->getName();
5367  }
5368 
5369 protected:
5370  virtual ~ILoop() noexcept = default;
5371  apiv::VLoop* mImpl;
5372 };
5373 
5377 class ISelectLayer : public ILayer
5378 {
5379 protected:
5380  virtual ~ISelectLayer() noexcept = default;
5381  apiv::VSelectLayer* mImpl;
5382 };
5383 
5398 class IAssertionLayer : public ILayer
5399 {
5400 public:
5409  void setMessage(const char* message) noexcept
5410  {
5411  mImpl->setMessage(message);
5412  }
5413 
5419  const char* getMessage() const noexcept
5420  {
5421  return mImpl->getMessage();
5422  }
5423 
5424 protected:
5425  virtual ~IAssertionLayer() noexcept = default;
5426 
5427  apiv::VAssertionLayer* mImpl;
5428 };
5429 
5437 enum class FillOperation : int32_t
5438 {
5439  kLINSPACE = 0,
5440  kRANDOM_UNIFORM = 1
5441 };
5442 
5444 template <>
5445 constexpr inline int32_t EnumMax<FillOperation>() noexcept
5446 {
5447  return 2;
5448 }
5449 
5475 class IFillLayer : public ILayer
5476 {
5477 public:
5486  //
5487  void setDimensions(Dims dimensions) noexcept
5488  {
5489  mImpl->setDimensions(dimensions);
5490  }
5491 
5502  Dims getDimensions() const noexcept
5503  {
5504  return mImpl->getDimensions();
5505  }
5506 
5512  void setOperation(FillOperation op) noexcept
5513  {
5514  mImpl->setOperation(op);
5515  }
5516 
5522  FillOperation getOperation() const noexcept
5523  {
5524  return mImpl->getOperation();
5525  }
5526 
5539  //
5540  void setAlpha(double alpha) noexcept
5541  {
5542  mImpl->setAlpha(alpha);
5543  }
5544 
5555  double getAlpha() const noexcept
5556  {
5557  return mImpl->getAlpha();
5558  }
5559 
5573  void setBeta(double beta) noexcept
5574  {
5575  mImpl->setBeta(beta);
5576  }
5577 
5588  double getBeta() const noexcept
5589  {
5590  return mImpl->getBeta();
5591  }
5592 
5619  using ILayer::setInput;
5620 
5621 protected:
5622  virtual ~IFillLayer() noexcept = default;
5623  apiv::VFillLayer* mImpl;
5624 };
5625 
5683 class IQuantizeLayer : public ILayer
5684 {
5685 public:
5694  int32_t getAxis() const noexcept
5695  {
5696  return mImpl->getAxis();
5697  }
5705  void setAxis(int32_t axis) noexcept
5706  {
5707  mImpl->setAxis(axis);
5708  }
5709 
5710 protected:
5711  virtual ~IQuantizeLayer() noexcept = default;
5712  apiv::VQuantizeLayer* mImpl;
5713 };
5714 
5770 class IDequantizeLayer : public ILayer
5771 {
5772 public:
5781  int32_t getAxis() const noexcept
5782  {
5783  return mImpl->getAxis();
5784  }
5792  void setAxis(int32_t axis) noexcept
5793  {
5794  mImpl->setAxis(axis);
5795  }
5796 
5797 protected:
5798  virtual ~IDequantizeLayer() noexcept = default;
5799  apiv::VDequantizeLayer* mImpl;
5800 };
5801 
5838 class IEinsumLayer : public ILayer
5839 {
5840 public:
5850  bool setEquation(const char* equation) noexcept
5851  {
5852  return mImpl->setEquation(equation);
5853  }
5854 
5860  const char* getEquation() const noexcept
5861  {
5862  return mImpl->getEquation();
5863  }
5864 
5865 protected:
5866  virtual ~IEinsumLayer() noexcept = default;
5867  apiv::VEinsumLayer* mImpl;
5868 };
5869 
5875 enum class ScatterMode : int32_t
5876 {
5877  kELEMENT = 0,
5878  kND = 1,
5879 };
5880 
5882 template <>
5883 constexpr inline int32_t EnumMax<ScatterMode>() noexcept
5884 {
5885  return 2;
5886 }
5887 
5941 //!
5944 class IScatterLayer : public ILayer
5945 {
5946 public:
5952  void setMode(ScatterMode mode) noexcept
5953  {
5954  mImpl->setMode(mode);
5955  }
5956 
5962  ScatterMode getMode() const noexcept
5963  {
5964  return mImpl->getMode();
5965  }
5966 
5972  void setAxis(int32_t axis) noexcept
5973  {
5974  mImpl->setAxis(axis);
5975  }
5976 
5980  int32_t getAxis() const noexcept
5981  {
5982  return mImpl->getAxis();
5983  }
5984 
5985 protected:
5986  apiv::VScatterLayer* mImpl;
5987  virtual ~IScatterLayer() noexcept = default;
5988 }; // class IScatterLayer
5989 
6010 {
6011 public:
6012  virtual ~INetworkDefinition() noexcept = default;
6013 
6049  ITensor* addInput(const char* name, DataType type, Dims dimensions) noexcept
6050  {
6051  return mImpl->addInput(name, type, dimensions);
6052  }
6053 
6063  void markOutput(ITensor& tensor) noexcept
6064  {
6065  mImpl->markOutput(tensor);
6066  }
6067 
6087  ITensor& input, int32_t nbOutputMaps, DimsHW kernelSize, Weights kernelWeights, Weights biasWeights) noexcept
6088  {
6089  return mImpl->addConvolution(input, nbOutputMaps, kernelSize, kernelWeights, biasWeights);
6090  }
6091 
6108  ITensor& input, int32_t nbOutputs, Weights kernelWeights, Weights biasWeights) noexcept
6109  {
6110  return mImpl->addFullyConnected(input, nbOutputs, kernelWeights, biasWeights);
6111  }
6112 
6128  {
6129  return mImpl->addActivation(input, type);
6130  }
6131 
6146  TRT_DEPRECATED IPoolingLayer* addPooling(ITensor& input, PoolingType type, DimsHW windowSize) noexcept
6147  {
6148  return mImpl->addPooling(input, type, windowSize);
6149  }
6150 
6165  ILRNLayer* addLRN(ITensor& input, int32_t window, float alpha, float beta, float k) noexcept
6166  {
6167  return mImpl->addLRN(input, window, alpha, beta, k);
6168  }
6169 
6192  IScaleLayer* addScale(ITensor& input, ScaleMode mode, Weights shift, Weights scale, Weights power) noexcept
6193  {
6194  return mImpl->addScale(input, mode, shift, scale, power);
6195  }
6196 
6206  {
6207  return mImpl->addSoftMax(input);
6208  }
6209 
6222  IConcatenationLayer* addConcatenation(ITensor* const* inputs, int32_t nbInputs) noexcept
6223  {
6224  return mImpl->addConcatenation(inputs, nbInputs);
6225  }
6226 
6246  ITensor& input, int32_t nbOutputMaps, DimsHW kernelSize, Weights kernelWeights, Weights biasWeights) noexcept
6247  {
6248  return mImpl->addDeconvolution(input, nbOutputMaps, kernelSize, kernelWeights, biasWeights);
6249  }
6250 
6272  {
6273  return mImpl->addElementWise(input1, input2, op);
6274  }
6275 
6291  IUnaryLayer* addUnary(ITensor& input, UnaryOperation operation) noexcept
6292  {
6293  return mImpl->addUnary(input, operation);
6294  }
6295 
6308  TRT_DEPRECATED IPaddingLayer* addPadding(ITensor& input, DimsHW prePadding, DimsHW postPadding) noexcept
6309  {
6310  return mImpl->addPadding(input, prePadding, postPadding);
6311  }
6312 
6323  {
6324  return mImpl->addShuffle(input);
6325  }
6326 
6334  int32_t getNbLayers() const noexcept
6335  {
6336  return mImpl->getNbLayers();
6337  }
6338 
6348  ILayer* getLayer(int32_t index) const noexcept
6349  {
6350  return mImpl->getLayer(index);
6351  }
6352 
6360  int32_t getNbInputs() const noexcept
6361  {
6362  return mImpl->getNbInputs();
6363  }
6364 
6376  ITensor* getInput(int32_t index) const noexcept
6377  {
6378  return mImpl->getInput(index);
6379  }
6380 
6390  int32_t getNbOutputs() const noexcept
6391  {
6392  return mImpl->getNbOutputs();
6393  }
6394 
6406  ITensor* getOutput(int32_t index) const noexcept
6407  {
6408  return mImpl->getOutput(index);
6409  }
6410 
6418  TRT_DEPRECATED void destroy() noexcept
6419  {
6420  delete this;
6421  }
6422 
6447  ITensor& input, ReduceOperation operation, uint32_t reduceAxes, bool keepDimensions) noexcept
6448  {
6449  return mImpl->addReduce(input, operation, reduceAxes, keepDimensions);
6450  }
6451 
6480  ITopKLayer* addTopK(ITensor& input, TopKOperation op, int32_t k, uint32_t reduceAxes) noexcept
6481  {
6482  return mImpl->addTopK(input, op, k, reduceAxes);
6483  }
6484 
6496  IGatherLayer* addGather(ITensor& data, ITensor& indices, int32_t axis) noexcept
6497  {
6498  return mImpl->addGather(data, indices, axis);
6499  }
6500 
6513  {
6514  return mImpl->addGatherV2(data, indices, mode);
6515  }
6516 
6531  {
6532  return mImpl->addRaggedSoftMax(input, bounds);
6533  }
6534 
6550  ITensor& input0, MatrixOperation op0, ITensor& input1, MatrixOperation op1) noexcept
6551  {
6552  return mImpl->addMatrixMultiply(input0, op0, input1, op1);
6553  }
6554 
6575  IConstantLayer* addConstant(Dims dimensions, Weights weights) noexcept
6576  {
6577  return mImpl->addConstant(dimensions, weights);
6578  }
6579 
6644  ITensor& input, int32_t layerCount, int32_t hiddenSize, int32_t maxSeqLen, RNNOperation op) noexcept
6645  {
6646  return mImpl->addRNNv2(input, layerCount, hiddenSize, maxSeqLen, op);
6647  }
6648 
6661  {
6662  return mImpl->addIdentity(input);
6663  }
6664 
6675  void removeTensor(ITensor& tensor) noexcept
6676  {
6677  mImpl->removeTensor(tensor);
6678  }
6679 
6687  void unmarkOutput(ITensor& tensor) noexcept
6688  {
6689  mImpl->unmarkOutput(tensor);
6690  }
6691 
6706  IPluginV2Layer* addPluginV2(ITensor* const* inputs, int32_t nbInputs, IPluginV2& plugin) noexcept
6707  {
6708  return mImpl->addPluginV2(inputs, nbInputs, plugin);
6709  }
6710 
6725  ISliceLayer* addSlice(ITensor& input, Dims start, Dims size, Dims stride) noexcept
6726  {
6727  return mImpl->addSlice(input, start, size, stride);
6728  }
6729 
6747  void setName(const char* name) noexcept
6748  {
6749  mImpl->setName(name);
6750  }
6751 
6761  const char* getName() const noexcept
6762  {
6763  return mImpl->getName();
6764  }
6765 
6779  IShapeLayer* addShape(ITensor& input) noexcept
6780  {
6781  return mImpl->addShape(input);
6782  }
6783 
6798  bool hasImplicitBatchDimension() const noexcept
6799  {
6800  return mImpl->hasImplicitBatchDimension();
6801  }
6802 
6816  bool markOutputForShapes(ITensor& tensor) noexcept
6817  {
6818  return mImpl->markOutputForShapes(tensor);
6819  }
6820 
6828  bool unmarkOutputForShapes(ITensor& tensor) noexcept
6829  {
6830  return mImpl->unmarkOutputForShapes(tensor);
6831  }
6832 
6847  {
6848  return mImpl->addParametricReLU(input, slope);
6849  }
6850 
6869  ITensor& input, int32_t nbOutputMaps, Dims kernelSize, Weights kernelWeights, Weights biasWeights) noexcept
6870  {
6871  return mImpl->addConvolutionNd(input, nbOutputMaps, kernelSize, kernelWeights, biasWeights);
6872  }
6873 
6888  IPoolingLayer* addPoolingNd(ITensor& input, PoolingType type, Dims windowSize) noexcept
6889  {
6890  return mImpl->addPoolingNd(input, type, windowSize);
6891  }
6892 
6907  //
6911  ITensor& input, int32_t nbOutputMaps, Dims kernelSize, Weights kernelWeights, Weights biasWeights) noexcept
6912  {
6913  return mImpl->addDeconvolutionNd(input, nbOutputMaps, kernelSize, kernelWeights, biasWeights);
6914  }
6915 
6947  ITensor& input, ScaleMode mode, Weights shift, Weights scale, Weights power, int32_t channelAxis) noexcept
6948  {
6949  return mImpl->addScaleNd(input, mode, shift, scale, power, channelAxis);
6950  }
6951 
6962  IResizeLayer* addResize(ITensor& input) noexcept
6963  {
6964  return mImpl->addResize(input);
6965  }
6966 
6979  TRT_DEPRECATED bool hasExplicitPrecision() const noexcept
6980  {
6981  return mImpl->hasExplicitPrecision();
6982  }
6983 
6995  ILoop* addLoop() noexcept
6996  {
6997  return mImpl->addLoop();
6998  }
6999 
7033  ISelectLayer* addSelect(ITensor& condition, ITensor& thenInput, ITensor& elseInput) noexcept
7034  {
7035  return mImpl->addSelect(condition, thenInput, elseInput);
7036  }
7037 
7050  IAssertionLayer* addAssertion(ITensor& condition, const char* message) noexcept
7051  {
7052  return mImpl->addAssertion(condition, message);
7053  }
7054 
7068  IFillLayer* addFill(Dims dimensions, FillOperation op) noexcept
7069  {
7070  return mImpl->addFill(dimensions, op);
7071  }
7072 
7085  TRT_DEPRECATED IPaddingLayer* addPaddingNd(ITensor& input, Dims prePadding, Dims postPadding) noexcept
7086  {
7087  return mImpl->addPaddingNd(input, prePadding, postPadding);
7088  }
7089 
7105  bool setWeightsName(Weights weights, const char* name) noexcept
7106  {
7107  return mImpl->setWeightsName(weights, name);
7108  }
7109 
7121  //
7124  void setErrorRecorder(IErrorRecorder* recorder) noexcept
7125  {
7126  mImpl->setErrorRecorder(recorder);
7127  }
7128 
7140  {
7141  return mImpl->getErrorRecorder();
7142  }
7143 
7158  IDequantizeLayer* addDequantize(ITensor& input, ITensor& scale) noexcept
7159  {
7160  return mImpl->addDequantize(input, scale);
7161  }
7162 
7178  IScatterLayer* addScatter(ITensor& data, ITensor& indices, ITensor& updates, ScatterMode mode) noexcept
7179  {
7180  return mImpl->addScatter(data, indices, updates, mode);
7181  }
7182 
7197  IQuantizeLayer* addQuantize(ITensor& input, ITensor& scale) noexcept
7198  {
7199  return mImpl->addQuantize(input, scale);
7200  }
7201 
7213  {
7214  return mImpl->addIfConditional();
7215  }
7216 
7226  IEinsumLayer* addEinsum(ITensor* const* inputs, int32_t nbInputs, const char* equation) noexcept
7227  {
7228  return mImpl->addEinsum(inputs, nbInputs, equation);
7229  }
7230 
7231 protected:
7232  apiv::VNetworkDefinition* mImpl;
7233 };
7234 
7240 enum class CalibrationAlgoType : int32_t
7241 {
7242  kLEGACY_CALIBRATION = 0,
7243  kENTROPY_CALIBRATION = 1,
7244  kENTROPY_CALIBRATION_2 = 2,
7245  kMINMAX_CALIBRATION = 3,
7246 };
7247 
7249 template <>
7250 constexpr inline int32_t EnumMax<CalibrationAlgoType>() noexcept
7251 {
7252  return 4;
7253 }
7254 
7267 {
7268 public:
7274  virtual int32_t getBatchSize() const noexcept = 0;
7275 
7289  virtual bool getBatch(void* bindings[], const char* names[], int32_t nbBindings) noexcept = 0;
7290 
7305  virtual const void* readCalibrationCache(std::size_t& length) noexcept = 0;
7306 
7315  virtual void writeCalibrationCache(const void* ptr, std::size_t length) noexcept = 0;
7316 
7322  virtual CalibrationAlgoType getAlgorithm() noexcept = 0;
7323 
7324  virtual ~IInt8Calibrator() noexcept = default;
7325 };
7326 
7332 {
7333 public:
7337  CalibrationAlgoType getAlgorithm() noexcept override
7338  {
7339  return CalibrationAlgoType::kENTROPY_CALIBRATION;
7340  }
7341 
7342  virtual ~IInt8EntropyCalibrator() noexcept = default;
7343 };
7344 
7350 {
7351 public:
7355  CalibrationAlgoType getAlgorithm() noexcept override
7356  {
7357  return CalibrationAlgoType::kENTROPY_CALIBRATION_2;
7358  }
7359 
7360  virtual ~IInt8EntropyCalibrator2() noexcept = default;
7361 };
7362 
7367 {
7368 public:
7372  CalibrationAlgoType getAlgorithm() noexcept override
7373  {
7374  return CalibrationAlgoType::kMINMAX_CALIBRATION;
7375  }
7376 
7377  virtual ~IInt8MinMaxCalibrator() noexcept = default;
7378 };
7379 
7385 {
7386 public:
7390  CalibrationAlgoType getAlgorithm() noexcept override
7391  {
7392  return CalibrationAlgoType::kLEGACY_CALIBRATION;
7393  }
7394 
7401  virtual double getQuantile() const noexcept = 0;
7402 
7409  virtual double getRegressionCutoff() const noexcept = 0;
7410 
7423  virtual const void* readHistogramCache(std::size_t& length) noexcept = 0;
7424 
7433  virtual void writeHistogramCache(const void* ptr, std::size_t length) noexcept = 0;
7434 
7435  virtual ~IInt8LegacyCalibrator() noexcept = default;
7436 };
7437 
7449 {
7450 public:
7455  {
7456  return mImpl->getTensorFormat();
7457  }
7458 
7462  DataType getDataType() const noexcept
7463  {
7464  return mImpl->getDataType();
7465  }
7466 
7470  Dims getStrides() const noexcept
7471  {
7472  return mImpl->getStrides();
7473  }
7474 
7475 protected:
7476  virtual ~IAlgorithmIOInfo() noexcept = default;
7477  apiv::VAlgorithmIOInfo* mImpl;
7478 };
7479 
7492 {
7493 public:
7497  int64_t getImplementation() const noexcept
7498  {
7499  return mImpl->getImplementation();
7500  }
7501 
7505  int64_t getTactic() const noexcept
7506  {
7507  return mImpl->getTactic();
7508  }
7509 
7510 protected:
7511  virtual ~IAlgorithmVariant() noexcept = default;
7512  apiv::VAlgorithmVariant* mImpl;
7513 };
7514 
7524 {
7525 public:
7530  const char* getName() const noexcept
7531  {
7532  return mImpl->getName();
7533  }
7534 
7541  Dims getDimensions(int32_t index, OptProfileSelector select) const noexcept
7542  {
7543  return mImpl->getDimensions(index, select);
7544  }
7545 
7549  int32_t getNbInputs() const noexcept
7550  {
7551  return mImpl->getNbInputs();
7552  }
7553 
7557  int32_t getNbOutputs() const noexcept
7558  {
7559  return mImpl->getNbOutputs();
7560  }
7561 
7562 protected:
7563  virtual ~IAlgorithmContext() noexcept = default;
7564  apiv::VAlgorithmContext* mImpl;
7565 };
7566 
7576 class IAlgorithm : public INoCopy
7577 {
7578 public:
7589  TRT_DEPRECATED const IAlgorithmIOInfo& getAlgorithmIOInfo(int32_t index) const noexcept
7590  {
7591  return mImpl->getAlgorithmIOInfo(index);
7592  }
7593 
7597  const IAlgorithmVariant& getAlgorithmVariant() const noexcept
7598  {
7599  return mImpl->getAlgorithmVariant();
7600  }
7601 
7605  float getTimingMSec() const noexcept
7606  {
7607  return mImpl->getTimingMSec();
7608  }
7609 
7613  std::size_t getWorkspaceSize() const noexcept
7614  {
7615  return mImpl->getWorkspaceSize();
7616  }
7617 
7626  const IAlgorithmIOInfo* getAlgorithmIOInfoByIndex(int32_t index) const noexcept
7627  {
7628  return mImpl->getAlgorithmIOInfoByIndex(index);
7629  }
7630 
7631 protected:
7632  virtual ~IAlgorithm() noexcept = default;
7633  apiv::VAlgorithm* mImpl;
7634 }; // IAlgorithm
7635 
7645 {
7646 public:
7660  virtual int32_t selectAlgorithms(const IAlgorithmContext& context, const IAlgorithm* const* choices,
7661  int32_t nbChoices, int32_t* selection) noexcept
7662  = 0;
7673  virtual void reportAlgorithms(const IAlgorithmContext* const* algoContexts, const IAlgorithm* const* algoChoices,
7674  int32_t nbAlgorithms) noexcept
7675  = 0;
7676 
7677  virtual ~IAlgorithmSelector() noexcept = default;
7678 };
7679 
7686 using QuantizationFlags = uint32_t;
7687 
7695 enum class QuantizationFlag : int32_t
7696 {
7701 };
7702 
7704 template <>
7705 constexpr inline int32_t EnumMax<QuantizationFlag>() noexcept
7706 {
7707  return 1;
7708 }
7709 
7716 using BuilderFlags = uint32_t;
7717 
7725 enum class BuilderFlag : int32_t
7726 {
7727  kFP16 = 0,
7728  kINT8 = 1,
7729  kDEBUG = 2,
7730  kGPU_FALLBACK = 3,
7731  kSTRICT_TYPES = 4,
7732  kREFIT = 5,
7733  kDISABLE_TIMING_CACHE = 6,
7734 
7738  kTF32 = 7,
7739 
7741  kSPARSE_WEIGHTS = 8,
7742 
7748  kSAFETY_SCOPE = 9
7749 };
7750 
7752 template <>
7753 constexpr inline int32_t EnumMax<BuilderFlag>() noexcept
7754 {
7755  return 10;
7756 }
7757 
7768 class ITimingCache : public INoCopy
7769 {
7770 public:
7771  virtual ~ITimingCache() noexcept = default;
7772 
7783  {
7784  return mImpl->serialize();
7785  }
7786 
7806  bool combine(const ITimingCache& inputCache, bool ignoreMismatch) noexcept
7807  {
7808  return mImpl->combine(inputCache, ignoreMismatch);
7809  }
7810 
7816  bool reset() noexcept
7817  {
7818  return mImpl->reset();
7819  }
7820 
7821 protected:
7822  apiv::VTimingCache* mImpl;
7823 };
7824 
7830 class IBuilderConfig : public INoCopy
7831 {
7832 public:
7833  virtual ~IBuilderConfig() noexcept = default;
7834 
7845  virtual void setMinTimingIterations(int32_t minTiming) noexcept
7846  {
7847  mImpl->setMinTimingIterations(minTiming);
7848  }
7849 
7857  virtual int32_t getMinTimingIterations() const noexcept
7858  {
7859  return mImpl->getMinTimingIterations();
7860  }
7861 
7870  virtual void setAvgTimingIterations(int32_t avgTiming) noexcept
7871  {
7872  mImpl->setAvgTimingIterations(avgTiming);
7873  }
7874 
7882  int32_t getAvgTimingIterations() const noexcept
7883  {
7884  return mImpl->getAvgTimingIterations();
7885  }
7886 
7895  void setEngineCapability(EngineCapability capability) noexcept
7896  {
7897  mImpl->setEngineCapability(capability);
7898  }
7899 
7908  {
7909  return mImpl->getEngineCapability();
7910  }
7911 
7917  void setInt8Calibrator(IInt8Calibrator* calibrator) noexcept
7918  {
7919  mImpl->setInt8Calibrator(calibrator);
7920  }
7921 
7926  {
7927  return mImpl->getInt8Calibrator();
7928  }
7929 
7937  void setMaxWorkspaceSize(std::size_t workspaceSize) noexcept
7938  {
7939  mImpl->setMaxWorkspaceSize(workspaceSize);
7940  }
7941 
7951  std::size_t getMaxWorkspaceSize() const noexcept
7952  {
7953  return mImpl->getMaxWorkspaceSize();
7954  }
7955 
7968  void setFlags(BuilderFlags builderFlags) noexcept
7969  {
7970  mImpl->setFlags(builderFlags);
7971  }
7972 
7980  BuilderFlags getFlags() const noexcept
7981  {
7982  return mImpl->getFlags();
7983  }
7984 
7992  void clearFlag(BuilderFlag builderFlag) noexcept
7993  {
7994  mImpl->clearFlag(builderFlag);
7995  }
7996 
8004  void setFlag(BuilderFlag builderFlag) noexcept
8005  {
8006  mImpl->setFlag(builderFlag);
8007  }
8008 
8016  bool getFlag(BuilderFlag builderFlag) const noexcept
8017  {
8018  return mImpl->getFlag(builderFlag);
8019  }
8020 
8031  void setDeviceType(const ILayer* layer, DeviceType deviceType) noexcept
8032  {
8033  mImpl->setDeviceType(layer, deviceType);
8034  }
8035 
8040  DeviceType getDeviceType(const ILayer* layer) const noexcept
8041  {
8042  return mImpl->getDeviceType(layer);
8043  }
8044 
8050  bool isDeviceTypeSet(const ILayer* layer) const noexcept
8051  {
8052  return mImpl->isDeviceTypeSet(layer);
8053  }
8054 
8060  void resetDeviceType(const ILayer* layer) noexcept
8061  {
8062  mImpl->resetDeviceType(layer);
8063  }
8064 
8069  bool canRunOnDLA(const ILayer* layer) const noexcept
8070  {
8071  return mImpl->canRunOnDLA(layer);
8072  }
8073 
8084  void setDLACore(int32_t dlaCore) noexcept
8085  {
8086  mImpl->setDLACore(dlaCore);
8087  }
8088 
8095  int32_t getDLACore() const noexcept
8096  {
8097  return mImpl->getDLACore();
8098  }
8099 
8105  void setDefaultDeviceType(DeviceType deviceType) noexcept
8106  {
8107  mImpl->setDefaultDeviceType(deviceType);
8108  }
8109 
8116  {
8117  return mImpl->getDefaultDeviceType();
8118  }
8119 
8125  void reset() noexcept
8126  {
8127  mImpl->reset();
8128  }
8129 
8139  TRT_DEPRECATED void destroy() noexcept
8140  {
8141  delete this;
8142  }
8143 
8151  void setProfileStream(const cudaStream_t stream) noexcept
8152  {
8153  return mImpl->setProfileStream(stream);
8154  }
8155 
8163  cudaStream_t getProfileStream() const noexcept
8164  {
8165  return mImpl->getProfileStream();
8166  }
8167 
8179  int32_t addOptimizationProfile(const IOptimizationProfile* profile) noexcept
8180  {
8181  return mImpl->addOptimizationProfile(profile);
8182  }
8183 
8192  int32_t getNbOptimizationProfiles() const noexcept
8193  {
8194  return mImpl->getNbOptimizationProfiles();
8195  }
8196 
8205  {
8206  mImpl->setProfilingVerbosity(verbosity);
8207  }
8208 
8218  {
8219  return mImpl->getProfilingVerbosity();
8220  }
8221 
8226  void setAlgorithmSelector(IAlgorithmSelector* selector) noexcept
8227  {
8228  mImpl->setAlgorithmSelector(selector);
8229  }
8230 
8235  {
8236  return mImpl->getAlgorithmSelector();
8237  }
8238 
8249  bool setCalibrationProfile(const IOptimizationProfile* profile) noexcept
8250  {
8251  return mImpl->setCalibrationProfile(profile);
8252  }
8253 
8260  {
8261  return mImpl->getCalibrationProfile();
8262  }
8263 
8277  {
8278  mImpl->setQuantizationFlags(flags);
8279  }
8280 
8289  {
8290  return mImpl->getQuantizationFlags();
8291  }
8292 
8301  {
8302  mImpl->clearQuantizationFlag(flag);
8303  }
8304 
8313  {
8314  mImpl->setQuantizationFlag(flag);
8315  }
8316 
8324  bool getQuantizationFlag(QuantizationFlag flag) const noexcept
8325  {
8326  return mImpl->getQuantizationFlag(flag);
8327  }
8328 
8349  bool setTacticSources(TacticSources tacticSources) noexcept
8350  {
8351  return mImpl->setTacticSources(tacticSources);
8352  }
8353 
8365  {
8366  return mImpl->getTacticSources();
8367  }
8368 
8383  nvinfer1::ITimingCache* createTimingCache(const void* blob, std::size_t size) const noexcept
8384  {
8385  return mImpl->createTimingCache(blob, size);
8386  }
8387 
8406  bool setTimingCache(const ITimingCache& cache, bool ignoreMismatch) noexcept
8407  {
8408  return mImpl->setTimingCache(cache, ignoreMismatch);
8409  }
8410 
8416  const nvinfer1::ITimingCache* getTimingCache() const noexcept
8417  {
8418  return mImpl->getTimingCache();
8419  }
8420 
8421 protected:
8422  apiv::VBuilderConfig* mImpl;
8423 };
8424 
8432 
8442 enum class NetworkDefinitionCreationFlag : int32_t
8443 {
8448  kEXPLICIT_BATCH = 0,
8449 
8462  kEXPLICIT_PRECISION TRT_DEPRECATED_ENUM = 1,
8463 };
8464 
8466 template <>
8467 constexpr inline int32_t EnumMax<NetworkDefinitionCreationFlag>() noexcept
8468 {
8469  return 2;
8470 }
8471 
8479 class IBuilder : public INoCopy
8480 {
8481 public:
8482  virtual ~IBuilder() noexcept = default;
8483 
8492  void setMaxBatchSize(int32_t batchSize) noexcept
8493  {
8494  mImpl->setMaxBatchSize(batchSize);
8495  }
8496 
8505  int32_t getMaxBatchSize() const noexcept
8506  {
8507  return mImpl->getMaxBatchSize();
8508  }
8509 
8513  bool platformHasFastFp16() const noexcept
8514  {
8515  return mImpl->platformHasFastFp16();
8516  }
8517 
8521  bool platformHasFastInt8() const noexcept
8522  {
8523  return mImpl->platformHasFastInt8();
8524  }
8525 
8533  TRT_DEPRECATED void destroy() noexcept
8534  {
8535  delete this;
8536  }
8537 
8545  int32_t getMaxDLABatchSize() const noexcept
8546  {
8547  return mImpl->getMaxDLABatchSize();
8548  }
8549 
8553  int32_t getNbDLACores() const noexcept
8554  {
8555  return mImpl->getNbDLACores();
8556  }
8557 
8569  void setGpuAllocator(IGpuAllocator* allocator) noexcept
8570  {
8571  mImpl->setGpuAllocator(allocator);
8572  }
8573 
8580  {
8581  return mImpl->createBuilderConfig();
8582  }
8583 
8595  INetworkDefinition& network, IBuilderConfig& config) noexcept
8596  {
8597  return mImpl->buildEngineWithConfig(network, config);
8598  }
8599 
8612  {
8613  return mImpl->createNetworkV2(flags);
8614  }
8615 
8626  {
8627  return mImpl->createOptimizationProfile();
8628  }
8629 
8641  //
8644  void setErrorRecorder(IErrorRecorder* recorder) noexcept
8645  {
8646  mImpl->setErrorRecorder(recorder);
8647  }
8648 
8660  {
8661  return mImpl->getErrorRecorder();
8662  }
8663 
8667  void reset() noexcept
8668  {
8669  mImpl->reset();
8670  }
8671 
8675  bool platformHasTf32() const noexcept
8676  {
8677  return mImpl->platformHasTf32();
8678  }
8679 
8695  {
8696  return mImpl->buildSerializedNetwork(network, config);
8697  }
8698 
8716  bool isNetworkSupported(INetworkDefinition const& network, IBuilderConfig const& config) const noexcept
8717  {
8718  return mImpl->isNetworkSupported(network, config);
8719  }
8720 
8726  ILogger* getLogger() const noexcept
8727  {
8728  return mImpl->getLogger();
8729  }
8730 
8731 protected:
8732  apiv::VBuilder* mImpl;
8733 };
8734 
8735 } // namespace nvinfer1
8736 
8741 extern "C" TENSORRTAPI void* createInferBuilder_INTERNAL(void* logger, int32_t version) noexcept;
8742 
8743 namespace nvinfer1
8744 {
8745 namespace
8746 {
8747 
8755 inline IBuilder* createInferBuilder(ILogger& logger) noexcept
8756 {
8757  return static_cast<IBuilder*>(createInferBuilder_INTERNAL(&logger, NV_TENSORRT_VERSION));
8758 }
8759 
8760 } // namespace
8761 } // namespace nvinfer1
8762 
8763 #endif // NV_INFER_H
nvinfer1::IDeconvolutionLayer::getStrideNd
Dims getStrideNd() const noexcept
Get the multi-dimension stride of the deconvolution.
Definition: NvInfer.h:2707
nvinfer1::INetworkDefinition::removeTensor
void removeTensor(ITensor &tensor) noexcept
remove a tensor from the network definition.
Definition: NvInfer.h:6675
nvinfer1::IConvolutionLayer::setKernelSize
TRT_DEPRECATED void setKernelSize(DimsHW kernelSize) noexcept
Set the HW kernel size of the convolution.
Definition: NvInfer.h:1005
nvinfer1::IFillLayer::setDimensions
void setDimensions(Dims dimensions) noexcept
Set the output tensor's dimensions.
Definition: NvInfer.h:5487
nvinfer1::LoopOutput
LoopOutput
Enum that describes kinds of loop outputs.
Definition: NvInfer.h:4930
nvinfer1::LayerType::kTOPK
TopK layer.
nvinfer1::IPoolingLayer::getPadding
TRT_DEPRECATED DimsHW getPadding() const noexcept
Get the padding for pooling.
Definition: NvInfer.h:1768
nvinfer1::IActivationLayer::getAlpha
float getAlpha() const noexcept
Get the alpha parameter.
Definition: NvInfer.h:1612
nvinfer1::IConvolutionLayer::getStrideNd
Dims getStrideNd() const noexcept
Get the multi-dimension stride of the convolution.
Definition: NvInfer.h:1332
nvinfer1::INetworkDefinition::getErrorRecorder
IErrorRecorder * getErrorRecorder() const noexcept
get the ErrorRecorder assigned to this interface.
Definition: NvInfer.h:7139
nvinfer1::INetworkDefinition::destroy
TRT_DEPRECATED void destroy() noexcept
Destroy this INetworkDefinition object.
Definition: NvInfer.h:6418
nvinfer1::LayerType::kPLUGIN
Plugin layer.
nvinfer1::ISliceLayer::setStride
void setStride(Dims stride) noexcept
Set the stride for computing the output slice data.
Definition: NvInfer.h:4147
nvinfer1::INetworkDefinition::addInput
ITensor * addInput(const char *name, DataType type, Dims dimensions) noexcept
Add an input tensor to the network.
Definition: NvInfer.h:6049
nvinfer1::IDeconvolutionLayer::getPostPadding
Dims getPostPadding() const noexcept
Get the padding.
Definition: NvInfer.h:2628
nvinfer1::ActivationType::kHARD_SIGMOID
Hard sigmoid activation: max(0, min(1, alpha*x+beta))
nvinfer1::IConvolutionLayer::setDilationNd
void setDilationNd(Dims dilation) noexcept
Set the multi-dimension dilation of the convolution.
Definition: NvInfer.h:1376
nvinfer1::ITopKLayer::setReduceAxes
void setReduceAxes(uint32_t reduceAxes) noexcept
Set which axes to reduce for the layer.
Definition: NvInfer.h:4309
nvinfer1::IDeconvolutionLayer::getPadding
TRT_DEPRECATED DimsHW getPadding() const noexcept
Get the padding of the deconvolution.
Definition: NvInfer.h:2493
nvinfer1::ILRNLayer::setWindowSize
void setWindowSize(int32_t windowSize) noexcept
Set the LRN window size.
Definition: NvInfer.h:2014
nvinfer1::PaddingMode::kEXPLICIT_ROUND_UP
Use explicit padding, rounding output size up.
nvinfer1::IResizeLayer::setAlignCorners
TRT_DEPRECATED void setAlignCorners(bool alignCorners) noexcept
Set whether to align corners while resizing.
Definition: NvInfer.h:4806
nvinfer1::IBuilderConfig::setAlgorithmSelector
void setAlgorithmSelector(IAlgorithmSelector *selector) noexcept
Set Algorithm Selector.
Definition: NvInfer.h:8226
nvinfer1::IPaddingLayer::setPrePaddingNd
void setPrePaddingNd(Dims padding) noexcept
Set the padding that is applied at the start of the tensor.
Definition: NvInfer.h:3793
nvinfer1::IShuffleLayer::setFirstTranspose
void setFirstTranspose(Permutation permutation) noexcept
Set the permutation applied by the first transpose operation.
Definition: NvInfer.h:3876
nvinfer1::SliceMode
SliceMode
Controls how ISliceLayer handles out of bounds coordinates.
Definition: NvInfer.h:4029
nvinfer1::PaddingMode::kSAME_LOWER
Use SAME padding, with prePadding >= postPadding.
nvinfer1::RNNGateType::kUPDATE
Update gate (z).
nvinfer1::IBuilderConfig::reset
void reset() noexcept
Resets the builder configuration to defaults.
Definition: NvInfer.h:8125
NvInferRuntime.h
nvinfer1::IConvolutionLayer::setStride
TRT_DEPRECATED void setStride(DimsHW stride) noexcept
Get the stride of the convolution.
Definition: NvInfer.h:1055
nvinfer1::LayerType::kSCATTER
Scatter layer.
nvinfer1::ActivationType::kSOFTPLUS
Parametric softplus activation: alpha*log(exp(beta*x)+1)
nvinfer1::IUnaryLayer::getOperation
UnaryOperation getOperation() const noexcept
Get the unary operation for the layer.
Definition: NvInfer.h:3600
nvinfer1::IBuilderConfig::setFlag
void setFlag(BuilderFlag builderFlag) noexcept
Set a single build mode flag.
Definition: NvInfer.h:8004
nvinfer1::IDeconvolutionLayer::setPaddingNd
void setPaddingNd(Dims padding) noexcept
Set the multi-dimension padding of the deconvolution.
Definition: NvInfer.h:2725
nvinfer1::IRNNv2Layer::setOperation
void setOperation(RNNOperation op) noexcept
Set the operation of the RNN layer.
Definition: NvInfer.h:3290
nvinfer1::IFullyConnectedLayer
A fully connected layer in a network definition. This layer expects an input tensor of three or more ...
Definition: NvInfer.h:1448
nvinfer1::Permutation
Definition: NvInfer.h:3841
nvinfer1::INetworkDefinition::addSoftMax
ISoftMaxLayer * addSoftMax(ITensor &input) noexcept
Add a SoftMax layer to the network.
Definition: NvInfer.h:6205
nvinfer1::IPaddingLayer::setPostPaddingNd
void setPostPaddingNd(Dims padding) noexcept
Set the padding that is applied at the end of the tensor.
Definition: NvInfer.h:3819
nvinfer1::RNNInputMode::kSKIP
No operation is performed on the first recurrent layer.
nvinfer1::IConvolutionLayer::getKernelSize
TRT_DEPRECATED DimsHW getKernelSize() const noexcept
Get the HW kernel size of the convolution.
Definition: NvInfer.h:1017
nvinfer1::IConstantLayer
Layer that represents a constant value.
Definition: NvInfer.h:4465
nvinfer1::PaddingMode::kCAFFE_ROUND_DOWN
Use CAFFE padding, rounding output size down, uses prePadding value.
nvinfer1::LayerType::kGATHER
Gather layer.
nvinfer1::INetworkDefinition::addDeconvolution
TRT_DEPRECATED IDeconvolutionLayer * addDeconvolution(ITensor &input, int32_t nbOutputMaps, DimsHW kernelSize, Weights kernelWeights, Weights biasWeights) noexcept
Add a deconvolution layer to the network.
Definition: NvInfer.h:6245
nvinfer1::IParametricReLULayer
Layer that represents a parametric ReLU operation.
Definition: NvInfer.h:4528
nvinfer1::INetworkDefinition::addPluginV2
IPluginV2Layer * addPluginV2(ITensor *const *inputs, int32_t nbInputs, IPluginV2 &plugin) noexcept
Add a plugin layer to the network using the IPluginV2 interface.
Definition: NvInfer.h:6706
nvinfer1::IBuilderConfig::getCalibrationProfile
const IOptimizationProfile * getCalibrationProfile() noexcept
Get the current calibration profile.
Definition: NvInfer.h:8259
nvinfer1::IIfConditionalBoundaryLayer::getConditional
IIfConditional * getConditional() const noexcept
Return pointer to the IIfConditional associated with this boundary layer.
Definition: NvInfer.h:4989
nvinfer1::EnumMax< RNNDirection >
constexpr int32_t EnumMax< RNNDirection >() noexcept
Maximum number of elements in RNNDirection enum.
Definition: NvInfer.h:3167
nvinfer1::INetworkDefinition::addPadding
TRT_DEPRECATED IPaddingLayer * addPadding(ITensor &input, DimsHW prePadding, DimsHW postPadding) noexcept
Add a padding layer to the network.
Definition: NvInfer.h:6308
nvinfer1::ElementWiseOperation::kMIN
Minimum of the two elements.
nvinfer1::INetworkDefinition::addConvolutionNd
IConvolutionLayer * addConvolutionNd(ITensor &input, int32_t nbOutputMaps, Dims kernelSize, Weights kernelWeights, Weights biasWeights) noexcept
Add a multi-dimension convolution layer to the network.
Definition: NvInfer.h:6868
nvinfer1::IBuilder::getErrorRecorder
IErrorRecorder * getErrorRecorder() const noexcept
get the ErrorRecorder assigned to this interface.
Definition: NvInfer.h:8659
nvinfer1::ISoftMaxLayer::getAxes
uint32_t getAxes() const noexcept
Get the axis along which softmax occurs.
Definition: NvInfer.h:2320
nvinfer1::UnaryOperation::kFLOOR
Floor.
nvinfer1::INetworkDefinition
A network definition for input to the builder.
Definition: NvInfer.h:6009
nvinfer1::IBuilderConfig::getQuantizationFlag
bool getQuantizationFlag(QuantizationFlag flag) const noexcept
Returns true if the quantization flag is set.
Definition: NvInfer.h:8324
nvinfer1::IBuilderConfig::getFlag
bool getFlag(BuilderFlag builderFlag) const noexcept
Returns true if the build mode flag is set.
Definition: NvInfer.h:8016
nvinfer1::IQuantizeLayer::setAxis
void setAxis(int32_t axis) noexcept
Set the quantization axis.
Definition: NvInfer.h:5705
nvinfer1::UnaryOperation::kABS
Absolute value.
nvinfer1::IGatherLayer::setNbElementWiseDims
void setNbElementWiseDims(int32_t elementWiseDims) noexcept
Set the number of leading dimensions of indices tensor to be handled elementwise. The gathering of in...
Definition: NvInfer.h:3018
nvinfer1::ScaleMode::kCHANNEL
Per-channel coefficients.
nvinfer1::IPoolingLayer::setPostPadding
void setPostPadding(Dims padding) noexcept
Set the multi-dimension post-padding for pooling.
Definition: NvInfer.h:1870
nvinfer1::ITensor::setDimensions
void setDimensions(Dims dimensions) noexcept
Set the dimensions of a tensor.
Definition: NvInfer.h:239
nvinfer1::Weights
An array of weights used as a layer parameter.
Definition: NvInferRuntime.h:155
nvinfer1::IAlgorithmVariant
provides a unique 128-bit identifier, which along with the input and output information denotes the v...
Definition: NvInfer.h:7491
nvinfer1::UnaryOperation::kASINH
Inverse hyperbolic sine.
nvinfer1::IGatherLayer::getGatherAxis
int32_t getGatherAxis() const noexcept
Get the axis to gather on.
Definition: NvInfer.h:2999
nvinfer1::ITensor::isShapeTensor
bool isShapeTensor() const noexcept
Whether the tensor is a shape tensor.
Definition: NvInfer.h:477
nvinfer1::ITimingCache::combine
bool combine(const ITimingCache &inputCache, bool ignoreMismatch) noexcept
Combine input timing cache into local instance.
Definition: NvInfer.h:7806
nvinfer1::IConvolutionLayer::getNbGroups
int32_t getNbGroups() const noexcept
Get the number of groups of the convolution.
Definition: NvInfer.h:1127
nvinfer1::IPaddingLayer
Layer that represents a padding operation.
Definition: NvInfer.h:3729
nvinfer1::IBuilderConfig::canRunOnDLA
bool canRunOnDLA(const ILayer *layer) const noexcept
Checks if a layer can run on DLA.
Definition: NvInfer.h:8069
nvinfer1::INetworkDefinition::addFullyConnected
IFullyConnectedLayer * addFullyConnected(ITensor &input, int32_t nbOutputs, Weights kernelWeights, Weights biasWeights) noexcept
Add a fully connected layer to the network.
Definition: NvInfer.h:6107
nvinfer1::IConvolutionLayer
A convolution layer in a network definition.
Definition: NvInfer.h:993
nvinfer1::ITensor::setDynamicRange
bool setDynamicRange(float min, float max) noexcept
Set dynamic range for the tensor.
Definition: NvInfer.h:294
nvinfer1::LayerType::kRNN_V2
RNNv2 layer.
nvinfer1::ILayer::getOutputType
DataType getOutputType(int32_t index) const noexcept
get the output type of this layer
Definition: NvInfer.h:704
nvinfer1::IPoolingLayer::setStride
TRT_DEPRECATED void setStride(DimsHW stride) noexcept
Set the stride for pooling.
Definition: NvInfer.h:1726
nvinfer1::IActivationLayer::setActivationType
void setActivationType(ActivationType type) noexcept
Set the type of activation to be performed.
Definition: NvInfer.h:1564
nvinfer1::IRNNv2Layer::setDirection
void setDirection(RNNDirection op) noexcept
Set the direction of the RNN layer.
Definition: NvInfer.h:3332
nvinfer1::IHostMemory
Class to handle library allocated memory that is accessible to the user.
Definition: NvInferRuntime.h:173
nvinfer1::IResizeLayer::getOutputDimensions
Dims getOutputDimensions() const noexcept
Get the output dimensions.
Definition: NvInfer.h:4716
nvinfer1::IIdentityLayer
A layer that represents the identity function.
Definition: NvInfer.h:4451
nvinfer1::IConvolutionLayer::setPostPadding
void setPostPadding(Dims padding) noexcept
Set the multi-dimension post-padding of the convolution.
Definition: NvInfer.h:1248
nvinfer1::IRNNv2Layer::getOperation
RNNOperation getOperation() const noexcept
Get the operation of the RNN layer.
Definition: NvInfer.h:3299
nvinfer1::DeviceType
DeviceType
The device that this layer/network will execute on.
Definition: NvInferRuntime.h:631
nvinfer1::INetworkDefinition::getNbOutputs
int32_t getNbOutputs() const noexcept
Get the number of outputs in the network.
Definition: NvInfer.h:6390
nvinfer1::RNNDirection::kBIDIRECTION
Network iterates from first to last and vice versa and outputs concatenated.
nvinfer1::ProfilingVerbosity
ProfilingVerbosity
List of verbosity levels of layer information exposed in NVTX annotations and in IEngineInspector.
Definition: NvInferRuntime.h:1285
nvinfer1::IAlgorithm::getAlgorithmIOInfoByIndex
const IAlgorithmIOInfo * getAlgorithmIOInfoByIndex(int32_t index) const noexcept
Returns the format of an Algorithm input or output. Algorithm inputs are incrementally numbered first...
Definition: NvInfer.h:7626
nvinfer1::ISoftMaxLayer::setAxes
void setAxes(uint32_t axes) noexcept
Set the axis along which softmax is computed. Currently, only one axis can be set.
Definition: NvInfer.h:2310
nvinfer1::ActivationType::kSELU
Selu activation: x>0 ? beta * x : beta * (alpha*exp(x) - alpha)
nvinfer1::IInt8EntropyCalibrator::getAlgorithm
CalibrationAlgoType getAlgorithm() noexcept override
Definition: NvInfer.h:7337
nvinfer1::IAlgorithmSelector
Interface implemented by application for selecting and reporting algorithms of a layer provided by th...
Definition: NvInfer.h:7644
nvinfer1::RNNInputMode
RNNInputMode
Enumerates the RNN input modes that may occur with an RNN layer.
Definition: NvInfer.h:3187
nvinfer1::IFullyConnectedLayer::setBiasWeights
void setBiasWeights(Weights weights) noexcept
Set the bias weights.
Definition: NvInfer.h:1500
nvinfer1::IBuilderConfig::getNbOptimizationProfiles
int32_t getNbOptimizationProfiles() const noexcept
Get number of optimization profiles.
Definition: NvInfer.h:8192
nvinfer1::IBuilderConfig::clearFlag
void clearFlag(BuilderFlag builderFlag) noexcept
clear a single build mode flag.
Definition: NvInfer.h:7992
nvinfer1::ResizeRoundMode::kHALF_DOWN
Round half down.
nvinfer1::impl::EnumMaxImpl
Declaration of EnumMaxImpl struct to store maximum number of elements in an enumeration type.
Definition: NvInferRuntimeCommon.h:136
nvinfer1::UnaryOperation::kSQRT
Square root.
nvinfer1::IBuilderConfig::getAvgTimingIterations
int32_t getAvgTimingIterations() const noexcept
Query the number of averaging iterations.
Definition: NvInfer.h:7882
nvinfer1::INetworkDefinition::addDequantize
IDequantizeLayer * addDequantize(ITensor &input, ITensor &scale) noexcept
Add a dequantization layer to the network.
Definition: NvInfer.h:7158
nvinfer1::IDeconvolutionLayer::setDilationNd
void setDilationNd(Dims dilation) noexcept
Set the multi-dimension dilation of the deconvolution.
Definition: NvInfer.h:2771
nvinfer1::IPaddingLayer::getPostPaddingNd
Dims getPostPaddingNd() const noexcept
Get the padding that is applied at the end of the tensor.
Definition: NvInfer.h:3831
nvinfer1::ITopKLayer::getOperation
TopKOperation getOperation() const noexcept
Get the operation for the layer.
Definition: NvInfer.h:4277
nvinfer1::IIfConditional::addInput
IIfConditionalInputLayer * addInput(ITensor &input) noexcept
Add an If-conditional input.
Definition: NvInfer.h:5095
nvinfer1::UnaryOperation::kRECIP
Reciprocal.
nvinfer1::IDeconvolutionLayer::getNbGroups
int32_t getNbGroups() const noexcept
Get the number of groups for a deconvolution.
Definition: NvInfer.h:2523
nvinfer1::INetworkDefinition::hasImplicitBatchDimension
bool hasImplicitBatchDimension() const noexcept
Query whether the network was created with an implicit batch dimension.
Definition: NvInfer.h:6798
nvinfer1::IResizeLayer::getScales
int32_t getScales(int32_t size, float *scales) const noexcept
Copies resize scales to scales[0, ..., nbScales-1], where nbScales is the number of scales that were ...
Definition: NvInfer.h:4765
nvinfer1::ITripLimitLayer
Definition: NvInfer.h:5232
nvinfer1::LayerType::kRAGGED_SOFTMAX
Ragged softmax layer.
nvinfer1::ActivationType::kCLIP
Clip activation: max(alpha, min(beta, x))
nvinfer1::IShuffleLayer::getFirstTranspose
Permutation getFirstTranspose() const noexcept
Get the permutation applied by the first transpose operation.
Definition: NvInfer.h:3888
nvinfer1::LayerType::kSCALE
Scale layer.
nvinfer1::IBuilderConfig::addOptimizationProfile
int32_t addOptimizationProfile(const IOptimizationProfile *profile) noexcept
Add an optimization profile.
Definition: NvInfer.h:8179
nvinfer1::INetworkDefinition::addElementWise
IElementWiseLayer * addElementWise(ITensor &input1, ITensor &input2, ElementWiseOperation op) noexcept
Add an elementwise layer to the network.
Definition: NvInfer.h:6271
nvinfer1::IGatherLayer::getMode
GatherMode getMode() const noexcept
Get the gather mode.
Definition: NvInfer.h:3048
nvinfer1::IPluginV2
Plugin class for user-implemented layers.
Definition: NvInferRuntimeCommon.h:409
nvinfer1::IAlgorithmIOInfo
Carries information about input or output of the algorithm. IAlgorithmIOInfo for all the input and ou...
Definition: NvInfer.h:7448
nvinfer1::IAlgorithm::getTimingMSec
float getTimingMSec() const noexcept
The time in milliseconds to execute the algorithm.
Definition: NvInfer.h:7605
nvinfer1::ILRNLayer::setK
void setK(float k) noexcept
Set the LRN K value.
Definition: NvInfer.h:2077
nvinfer1::Dims32
Definition: NvInferRuntimeCommon.h:189
nvinfer1::IInt8MinMaxCalibrator
Definition: NvInfer.h:7366
nvinfer1::IAlgorithmIOInfo::getTensorFormat
TensorFormat getTensorFormat() const noexcept
Return TensorFormat of the input/output of algorithm.
Definition: NvInfer.h:7454
nvinfer1::INetworkDefinition::markOutput
void markOutput(ITensor &tensor) noexcept
Mark a tensor as a network output.
Definition: NvInfer.h:6063
nvinfer1::ActivationType::kSCALED_TANH
Scaled tanh activation: alpha*tanh(beta*x)
nvinfer1::EnumMax< FillOperation >
constexpr int32_t EnumMax< FillOperation >() noexcept
Maximum number of elements in FillOperation enum.
Definition: NvInfer.h:5445
nvinfer1::IAlgorithmContext::getNbInputs
int32_t getNbInputs() const noexcept
Return number of inputs of the algorithm.
Definition: NvInfer.h:7549
nvinfer1::ITensor::setType
void setType(DataType type) noexcept
Set the data type of a tensor.
Definition: NvInfer.h:267
nvinfer1::IPoolingLayer::setPoolingType
void setPoolingType(PoolingType type) noexcept
Set the type of activation to be performed.
Definition: NvInfer.h:1674
nvinfer1::ActivationType::kSOFTSIGN
Softsign activation: x / (1+|x|)
nvinfer1::SliceMode::kCLAMP
Out of bounds indices are clamped to bounds.
nvinfer1::BuilderFlag::kGPU_FALLBACK
Enable layers marked to execute on GPU if layer cannot execute on DLA.
nvinfer1::ITensor::resetDynamicRange
void resetDynamicRange() noexcept
Undo effect of setDynamicRange.
Definition: NvInfer.h:391
nvinfer1::IBuilder::destroy
TRT_DEPRECATED void destroy() noexcept
Destroy this object.
Definition: NvInfer.h:8533
nvinfer1::INetworkDefinition::addRaggedSoftMax
IRaggedSoftMaxLayer * addRaggedSoftMax(ITensor &input, ITensor &bounds) noexcept
Add a RaggedSoftMax layer to the network.
Definition: NvInfer.h:6530
nvinfer1::ITensor::setLocation
void setLocation(TensorLocation location) noexcept
Set the storage location of a tensor.
Definition: NvInfer.h:373
nvinfer1::LayerType::kPADDING
Padding layer.
nvinfer1::MatrixOperation::kTRANSPOSE
Like kNONE, but transpose the matrix dimensions.
nvinfer1::BuilderFlag::kREFIT
Enable building a refittable engine.
nvinfer1::IScatterLayer::getMode
ScatterMode getMode() const noexcept
Get the scatter mode.
Definition: NvInfer.h:5962
nvinfer1::IBuilder::buildSerializedNetwork
nvinfer1::IHostMemory * buildSerializedNetwork(INetworkDefinition &network, IBuilderConfig &config) noexcept
Builds and serializes a network for the given INetworkDefinition and IBuilderConfig.
Definition: NvInfer.h:8694
nvinfer1::INetworkDefinition::addSelect
ISelectLayer * addSelect(ITensor &condition, ITensor &thenInput, ITensor &elseInput) noexcept
Add a select layer to the network.
Definition: NvInfer.h:7033
nvinfer1::IDeconvolutionLayer::setPrePadding
void setPrePadding(Dims padding) noexcept
Set the multi-dimension pre-padding of the deconvolution.
Definition: NvInfer.h:2590
nvinfer1::IRNNv2Layer
An RNN layer in a network definition, version 2.
Definition: NvInfer.h:3235
nvinfer1::ILRNLayer::getAlpha
float getAlpha() const noexcept
Get the LRN alpha value.
Definition: NvInfer.h:2045
nvinfer1::IAlgorithmIOInfo::getDataType
DataType getDataType() const noexcept
Return DataType of the input/output of algorithm.
Definition: NvInfer.h:7462
nvinfer1::ITensor::setBroadcastAcrossBatch
void setBroadcastAcrossBatch(bool broadcastAcrossBatch) noexcept
Set whether to enable broadcast of tensor across the batch.
Definition: NvInfer.h:332
nvinfer1::IPoolingLayer::setPaddingMode
void setPaddingMode(PaddingMode paddingMode) noexcept
Set the padding mode.
Definition: NvInfer.h:1893
nvinfer1::UnaryOperation::kCEIL
Ceiling.
nvinfer1::ElementWiseOperation::kAND
Logical AND of two elements.
nvinfer1::IFullyConnectedLayer::getNbOutputChannels
int32_t getNbOutputChannels() const noexcept
Get the number of output channels K from the fully connected layer.
Definition: NvInfer.h:1468
nvinfer1::BuilderFlag::kINT8
Enable Int8 layer selection, with FP32 fallback with FP16 fallback if kFP16 also specified.
nvinfer1::IConvolutionLayer::getPostPadding
Dims getPostPadding() const noexcept
Get the post-padding.
Definition: NvInfer.h:1258
nvinfer1::IResizeLayer::getAlignCorners
TRT_DEPRECATED bool getAlignCorners() const noexcept
True if align corners has been set.
Definition: NvInfer.h:4819
nvinfer1::GatherMode::kND
Similar to ONNX GatherND.
nvinfer1::IPoolingLayer::getWindowSize
TRT_DEPRECATED DimsHW getWindowSize() const noexcept
Get the window size for pooling.
Definition: NvInfer.h:1710
nvinfer1::ILoop::addRecurrence
IRecurrenceLayer * addRecurrence(ITensor &initialValue) noexcept
Create a recurrence layer for this loop with initialValue as its first input.
Definition: NvInfer.h:5295
nvinfer1::IFillLayer::getDimensions
Dims getDimensions() const noexcept
Get the output tensor's dimensions.
Definition: NvInfer.h:5502
nvinfer1::DimsHW
Descriptor for two-dimensional spatial data.
Definition: NvInferLegacyDims.h:100
nvinfer1::IBuilderConfig::getProfileStream
cudaStream_t getProfileStream() const noexcept
Get the cuda stream that is used to profile this network.
Definition: NvInfer.h:8163
nvinfer1::IPoolingLayer::getStrideNd
Dims getStrideNd() const noexcept
Get the multi-dimension stride for pooling.
Definition: NvInfer.h:1952
nvinfer1::IShuffleLayer::getReshapeDimensions
Dims getReshapeDimensions() const noexcept
Get the reshaped dimensions.
Definition: NvInfer.h:3926
nvinfer1::UnaryOperation::kASIN
Inverse sine.
nvinfer1::LayerType::kFILL
Fill layer.
nvinfer1::IBuilder::platformHasFastInt8
bool platformHasFastInt8() const noexcept
Determine whether the platform has fast native int8.
Definition: NvInfer.h:8521
nvinfer1::IIfConditional::setCondition
IConditionLayer * setCondition(ITensor &condition) noexcept
Set the condition tensor for this If-Conditional construct.
Definition: NvInfer.h:5067
nvinfer1::ResizeMode
ResizeMode
Enumerates various modes of resize in the resize layer. Resize mode set using setResizeMode().
Definition: NvInfer.h:4540
nvinfer1::TensorFormat
TensorFormat
Format of the input/output tensors.
Definition: NvInferRuntimeCommon.h:220
nvinfer1::IRNNv2Layer::setWeightsForGate
void setWeightsForGate(int32_t layerIndex, RNNGateType gate, bool isW, Weights weights) noexcept
Set the weight parameters for an individual gate in the RNN.
Definition: NvInfer.h:3400
nvinfer1::ILoopOutputLayer
Definition: NvInfer.h:5174
nvinfer1::EnumMax< MatrixOperation >
constexpr int32_t EnumMax< MatrixOperation >() noexcept
Maximum number of elements in MatrixOperation enum.
Definition: NvInfer.h:4359
nvinfer1::INetworkDefinition::addUnary
IUnaryLayer * addUnary(ITensor &input, UnaryOperation operation) noexcept
Add a unary layer to the network.
Definition: NvInfer.h:6291
nvinfer1::UnaryOperation::kSINH
Hyperbolic sine.
nvinfer1::IConvolutionLayer::setBiasWeights
void setBiasWeights(Weights weights) noexcept
Set the bias weights for the convolution.
Definition: NvInfer.h:1166
nvinfer1::RNNGateType::kCELL
Cell gate (c).
nvinfer1::INetworkDefinition::addDeconvolutionNd
IDeconvolutionLayer * addDeconvolutionNd(ITensor &input, int32_t nbOutputMaps, Dims kernelSize, Weights kernelWeights, Weights biasWeights) noexcept
Add a multi-dimension deconvolution layer to the network.
Definition: NvInfer.h:6910
nvinfer1::IBuilder::createNetworkV2
nvinfer1::INetworkDefinition * createNetworkV2(NetworkDefinitionCreationFlags flags) noexcept
Create a network definition object.
Definition: NvInfer.h:8611
nvinfer1::IAlgorithmIOInfo::getStrides
Dims getStrides() const noexcept
Return strides of the input/output tensor of algorithm.
Definition: NvInfer.h:7470
nvinfer1::IPoolingLayer::setPaddingNd
void setPaddingNd(Dims padding) noexcept
Set the multi-dimension padding for pooling.
Definition: NvInfer.h:1971
nvinfer1::ILayer::getNbOutputs
int32_t getNbOutputs() const noexcept
Get the number of outputs of a layer.
Definition: NvInfer.h:577
nvinfer1::RNNGateType::kRESET
Reset gate (r).
nvinfer1::IPoolingLayer::getPoolingType
PoolingType getPoolingType() const noexcept
Get the type of activation to be performed.
Definition: NvInfer.h:1684
nvinfer1::IIfConditionalInputLayer
Definition: NvInfer.h:5026
nvinfer1::IDeconvolutionLayer::setNbOutputMaps
void setNbOutputMaps(int32_t nbOutputMaps) noexcept
Set the number of output feature maps for the deconvolution.
Definition: NvInfer.h:2420
nvinfer1::INetworkDefinition::markOutputForShapes
bool markOutputForShapes(ITensor &tensor) noexcept
Enable tensor's value to be computed by IExecutionContext::getShapeBinding.
Definition: NvInfer.h:6816
nvinfer1::LoopOutput::kREVERSE
Output value is concatenation of values of tensor for each iteration, in reverse order.
nvinfer1::LayerType::kCONDITION
Condition layer.
nvinfer1::IReduceLayer::getKeepDimensions
bool getKeepDimensions() const noexcept
Get the boolean that specifies whether or not to keep the reduced dimensions for the layer.
Definition: NvInfer.h:3709
nvinfer1::ILogger
Application-implemented logging interface for the builder, refitter and runtime.
Definition: NvInferRuntimeCommon.h:1256
nvinfer1::IAlgorithmContext
Describes the context and requirements, that could be fulfilled by one or more instances of IAlgorith...
Definition: NvInfer.h:7523
nvinfer1::ISliceLayer::getStart
Dims getStart() const noexcept
Get the start offset for the slice layer.
Definition: NvInfer.h:4104
nvinfer1::ILayer::outputTypeIsSet
bool outputTypeIsSet(int32_t index) const noexcept
whether the output type has been set for this layer
Definition: NvInfer.h:717
nvinfer1::IConvolutionLayer::getPrePadding
Dims getPrePadding() const noexcept
Get the pre-padding.
Definition: NvInfer.h:1231
nvinfer1::IConvolutionLayer::getPadding
TRT_DEPRECATED DimsHW getPadding() const noexcept
Get the padding of the convolution. If the padding is asymmetric, the pre-padding is returned.
Definition: NvInfer.h:1097
nvinfer1::EnumMax< QuantizationFlag >
constexpr int32_t EnumMax< QuantizationFlag >() noexcept
Maximum number of quantization flags in QuantizationFlag enum.
Definition: NvInfer.h:7705
nvinfer1::IScaleLayer::setChannelAxis
void setChannelAxis(int32_t channelAxis) noexcept
Set the channel axis.
Definition: NvInfer.h:2256
nvinfer1::IIteratorLayer::setReverse
void setReverse(bool reverse) noexcept
Definition: NvInfer.h:5265
nvinfer1::INetworkDefinition::addShuffle
IShuffleLayer * addShuffle(ITensor &input) noexcept
Add a shuffle layer to the network.
Definition: NvInfer.h:6322
nvinfer1::INetworkDefinition::unmarkOutput
void unmarkOutput(ITensor &tensor) noexcept
unmark a tensor as a network output.
Definition: NvInfer.h:6687
nvinfer1::QuantizationFlag::kCALIBRATE_BEFORE_FUSION
nvinfer1::IScatterLayer
A scatter layer in a network definition. Supports several kinds of scattering.
Definition: NvInfer.h:5944
nvinfer1::ICudaEngine
An engine for executing inference on a built network, with functionally unsafe features.
Definition: NvInferRuntime.h:1308
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: NvInfer.h:154
nvinfer1::ILayer::setPrecision
void setPrecision(DataType dataType) noexcept
Set the computational precision of this layer.
Definition: NvInfer.h:625
nvinfer1::IPoolingLayer::getWindowSizeNd
Dims getWindowSizeNd() const noexcept
Get the multi-dimension window size for pooling.
Definition: NvInfer.h:1927
nvinfer1::LayerType::kLOOP_OUTPUT
Loop output layer.
nvinfer1::IShuffleLayer::getSecondTranspose
Permutation getSecondTranspose() const noexcept
Get the permutation applied by the second transpose operation.
Definition: NvInfer.h:3985
nvinfer1::IRaggedSoftMaxLayer
A RaggedSoftmax layer in a network definition.
Definition: NvInfer.h:4432
nvinfer1::IReduceLayer::setKeepDimensions
void setKeepDimensions(bool keepDimensions) noexcept
Set the boolean that specifies whether or not to keep the reduced dimensions for the layer.
Definition: NvInfer.h:3699
nvinfer1::IScaleLayer::setScale
void setScale(Weights scale) noexcept
Set the scale value.
Definition: NvInfer.h:2190
nvinfer1::IConvolutionLayer::getDilationNd
Dims getDilationNd() const noexcept
Get the multi-dimension dilation of the convolution.
Definition: NvInfer.h:1386
nvinfer1::IShuffleLayer::setReshapeDimensions
void setReshapeDimensions(Dims dimensions) noexcept
Set the reshaped dimensions.
Definition: NvInfer.h:3913
nvinfer1::IBuilderConfig::clearQuantizationFlag
void clearQuantizationFlag(QuantizationFlag flag) noexcept
clear a quantization flag.
Definition: NvInfer.h:8300
nvinfer1::ILRNLayer::getK
float getK() const noexcept
Get the LRN K value.
Definition: NvInfer.h:2087
nvinfer1::PaddingMode::kSAME_UPPER
Use SAME padding, with prePadding <= postPadding.
nvinfer1::ILoopOutputLayer::getAxis
int32_t getAxis() const noexcept
Get axis being concatenated over.
Definition: NvInfer.h:5200
nvinfer1::IEinsumLayer::getEquation
const char * getEquation() const noexcept
Return the equation.
Definition: NvInfer.h:5860
nvinfer1::EnumMax< RNNInputMode >
constexpr int32_t EnumMax< RNNInputMode >() noexcept
Maximum number of elements in RNNInputMode enum.
Definition: NvInfer.h:3195
nvinfer1::IFullyConnectedLayer::setKernelWeights
void setKernelWeights(Weights weights) noexcept
Set the kernel weights, given as a KxC matrix in row-major order.
Definition: NvInfer.h:1478
nvinfer1::IRNNv2Layer::getDirection
RNNDirection getDirection() const noexcept
Get the direction of the RNN layer.
Definition: NvInfer.h:3341
nvinfer1::IAlgorithmContext::getDimensions
Dims getDimensions(int32_t index, OptProfileSelector select) const noexcept
Get the minimum / optimum / maximum dimensions for input or output tensor.
Definition: NvInfer.h:7541
nvinfer1::IDeconvolutionLayer::setKernelWeights
void setKernelWeights(Weights weights) noexcept
Set the kernel weights for the deconvolution.
Definition: NvInfer.h:2537
nvinfer1::ITensor::getDynamicRangeMin
float getDynamicRangeMin() const noexcept
Get minimum of dynamic range.
Definition: NvInfer.h:401
nvinfer1::ElementWiseOperation
ElementWiseOperation
Enumerates the binary operations that may be performed by an ElementWise layer.
Definition: NvInfer.h:2798
nvinfer1::FillOperation::kRANDOM_UNIFORM
Generate a tensor with random values drawn from a uniform distribution.
nvinfer1::IScaleLayer::getMode
ScaleMode getMode() const noexcept
Get the scale mode.
Definition: NvInfer.h:2160
nvinfer1::INetworkDefinition::addQuantize
IQuantizeLayer * addQuantize(ITensor &input, ITensor &scale) noexcept
Add a quantization layer to the network.
Definition: NvInfer.h:7197
nvinfer1::LayerType::kPLUGIN_V2
PluginV2 layer.
nvinfer1::ElementWiseOperation::kDIV
Divide the first element by the second.
nvinfer1::IScaleLayer::getChannelAxis
int32_t getChannelAxis() const noexcept
Get the channel axis.
Definition: NvInfer.h:2235
nvinfer1::IBuilderConfig::getInt8Calibrator
IInt8Calibrator * getInt8Calibrator() const noexcept
Get Int8 Calibration interface.
Definition: NvInfer.h:7925
nvinfer1::IDeconvolutionLayer::getKernelWeights
Weights getKernelWeights() const noexcept
Get the kernel weights for the deconvolution.
Definition: NvInfer.h:2547
nvinfer1::ISliceLayer
Slices an input tensor into an output tensor based on the offset and strides.
Definition: NvInfer.h:4077
nvinfer1::IConvolutionLayer::getDilation
TRT_DEPRECATED DimsHW getDilation() const noexcept
Get the dilation for a convolution.
Definition: NvInfer.h:1204
nvinfer1::IMatrixMultiplyLayer::setOperation
void setOperation(int32_t index, MatrixOperation op) noexcept
Set the operation for an input tensor.
Definition: NvInfer.h:4398
nvinfer1::SliceMode::kREFLECT
nvinfer1::ITensor::setAllowedFormats
void setAllowedFormats(TensorFormats formats) noexcept
Set allowed formats for this tensor. By default all formats are allowed. Shape tensors (for which isS...
Definition: NvInfer.h:430
nvinfer1::LayerType::kSHAPE
Shape layer.
nvinfer1::IPoolingLayer::setWindowSize
TRT_DEPRECATED void setWindowSize(DimsHW windowSize) noexcept
Set the window size for pooling.
Definition: NvInfer.h:1698
nvinfer1::ScaleMode
ScaleMode
Controls how shift, scale and power are applied in a Scale layer.
Definition: NvInfer.h:2102
nvinfer1::IBuilderConfig::getTacticSources
TacticSources getTacticSources() const noexcept
Get tactic sources.
Definition: NvInfer.h:8364
nvinfer1::PaddingMode::kEXPLICIT_ROUND_DOWN
Use explicit padding, rounding output size down.
nvinfer1::IAlgorithm::getWorkspaceSize
std::size_t getWorkspaceSize() const noexcept
The size of the GPU temporary memory in bytes which the algorithm uses at execution time.
Definition: NvInfer.h:7613
nvinfer1::ElementWiseOperation::kOR
Logical OR of two elements.
nvinfer1::INetworkDefinition::addConstant
IConstantLayer * addConstant(Dims dimensions, Weights weights) noexcept
Add a constant layer to the network.
Definition: NvInfer.h:6575
nvinfer1::LayerType::kRESIZE
Resize Layer.
nvinfer1::ReduceOperation
ReduceOperation
Enumerates the reduce operations that may be performed by a Reduce layer.
Definition: NvInfer.h:3628
nvinfer1::ActivationType::kRELU
Rectified linear activation.
nvinfer1::EnumMax< SliceMode >
constexpr int32_t EnumMax< SliceMode >() noexcept
Maximum number of elements in SliceMode enum.
Definition: NvInfer.h:4042
nvinfer1::IIteratorLayer
Definition: NvInfer.h:5245
nvinfer1::IBuilderConfig::setProfilingVerbosity
void setProfilingVerbosity(ProfilingVerbosity verbosity) noexcept
Set verbosity level of layer information exposed in NVTX annotations and IEngineInspector.
Definition: NvInfer.h:8204
nvinfer1::IShuffleLayer::setZeroIsPlaceholder
void setZeroIsPlaceholder(bool zeroIsPlaceholder) noexcept
Set meaning of 0 in reshape dimensions.
Definition: NvInfer.h:4001
nvinfer1::IResizeLayer::setOutputDimensions
void setOutputDimensions(Dims dimensions) noexcept
Set the output dimensions.
Definition: NvInfer.h:4706
nvinfer1::INetworkDefinition::unmarkOutputForShapes
bool unmarkOutputForShapes(ITensor &tensor) noexcept
Undo markOutputForShapes.
Definition: NvInfer.h:6828
nvinfer1::INetworkDefinition::getNbLayers
int32_t getNbLayers() const noexcept
Get the number of layers in the network.
Definition: NvInfer.h:6334
nvinfer1::BuilderFlag
BuilderFlag
List of valid modes that the builder can enable when creating an engine from a network definition.
Definition: NvInfer.h:7725
nvinfer1::IActivationLayer::setAlpha
void setAlpha(float alpha) noexcept
Set the alpha parameter (must be finite).
Definition: NvInfer.h:1589
nvinfer1::IActivationLayer::setBeta
void setBeta(float beta) noexcept
Set the beta parameter (must be finite).
Definition: NvInfer.h:1603
nvinfer1::IBuilderConfig::setDefaultDeviceType
void setDefaultDeviceType(DeviceType deviceType) noexcept
Sets the default DeviceType to be used by the builder. It ensures that all the layers that can run on...
Definition: NvInfer.h:8105
nvinfer1::EnumMax< TopKOperation >
constexpr int32_t EnumMax< TopKOperation >() noexcept
Maximum number of elements in TopKOperation enum.
Definition: NvInfer.h:4247
nvinfer1::ElementWiseOperation::kPOW
The first element to the power of the second element.
nvinfer1::IDeconvolutionLayer::getPaddingMode
PaddingMode getPaddingMode() const noexcept
Get the padding mode.
Definition: NvInfer.h:2654
nvinfer1::IIteratorLayer::getReverse
bool getReverse() const noexcept
True if and only if reversing input.
Definition: NvInfer.h:5271
nvinfer1::ILoopOutputLayer::setAxis
void setAxis(int32_t axis) noexcept
Set where to insert the contenation axis. Ignored if getLoopOutput() is kLAST_VALUE.
Definition: NvInfer.h:5194
nvinfer1::LayerType::kEINSUM
Einsum layer.
nvinfer1::IPoolingLayer::setBlendFactor
void setBlendFactor(float blendFactor) noexcept
Set the blending factor for the max_average_blend mode: max_average_blendPool = (1-blendFactor)*maxPo...
Definition: NvInfer.h:1783
nvinfer1::IDeconvolutionLayer::getBiasWeights
Weights getBiasWeights() const noexcept
Get the bias weights for the deconvolution.
Definition: NvInfer.h:2572
nvinfer1::EnumMax< ScaleMode >
constexpr int32_t EnumMax< ScaleMode >() noexcept
Maximum number of elements in ScaleMode enum.
Definition: NvInfer.h:2111
nvinfer1::UnaryOperation::kSIGN
Sign, If input > 0, output 1; if input < 0, output -1; if input == 0, output 0.
nvinfer1::IElementWiseLayer::getOperation
ElementWiseOperation getOperation() const noexcept
Get the binary operation for the layer.
Definition: NvInfer.h:2869
nvinfer1::IConvolutionLayer::setNbOutputMaps
void setNbOutputMaps(int32_t nbOutputMaps) noexcept
Set the number of output maps for the convolution.
Definition: NvInfer.h:1029
nvinfer1::ILayer::precisionIsSet
bool precisionIsSet() const noexcept
whether the computational precision has been set for this layer
Definition: NvInfer.h:649
nvinfer1::INetworkDefinition::setWeightsName
bool setWeightsName(Weights weights, const char *name) noexcept
Associate a name with all current uses of the given weights.
Definition: NvInfer.h:7105
nvinfer1
The TensorRT API version 1 namespace.
nvinfer1::EnumMax< RNNGateType >
constexpr int32_t EnumMax< RNNGateType >() noexcept
Maximum number of elements in RNNGateType enum.
Definition: NvInfer.h:3219
nvinfer1::IConvolutionLayer::setPadding
TRT_DEPRECATED void setPadding(DimsHW padding) noexcept
Set the padding of the convolution.
Definition: NvInfer.h:1085
nvinfer1::ILayer
Base class for all layer classes in a network definition.
Definition: NvInfer.h:517
nvinfer1::IRNNv2Layer::getCellState
ITensor * getCellState() const noexcept
Get the initial cell state of the RNN.
Definition: NvInfer.h:3497
nvinfer1::EnumMax< ReduceOperation >
constexpr int32_t EnumMax< ReduceOperation >() noexcept
Maximum number of elements in ReduceOperation enum.
Definition: NvInfer.h:3639
nvinfer1::ITensor::getAllowedFormats
TensorFormats getAllowedFormats() const noexcept
Get a bitmask of TensorFormat values that the tensor supports. For a shape tensor,...
Definition: NvInfer.h:443
nvinfer1::IConvolutionLayer::setStrideNd
void setStrideNd(Dims stride) noexcept
Set the multi-dimension stride of the convolution.
Definition: NvInfer.h:1322
nvinfer1::IPoolingLayer::setWindowSizeNd
void setWindowSizeNd(Dims windowSize) noexcept
Set the multi-dimension window size for pooling.
Definition: NvInfer.h:1917
nvinfer1::ISliceLayer::setStart
void setStart(Dims start) noexcept
Set the start offset that the slice layer uses to create the output slice.
Definition: NvInfer.h:4089
nvinfer1::UnaryOperation::kATANH
Inverse hyperbolic tangent.
nvinfer1::IResizeLayer::setCoordinateTransformation
void setCoordinateTransformation(ResizeCoordinateTransformation coordTransform) noexcept
Set coordinate transformation function.
Definition: NvInfer.h:4856
nvinfer1::UnaryOperation::kEXP
Exponentiation.
nvinfer1::IConvolutionLayer::setKernelSizeNd
void setKernelSizeNd(Dims kernelSize) noexcept
Set the multi-dimension kernel size of the convolution.
Definition: NvInfer.h:1297
nvinfer1::IReduceLayer::setReduceAxes
void setReduceAxes(uint32_t reduceAxes) noexcept
Set the axes over which to reduce.
Definition: NvInfer.h:3679
nvinfer1::INetworkDefinition::addReduce
IReduceLayer * addReduce(ITensor &input, ReduceOperation operation, uint32_t reduceAxes, bool keepDimensions) noexcept
Add a reduce layer to the network.
Definition: NvInfer.h:6446
nvinfer1::UnaryOperation::kATAN
Inverse tangent.
nvinfer1::ILoop
Definition: NvInfer.h:5286
nvinfer1::ActivationType::kTHRESHOLDED_RELU
Thresholded ReLU activation: x>alpha ? x : 0.
nvinfer1::IDeconvolutionLayer::setBiasWeights
void setBiasWeights(Weights weights) noexcept
Set the bias weights for the deconvolution.
Definition: NvInfer.h:2562
nvinfer1::IPluginV2Layer
Layer type for pluginV2.
Definition: NvInfer.h:3516
nvinfer1::LayerType::kIDENTITY
Identity layer.
nvinfer1::ISliceLayer::setMode
void setMode(SliceMode mode) noexcept
Set the slice mode.
Definition: NvInfer.h:4172
nvinfer1::IReduceLayer::setOperation
void setOperation(ReduceOperation op) noexcept
Set the reduce operation for the layer.
Definition: NvInfer.h:3659
nvinfer1::BuilderFlag::kSTRICT_TYPES
Enables strict type constraints.
nvinfer1::IPoolingLayer::setPrePadding
void setPrePadding(Dims padding) noexcept
Set the multi-dimension pre-padding for pooling.
Definition: NvInfer.h:1842
nvinfer1::INetworkDefinition::addConcatenation
IConcatenationLayer * addConcatenation(ITensor *const *inputs, int32_t nbInputs) noexcept
Add a concatenation layer to the network.
Definition: NvInfer.h:6222
nvinfer1::RNNGateType::kOUTPUT
Output gate (o).
nvinfer1::EnumMax< LoopOutput >
constexpr int32_t EnumMax< LoopOutput >() noexcept
Maximum number of elements in LoopOutput enum.
Definition: NvInfer.h:4944
nvinfer1::IBuilder::platformHasFastFp16
bool platformHasFastFp16() const noexcept
Determine whether the platform has fast native fp16.
Definition: NvInfer.h:8513
nvinfer1::IDeconvolutionLayer::getNbOutputMaps
int32_t getNbOutputMaps() const noexcept
Get the number of output feature maps for the deconvolution.
Definition: NvInfer.h:2430
nvinfer1::LayerType::kDECONVOLUTION
Deconvolution layer.
nvinfer1::ITimingCache::serialize
nvinfer1::IHostMemory * serialize() const noexcept
Serialize a timing cache to IHostMemory object.
Definition: NvInfer.h:7782
nvinfer1::IRNNv2Layer::getHiddenSize
int32_t getHiddenSize() const noexcept
Get the hidden size of the RNN.
Definition: NvInfer.h:3242
nvinfer1::INetworkDefinition::addResize
IResizeLayer * addResize(ITensor &input) noexcept
Add a resize layer to the network.
Definition: NvInfer.h:6962
nvinfer1::IPaddingLayer::getPrePaddingNd
Dims getPrePaddingNd() const noexcept
Get the padding that is applied at the start of the tensor.
Definition: NvInfer.h:3805
nvinfer1::IElementWiseLayer
A elementwise layer in a network definition.
Definition: NvInfer.h:2845
nvinfer1::IBuilderConfig::setTacticSources
bool setTacticSources(TacticSources tacticSources) noexcept
Set tactic sources.
Definition: NvInfer.h:8349
nvinfer1::RNNDirection::kUNIDIRECTION
Network iterations from first input to last input.
nvinfer1::IMatrixMultiplyLayer::getOperation
MatrixOperation getOperation(int32_t index) const noexcept
Get the operation for an input tensor.
Definition: NvInfer.h:4408
nvinfer1::UnaryOperation::kACOSH
Inverse hyperbolic cosine.
nvinfer1::IConvolutionLayer::getBiasWeights
Weights getBiasWeights() const noexcept
Get the bias weights for the convolution.
Definition: NvInfer.h:1176
nvinfer1::INetworkDefinition::setErrorRecorder
void setErrorRecorder(IErrorRecorder *recorder) noexcept
Set the ErrorRecorder for this interface.
Definition: NvInfer.h:7124
nvinfer1::IDeconvolutionLayer::setPostPadding
void setPostPadding(Dims padding) noexcept
Set the multi-dimension post-padding of the deconvolution.
Definition: NvInfer.h:2618
nvinfer1::IScatterLayer::setAxis
void setAxis(int32_t axis) noexcept
Set the axis used by ScatterMode::kELEMENTS.
Definition: NvInfer.h:5972
nvinfer1::TripLimit::kWHILE
Tensor is a scalar of type kBOOL. Loop terminates when value is false.
nvinfer1::ILayer::getName
const char * getName() const noexcept
Return the name of a layer.
Definition: NvInfer.h:548
nvinfer1::RNNGateType
RNNGateType
Identifies an individual gate within an RNN cell.
Definition: NvInfer.h:3207
nvinfer1::LayerType::kSELECT
Select layer.
nvinfer1::ILayer::setOutputType
void setOutputType(int32_t index, DataType dataType) noexcept
Set the output type of this layer.
Definition: NvInfer.h:690
nvinfer1::ILoopBoundaryLayer::getLoop
ILoop * getLoop() const noexcept
Return pointer to ILoop associated with this boundary layer.
Definition: NvInfer.h:4970
nvinfer1::IConvolutionLayer::setKernelWeights
void setKernelWeights(Weights weights) noexcept
Set the kernel weights for the convolution.
Definition: NvInfer.h:1141
nvinfer1::ElementWiseOperation::kEQUAL
Check if two elements are equal.
nvinfer1::IFullyConnectedLayer::setNbOutputChannels
void setNbOutputChannels(int32_t nbOutputs) noexcept
Set the number of output channels K from the fully connected layer.
Definition: NvInfer.h:1458
nvinfer1::IFullyConnectedLayer::getKernelWeights
Weights getKernelWeights() const noexcept
Get the kernel weights.
Definition: NvInfer.h:1488
nvinfer1::EnumMax< CalibrationAlgoType >
constexpr int32_t EnumMax< CalibrationAlgoType >() noexcept
Maximum number of elements in CalibrationAlgoType enum.
Definition: NvInfer.h:7250
nvinfer1::ITopKLayer::setK
void setK(int32_t k) noexcept
Set the k value for the layer.
Definition: NvInfer.h:4289
nvinfer1::ITensor::getDimensions
Dims getDimensions() const noexcept
Get the dimensions of a tensor.
Definition: NvInfer.h:252
nvinfer1::INetworkDefinition::addSlice
ISliceLayer * addSlice(ITensor &input, Dims start, Dims size, Dims stride) noexcept
Add a slice layer to the network.
Definition: NvInfer.h:6725
nvinfer1::IBuilderConfig::getDLACore
int32_t getDLACore() const noexcept
Get the DLA core that the engine executes on.
Definition: NvInfer.h:8095
nvinfer1::NetworkDefinitionCreationFlag::kEXPLICIT_PRECISION
nvinfer1::IResizeLayer::getCoordinateTransformation
ResizeCoordinateTransformation getCoordinateTransformation() const noexcept
Get coordinate transformation function.
Definition: NvInfer.h:4866
nvinfer1::IResizeLayer::setNearestRounding
void setNearestRounding(ResizeRoundMode value) noexcept
Set rounding mode for nearest neighbor resize.
Definition: NvInfer.h:4909
nvinfer1::IBuilderConfig::getEngineCapability
EngineCapability getEngineCapability() const noexcept
Query EngineCapability flow configured for the builder.
Definition: NvInfer.h:7907
nvinfer1::IDeconvolutionLayer::setNbGroups
void setNbGroups(int32_t nbGroups) noexcept
Set the number of groups for a deconvolution.
Definition: NvInfer.h:2513
nvinfer1::ILoop::addTripLimit
ITripLimitLayer * addTripLimit(ITensor &tensor, TripLimit limit) noexcept
Add a trip-count limiter, based on the given tensor.
Definition: NvInfer.h:5316
nvinfer1::INetworkDefinition::addFill
IFillLayer * addFill(Dims dimensions, FillOperation op) noexcept
Add a fill layer to the network.
Definition: NvInfer.h:7068
nvinfer1::ILayer::setName
void setName(const char *name) noexcept
Set the name of a layer.
Definition: NvInfer.h:537
nvinfer1::IUnaryLayer::setOperation
void setOperation(UnaryOperation op) noexcept
Set the unary operation for the layer.
Definition: NvInfer.h:3590
nvinfer1::UnaryOperation
UnaryOperation
Enumerates the unary operations that may be performed by a Unary layer.
Definition: NvInfer.h:3541
nvinfer1::BuilderFlag::kDISABLE_TIMING_CACHE
Disable reuse of timing information across identical layers.
nvinfer1::ITimingCache
Class to handle tactic timing info collected from builder.
Definition: NvInfer.h:7768
nvinfer1::LoopOutput::kLAST_VALUE
Output value is value of tensor for last iteration.
nvinfer1::MatrixOperation::kNONE
nvinfer1::BuilderFlag::kSAFETY_SCOPE
nvinfer1::IScatterLayer::getAxis
int32_t getAxis() const noexcept
Get the axis.
Definition: NvInfer.h:5980
nvinfer1::ILRNLayer::getWindowSize
int32_t getWindowSize() const noexcept
Get the LRN window size.
Definition: NvInfer.h:2024
nvinfer1::IPoolingLayer::getPrePadding
Dims getPrePadding() const noexcept
Get the pre-padding.
Definition: NvInfer.h:1852
nvinfer1::MatrixOperation::kVECTOR
nvinfer1::ILayer::getInput
ITensor * getInput(int32_t index) const noexcept
Get the layer input corresponding to the given index.
Definition: NvInfer.h:569
nvinfer1::IResizeLayer::getNearestRounding
ResizeRoundMode getNearestRounding() const noexcept
Get rounding mode for nearest neighbor resize.
Definition: NvInfer.h:4919
nvinfer1::ISliceLayer::getSize
Dims getSize() const noexcept
Get dimensions of the output slice.
Definition: NvInfer.h:4133
nvinfer1::EnumMax< RNNOperation >
constexpr int32_t EnumMax< RNNOperation >() noexcept
Maximum number of elements in RNNOperation enum.
Definition: NvInfer.h:3147
nvinfer1::EnumMax< ScatterMode >
constexpr int32_t EnumMax< ScatterMode >() noexcept
Maximum number of elements in ScatterMode enum.
Definition: NvInfer.h:5883
nvinfer1::IScaleLayer::setPower
void setPower(Weights power) noexcept
Set the power value.
Definition: NvInfer.h:2210
nvinfer1::IShapeLayer
Layer type for getting shape of a tensor.
Definition: NvInfer.h:4227
nvinfer1::SliceMode::kWRAP
Coordinates wrap around periodically.
nvinfer1::ITensor::getName
const char * getName() const noexcept
Get the tensor name.
Definition: NvInfer.h:220
nvinfer1::INetworkDefinition::addTopK
ITopKLayer * addTopK(ITensor &input, TopKOperation op, int32_t k, uint32_t reduceAxes) noexcept
Add a TopK layer to the network.
Definition: NvInfer.h:6480
nvinfer1::IDequantizeLayer::setAxis
void setAxis(int32_t axis) noexcept
Set the quantization axis.
Definition: NvInfer.h:5792
nvinfer1::ILRNLayer::getBeta
float getBeta() const noexcept
Get the LRN beta value.
Definition: NvInfer.h:2066
nvinfer1::ILayer::setInput
void setInput(int32_t index, ITensor &tensor) noexcept
Replace an input of this layer with a specific tensor.
Definition: NvInfer.h:605
nvinfer1::INetworkDefinition::addEinsum
IEinsumLayer * addEinsum(ITensor *const *inputs, int32_t nbInputs, const char *equation) noexcept
Add an Einsum layer to the network.
Definition: NvInfer.h:7226
nvinfer1::IAssertionLayer::setMessage
void setMessage(const char *message) noexcept
Set the message to print if the assertion fails.
Definition: NvInfer.h:5409
nvinfer1::NetworkDefinitionCreationFlag
NetworkDefinitionCreationFlag
List of immutable network properties expressed at network creation time. NetworkDefinitionCreationFla...
Definition: NvInfer.h:8442
nvinfer1::IBuilderConfig::getMaxWorkspaceSize
std::size_t getMaxWorkspaceSize() const noexcept
Get the maximum workspace size.
Definition: NvInfer.h:7951
nvinfer1::RNNGateType::kINPUT
Input gate (i).
nvinfer1::ResizeMode::kNEAREST
ND (0 < N <= 8) nearest neighbor resizing.
nvinfer1::ILoop::getName
const char * getName() const noexcept
Return the name of the loop.
Definition: NvInfer.h:5364
nvinfer1::IScaleLayer::setShift
void setShift(Weights shift) noexcept
Set the shift value.
Definition: NvInfer.h:2170
nvinfer1::FillOperation::kLINSPACE
Generate evenly spaced numbers over a specified interval.
nvinfer1::UnaryOperation::kCOSH
Hyperbolic cosine.
nvinfer1::PaddingMode
PaddingMode
Enumerates the modes of padding to perform in convolution, deconvolution and pooling layer,...
Definition: NvInfer.h:961
nvinfer1::IFillLayer::setAlpha
void setAlpha(double alpha) noexcept
Set the alpha parameter.
Definition: NvInfer.h:5540
nvinfer1::IPaddingLayer::getPostPadding
TRT_DEPRECATED DimsHW getPostPadding() const noexcept
Get the padding that is applied at the end of the tensor.
Definition: NvInfer.h:3779
nvinfer1::IBuilderConfig::setEngineCapability
void setEngineCapability(EngineCapability capability) noexcept
Configure the builder to target specified EngineCapability flow.
Definition: NvInfer.h:7895
nvinfer1::IIfConditional::setName
void setName(const char *name) noexcept
Set the name of the conditional.
Definition: NvInfer.h:5108
nvinfer1::IBuilderConfig::getDeviceType
DeviceType getDeviceType(const ILayer *layer) const noexcept
Get the device that this layer executes on.
Definition: NvInfer.h:8040
nvinfer1::RNNInputMode::kLINEAR
Perform the normal matrix multiplication in the first recurrent layer.
nvinfer1::ResizeCoordinateTransformation::kHALF_PIXEL
nvinfer1::IPoolingLayer::getPostPadding
Dims getPostPadding() const noexcept
Get the padding.
Definition: NvInfer.h:1880
nvinfer1::IInt8LegacyCalibrator::getAlgorithm
CalibrationAlgoType getAlgorithm() noexcept override
Definition: NvInfer.h:7390
nvinfer1::IScaleLayer::setMode
void setMode(ScaleMode mode) noexcept
Set the scale mode.
Definition: NvInfer.h:2150
nvinfer1::IScatterLayer::setMode
void setMode(ScatterMode mode) noexcept
Set the scatter mode.
Definition: NvInfer.h:5952
nvinfer1::IConvolutionLayer::getPaddingMode
PaddingMode getPaddingMode() const noexcept
Get the padding mode.
Definition: NvInfer.h:1284
nvinfer1::INetworkDefinition::addActivation
IActivationLayer * addActivation(ITensor &input, ActivationType type) noexcept
Add an activation layer to the network.
Definition: NvInfer.h:6127
nvinfer1::ITimingCache::reset
bool reset() noexcept
Empty the timing cache.
Definition: NvInfer.h:7816
nvinfer1::MatrixOperation
MatrixOperation
Enumerates the operations that may be performed on a tensor by IMatrixMultiplyLayer before multiplica...
Definition: NvInfer.h:4335
nvinfer1::ILayer::getOutput
ITensor * getOutput(int32_t index) const noexcept
Get the layer output corresponding to the given index.
Definition: NvInfer.h:588
nvinfer1::IAlgorithmContext::getName
const char * getName() const noexcept
Return name of the algorithm node. This is a unique identifier for the IAlgorithmContext.
Definition: NvInfer.h:7530
nvinfer1::ResizeSelector::kFORMULA
Use formula to map the original index.
nvinfer1::IOptimizationProfile
Optimization profile for dynamic input dimensions and shape tensors.
Definition: NvInferRuntime.h:1092
nvinfer1::INetworkDefinition::addPaddingNd
TRT_DEPRECATED IPaddingLayer * addPaddingNd(ITensor &input, Dims prePadding, Dims postPadding) noexcept
Add a padding layer to the network. Only 2D padding is currently supported.
Definition: NvInfer.h:7085
nvinfer1::PoolingType
PoolingType
The type of pooling to perform in a pooling layer.
Definition: NvInfer.h:1636
nvinfer1::ITensor::getDynamicRangeMax
float getDynamicRangeMax() const noexcept
Get maximum of dynamic range.
Definition: NvInfer.h:411
nvinfer1::INetworkDefinition::addLRN
ILRNLayer * addLRN(ITensor &input, int32_t window, float alpha, float beta, float k) noexcept
Add a LRN layer to the network.
Definition: NvInfer.h:6165
nvinfer1::ILRNLayer::setBeta
void setBeta(float beta) noexcept
Set the LRN beta value.
Definition: NvInfer.h:2056
nvinfer1::ILayer::resetOutputType
void resetOutputType(int32_t index) noexcept
reset the output type for this layer
Definition: NvInfer.h:729
nvinfer1::ITensor::getType
DataType getType() const noexcept
Get the data type of a tensor.
Definition: NvInfer.h:279
nvinfer1::IActivationLayer::getActivationType
ActivationType getActivationType() const noexcept
Get the type of activation to be performed.
Definition: NvInfer.h:1574
nvinfer1::LayerType::kSLICE
Slice layer.
nvinfer1::ResizeSelector
ResizeSelector
The coordinate selector when resize to single pixel output.
Definition: NvInfer.h:4613
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::IRNNv2Layer::setHiddenState
void setHiddenState(ITensor &hidden) noexcept
Set the initial hidden state of the RNN with the provided hidden ITensor.
Definition: NvInfer.h:3460
nvinfer1::ILayer::getPrecision
DataType getPrecision() const noexcept
get the computational precision of this layer
Definition: NvInfer.h:637
nvinfer1::IRNNv2Layer::getSequenceLengths
ITensor * getSequenceLengths() const noexcept
Get the sequence lengths specified for the RNN.
Definition: NvInfer.h:3281
nvinfer1::TacticSources
uint32_t TacticSources
Represents a collection of one or more TacticSource values combine using bitwise-OR operations.
Definition: NvInferRuntime.h:1274
nvinfer1::DataType
DataType
The type of weights and tensors.
Definition: NvInferRuntimeCommon.h:150
nvinfer1::IBuilder::setMaxBatchSize
void setMaxBatchSize(int32_t batchSize) noexcept
Set the maximum batch size.
Definition: NvInfer.h:8492
nvinfer1::IDeconvolutionLayer::getKernelSizeNd
Dims getKernelSizeNd() const noexcept
Get the multi-dimension kernel size of the deconvolution.
Definition: NvInfer.h:2679
nvinfer1::IBuilderConfig::setQuantizationFlags
void setQuantizationFlags(QuantizationFlags flags) noexcept
Set the quantization flags.
Definition: NvInfer.h:8276
nvinfer1::ActivationType::kELU
Elu activation: x>=0 ? x : alpha * (exp(x) - 1).
nvinfer1::IBuilder::getMaxBatchSize
int32_t getMaxBatchSize() const noexcept
Get the maximum batch size.
Definition: NvInfer.h:8505
nvinfer1::IBuilderConfig::resetDeviceType
void resetDeviceType(const ILayer *layer) noexcept
reset the DeviceType for this layer
Definition: NvInfer.h:8060
nvinfer1::IConcatenationLayer
A concatenation layer in a network definition.
Definition: NvInfer.h:2342
nvinfer1::LayerType::kSOFTMAX
SoftMax layer.
nvinfer1::IShuffleLayer
Layer type for shuffling data.
Definition: NvInfer.h:3864
nvinfer1::IPaddingLayer::getPrePadding
TRT_DEPRECATED DimsHW getPrePadding() const noexcept
Get the padding that is applied at the start of the tensor.
Definition: NvInfer.h:3753
nvinfer1::IShuffleLayer::getZeroIsPlaceholder
bool getZeroIsPlaceholder() const noexcept
Get meaning of 0 in reshape dimensions.
Definition: NvInfer.h:4014
nvinfer1::IGatherLayer::setMode
void setMode(GatherMode mode) noexcept
Set the gather mode.
Definition: NvInfer.h:3038
nvinfer1::IScaleLayer::getShift
Weights getShift() const noexcept
Get the shift value.
Definition: NvInfer.h:2180
nvinfer1::RNNOperation
RNNOperation
Enumerates the RNN operations that may be performed by an RNN layer.
Definition: NvInfer.h:3137
nvinfer1::ITensor
A tensor in a network definition.
Definition: NvInfer.h:193
nvinfer1::IConvolutionLayer::getKernelSizeNd
Dims getKernelSizeNd() const noexcept
Get the multi-dimension kernel size of the convolution.
Definition: NvInfer.h:1307
nvinfer1::ActivationType::kTANH
TanH activation.
nvinfer1::IRecurrenceLayer
Definition: NvInfer.h:5129
nvinfer1::IBuilderConfig::getFlags
BuilderFlags getFlags() const noexcept
Get the build mode flags for this builder config. Defaults to 0.
Definition: NvInfer.h:7980
nvinfer1::INetworkDefinition::addLoop
ILoop * addLoop() noexcept
Add a loop to the network.
Definition: NvInfer.h:6995
nvinfer1::QuantizationFlags
uint32_t QuantizationFlags
Represents one or more QuantizationFlag values using binary OR operations.
Definition: NvInfer.h:7686
nvinfer1::ResizeSelector::kUPPER
Select the upper left pixel.
nvinfer1::LayerType::kTRIP_LIMIT
Loop Trip limit layer.
nvinfer1::IRNNv2Layer::getDataLength
int32_t getDataLength() const noexcept
Get the maximum data length of the RNN.
Definition: NvInfer.h:3250
nvinfer1::IPoolingLayer::getPaddingMode
PaddingMode getPaddingMode() const noexcept
Get the padding mode.
Definition: NvInfer.h:1904
nvinfer1::ElementWiseOperation::kFLOOR_DIV
Floor division of the first element by the second.
nvinfer1::LayerType::kQUANTIZE
Quantize layer.
nvinfer1::IGatherLayer::setGatherAxis
void setGatherAxis(int32_t axis) noexcept
Set the axis used by GatherMode::kELEMENTS and GatherMode::kDEFAULT The axis must be less than the nu...
Definition: NvInfer.h:2988
nvinfer1::IAssertionLayer::getMessage
const char * getMessage() const noexcept
Return the assertion message.
Definition: NvInfer.h:5419
nvinfer1::LayerType
LayerType
The type values of layer classes.
Definition: NvInfer.h:89
nvinfer1::IGatherLayer::getNbElementWiseDims
int32_t getNbElementWiseDims() const noexcept
Get the number of leading dimensions of indices tensor to be handled elementwise.
Definition: NvInfer.h:3028
nvinfer1::IBuilderConfig::setProfileStream
void setProfileStream(const cudaStream_t stream) noexcept
Set the cuda stream that is used to profile this network.
Definition: NvInfer.h:8151
nvinfer1::UnaryOperation::kTAN
Tangent.
nvinfer1::BuilderFlag::kTF32
nvinfer1::IBuilder::createBuilderConfig
nvinfer1::IBuilderConfig * createBuilderConfig() noexcept
Create a builder configuration object.
Definition: NvInfer.h:8579
nvinfer1::ILayer::resetPrecision
void resetPrecision() noexcept
reset the computational precision for this layer
Definition: NvInfer.h:659
nvinfer1::ScaleMode::kUNIFORM
Identical coefficients across all elements of the tensor.
nvinfer1::ILRNLayer
A LRN layer in a network definition.
Definition: NvInfer.h:2002
nvinfer1::RNNDirection
RNNDirection
Enumerates the RNN direction that may be performed by an RNN layer.
Definition: NvInfer.h:3159
nvinfer1::IBuilderConfig::getDefaultDeviceType
DeviceType getDefaultDeviceType() const noexcept
Get the default DeviceType which was set by setDefaultDeviceType.
Definition: NvInfer.h:8115
nvinfer1::RNNOperation::kLSTM
Four-gate LSTM network w/o peephole connections.
nvinfer1::INetworkDefinition::getLayer
ILayer * getLayer(int32_t index) const noexcept
Get the layer specified by the given index.
Definition: NvInfer.h:6348
nvinfer1::ElementWiseOperation::kGREATER
Check if element in first tensor is greater than corresponding element in second tensor.
nvinfer1::IFillLayer::getOperation
FillOperation getOperation() const noexcept
Get the fill operation for the layer.
Definition: NvInfer.h:5522
nvinfer1::IBuilder::reset
void reset() noexcept
Resets the builder state to default values.
Definition: NvInfer.h:8667
nvinfer1::TripLimit
TripLimit
Enum that describes kinds of trip limits.
Definition: NvInfer.h:4950
nvinfer1::IReduceLayer
Layer that represents a reduction operator across Shape, Int32, Float, Half, and Int8 tensors.
Definition: NvInfer.h:3651
nvinfer1::IResizeLayer::getResizeMode
ResizeMode getResizeMode() const noexcept
Get resize mode for an input tensor.
Definition: NvInfer.h:4789
nvinfer1::IMatrixMultiplyLayer
Layer that represents a Matrix Multiplication.
Definition: NvInfer.h:4389
nvinfer1::IPoolingLayer::getBlendFactor
float getBlendFactor() const noexcept
Get the blending factor for the max_average_blend mode: max_average_blendPool = (1-blendFactor)*maxPo...
Definition: NvInfer.h:1796
nvinfer1::ElementWiseOperation::kXOR
Logical XOR of two elements.
nvinfer1::IDequantizeLayer::getAxis
int32_t getAxis() const noexcept
Get the quantization axis.
Definition: NvInfer.h:5781
nvinfer1::ElementWiseOperation::kSUB
Substract the second element from the first.
nvinfer1::IConstantLayer::setDimensions
void setDimensions(Dims dimensions) noexcept
Set the dimensions for the layer.
Definition: NvInfer.h:4499
nvinfer1::ActivationType::kLEAKY_RELU
LeakyRelu activation: x>=0 ? x : alpha * x.
nvinfer1::FillOperation
FillOperation
Enumerates the tensor fill operations that may performed by a fill layer.
Definition: NvInfer.h:5437
nvinfer1::INetworkDefinition::addScatter
IScatterLayer * addScatter(ITensor &data, ITensor &indices, ITensor &updates, ScatterMode mode) noexcept
Add a Scatter layer to the network with specified mode and axis=0.
Definition: NvInfer.h:7178
nvinfer1::INetworkDefinition::addPooling
TRT_DEPRECATED IPoolingLayer * addPooling(ITensor &input, PoolingType type, DimsHW windowSize) noexcept
Add a pooling layer to the network.
Definition: NvInfer.h:6146
nvinfer1::INoCopy
Forward declaration of IEngineInspector for use by other interfaces.
Definition: NvInferRuntime.h:79
nvinfer1::ISliceLayer::setSize
void setSize(Dims size) noexcept
Set the dimensions of the output slice.
Definition: NvInfer.h:4118
nvinfer1::IRNNv2Layer::setBiasForGate
void setBiasForGate(int32_t layerIndex, RNNGateType gate, bool isW, Weights bias) noexcept
Set the bias parameters for an individual gate in the RNN.
Definition: NvInfer.h:3434
nvinfer1::IInt8EntropyCalibrator2
Definition: NvInfer.h:7349
nvinfer1::LayerType::kITERATOR
Loop Iterator layer.
nvinfer1::INetworkDefinition::hasExplicitPrecision
TRT_DEPRECATED bool hasExplicitPrecision() const noexcept
True if network is an explicit precision network.
Definition: NvInfer.h:6979
nvinfer1::IFillLayer
Generate an output tensor with specified mode.
Definition: NvInfer.h:5475
nvinfer1::LayerType::kCONSTANT
Constant layer.
nvinfer1::QuantizationFlag
QuantizationFlag
List of valid flags for quantizing the network to int8.
Definition: NvInfer.h:7695
nvinfer1::IFillLayer::getAlpha
double getAlpha() const noexcept
Get the value of alpha parameter.
Definition: NvInfer.h:5555
nvinfer1::ILoop::addLoopOutput
ILoopOutputLayer * addLoopOutput(ITensor &tensor, LoopOutput outputKind, int32_t axis=0) noexcept
Make an output for this loop, based on the given tensor.
Definition: NvInfer.h:5341
nvinfer1::IBuilderConfig::setQuantizationFlag
void setQuantizationFlag(QuantizationFlag flag) noexcept
Set a single quantization flag.
Definition: NvInfer.h:8312
nvinfer1::IInt8Calibrator
Application-implemented interface for calibration.
Definition: NvInfer.h:7266
nvinfer1::IErrorRecorder
Reference counted application-implemented error reporting interface for TensorRT objects.
Definition: NvInferRuntimeCommon.h:1439
nvinfer1::INetworkDefinition::addIfConditional
IIfConditional * addIfConditional() noexcept
Add an If-conditional layer to the network.
Definition: NvInfer.h:7212
nvinfer1::IBuilder::setGpuAllocator
void setGpuAllocator(IGpuAllocator *allocator) noexcept
Set the GPU allocator.
Definition: NvInfer.h:8569
nvinfer1::LayerType::kRECURRENCE
Loop Recurrence layer.
nvinfer1::ITopKLayer
Layer that represents a TopK reduction.
Definition: NvInfer.h:4259
nvinfer1::IResizeLayer::setResizeMode
void setResizeMode(ResizeMode resizeMode) noexcept
Set resize mode for an input tensor.
Definition: NvInfer.h:4779
nvinfer1::IPaddingLayer::setPrePadding
TRT_DEPRECATED void setPrePadding(DimsHW padding) noexcept
Set the padding that is applied at the start of the tensor.
Definition: NvInfer.h:3741
nvinfer1::ResizeRoundMode
ResizeRoundMode
The rounding mode for nearest neighbor resize.
Definition: NvInfer.h:4639
nvinfer1::IConvolutionLayer::getPaddingNd
Dims getPaddingNd() const noexcept
Get the multi-dimension padding of the convolution.
Definition: NvInfer.h:1362
nvinfer1::IIteratorLayer::getAxis
int32_t getAxis() const noexcept
Get axis being iterated over.
Definition: NvInfer.h:5255
nvinfer1::ResizeCoordinateTransformation::kASYMMETRIC
nvinfer1::OptProfileSelector
OptProfileSelector
When setting or querying optimization profile parameters (such as shape tensor inputs or dynamic dime...
Definition: NvInferRuntime.h:1056
nvinfer1::ITensor::getLocation
TensorLocation getLocation() const noexcept
Get the storage location of a tensor.
Definition: NvInfer.h:358
nvinfer1::IConvolutionLayer::setPrePadding
void setPrePadding(Dims padding) noexcept
Set the multi-dimension pre-padding of the convolution.
Definition: NvInfer.h:1221
nvinfer1::GatherMode::kDEFAULT
Similar to ONNX Gather.
nvinfer1::BuilderFlags
uint32_t BuilderFlags
Represents one or more QuantizationFlag values using binary OR operations, e.g., 1U << BuilderFlag::k...
Definition: NvInfer.h:7716
nvinfer1::ActivationType::kSIGMOID
Sigmoid activation.
nvinfer1::PaddingMode::kCAFFE_ROUND_UP
Use CAFFE padding, rounding output size up, uses prePadding value.
nvinfer1::ISelectLayer
Definition: NvInfer.h:5377
nvinfer1::IConcatenationLayer::setAxis
void setAxis(int32_t axis) noexcept
Set the axis along which concatenation occurs.
Definition: NvInfer.h:2355
nvinfer1::NetworkDefinitionCreationFlags
uint32_t NetworkDefinitionCreationFlags
Represents one or more NetworkDefinitionCreationFlag flags using binary OR operations....
Definition: NvInfer.h:8431
nvinfer1::ILayer::getNbInputs
int32_t getNbInputs() const noexcept
Get the number of inputs of a layer.
Definition: NvInfer.h:556
nvinfer1::IConstantLayer::getWeights
Weights getWeights() const noexcept
Get the weights for the layer.
Definition: NvInfer.h:4487
nvinfer1::INetworkDefinition::addGather
IGatherLayer * addGather(ITensor &data, ITensor &indices, int32_t axis) noexcept
Add gather with mode GatherMode::kDEFAULT and specified axis and nbElementWiseDims=0.
Definition: NvInfer.h:6496
nvinfer1::IDeconvolutionLayer::getDilationNd
Dims getDilationNd() const noexcept
Get the multi-dimension dilation of the deconvolution.
Definition: NvInfer.h:2781
nvinfer1::INetworkDefinition::getOutput
ITensor * getOutput(int32_t index) const noexcept
Get the output tensor specified by the given index.
Definition: NvInfer.h:6406
NvInferLegacyDims.h
nvinfer1::INetworkDefinition::addIdentity
IIdentityLayer * addIdentity(ITensor &input) noexcept
Add an identity layer.
Definition: NvInfer.h:6660
nvinfer1::IDeconvolutionLayer::setStride
TRT_DEPRECATED void setStride(DimsHW stride) noexcept
Set the stride of the deconvolution.
Definition: NvInfer.h:2447
nvinfer1::ITensor::dynamicRangeIsSet
bool dynamicRangeIsSet() const noexcept
Query whether dynamic range is set.
Definition: NvInfer.h:383
nvinfer1::ScatterMode
ScatterMode
Control form of IScatterLayer.
Definition: NvInfer.h:5875
nvinfer1::LayerType::kREDUCE
Reduce layer.
nvinfer1::IInt8EntropyCalibrator
Definition: NvInfer.h:7331
nvinfer1::EnumMax< UnaryOperation >
constexpr int32_t EnumMax< UnaryOperation >() noexcept
Maximum number of elements in UnaryOperation enum.
Definition: NvInfer.h:3570
nvinfer1::IGatherLayer
A Gather layer in a network definition. Supports several kinds of gathering.
Definition: NvInfer.h:2976
nvinfer1::IDeconvolutionLayer::getPrePadding
Dims getPrePadding() const noexcept
Get the pre-padding.
Definition: NvInfer.h:2600
nvinfer1::ResizeCoordinateTransformation::kALIGN_CORNERS
nvinfer1::UnaryOperation::kSIN
Sine.
nvinfer1::IConstantLayer::getDimensions
Dims getDimensions() const noexcept
Get the dimensions for the layer.
Definition: NvInfer.h:4511
nvinfer1::IFillLayer::setOperation
void setOperation(FillOperation op) noexcept
Set the fill operation for the layer.
Definition: NvInfer.h:5512
nvinfer1::IBuilderConfig::getMinTimingIterations
virtual int32_t getMinTimingIterations() const noexcept
Query the number of minimization iterations.
Definition: NvInfer.h:7857
nvinfer1::IIteratorLayer::setAxis
void setAxis(int32_t axis) noexcept
Set axis to iterate over.
Definition: NvInfer.h:5249
nvinfer1::IDeconvolutionLayer::getPaddingNd
Dims getPaddingNd() const noexcept
Get the multi-dimension padding of the deconvolution.
Definition: NvInfer.h:2737
nvinfer1::IReduceLayer::getReduceAxes
uint32_t getReduceAxes() const noexcept
Get the axes over which to reduce for the layer.
Definition: NvInfer.h:3689
nvinfer1::Dims32::MAX_DIMS
static constexpr int32_t MAX_DIMS
The maximum rank (number of dimensions) supported for a tensor.
Definition: NvInferRuntimeCommon.h:193
nvinfer1::IElementWiseLayer::setOperation
void setOperation(ElementWiseOperation op) noexcept
Set the binary operation for the layer.
Definition: NvInfer.h:2857
nvinfer1::IBuilderConfig::setAvgTimingIterations
virtual void setAvgTimingIterations(int32_t avgTiming) noexcept
Set the number of averaging iterations used when timing layers.
Definition: NvInfer.h:7870
nvinfer1::ITensor::setName
void setName(const char *name) noexcept
Set the tensor name.
Definition: NvInfer.h:208
nvinfer1::IPoolingLayer::getPaddingNd
Dims getPaddingNd() const noexcept
Get the multi-dimension padding for pooling.
Definition: NvInfer.h:1983
nvinfer1::IIfConditional
Definition: NvInfer.h:5055
nvinfer1::IBuilderConfig::setMinTimingIterations
virtual void setMinTimingIterations(int32_t minTiming) noexcept
Set the number of minimization iterations used when timing layers.
Definition: NvInfer.h:7845
nvinfer1::EnumMax< LayerType >
constexpr int32_t EnumMax< LayerType >() noexcept
Maximum number of elements in LayerType enum.
Definition: NvInfer.h:136
nvinfer1::LayerType::kCONVOLUTION
Convolution layer.
nvinfer1::IInt8MinMaxCalibrator::getAlgorithm
CalibrationAlgoType getAlgorithm() noexcept override
Definition: NvInfer.h:7372
nvinfer1::ElementWiseOperation::kPROD
Product of the two elements.
nvinfer1::IFillLayer::getBeta
double getBeta() const noexcept
Get the value of beta parameter.
Definition: NvInfer.h:5588
nvinfer1::IConvolutionLayer::setNbGroups
void setNbGroups(int32_t nbGroups) noexcept
Set the number of groups for a convolution.
Definition: NvInfer.h:1117
nvinfer1::ILoopBoundaryLayer
Definition: NvInfer.h:4966
nvinfer1::TensorFormats
uint32_t TensorFormats
It is capable of representing one or more TensorFormat by binary OR operations, e....
Definition: NvInfer.h:147
nvinfer1::UnaryOperation::kERF
Gauss error function.
nvinfer1::IConvolutionLayer::setPaddingNd
void setPaddingNd(Dims padding) noexcept
Set the multi-dimension padding of the convolution.
Definition: NvInfer.h:1350
nvinfer1::EngineCapability
EngineCapability
List of supported engine capability flows.
Definition: NvInferRuntime.h:105
nvinfer1::IAlgorithm
Describes a variation of execution of a layer. An algorithm is represented by IAlgorithmVariant and t...
Definition: NvInfer.h:7576
nvinfer1::UnaryOperation::kLOG
Log (base e).
nvinfer1::IRNNv2Layer::getWeightsForGate
Weights getWeightsForGate(int32_t layerIndex, RNNGateType gate, bool isW) const noexcept
Get the weight parameters for an individual gate in the RNN.
Definition: NvInfer.h:3409
nvinfer1::LayerType::kLRN
LRN layer.
nvinfer1::IBuilder::createOptimizationProfile
nvinfer1::IOptimizationProfile * createOptimizationProfile() noexcept
Create a new optimization profile.
Definition: NvInfer.h:8625
nvinfer1::IBuilderConfig::setDLACore
void setDLACore(int32_t dlaCore) noexcept
Sets the DLA core used by the network.
Definition: NvInfer.h:8084
nvinfer1::IResizeLayer::setSelectorForSinglePixel
void setSelectorForSinglePixel(ResizeSelector selector) noexcept
Set coordinate selector function when resized to single pixel.
Definition: NvInfer.h:4883
nvinfer1::IBuilderConfig::getAlgorithmSelector
IAlgorithmSelector * getAlgorithmSelector() const noexcept
Get Algorithm Selector.
Definition: NvInfer.h:8234
nvinfer1::INetworkDefinition::getNbInputs
int32_t getNbInputs() const noexcept
Get the number of inputs in the network.
Definition: NvInfer.h:6360
nvinfer1::ITensor::isExecutionTensor
bool isExecutionTensor() const noexcept
Whether the tensor is an execution tensor.
Definition: NvInfer.h:500
nvinfer1::ILoop::setName
void setName(const char *name) noexcept
Set the name of the loop.
Definition: NvInfer.h:5354
nvinfer1::EnumMax< GatherMode >
constexpr int32_t EnumMax< GatherMode >() noexcept
Maximum number of elements in GatherMode enum.
Definition: NvInfer.h:2893
nvinfer1::IBuilderConfig::setFlags
void setFlags(BuilderFlags builderFlags) noexcept
Set the build mode flags to turn on builder options for this network.
Definition: NvInfer.h:7968
nvinfer1::LayerType::kASSERTION
Assertion layer.
nvinfer1::ResizeCoordinateTransformation
ResizeCoordinateTransformation
The resize coordinate transformation function.
Definition: NvInfer.h:4563
nvinfer1::IConvolutionLayer::getStride
TRT_DEPRECATED DimsHW getStride() const noexcept
Get the stride of the convolution.
Definition: NvInfer.h:1065
nvinfer1::IBuilderConfig::getTimingCache
const nvinfer1::ITimingCache * getTimingCache() const noexcept
Get the pointer to the timing cache from current IBuilderConfig.
Definition: NvInfer.h:8416
nvinfer1::IShuffleLayer::setSecondTranspose
void setSecondTranspose(Permutation permutation) noexcept
Set the permutation applied by the second transpose operation.
Definition: NvInfer.h:3973
nvinfer1::INetworkDefinition::addScaleNd
IScaleLayer * addScaleNd(ITensor &input, ScaleMode mode, Weights shift, Weights scale, Weights power, int32_t channelAxis) noexcept
Add a multi-dimension scale layer to the network.
Definition: NvInfer.h:6946
nvinfer1::RNNGateType::kHIDDEN
Hidden gate (h).
nvinfer1::GatherMode::kELEMENT
Similar to ONNX GatherElements.
nvinfer1::INetworkDefinition::addAssertion
IAssertionLayer * addAssertion(ITensor &condition, const char *message) noexcept
Add an assertion layer to the network.
Definition: NvInfer.h:7050
nvinfer1::IBuilderConfig::setDeviceType
void setDeviceType(const ILayer *layer, DeviceType deviceType) noexcept
Set the device that this layer must execute on.
Definition: NvInfer.h:8031
nvinfer1::LayerType::kCONDITIONAL_OUTPUT
Conditional Output layer.
nvinfer1::LayerType::kUNARY
UnaryOp operation Layer.
nvinfer1::IInt8LegacyCalibrator
Definition: NvInfer.h:7384
nvinfer1::INetworkDefinition::addParametricReLU
IParametricReLULayer * addParametricReLU(ITensor &input, ITensor &slope) noexcept
Add a parametric ReLU layer to the network.
Definition: NvInfer.h:6846
nvinfer1::UnaryOperation::kNEG
Negation.
nvinfer1::IPoolingLayer::getAverageCountExcludesPadding
bool getAverageCountExcludesPadding() const noexcept
Get whether average pooling uses as a denominator the overlap area between the window and the unpadde...
Definition: NvInfer.h:1824
nvinfer1::ElementWiseOperation::kLESS
Check if element in first tensor is less than corresponding element in second tensor.
nvinfer1::INetworkDefinition::addConvolution
TRT_DEPRECATED IConvolutionLayer * addConvolution(ITensor &input, int32_t nbOutputMaps, DimsHW kernelSize, Weights kernelWeights, Weights biasWeights) noexcept
Add a convolution layer to the network.
Definition: NvInfer.h:6086
nvinfer1::IConvolutionLayer::setDilation
TRT_DEPRECATED void setDilation(DimsHW dilation) noexcept
Set the dilation for a convolution.
Definition: NvInfer.h:1192
nvinfer1::IScaleLayer::getPower
Weights getPower() const noexcept
Get the power value.
Definition: NvInfer.h:2220
nvinfer1::IQuantizeLayer::getAxis
int32_t getAxis() const noexcept
Get the quantization axis.
Definition: NvInfer.h:5694
nvinfer1::UnaryOperation::kACOS
Inverse cosine.
nvinfer1::UnaryOperation::kCOS
Cosine.
nvinfer1::IPluginV2Layer::getPlugin
IPluginV2 & getPlugin() noexcept
Get the plugin for the layer.
Definition: NvInfer.h:3524
nvinfer1::IIfConditionalOutputLayer
Definition: NvInfer.h:5015
nvinfer1::IConvolutionLayer::getKernelWeights
Weights getKernelWeights() const noexcept
Get the kernel weights of the convolution.
Definition: NvInfer.h:1151
nvinfer1::IScaleLayer
A Scale layer in a network definition.
Definition: NvInfer.h:2142
nvinfer1::INetworkDefinition::getName
const char * getName() const noexcept
Returns the name associated with the network.
Definition: NvInfer.h:6761
nvinfer1::IDeconvolutionLayer::setPadding
TRT_DEPRECATED void setPadding(DimsHW padding) noexcept
Set the padding of the deconvolution.
Definition: NvInfer.h:2479
nvinfer1::IConstantLayer::setWeights
void setWeights(Weights weights) noexcept
Set the weights for the layer.
Definition: NvInfer.h:4477
nvinfer1::RNNOperation::kGRU
Three-gate network consisting of Gated Recurrent Units.
nvinfer1::UnaryOperation::kNOT
Logical NOT.
nvinfer1::GatherMode
GatherMode
Control form of IGatherLayer.
Definition: NvInfer.h:2884
nvinfer1::ISliceLayer::getStride
Dims getStride() const noexcept
Get the stride for the output slice.
Definition: NvInfer.h:4162
nvinfer1::ILRNLayer::setAlpha
void setAlpha(float alpha) noexcept
Set the LRN alpha value.
Definition: NvInfer.h:2035
nvinfer1::IBuilder::buildEngineWithConfig
TRT_DEPRECATED nvinfer1::ICudaEngine * buildEngineWithConfig(INetworkDefinition &network, IBuilderConfig &config) noexcept
Builds an engine for the given INetworkDefinition and given IBuilderConfig.
Definition: NvInfer.h:8594
nvinfer1::ISoftMaxLayer
A Softmax layer in a network definition.
Definition: NvInfer.h:2277
nvinfer1::IPoolingLayer::getStride
TRT_DEPRECATED DimsHW getStride() const noexcept
Get the stride for pooling.
Definition: NvInfer.h:1738
nvinfer1::INetworkDefinition::addPoolingNd
IPoolingLayer * addPoolingNd(ITensor &input, PoolingType type, Dims windowSize) noexcept
Add a multi-dimension pooling layer to the network.
Definition: NvInfer.h:6888
nvinfer1::INetworkDefinition::setName
void setName(const char *name) noexcept
Sets the name of the network.
Definition: NvInfer.h:6747
nvinfer1::TripLimit::kCOUNT
Tensor is scalar of type kINT32 that contains the trip count.
nvinfer1::IBuilder::platformHasTf32
bool platformHasTf32() const noexcept
Determine whether the platform has TF32 support.
Definition: NvInfer.h:8675
nvinfer1::IRNNv2Layer::getMaxSeqLength
int32_t getMaxSeqLength() const noexcept
Get the maximum sequence length of the RNN.
Definition: NvInfer.h:3246
nvinfer1::IFullyConnectedLayer::getBiasWeights
Weights getBiasWeights() const noexcept
Get the bias weights.
Definition: NvInfer.h:1510
nvinfer1::IBuilder::getLogger
ILogger * getLogger() const noexcept
get the logger with which the builder was created
Definition: NvInfer.h:8726
nvinfer1::IBuilderConfig
Holds properties for configuring a builder to produce an engine.
Definition: NvInfer.h:7830
nvinfer1::IDeconvolutionLayer::setPaddingMode
void setPaddingMode(PaddingMode paddingMode) noexcept
Set the padding mode.
Definition: NvInfer.h:2642
nvinfer1::IBuilderConfig::setCalibrationProfile
bool setCalibrationProfile(const IOptimizationProfile *profile) noexcept
Add a calibration profile.
Definition: NvInfer.h:8249
nvinfer1::IDeconvolutionLayer::setKernelSize
TRT_DEPRECATED void setKernelSize(DimsHW kernelSize) noexcept
Set the HW kernel size of the convolution.
Definition: NvInfer.h:2396
nvinfer1::INetworkDefinition::getInput
ITensor * getInput(int32_t index) const noexcept
Get the input tensor specified by the given index.
Definition: NvInfer.h:6376
nvinfer1::IDeconvolutionLayer::getStride
TRT_DEPRECATED DimsHW getStride() const noexcept
Get the stride of the deconvolution.
Definition: NvInfer.h:2459
nvinfer1::IRNNv2Layer::getHiddenState
ITensor * getHiddenState() const noexcept
Get the initial hidden state of the RNN.
Definition: NvInfer.h:3469
nvinfer1::IPoolingLayer::setAverageCountExcludesPadding
void setAverageCountExcludesPadding(bool exclusive) noexcept
Set whether average pooling uses as a denominator the overlap area between the window and the unpadde...
Definition: NvInfer.h:1813
nvinfer1::INetworkDefinition::addGatherV2
IGatherLayer * addGatherV2(ITensor &data, ITensor &indices, GatherMode mode)
Add gather with specified mode, axis=0 and nbElementWiseDims=0.
Definition: NvInfer.h:6512
nvinfer1::IEinsumLayer
An Einsum layer in a network.
Definition: NvInfer.h:5838
nvinfer1::EnumMax< NetworkDefinitionCreationFlag >
constexpr int32_t EnumMax< NetworkDefinitionCreationFlag >() noexcept
Maximum number of elements in NetworkDefinitionCreationFlag enum.
Definition: NvInfer.h:8467
nvinfer1::EnumMax< TripLimit >
constexpr int32_t EnumMax< TripLimit >() noexcept
Maximum number of elements in TripLimit enum.
Definition: NvInfer.h:4959
nvinfer1::LayerType::kDEQUANTIZE
Dequantize layer.
nvinfer1::IRNNv2Layer::getBiasForGate
Weights getBiasForGate(int32_t layerIndex, RNNGateType gate, bool isW) const noexcept
Get the bias parameters for an individual gate in the RNN.
Definition: NvInfer.h:3443
nvinfer1::IResizeLayer
A resize layer in a network definition.
Definition: NvInfer.h:4685
nvinfer1::LayerType::kELEMENTWISE
Elementwise layer.
nvinfer1::INetworkDefinition::addMatrixMultiply
IMatrixMultiplyLayer * addMatrixMultiply(ITensor &input0, MatrixOperation op0, ITensor &input1, MatrixOperation op1) noexcept
Add a MatrixMultiply layer to the network.
Definition: NvInfer.h:6549
nvinfer1::LayerType::kSHUFFLE
Shuffle layer.
nvinfer1::BuilderFlag::kDEBUG
Enable debugging of layers via synchronizing after every layer.
nvinfer1::IAlgorithm::getAlgorithmIOInfo
const TRT_DEPRECATED IAlgorithmIOInfo & getAlgorithmIOInfo(int32_t index) const noexcept
Returns the format of an Algorithm input or output. Algorithm inputs are incrementally numbered first...
Definition: NvInfer.h:7589
nvinfer1::IBuilderConfig::getProfilingVerbosity
ProfilingVerbosity getProfilingVerbosity() const noexcept
Get verbosity level of layer information exposed in NVTX annotations and IEngineInspector.
Definition: NvInfer.h:8217
nvinfer1::IDeconvolutionLayer::setKernelSizeNd
void setKernelSizeNd(Dims kernelSize) noexcept
Set the multi-dimension kernel size of the deconvolution.
Definition: NvInfer.h:2669
nvinfer1::IBuilderConfig::isDeviceTypeSet
bool isDeviceTypeSet(const ILayer *layer) const noexcept
whether the DeviceType has been explicitly set for this layer
Definition: NvInfer.h:8050
nvinfer1::ITensor::isNetworkInput
bool isNetworkInput() const noexcept
Whether the tensor is a network input.
Definition: NvInfer.h:302
nvinfer1::IResizeLayer::setScales
void setScales(const float *scales, int32_t nbScales) noexcept
Set the resize scales.
Definition: NvInfer.h:4746
nvinfer1::ILayer::getType
LayerType getType() const noexcept
Return the type of a layer.
Definition: NvInfer.h:525
nvinfer1::IIfConditional::getName
const char * getName() const noexcept
Return the name of the conditional.
Definition: NvInfer.h:5118
nvinfer1::IPoolingLayer
A Pooling layer in a network definition.
Definition: NvInfer.h:1664
nvinfer1::IConvolutionLayer::setPaddingMode
void setPaddingMode(PaddingMode paddingMode) noexcept
Set the padding mode.
Definition: NvInfer.h:1272
nvinfer1::IInt8EntropyCalibrator2::getAlgorithm
CalibrationAlgoType getAlgorithm() noexcept override
Definition: NvInfer.h:7355
nvinfer1::ITopKLayer::getReduceAxes
uint32_t getReduceAxes() const noexcept
Get the axes to reduce for the layer.
Definition: NvInfer.h:4319
nvinfer1::IBuilderConfig::createTimingCache
nvinfer1::ITimingCache * createTimingCache(const void *blob, std::size_t size) const noexcept
Create timing cache.
Definition: NvInfer.h:8383
nvinfer1::IRNNv2Layer::setCellState
void setCellState(ITensor &cell) noexcept
Set the initial cell state of the LSTM with the provided cell ITensor.
Definition: NvInfer.h:3488
nvinfer1::IGpuAllocator
Application-implemented class for controlling allocation on the GPU.
Definition: NvInferRuntimeCommon.h:1138
nvinfer1::IPoolingLayer::setStrideNd
void setStrideNd(Dims stride) noexcept
Set the multi-dimension stride for pooling.
Definition: NvInfer.h:1942
nvinfer1::anonymous_namespace{NvInfer.h}::createInferBuilder
IBuilder * createInferBuilder(ILogger &logger) noexcept
Create an instance of an IBuilder class.
Definition: NvInfer.h:8755
nvinfer1::IUnaryLayer
Layer that represents an unary operation.
Definition: NvInfer.h:3582
nvinfer1::IAlgorithmVariant::getTactic
int64_t getTactic() const noexcept
Return tactic of the algorithm.
Definition: NvInfer.h:7505
nvinfer1::IConditionLayer
Definition: NvInfer.h:5002
nvinfer1::IReduceLayer::getOperation
ReduceOperation getOperation() const noexcept
Get the reduce operation for the layer.
Definition: NvInfer.h:3669
nvinfer1::IPoolingLayer::setPadding
TRT_DEPRECATED void setPadding(DimsHW padding) noexcept
Set the padding for pooling.
Definition: NvInfer.h:1754
nvinfer1::ISliceLayer::getMode
SliceMode getMode() const noexcept
Get the slice mode.
Definition: NvInfer.h:4182
nvinfer1::UnaryOperation::kROUND
Round to nearest even for float datatype.
nvinfer1::IBuilder
Builds an engine from a network definition.
Definition: NvInfer.h:8479
nvinfer1::IPaddingLayer::setPostPadding
TRT_DEPRECATED void setPostPadding(DimsHW padding) noexcept
Set the padding that is applied at the end of the tensor.
Definition: NvInfer.h:3767
nvinfer1::IBuilderConfig::setInt8Calibrator
void setInt8Calibrator(IInt8Calibrator *calibrator) noexcept
Set Int8 Calibration interface.
Definition: NvInfer.h:7917
nvinfer1::IFillLayer::setBeta
void setBeta(double beta) noexcept
Set the beta parameter.
Definition: NvInfer.h:5573
nvinfer1::IBuilder::isNetworkSupported
bool isNetworkSupported(INetworkDefinition const &network, IBuilderConfig const &config) const noexcept
Checks that a network is within the scope of the IBuilderConfig settings.
Definition: NvInfer.h:8716
nvinfer1::LayerType::kCONCATENATION
Concatenation layer.
nvinfer1::BuilderFlag::kSPARSE_WEIGHTS
Allow the builder to examine weights and use optimized functions when weights have suitable sparsity.
nvinfer1::ITopKLayer::setOperation
void setOperation(TopKOperation op) noexcept
Set the operation for the layer.
Definition: NvInfer.h:4267
nvinfer1::IAssertionLayer
An assertion layer in a network.
Definition: NvInfer.h:5398
nvinfer1::LayerType::kACTIVATION
Activation layer.
nvinfer1::IAlgorithm::getAlgorithmVariant
const IAlgorithmVariant & getAlgorithmVariant() const noexcept
Returns the algorithm variant.
Definition: NvInfer.h:7597
nvinfer1::NetworkDefinitionCreationFlag::kEXPLICIT_BATCH
Mark the network to be an explicit batch network.
nvinfer1::IDeconvolutionLayer::getKernelSize
TRT_DEPRECATED DimsHW getKernelSize() const noexcept
Get the HW kernel size of the deconvolution.
Definition: NvInfer.h:2408
nvinfer1::IQuantizeLayer
A Quantize layer in a network definition.
Definition: NvInfer.h:5683
nvinfer1::INetworkDefinition::addShape
IShapeLayer * addShape(ITensor &input) noexcept
Add a shape layer to the network.
Definition: NvInfer.h:6779
nvinfer1::LayerType::kPARAMETRIC_RELU
Parametric ReLU layer.
nvinfer1::TopKOperation
TopKOperation
Enumerates the operations that may be performed by a TopK layer.
Definition: NvInfer.h:4239
nvinfer1::IAlgorithmVariant::getImplementation
int64_t getImplementation() const noexcept
Return implementation of the algorithm.
Definition: NvInfer.h:7497
nvinfer1::ILoop::addIterator
IIteratorLayer * addIterator(ITensor &tensor, int32_t axis=0, bool reverse=false) noexcept
Return layer that subscripts tensor by loop iteration.
Definition: NvInfer.h:5329
nvinfer1::IRNNv2Layer::getLayerCount
int32_t getLayerCount() const noexcept
Get the layer count of the RNN.
Definition: NvInfer.h:3238
nvinfer1::TensorLocation
TensorLocation
The location for tensor data storage, device or host.
Definition: NvInferRuntime.h:245
nvinfer1::ITopKLayer::getK
int32_t getK() const noexcept
Get the k value for the layer.
Definition: NvInfer.h:4299
nvinfer1::LayerType::kFULLY_CONNECTED
Fully connected layer.
nvinfer1::IActivationLayer::getBeta
float getBeta() const noexcept
Get the beta parameter.
Definition: NvInfer.h:1621
nvinfer1::IBuilder::getNbDLACores
int32_t getNbDLACores() const noexcept
Return the number of DLA engines available to this builder.
Definition: NvInfer.h:8553
nvinfer1::IResizeLayer::getSelectorForSinglePixel
ResizeSelector getSelectorForSinglePixel() const noexcept
Get the coordinate selector function when resized to single pixel.
Definition: NvInfer.h:4893
nvinfer1::RNNGateType::kFORGET
Forget gate (f).
nvinfer1::LayerType::kCONDITIONAL_INPUT
Conditional Input layer.
nvinfer1::IBuilderConfig::setMaxWorkspaceSize
void setMaxWorkspaceSize(std::size_t workspaceSize) noexcept
Set the maximum workspace size.
Definition: NvInfer.h:7937
nvinfer1::IConvolutionLayer::getNbOutputMaps
int32_t getNbOutputMaps() const noexcept
Get the number of output maps for the convolution.
Definition: NvInfer.h:1039
nvinfer1::IBuilder::getMaxDLABatchSize
int32_t getMaxDLABatchSize() const noexcept
Get the maximum batch size DLA can support. For any tensor the total volume of index dimensions combi...
Definition: NvInfer.h:8545
nvinfer1::IRNNv2Layer::getInputMode
RNNInputMode getInputMode() const noexcept
Get the input mode of the RNN layer.
Definition: NvInfer.h:3317
nvinfer1::IAlgorithmContext::getNbOutputs
int32_t getNbOutputs() const noexcept
Return number of outputs of the algorithm.
Definition: NvInfer.h:7557
nvinfer1::IBuilderConfig::getQuantizationFlags
QuantizationFlags getQuantizationFlags() const noexcept
Get the quantization flags.
Definition: NvInfer.h:8288
nvinfer1::IEinsumLayer::setEquation
bool setEquation(const char *equation) noexcept
Set the equation. The equation is a comma-separated list of subscript labels, where each label refers...
Definition: NvInfer.h:5850
nvinfer1::IConcatenationLayer::getAxis
int32_t getAxis() const noexcept
Get the axis along which concatenation occurs.
Definition: NvInfer.h:2365
nvinfer1::INetworkDefinition::addScale
IScaleLayer * addScale(ITensor &input, ScaleMode mode, Weights shift, Weights scale, Weights power) noexcept
Add a Scale layer to the network.
Definition: NvInfer.h:6192
TRT_DEPRECATED
#define TRT_DEPRECATED
< Items that are marked as deprecated will be removed in a future release.
Definition: NvInferRuntimeCommon.h:77
nvinfer1::LayerType::kMATRIX_MULTIPLY
Matrix multiply layer.
nvinfer1::IIfConditionalBoundaryLayer
Definition: NvInfer.h:4985
nvinfer1::IDeconvolutionLayer::setStrideNd
void setStrideNd(Dims stride) noexcept
Set the multi-dimension stride of the deconvolution.
Definition: NvInfer.h:2697
nvinfer1::ITensor::getBroadcastAcrossBatch
bool getBroadcastAcrossBatch() const noexcept
Check if tensor is broadcast across the batch.
Definition: NvInfer.h:348
nvinfer1::INetworkDefinition::addRNNv2
TRT_DEPRECATED IRNNv2Layer * addRNNv2(ITensor &input, int32_t layerCount, int32_t hiddenSize, int32_t maxSeqLen, RNNOperation op) noexcept
Add an layerCount deep RNN layer to the network with hiddenSize internal states that can take a batch...
Definition: NvInfer.h:6643
nvinfer1::ITensor::isNetworkOutput
bool isNetworkOutput() const noexcept
Whether the tensor is a network output.
Definition: NvInfer.h:310
nvinfer1::IBuilderConfig::setTimingCache
bool setTimingCache(const ITimingCache &cache, bool ignoreMismatch) noexcept
Attach a timing cache to IBuilderConfig.
Definition: NvInfer.h:8406
nvinfer1::ResizeRoundMode::kHALF_UP
Round half up.
nvinfer1::IIfConditional::addOutput
IIfConditionalOutputLayer * addOutput(ITensor &trueSubgraphOutput, ITensor &falseSubgraphOutput) noexcept
Add an If-conditional output.
Definition: NvInfer.h:5083
nvinfer1::IScaleLayer::getScale
Weights getScale() const noexcept
Get the scale value.
Definition: NvInfer.h:2200
nvinfer1::IActivationLayer
An Activation layer in a network definition.
Definition: NvInfer.h:1554
nvinfer1::CalibrationAlgoType
CalibrationAlgoType
Version of calibration algorithm to use.
Definition: NvInfer.h:7240
nvinfer1::IBuilder::setErrorRecorder
void setErrorRecorder(IErrorRecorder *recorder) noexcept
Set the ErrorRecorder for this interface.
Definition: NvInfer.h:8644
nvinfer1::IDequantizeLayer
A Dequantize layer in a network definition.
Definition: NvInfer.h:5770
nvinfer1::LayerType::kPOOLING
Pooling layer.
nvinfer1::IBuilderConfig::destroy
TRT_DEPRECATED void destroy() noexcept
Delete this IBuilderConfig.
Definition: NvInfer.h:8139
nvinfer1::EnumMax< BuilderFlag >
constexpr int32_t EnumMax< BuilderFlag >() noexcept
Maximum number of builder flags in BuilderFlag enum.
Definition: NvInfer.h:7753
nvinfer1::IRNNv2Layer::setInputMode
void setInputMode(RNNInputMode op) noexcept
Set the input mode of the RNN layer.
Definition: NvInfer.h:3308
nvinfer1::IDeconvolutionLayer
A deconvolution layer in a network definition.
Definition: NvInfer.h:2382
nvinfer1::IRNNv2Layer::setSequenceLengths
void setSequenceLengths(ITensor &seqLengths) noexcept
Specify individual sequence lengths in the batch with the ITensor pointed to by seqLengths.
Definition: NvInfer.h:3269