TensorRT  8.0.1
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 };
127 
129 template <>
130 constexpr inline int32_t EnumMax<LayerType>() noexcept
131 {
132  return 35;
133 }
134 
141 using TensorFormats = uint32_t;
142 
148 enum class ActivationType : int32_t
149 {
150  kRELU = 0,
151  kSIGMOID = 1,
152  kTANH = 2,
153  kLEAKY_RELU = 3,
154  kELU = 4,
155  kSELU = 5,
156  kSOFTSIGN = 6,
157  kSOFTPLUS = 7,
158  kCLIP = 8,
159  kHARD_SIGMOID = 9,
160  kSCALED_TANH = 10,
161  kTHRESHOLDED_RELU = 11
162 };
163 
164 namespace impl
165 {
167 template <>
169 {
170  static constexpr int32_t kVALUE = 12;
171 };
172 } // namespace impl
173 
187 class ITensor : public INoCopy
188 {
189 public:
202  void setName(const char* name) noexcept
203  {
204  mImpl->setName(name);
205  }
206 
214  const char* getName() const noexcept
215  {
216  return mImpl->getName();
217  }
218 
233  void setDimensions(Dims dimensions) noexcept
234  {
235  mImpl->setDimensions(dimensions);
236  }
237 
246  Dims getDimensions() const noexcept
247  {
248  return mImpl->getDimensions();
249  }
250 
261  void setType(DataType type) noexcept
262  {
263  mImpl->setType(type);
264  }
265 
273  DataType getType() const noexcept
274  {
275  return mImpl->getType();
276  }
277 
288  bool setDynamicRange(float min, float max) noexcept
289  {
290  return mImpl->setDynamicRange(min, max);
291  }
292 
296  bool isNetworkInput() const noexcept
297  {
298  return mImpl->isNetworkInput();
299  }
300 
304  bool isNetworkOutput() const noexcept
305  {
306  return mImpl->isNetworkOutput();
307  }
308 
326  void setBroadcastAcrossBatch(bool broadcastAcrossBatch) noexcept
327  {
328  mImpl->setBroadcastAcrossBatch(broadcastAcrossBatch);
329  }
330 
342  bool getBroadcastAcrossBatch() const noexcept
343  {
344  return mImpl->getBroadcastAcrossBatch();
345  }
346 
352  TensorLocation getLocation() const noexcept
353  {
354  return mImpl->getLocation();
355  }
356 
367  void setLocation(TensorLocation location) noexcept
368  {
369  mImpl->setLocation(location);
370  }
371 
377  bool dynamicRangeIsSet() const noexcept
378  {
379  return mImpl->dynamicRangeIsSet();
380  }
381 
385  void resetDynamicRange() noexcept
386  {
387  mImpl->resetDynamicRange();
388  }
389 
395  float getDynamicRangeMin() const noexcept
396  {
397  return mImpl->getDynamicRangeMin();
398  }
399 
405  float getDynamicRangeMax() const noexcept
406  {
407  return mImpl->getDynamicRangeMax();
408  }
409 
424  void setAllowedFormats(TensorFormats formats) noexcept
425  {
426  mImpl->setAllowedFormats(formats);
427  }
428 
438  {
439  return mImpl->getAllowedFormats();
440  }
441 
471  bool isShapeTensor() const noexcept
472  {
473  return mImpl->isShapeTensor();
474  }
475 
494  bool isExecutionTensor() const noexcept
495  {
496  return mImpl->isExecutionTensor();
497  }
498 
499 protected:
500  apiv::VTensor* mImpl;
501  virtual ~ITensor() noexcept = default;
502 };
503 
511 class ILayer : public INoCopy
512 {
513 public:
519  LayerType getType() const noexcept
520  {
521  return mLayer->getType();
522  }
523 
531  void setName(const char* name) noexcept
532  {
533  mLayer->setName(name);
534  }
535 
539 
542  const char* getName() const noexcept
543  {
544  return mLayer->getName();
545  }
546 
550  int32_t getNbInputs() const noexcept
551  {
552  return mLayer->getNbInputs();
553  }
554 
563  ITensor* getInput(int32_t index) const noexcept
564  {
565  return mLayer->getInput(index);
566  }
567 
571  int32_t getNbOutputs() const noexcept
572  {
573  return mLayer->getNbOutputs();
574  }
575 
582  ITensor* getOutput(int32_t index) const noexcept
583  {
584  return mLayer->getOutput(index);
585  }
586 
599  void setInput(int32_t index, ITensor& tensor) noexcept
600  {
601  return mLayer->setInput(index, tensor);
602  }
603 
619  void setPrecision(DataType dataType) noexcept
620  {
621  mLayer->setPrecision(dataType);
622  }
623 
631  DataType getPrecision() const noexcept
632  {
633  return mLayer->getPrecision();
634  }
635 
643  bool precisionIsSet() const noexcept
644  {
645  return mLayer->precisionIsSet();
646  }
647 
653  void resetPrecision() noexcept
654  {
655  mLayer->resetPrecision();
656  }
657 
684  void setOutputType(int32_t index, DataType dataType) noexcept
685  {
686  mLayer->setOutputType(index, dataType);
687  }
688 
698  DataType getOutputType(int32_t index) const noexcept
699  {
700  return mLayer->getOutputType(index);
701  }
702 
711  bool outputTypeIsSet(int32_t index) const noexcept
712  {
713  return mLayer->outputTypeIsSet(index);
714  }
715 
723  void resetOutputType(int32_t index) noexcept
724  {
725  return mLayer->resetOutputType(index);
726  }
727 
728 protected:
729  virtual ~ILayer() noexcept = default;
730  apiv::VLayer* mLayer;
731 };
732 
955 enum class PaddingMode : int32_t
956 {
958  kEXPLICIT_ROUND_UP = 1,
959  kSAME_UPPER = 2,
960  kSAME_LOWER = 3,
961  kCAFFE_ROUND_DOWN = 4,
962  kCAFFE_ROUND_UP = 5
963 };
964 
965 namespace impl
966 {
968 template <>
970 {
971  static constexpr int32_t kVALUE = 6;
972 };
973 } // namespace impl
974 
987 class IConvolutionLayer : public ILayer
988 {
989 public:
999  TRT_DEPRECATED void setKernelSize(DimsHW kernelSize) noexcept
1000  {
1001  mImpl->setKernelSize(kernelSize);
1002  }
1003 
1012  {
1013  return mImpl->getKernelSize();
1014  }
1015 
1023  void setNbOutputMaps(int32_t nbOutputMaps) noexcept
1024  {
1025  mImpl->setNbOutputMaps(nbOutputMaps);
1026  }
1027 
1033  int32_t getNbOutputMaps() const noexcept
1034  {
1035  return mImpl->getNbOutputMaps();
1036  }
1037 
1049  TRT_DEPRECATED void setStride(DimsHW stride) noexcept
1050  {
1051  mImpl->setStride(stride);
1052  }
1053 
1060  {
1061  return mImpl->getStride();
1062  }
1063 
1079  TRT_DEPRECATED void setPadding(DimsHW padding) noexcept
1080  {
1081  return mImpl->setPadding(padding);
1082  }
1083 
1092  {
1093  return mImpl->getPadding();
1094  }
1095 
1111  void setNbGroups(int32_t nbGroups) noexcept
1112  {
1113  mImpl->setNbGroups(nbGroups);
1114  }
1115 
1121  int32_t getNbGroups() const noexcept
1122  {
1123  return mImpl->getNbGroups();
1124  }
1125 
1135  void setKernelWeights(Weights weights) noexcept
1136  {
1137  mImpl->setKernelWeights(weights);
1138  }
1139 
1145  Weights getKernelWeights() const noexcept
1146  {
1147  return mImpl->getKernelWeights();
1148  }
1149 
1160  void setBiasWeights(Weights weights) noexcept
1161  {
1162  mImpl->setBiasWeights(weights);
1163  }
1164 
1170  Weights getBiasWeights() const noexcept
1171  {
1172  return mImpl->getBiasWeights();
1173  }
1174 
1186  TRT_DEPRECATED void setDilation(DimsHW dilation) noexcept
1187  {
1188  return mImpl->setDilation(dilation);
1189  }
1190 
1199  {
1200  return mImpl->getDilation();
1201  }
1202 
1215  void setPrePadding(Dims padding) noexcept
1216  {
1217  mImpl->setPrePadding(padding);
1218  }
1219 
1225  Dims getPrePadding() const noexcept
1226  {
1227  return mImpl->getPrePadding();
1228  }
1229 
1242  void setPostPadding(Dims padding) noexcept
1243  {
1244  mImpl->setPostPadding(padding);
1245  }
1246 
1252  Dims getPostPadding() const noexcept
1253  {
1254  return mImpl->getPostPadding();
1255  }
1256 
1266  void setPaddingMode(PaddingMode paddingMode) noexcept
1267  {
1268  mImpl->setPaddingMode(paddingMode);
1269  }
1270 
1278  PaddingMode getPaddingMode() const noexcept
1279  {
1280  return mImpl->getPaddingMode();
1281  }
1282 
1291  void setKernelSizeNd(Dims kernelSize) noexcept
1292  {
1293  mImpl->setKernelSizeNd(kernelSize);
1294  }
1295 
1301  Dims getKernelSizeNd() const noexcept
1302  {
1303  return mImpl->getKernelSizeNd();
1304  }
1305 
1316  void setStrideNd(Dims stride) noexcept
1317  {
1318  mImpl->setStrideNd(stride);
1319  }
1320 
1326  Dims getStrideNd() const noexcept
1327  {
1328  return mImpl->getStrideNd();
1329  }
1330 
1344  void setPaddingNd(Dims padding) noexcept
1345  {
1346  mImpl->setPaddingNd(padding);
1347  }
1348 
1356  Dims getPaddingNd() const noexcept
1357  {
1358  return mImpl->getPaddingNd();
1359  }
1360 
1370  void setDilationNd(Dims dilation) noexcept
1371  {
1372  mImpl->setDilationNd(dilation);
1373  }
1374 
1380  Dims getDilationNd() const noexcept
1381  {
1382  return mImpl->getDilationNd();
1383  }
1384 
1403  using ILayer::setInput;
1404 
1405 protected:
1406  virtual ~IConvolutionLayer() noexcept = default;
1407  apiv::VConvolutionLayer* mImpl;
1408 };
1409 
1440 {
1441 public:
1449  void setNbOutputChannels(int32_t nbOutputs) noexcept
1450  {
1451  mImpl->setNbOutputChannels(nbOutputs);
1452  }
1453 
1459  int32_t getNbOutputChannels() const noexcept
1460  {
1461  return mImpl->getNbOutputChannels();
1462  }
1463 
1469  void setKernelWeights(Weights weights) noexcept
1470  {
1471  mImpl->setKernelWeights(weights);
1472  }
1473 
1479  Weights getKernelWeights() const noexcept
1480  {
1481  return mImpl->getKernelWeights();
1482  }
1483 
1491  void setBiasWeights(Weights weights) noexcept
1492  {
1493  mImpl->setBiasWeights(weights);
1494  }
1495 
1501  Weights getBiasWeights() const noexcept
1502  {
1503  return mImpl->getBiasWeights();
1504  }
1505 
1522  using ILayer::setInput;
1523 
1524 protected:
1525  virtual ~IFullyConnectedLayer() noexcept = default;
1526  apiv::VFullyConnectedLayer* mImpl;
1527 };
1528 
1540 class IActivationLayer : public ILayer
1541 {
1542 public:
1550  void setActivationType(ActivationType type) noexcept
1551  {
1552  mImpl->setActivationType(type);
1553  }
1554 
1561  {
1562  return mImpl->getActivationType();
1563  }
1564 
1575  void setAlpha(float alpha) noexcept
1576  {
1577  mImpl->setAlpha(alpha);
1578  }
1579 
1589  void setBeta(float beta) noexcept
1590  {
1591  mImpl->setBeta(beta);
1592  }
1593 
1598  float getAlpha() const noexcept
1599  {
1600  return mImpl->getAlpha();
1601  }
1602 
1607  float getBeta() const noexcept
1608  {
1609  return mImpl->getBeta();
1610  }
1611 
1612 protected:
1613  virtual ~IActivationLayer() noexcept = default;
1614  apiv::VActivationLayer* mImpl;
1615 };
1616 
1622 enum class PoolingType : int32_t
1623 {
1624  kMAX = 0, // Maximum over elements
1625  kAVERAGE = 1, // Average over elements. If the tensor is padded, the count includes the padding
1626  kMAX_AVERAGE_BLEND = 2 // Blending between max and average pooling: (1-blendFactor)*maxPool + blendFactor*avgPool
1627 };
1628 
1629 namespace impl
1630 {
1632 template <>
1634 {
1635  static constexpr int32_t kVALUE = 3;
1636 };
1637 } // namespace impl
1638 
1650 class IPoolingLayer : public ILayer
1651 {
1652 public:
1660  void setPoolingType(PoolingType type) noexcept
1661  {
1662  mImpl->setPoolingType(type);
1663  }
1664 
1670  PoolingType getPoolingType() const noexcept
1671  {
1672  return mImpl->getPoolingType();
1673  }
1674 
1684  TRT_DEPRECATED void setWindowSize(DimsHW windowSize) noexcept
1685  {
1686  mImpl->setWindowSize(windowSize);
1687  }
1688 
1697  {
1698  return mImpl->getWindowSize();
1699  }
1700 
1712  TRT_DEPRECATED void setStride(DimsHW stride) noexcept
1713  {
1714  mImpl->setStride(stride);
1715  }
1716 
1725  {
1726  return mImpl->getStride();
1727  }
1728 
1740  TRT_DEPRECATED void setPadding(DimsHW padding) noexcept
1741  {
1742  mImpl->setPadding(padding);
1743  }
1744 
1755  {
1756  return mImpl->getPadding();
1757  }
1758 
1769  void setBlendFactor(float blendFactor) noexcept
1770  {
1771  mImpl->setBlendFactor(blendFactor);
1772  }
1773 
1782  float getBlendFactor() const noexcept
1783  {
1784  return mImpl->getBlendFactor();
1785  }
1786 
1799  void setAverageCountExcludesPadding(bool exclusive) noexcept
1800  {
1801  mImpl->setAverageCountExcludesPadding(exclusive);
1802  }
1803 
1810  bool getAverageCountExcludesPadding() const noexcept
1811  {
1812  return mImpl->getAverageCountExcludesPadding();
1813  }
1814 
1828  void setPrePadding(Dims padding) noexcept
1829  {
1830  mImpl->setPrePadding(padding);
1831  }
1832 
1838  Dims getPrePadding() const noexcept
1839  {
1840  return mImpl->getPrePadding();
1841  }
1842 
1856  void setPostPadding(Dims padding) noexcept
1857  {
1858  mImpl->setPostPadding(padding);
1859  }
1860 
1866  Dims getPostPadding() const noexcept
1867  {
1868  return mImpl->getPostPadding();
1869  }
1870 
1879  void setPaddingMode(PaddingMode paddingMode) noexcept
1880  {
1881  mImpl->setPaddingMode(paddingMode);
1882  }
1883 
1890  PaddingMode getPaddingMode() const noexcept
1891  {
1892  return mImpl->getPaddingMode();
1893  }
1894 
1903  void setWindowSizeNd(Dims windowSize) noexcept
1904  {
1905  mImpl->setWindowSizeNd(windowSize);
1906  }
1907 
1913  Dims getWindowSizeNd() const noexcept
1914  {
1915  return mImpl->getWindowSizeNd();
1916  }
1917 
1928  void setStrideNd(Dims stride) noexcept
1929  {
1930  mImpl->setStrideNd(stride);
1931  }
1932 
1938  Dims getStrideNd() const noexcept
1939  {
1940  return mImpl->getStrideNd();
1941  }
1942 
1957  void setPaddingNd(Dims padding) noexcept
1958  {
1959  mImpl->setPaddingNd(padding);
1960  }
1961 
1969  Dims getPaddingNd() const noexcept
1970  {
1971  return mImpl->getPaddingNd();
1972  }
1973 
1974 protected:
1975  virtual ~IPoolingLayer() noexcept = default;
1976  apiv::VPoolingLayer* mImpl;
1977 };
1978 
1988 class ILRNLayer : public ILayer
1989 {
1990 public:
2000  void setWindowSize(int32_t windowSize) noexcept
2001  {
2002  mImpl->setWindowSize(windowSize);
2003  }
2004 
2010  int32_t getWindowSize() const noexcept
2011  {
2012  return mImpl->getWindowSize();
2013  }
2014 
2021  void setAlpha(float alpha) noexcept
2022  {
2023  mImpl->setAlpha(alpha);
2024  }
2025 
2031  float getAlpha() const noexcept
2032  {
2033  return mImpl->getAlpha();
2034  }
2035 
2042  void setBeta(float beta) noexcept
2043  {
2044  mImpl->setBeta(beta);
2045  }
2046 
2052  float getBeta() const noexcept
2053  {
2054  return mImpl->getBeta();
2055  }
2056 
2063  void setK(float k) noexcept
2064  {
2065  mImpl->setK(k);
2066  }
2067 
2073  float getK() const noexcept
2074  {
2075  return mImpl->getK();
2076  }
2077 
2078 protected:
2079  virtual ~ILRNLayer() noexcept = default;
2080  apiv::VLRNLayer* mImpl;
2081 };
2082 
2088 enum class ScaleMode : int32_t
2089 {
2090  kUNIFORM = 0,
2091  kCHANNEL = 1,
2092  kELEMENTWISE = 2
2093 };
2094 
2096 template <>
2097 constexpr inline int32_t EnumMax<ScaleMode>() noexcept
2098 {
2099  return 3;
2100 }
2101 
2128 class IScaleLayer : public ILayer
2129 {
2130 public:
2136  void setMode(ScaleMode mode) noexcept
2137  {
2138  mImpl->setMode(mode);
2139  }
2140 
2146  ScaleMode getMode() const noexcept
2147  {
2148  return mImpl->getMode();
2149  }
2150 
2156  void setShift(Weights shift) noexcept
2157  {
2158  mImpl->setShift(shift);
2159  }
2160 
2166  Weights getShift() const noexcept
2167  {
2168  return mImpl->getShift();
2169  }
2170 
2176  void setScale(Weights scale) noexcept
2177  {
2178  mImpl->setScale(scale);
2179  }
2180 
2186  Weights getScale() const noexcept
2187  {
2188  return mImpl->getScale();
2189  }
2190 
2196  void setPower(Weights power) noexcept
2197  {
2198  mImpl->setPower(power);
2199  }
2200 
2206  Weights getPower() const noexcept
2207  {
2208  return mImpl->getPower();
2209  }
2210 
2221  int32_t getChannelAxis() const noexcept
2222  {
2223  return mImpl->getChannelAxis();
2224  }
2225 
2242  void setChannelAxis(int32_t channelAxis) noexcept
2243  {
2244  mImpl->setChannelAxis(channelAxis);
2245  }
2246 
2247 protected:
2248  virtual ~IScaleLayer() noexcept = default;
2249  apiv::VScaleLayer* mImpl;
2250 };
2251 
2263 class ISoftMaxLayer : public ILayer
2264 {
2265 public:
2296  void setAxes(uint32_t axes) noexcept
2297  {
2298  mImpl->setAxes(axes);
2299  }
2300 
2306  uint32_t getAxes() const noexcept
2307  {
2308  return mImpl->getAxes();
2309  }
2310 
2311 protected:
2312  virtual ~ISoftMaxLayer() noexcept = default;
2313  apiv::VSoftMaxLayer* mImpl;
2314 };
2315 
2329 {
2330 public:
2341  void setAxis(int32_t axis) noexcept
2342  {
2343  mImpl->setAxis(axis);
2344  }
2345 
2351  int32_t getAxis() const noexcept
2352  {
2353  return mImpl->getAxis();
2354  }
2355 
2356 protected:
2357  virtual ~IConcatenationLayer() noexcept = default;
2358  apiv::VConcatenationLayer* mImpl;
2359 };
2360 
2369 {
2370 public:
2382  TRT_DEPRECATED void setKernelSize(DimsHW kernelSize) noexcept
2383  {
2384  mImpl->setKernelSize(kernelSize);
2385  }
2386 
2395  {
2396  return mImpl->getKernelSize();
2397  }
2398 
2406  void setNbOutputMaps(int32_t nbOutputMaps) noexcept
2407  {
2408  mImpl->setNbOutputMaps(nbOutputMaps);
2409  }
2410 
2416  int32_t getNbOutputMaps() const noexcept
2417  {
2418  return mImpl->getNbOutputMaps();
2419  }
2420 
2432  TRT_DEPRECATED void setStride(DimsHW stride) noexcept
2433  {
2434  mImpl->setStride(stride);
2435  }
2436 
2445  {
2446  return mImpl->getStride();
2447  }
2448 
2464  TRT_DEPRECATED void setPadding(DimsHW padding) noexcept
2465  {
2466  mImpl->setPadding(padding);
2467  }
2468 
2479  {
2480  return mImpl->getPadding();
2481  }
2482 
2498  void setNbGroups(int32_t nbGroups) noexcept
2499  {
2500  mImpl->setNbGroups(nbGroups);
2501  }
2502 
2508  int32_t getNbGroups() const noexcept
2509  {
2510  return mImpl->getNbGroups();
2511  }
2512 
2522  void setKernelWeights(Weights weights) noexcept
2523  {
2524  mImpl->setKernelWeights(weights);
2525  }
2526 
2532  Weights getKernelWeights() const noexcept
2533  {
2534  return mImpl->getKernelWeights();
2535  }
2536 
2547  void setBiasWeights(Weights weights) noexcept
2548  {
2549  mImpl->setBiasWeights(weights);
2550  }
2551 
2557  Weights getBiasWeights() const noexcept
2558  {
2559  return mImpl->getBiasWeights();
2560  }
2561 
2575  void setPrePadding(Dims padding) noexcept
2576  {
2577  mImpl->setPrePadding(padding);
2578  }
2579 
2585  Dims getPrePadding() const noexcept
2586  {
2587  return mImpl->getPrePadding();
2588  }
2589 
2603  void setPostPadding(Dims padding) noexcept
2604  {
2605  mImpl->setPostPadding(padding);
2606  }
2607 
2613  Dims getPostPadding() const noexcept
2614  {
2615  return mImpl->getPostPadding();
2616  }
2617 
2627  void setPaddingMode(PaddingMode paddingMode) noexcept
2628  {
2629  mImpl->setPaddingMode(paddingMode);
2630  }
2631 
2639  PaddingMode getPaddingMode() const noexcept
2640  {
2641  return mImpl->getPaddingMode();
2642  }
2643 
2652  void setKernelSizeNd(Dims kernelSize) noexcept
2653  {
2654  mImpl->setKernelSizeNd(kernelSize);
2655  }
2656 
2662  Dims getKernelSizeNd() const noexcept
2663  {
2664  return mImpl->getKernelSizeNd();
2665  }
2666 
2677  void setStrideNd(Dims stride) noexcept
2678  {
2679  mImpl->setStrideNd(stride);
2680  }
2681 
2687  Dims getStrideNd() const noexcept
2688  {
2689  return mImpl->getStrideNd();
2690  }
2691 
2705  void setPaddingNd(Dims padding) noexcept
2706  {
2707  mImpl->setPaddingNd(padding);
2708  }
2709 
2717  Dims getPaddingNd() const noexcept
2718  {
2719  return mImpl->getPaddingNd();
2720  }
2721 
2739  using ILayer::setInput;
2740 
2747  void setDilationNd(Dims dilation) noexcept
2748  {
2749  mImpl->setDilationNd(dilation);
2750  }
2751 
2757  Dims getDilationNd() const noexcept
2758  {
2759  return mImpl->getDilationNd();
2760  }
2761 
2762 protected:
2763  virtual ~IDeconvolutionLayer() noexcept = default;
2764  apiv::VDeconvolutionLayer* mImpl;
2765 };
2766 
2774 enum class ElementWiseOperation : int32_t
2775 {
2776  kSUM = 0,
2777  kPROD = 1,
2778  kMAX = 2,
2779  kMIN = 3,
2780  kSUB = 4,
2781  kDIV = 5,
2782  kPOW = 6,
2783  kFLOOR_DIV = 7,
2784  kAND = 8,
2785  kOR = 9,
2786  kXOR = 10,
2787  kEQUAL = 11,
2788  kGREATER = 12,
2789  kLESS = 13
2790 };
2791 
2792 namespace impl
2793 {
2795 template <>
2797 {
2798  static constexpr int32_t kVALUE = 14;
2799 };
2800 } // namespace impl
2801 
2815 //!
2822 {
2823 public:
2834  {
2835  return mImpl->setOperation(op);
2836  }
2837 
2846  {
2847  return mImpl->getOperation();
2848  }
2849 
2850 protected:
2851  apiv::VElementWiseLayer* mImpl;
2852  virtual ~IElementWiseLayer() noexcept = default;
2853 };
2854 
2858 class IGatherLayer : public ILayer
2859 {
2860 public:
2867  void setGatherAxis(int32_t axis) noexcept
2868  {
2869  mImpl->setGatherAxis(axis);
2870  }
2871 
2877  int32_t getGatherAxis() const noexcept
2878  {
2879  return mImpl->getGatherAxis();
2880  }
2881 
2889  void setNbElementWiseDims(int32_t k) noexcept
2890  {
2891  mImpl->setNbElementWiseDims(k);
2892  }
2893 
2899  int32_t getNbElementWiseDims() const noexcept
2900  {
2901  return mImpl->getNbElementWiseDims();
2902  }
2903 
2904 protected:
2905  apiv::VGatherLayer* mImpl;
2906  virtual ~IGatherLayer() noexcept = default;
2907 };
2908 
2988 enum class RNNOperation : int32_t
2989 {
2990  kRELU = 0,
2991  kTANH = 1,
2992  kLSTM = 2,
2993  kGRU = 3
2994 };
2995 
2997 template <>
2998 constexpr inline int32_t EnumMax<RNNOperation>() noexcept
2999 {
3000  return 4;
3001 }
3002 
3010 enum class RNNDirection : int32_t
3011 {
3012  kUNIDIRECTION = 0,
3013  kBIDIRECTION = 1
3014 };
3015 
3017 template <>
3018 constexpr inline int32_t EnumMax<RNNDirection>() noexcept
3019 {
3020  return 2;
3021 }
3022 
3038 enum class RNNInputMode : int32_t
3039 {
3040  kLINEAR = 0,
3041  kSKIP = 1
3042 };
3043 
3045 template <>
3046 constexpr inline int32_t EnumMax<RNNInputMode>() noexcept
3047 {
3048  return 2;
3049 }
3050 
3058 enum class RNNGateType : int32_t
3059 {
3060  kINPUT = 0,
3061  kOUTPUT = 1,
3062  kFORGET = 2,
3063  kUPDATE = 3,
3064  kRESET = 4,
3065  kCELL = 5,
3066  kHIDDEN = 6
3067 };
3068 
3069 template <>
3070 constexpr inline int32_t EnumMax<RNNGateType>() noexcept
3071 {
3072  return 7;
3073 }
3074 
3087 {
3088 public:
3089  int32_t getLayerCount() const noexcept
3090  {
3091  return mImpl->getLayerCount();
3092  }
3093  int32_t getHiddenSize() const noexcept
3094  {
3095  return mImpl->getHiddenSize();
3096  }
3097  int32_t getMaxSeqLength() const noexcept
3098  {
3099  return mImpl->getMaxSeqLength();
3100  }
3101  int32_t getDataLength() const noexcept
3102  {
3103  return mImpl->getDataLength();
3104  }
3105 
3120  void setSequenceLengths(ITensor& seqLengths) noexcept
3121  {
3122  return mImpl->setSequenceLengths(seqLengths);
3123  }
3124 
3132  ITensor* getSequenceLengths() const noexcept
3133  {
3134  return mImpl->getSequenceLengths();
3135  }
3136 
3141  void setOperation(RNNOperation op) noexcept
3142  {
3143  mImpl->setOperation(op);
3144  }
3145 
3150  RNNOperation getOperation() const noexcept
3151  {
3152  return mImpl->getOperation();
3153  }
3154 
3159  void setInputMode(RNNInputMode op) noexcept
3160  {
3161  mImpl->setInputMode(op);
3162  }
3163 
3168  RNNInputMode getInputMode() const noexcept
3169  {
3170  return mImpl->getInputMode();
3171  }
3172 
3183  void setDirection(RNNDirection op) noexcept
3184  {
3185  mImpl->setDirection(op);
3186  }
3187 
3192  RNNDirection getDirection() const noexcept
3193  {
3194  return mImpl->getDirection();
3195  }
3196 
3251  void setWeightsForGate(int32_t layerIndex, RNNGateType gate, bool isW, Weights weights) noexcept
3252  {
3253  mImpl->setWeightsForGate(layerIndex, gate, isW, weights);
3254  }
3255 
3260  Weights getWeightsForGate(int32_t layerIndex, RNNGateType gate, bool isW) const noexcept
3261  {
3262  return mImpl->getWeightsForGate(layerIndex, gate, isW);
3263  }
3264 
3285  void setBiasForGate(int32_t layerIndex, RNNGateType gate, bool isW, Weights bias) noexcept
3286  {
3287  mImpl->setBiasForGate(layerIndex, gate, isW, bias);
3288  }
3289 
3294  Weights getBiasForGate(int32_t layerIndex, RNNGateType gate, bool isW) const noexcept
3295  {
3296  return mImpl->getBiasForGate(layerIndex, gate, isW);
3297  }
3298 
3311  void setHiddenState(ITensor& hidden) noexcept
3312  {
3313  mImpl->setHiddenState(hidden);
3314  }
3315 
3320  ITensor* getHiddenState() const noexcept
3321  {
3322  return mImpl->getHiddenState();
3323  }
3324 
3339  void setCellState(ITensor& cell) noexcept
3340  {
3341  mImpl->setCellState(cell);
3342  }
3343 
3348  ITensor* getCellState() const noexcept
3349  {
3350  return mImpl->getCellState();
3351  }
3352 
3353 protected:
3354  apiv::VRNNv2Layer* mImpl;
3355  virtual ~IRNNv2Layer() noexcept = default;
3356 };
3357 
3367 class IPluginV2Layer : public ILayer
3368 {
3369 public:
3375  IPluginV2& getPlugin() noexcept
3376  {
3377  return mImpl->getPlugin();
3378  }
3379 
3380 protected:
3381  apiv::VPluginV2Layer* mImpl;
3382  virtual ~IPluginV2Layer() noexcept = default;
3383 };
3384 
3392 enum class UnaryOperation : int32_t
3393 {
3394  kEXP = 0,
3395  kLOG = 1,
3396  kSQRT = 2,
3397  kRECIP = 3,
3398  kABS = 4,
3399  kNEG = 5,
3400  kSIN = 6,
3401  kCOS = 7,
3402  kTAN = 8,
3403  kSINH = 9,
3404  kCOSH = 10,
3405  kASIN = 11,
3406  kACOS = 12,
3407  kATAN = 13,
3408  kASINH = 14,
3409  kACOSH = 15,
3410  kATANH = 16,
3411  kCEIL = 17,
3412  kFLOOR = 18,
3413  kERF = 19,
3414  kNOT = 20
3415 };
3416 
3418 template <>
3419 constexpr inline int32_t EnumMax<UnaryOperation>() noexcept
3420 {
3421  return 21;
3422 }
3423 
3431 class IUnaryLayer : public ILayer
3432 {
3433 public:
3439  void setOperation(UnaryOperation op) noexcept
3440  {
3441  mImpl->setOperation(op);
3442  }
3443 
3449  UnaryOperation getOperation() const noexcept
3450  {
3451  return mImpl->getOperation();
3452  }
3453 
3454 protected:
3455  apiv::VUnaryLayer* mImpl;
3456  virtual ~IUnaryLayer() noexcept = default;
3457 };
3458 
3477 enum class ReduceOperation : int32_t
3478 {
3479  kSUM = 0,
3480  kPROD = 1,
3481  kMAX = 2,
3482  kMIN = 3,
3483  kAVG = 4
3484 };
3485 
3487 template <>
3488 constexpr inline int32_t EnumMax<ReduceOperation>() noexcept
3489 {
3490  return 5;
3491 }
3492 
3500 class IReduceLayer : public ILayer
3501 {
3502 public:
3508  void setOperation(ReduceOperation op) noexcept
3509  {
3510  mImpl->setOperation(op);
3511  }
3512 
3519  {
3520  return mImpl->getOperation();
3521  }
3522 
3528  void setReduceAxes(uint32_t reduceAxes) noexcept
3529  {
3530  mImpl->setReduceAxes(reduceAxes);
3531  }
3532 
3538  uint32_t getReduceAxes() const noexcept
3539  {
3540  return mImpl->getReduceAxes();
3541  }
3542 
3548  void setKeepDimensions(bool keepDimensions) noexcept
3549  {
3550  mImpl->setKeepDimensions(keepDimensions);
3551  }
3552 
3558  bool getKeepDimensions() const noexcept
3559  {
3560  return mImpl->getKeepDimensions();
3561  }
3562 
3563 protected:
3564  apiv::VReduceLayer* mImpl;
3565  virtual ~IReduceLayer() noexcept = default;
3566 };
3567 
3578 class IPaddingLayer : public ILayer
3579 {
3580 public:
3590  TRT_DEPRECATED void setPrePadding(DimsHW padding) noexcept
3591  {
3592  mImpl->setPrePadding(padding);
3593  }
3594 
3603  {
3604  return mImpl->getPrePadding();
3605  }
3606 
3616  TRT_DEPRECATED void setPostPadding(DimsHW padding) noexcept
3617  {
3618  mImpl->setPostPadding(padding);
3619  }
3620 
3629  {
3630  return mImpl->getPostPadding();
3631  }
3632 
3642  void setPrePaddingNd(Dims padding) noexcept
3643  {
3644  mImpl->setPrePaddingNd(padding);
3645  }
3646 
3654  Dims getPrePaddingNd() const noexcept
3655  {
3656  return mImpl->getPrePaddingNd();
3657  }
3658 
3668  void setPostPaddingNd(Dims padding) noexcept
3669  {
3670  mImpl->setPostPaddingNd(padding);
3671  }
3672 
3680  Dims getPostPaddingNd() const noexcept
3681  {
3682  return mImpl->getPostPaddingNd();
3683  }
3684 
3685 protected:
3686  apiv::VPaddingLayer* mImpl;
3687  virtual ~IPaddingLayer() noexcept = default;
3688 };
3689 
3691 {
3698  int32_t order[Dims::MAX_DIMS];
3699 };
3700 
3713 class IShuffleLayer : public ILayer
3714 {
3715 public:
3725  void setFirstTranspose(Permutation permutation) noexcept
3726  {
3727  mImpl->setFirstTranspose(permutation);
3728  }
3729 
3738  {
3739  return mImpl->getFirstTranspose();
3740  }
3741 
3762  void setReshapeDimensions(Dims dimensions) noexcept
3763  {
3764  mImpl->setReshapeDimensions(dimensions);
3765  }
3766 
3775  Dims getReshapeDimensions() const noexcept
3776  {
3777  return mImpl->getReshapeDimensions();
3778  }
3779 
3785  //
3808  using ILayer::setInput;
3809 
3822  void setSecondTranspose(Permutation permutation) noexcept
3823  {
3824  mImpl->setSecondTranspose(permutation);
3825  }
3826 
3835  {
3836  return mImpl->getSecondTranspose();
3837  }
3838 
3850  void setZeroIsPlaceholder(bool zeroIsPlaceholder) noexcept
3851  {
3852  return mImpl->setZeroIsPlaceholder(zeroIsPlaceholder);
3853  }
3854 
3863  bool getZeroIsPlaceholder() const noexcept
3864  {
3865  return mImpl->getZeroIsPlaceholder();
3866  }
3867 
3868 protected:
3869  apiv::VShuffleLayer* mImpl;
3870  virtual ~IShuffleLayer() noexcept = default;
3871 };
3872 
3878 enum class SliceMode : int32_t
3879 {
3880  kDEFAULT = 0,
3881  kWRAP = 1,
3882 };
3883 
3885 template <>
3886 constexpr inline int32_t EnumMax<SliceMode>() noexcept
3887 {
3888  return 2;
3889 }
3890 
3921 class ISliceLayer : public ILayer
3922 {
3923 public:
3933  void setStart(Dims start) noexcept
3934  {
3935  mImpl->setStart(start);
3936  }
3937 
3948  Dims getStart() const noexcept
3949  {
3950  return mImpl->getStart();
3951  }
3952 
3962  void setSize(Dims size) noexcept
3963  {
3964  return mImpl->setSize(size);
3965  }
3966 
3977  Dims getSize() const noexcept
3978  {
3979  return mImpl->getSize();
3980  }
3981 
3991  void setStride(Dims stride) noexcept
3992  {
3993  mImpl->setStride(stride);
3994  }
3995 
4006  Dims getStride() const noexcept
4007  {
4008  return mImpl->getStride();
4009  }
4010 
4016  void setMode(SliceMode mode) noexcept
4017  {
4018  mImpl->setMode(mode);
4019  }
4020 
4026  SliceMode getMode() const noexcept
4027  {
4028  return mImpl->getMode();
4029  }
4030 
4049  using ILayer::setInput;
4050 
4051 protected:
4052  apiv::VSliceLayer* mImpl;
4053  virtual ~ISliceLayer() noexcept = default;
4054 };
4055 
4068 class IShapeLayer : public ILayer
4069 {
4070 protected:
4071  apiv::VShapeLayer* mImpl;
4072  virtual ~IShapeLayer() noexcept = default;
4073 };
4074 
4080 enum class TopKOperation : int32_t
4081 {
4082  kMAX = 0,
4083  kMIN = 1,
4084 };
4085 
4087 template <>
4088 constexpr inline int32_t EnumMax<TopKOperation>() noexcept
4089 {
4090  return 2;
4091 }
4092 
4100 class ITopKLayer : public ILayer
4101 {
4102 public:
4108  void setOperation(TopKOperation op) noexcept
4109  {
4110  mImpl->setOperation(op);
4111  }
4112 
4118  TopKOperation getOperation() const noexcept
4119  {
4120  return mImpl->getOperation();
4121  }
4122 
4130  void setK(int32_t k) noexcept
4131  {
4132  mImpl->setK(k);
4133  }
4134 
4140  int32_t getK() const noexcept
4141  {
4142  return mImpl->getK();
4143  }
4144 
4150  void setReduceAxes(uint32_t reduceAxes) noexcept
4151  {
4152  mImpl->setReduceAxes(reduceAxes);
4153  }
4154 
4160  uint32_t getReduceAxes() const noexcept
4161  {
4162  return mImpl->getReduceAxes();
4163  }
4164 
4165 protected:
4166  apiv::VTopKLayer* mImpl;
4167  virtual ~ITopKLayer() noexcept = default;
4168 };
4169 
4176 enum class MatrixOperation : int32_t
4177 {
4181  kNONE,
4182 
4184  kTRANSPOSE,
4185 
4195  kVECTOR
4196 };
4197 
4199 template <>
4200 constexpr inline int32_t EnumMax<MatrixOperation>() noexcept
4201 {
4202  return 3;
4203 }
4204 
4231 {
4232 public:
4239  void setOperation(int32_t index, MatrixOperation op) noexcept
4240  {
4241  mImpl->setOperation(index, op);
4242  }
4243 
4249  MatrixOperation getOperation(int32_t index) const noexcept
4250  {
4251  return mImpl->getOperation(index);
4252  }
4253 
4254 protected:
4256  virtual ~IMatrixMultiplyLayer() noexcept = default;
4257 };
4258 
4274 {
4275 protected:
4277  virtual ~IRaggedSoftMaxLayer() noexcept = default;
4278 };
4279 
4291 class IIdentityLayer : public ILayer
4292 {
4293 protected:
4294  apiv::VIdentityLayer* mImpl;
4295  virtual ~IIdentityLayer() noexcept = default;
4296 };
4297 
4305 class IConstantLayer : public ILayer
4306 {
4307 public:
4317  void setWeights(Weights weights) noexcept
4318  {
4319  mImpl->setWeights(weights);
4320  }
4321 
4327  Weights getWeights() const noexcept
4328  {
4329  return mImpl->getWeights();
4330  }
4331 
4339  void setDimensions(Dims dimensions) noexcept
4340  {
4341  mImpl->setDimensions(dimensions);
4342  }
4343 
4351  Dims getDimensions() const noexcept
4352  {
4353  return mImpl->getDimensions();
4354  }
4355 
4356 protected:
4357  apiv::VConstantLayer* mImpl;
4358  virtual ~IConstantLayer() noexcept = default;
4359 };
4360 
4369 {
4370 protected:
4372  virtual ~IParametricReLULayer() noexcept = default;
4373 };
4374 
4380 enum class ResizeMode : int32_t
4381 {
4382  kNEAREST = 0,
4383  kLINEAR = 1
4384 };
4385 
4386 namespace impl
4387 {
4389 template <>
4391 {
4392  static constexpr int32_t kVALUE = 2;
4393 };
4394 } // namespace impl
4395 
4404 {
4417  kALIGN_CORNERS = 0,
4418 
4425  kASYMMETRIC = 1,
4426 
4433  kHALF_PIXEL = 2,
4434 };
4435 
4436 namespace impl
4437 {
4439 template <>
4441 {
4442  static constexpr int32_t kVALUE = 3;
4443 };
4444 } // namespace impl
4445 
4453 enum class ResizeSelector : int32_t
4454 {
4456  kFORMULA = 0,
4457 
4459  kUPPER = 1,
4460 };
4461 
4462 namespace impl
4463 {
4465 template <>
4467 {
4468  static constexpr int32_t kVALUE = 2;
4469 };
4470 } // namespace impl
4471 
4480 enum class ResizeRoundMode : int32_t
4481 {
4483  kHALF_UP = 0,
4484 
4486  kHALF_DOWN = 1,
4487 
4489  kFLOOR = 2,
4490 
4492  kCEIL = 3,
4493 };
4494 
4495 namespace impl
4496 {
4498 template <>
4500 {
4501  static constexpr int32_t kVALUE = 4;
4502 };
4503 } // namespace impl
4504 
4526 class IResizeLayer : public ILayer
4527 {
4528 public:
4545  void setOutputDimensions(Dims dimensions) noexcept
4546  {
4547  return mImpl->setOutputDimensions(dimensions);
4548  }
4549 
4555  Dims getOutputDimensions() const noexcept
4556  {
4557  return mImpl->getOutputDimensions();
4558  }
4559 
4578  void setScales(const float* scales, int32_t nbScales) noexcept
4579  {
4580  mImpl->setScales(scales, nbScales);
4581  }
4582 
4597  int32_t getScales(int32_t size, float* scales) const noexcept
4598  {
4599  return mImpl->getScales(size, scales);
4600  }
4601 
4609  void setResizeMode(ResizeMode resizeMode) noexcept
4610  {
4611  mImpl->setResizeMode(resizeMode);
4612  }
4613 
4619  ResizeMode getResizeMode() const noexcept
4620  {
4621  return mImpl->getResizeMode();
4622  }
4623 
4636  TRT_DEPRECATED void setAlignCorners(bool alignCorners) noexcept
4637  {
4638  mImpl->setAlignCorners(alignCorners);
4639  }
4640 
4649  TRT_DEPRECATED bool getAlignCorners() const noexcept
4650  {
4651  return mImpl->getAlignCorners();
4652  }
4653 
4673  using ILayer::setInput;
4674 
4685  {
4686  mImpl->setCoordinateTransformation(coordTransform);
4687  }
4688 
4695  {
4696  return mImpl->getCoordinateTransformation();
4697  }
4698 
4710  {
4711  mImpl->setSelectorForSinglePixel(selector);
4712  }
4713 
4720  {
4721  return mImpl->getSelectorForSinglePixel();
4722  }
4723 
4734  {
4735  mImpl->setNearestRounding(value);
4736  }
4737 
4744  {
4745  return mImpl->getNearestRounding();
4746  }
4747 
4748 protected:
4749  virtual ~IResizeLayer() noexcept = default;
4750  apiv::VResizeLayer* mImpl;
4751 };
4752 
4754 enum class LoopOutput : int32_t
4755 {
4757  kLAST_VALUE = 0,
4758 
4760  kCONCATENATE = 1,
4761 
4763  kREVERSE = 2
4764 };
4765 
4767 template <>
4768 constexpr inline int32_t EnumMax<LoopOutput>() noexcept
4769 {
4770  return 3;
4771 }
4772 
4774 enum class TripLimit : int32_t
4775 {
4776 
4777  kCOUNT = 0,
4778  kWHILE = 1
4779 };
4780 
4782 template <>
4783 constexpr inline int32_t EnumMax<TripLimit>() noexcept
4784 {
4785  return 2;
4786 }
4787 
4788 class ILoop;
4789 
4791 {
4792 public:
4794  ILoop* getLoop() const noexcept
4795  {
4796  return mBoundary->getLoop();
4797  }
4798 
4799 protected:
4800  virtual ~ILoopBoundaryLayer() noexcept = default;
4801  apiv::VLoopBoundaryLayer* mBoundary;
4802 };
4803 
4805 {
4806 public:
4812  //
4825  using ILayer::setInput;
4826 
4827 protected:
4828  virtual ~IRecurrenceLayer() noexcept = default;
4829  apiv::VRecurrenceLayer* mImpl;
4830 };
4831 
4850 {
4851 public:
4852  LoopOutput getLoopOutput() const noexcept
4853  {
4854  return mImpl->getLoopOutput();
4855  }
4856 
4869  void setAxis(int32_t axis) noexcept
4870  {
4871  mImpl->setAxis(axis);
4872  }
4873 
4875  int32_t getAxis() const noexcept
4876  {
4877  return mImpl->getAxis();
4878  }
4879 
4885  //
4900  using ILayer::setInput;
4901 
4902 protected:
4903  virtual ~ILoopOutputLayer() noexcept = default;
4904  apiv::VLoopOutputLayer* mImpl;
4905 };
4906 
4908 {
4909 public:
4910  TripLimit getTripLimit() const noexcept
4911  {
4912  return mImpl->getTripLimit();
4913  }
4914 
4915 protected:
4916  virtual ~ITripLimitLayer() noexcept = default;
4917  apiv::VTripLimitLayer* mImpl;
4918 };
4919 
4921 {
4922 public:
4924  void setAxis(int32_t axis) noexcept
4925  {
4926  mImpl->setAxis(axis);
4927  }
4928 
4930  int32_t getAxis() const noexcept
4931  {
4932  return mImpl->getAxis();
4933  }
4934 
4940  void setReverse(bool reverse) noexcept
4941  {
4942  mImpl->setReverse(reverse);
4943  }
4944 
4946  bool getReverse() const noexcept
4947  {
4948  return mImpl->getReverse();
4949  }
4950 
4951 protected:
4952  virtual ~IIteratorLayer() noexcept = default;
4953  apiv::VIteratorLayer* mImpl;
4954 };
4955 
4961 class ILoop : public INoCopy
4962 {
4963 public:
4970  IRecurrenceLayer* addRecurrence(ITensor& initialValue) noexcept
4971  {
4972  return mImpl->addRecurrence(initialValue);
4973  }
4974 
4991  ITripLimitLayer* addTripLimit(ITensor& tensor, TripLimit limit) noexcept
4992  {
4993  return mImpl->addTripLimit(tensor, limit);
4994  }
4995 
5004  IIteratorLayer* addIterator(ITensor& tensor, int32_t axis = 0, bool reverse = false) noexcept
5005  {
5006  return mImpl->addIterator(tensor, axis, reverse);
5007  }
5008 
5016  ILoopOutputLayer* addLoopOutput(ITensor& tensor, LoopOutput outputKind, int32_t axis = 0) noexcept
5017  {
5018  return mImpl->addLoopOutput(tensor, outputKind, axis);
5019  }
5020 
5029  void setName(const char* name) noexcept
5030  {
5031  mImpl->setName(name);
5032  }
5033 
5039  const char* getName() const noexcept
5040  {
5041  return mImpl->getName();
5042  }
5043 
5044 protected:
5045  virtual ~ILoop() noexcept = default;
5046  apiv::VLoop* mImpl;
5047 };
5048 
5052 class ISelectLayer : public ILayer
5053 {
5054 protected:
5055  virtual ~ISelectLayer() noexcept = default;
5056  apiv::VSelectLayer* mImpl;
5057 };
5058 
5066 enum class FillOperation : int32_t
5067 {
5068  kLINSPACE = 0,
5069  kRANDOM_UNIFORM = 1
5070 };
5071 
5073 template <>
5074 constexpr inline int32_t EnumMax<FillOperation>() noexcept
5075 {
5076  return 2;
5077 }
5078 
5104 class IFillLayer : public ILayer
5105 {
5106 public:
5115  //
5116  void setDimensions(Dims dimensions) noexcept
5117  {
5118  mImpl->setDimensions(dimensions);
5119  }
5120 
5131  Dims getDimensions() const noexcept
5132  {
5133  return mImpl->getDimensions();
5134  }
5135 
5141  void setOperation(FillOperation op) noexcept
5142  {
5143  mImpl->setOperation(op);
5144  }
5145 
5151  FillOperation getOperation() const noexcept
5152  {
5153  return mImpl->getOperation();
5154  }
5155 
5168  //
5169  void setAlpha(double alpha) noexcept
5170  {
5171  mImpl->setAlpha(alpha);
5172  }
5173 
5184  double getAlpha() const noexcept
5185  {
5186  return mImpl->getAlpha();
5187  }
5188 
5202  void setBeta(double beta) noexcept
5203  {
5204  mImpl->setBeta(beta);
5205  }
5206 
5217  double getBeta() const noexcept
5218  {
5219  return mImpl->getBeta();
5220  }
5221 
5248  using ILayer::setInput;
5249 
5250 protected:
5251  virtual ~IFillLayer() noexcept = default;
5252  apiv::VFillLayer* mImpl;
5253 };
5254 
5312 class IQuantizeLayer : public ILayer
5313 {
5314 public:
5323  int32_t getAxis() const noexcept
5324  {
5325  return mImpl->getAxis();
5326  }
5334  void setAxis(int32_t axis) noexcept
5335  {
5336  mImpl->setAxis(axis);
5337  }
5338 
5339 protected:
5340  virtual ~IQuantizeLayer() noexcept = default;
5341  apiv::VQuantizeLayer* mImpl;
5342 };
5343 
5399 class IDequantizeLayer : public ILayer
5400 {
5401 public:
5410  int32_t getAxis() const noexcept
5411  {
5412  return mImpl->getAxis();
5413  }
5421  void setAxis(int32_t axis) noexcept
5422  {
5423  mImpl->setAxis(axis);
5424  }
5425 
5426 protected:
5427  virtual ~IDequantizeLayer() noexcept = default;
5428  apiv::VDequantizeLayer* mImpl;
5429 };
5430 
5451 {
5452 public:
5453  virtual ~INetworkDefinition() noexcept = default;
5454 
5490  ITensor* addInput(const char* name, DataType type, Dims dimensions) noexcept
5491  {
5492  return mImpl->addInput(name, type, dimensions);
5493  }
5494 
5502  void markOutput(ITensor& tensor) noexcept
5503  {
5504  mImpl->markOutput(tensor);
5505  }
5506 
5526  ITensor& input, int32_t nbOutputMaps, DimsHW kernelSize, Weights kernelWeights, Weights biasWeights) noexcept
5527  {
5528  return mImpl->addConvolution(input, nbOutputMaps, kernelSize, kernelWeights, biasWeights);
5529  }
5530 
5547  ITensor& input, int32_t nbOutputs, Weights kernelWeights, Weights biasWeights) noexcept
5548  {
5549  return mImpl->addFullyConnected(input, nbOutputs, kernelWeights, biasWeights);
5550  }
5551 
5567  {
5568  return mImpl->addActivation(input, type);
5569  }
5570 
5585  TRT_DEPRECATED IPoolingLayer* addPooling(ITensor& input, PoolingType type, DimsHW windowSize) noexcept
5586  {
5587  return mImpl->addPooling(input, type, windowSize);
5588  }
5589 
5604  ILRNLayer* addLRN(ITensor& input, int32_t window, float alpha, float beta, float k) noexcept
5605  {
5606  return mImpl->addLRN(input, window, alpha, beta, k);
5607  }
5608 
5631  IScaleLayer* addScale(ITensor& input, ScaleMode mode, Weights shift, Weights scale, Weights power) noexcept
5632  {
5633  return mImpl->addScale(input, mode, shift, scale, power);
5634  }
5635 
5645  {
5646  return mImpl->addSoftMax(input);
5647  }
5648 
5661  IConcatenationLayer* addConcatenation(ITensor* const* inputs, int32_t nbInputs) noexcept
5662  {
5663  return mImpl->addConcatenation(inputs, nbInputs);
5664  }
5665 
5685  ITensor& input, int32_t nbOutputMaps, DimsHW kernelSize, Weights kernelWeights, Weights biasWeights) noexcept
5686  {
5687  return mImpl->addDeconvolution(input, nbOutputMaps, kernelSize, kernelWeights, biasWeights);
5688  }
5689 
5711  {
5712  return mImpl->addElementWise(input1, input2, op);
5713  }
5714 
5729  IUnaryLayer* addUnary(ITensor& input, UnaryOperation operation) noexcept
5730  {
5731  return mImpl->addUnary(input, operation);
5732  }
5733 
5746  TRT_DEPRECATED IPaddingLayer* addPadding(ITensor& input, DimsHW prePadding, DimsHW postPadding) noexcept
5747  {
5748  return mImpl->addPadding(input, prePadding, postPadding);
5749  }
5750 
5761  {
5762  return mImpl->addShuffle(input);
5763  }
5764 
5772  int32_t getNbLayers() const noexcept
5773  {
5774  return mImpl->getNbLayers();
5775  }
5776 
5786  ILayer* getLayer(int32_t index) const noexcept
5787  {
5788  return mImpl->getLayer(index);
5789  }
5790 
5798  int32_t getNbInputs() const noexcept
5799  {
5800  return mImpl->getNbInputs();
5801  }
5802 
5814  ITensor* getInput(int32_t index) const noexcept
5815  {
5816  return mImpl->getInput(index);
5817  }
5818 
5828  int32_t getNbOutputs() const noexcept
5829  {
5830  return mImpl->getNbOutputs();
5831  }
5832 
5844  ITensor* getOutput(int32_t index) const noexcept
5845  {
5846  return mImpl->getOutput(index);
5847  }
5848 
5856  TRT_DEPRECATED void destroy() noexcept
5857  {
5858  delete this;
5859  }
5860 
5885  ITensor& input, ReduceOperation operation, uint32_t reduceAxes, bool keepDimensions) noexcept
5886  {
5887  return mImpl->addReduce(input, operation, reduceAxes, keepDimensions);
5888  }
5889 
5918  ITopKLayer* addTopK(ITensor& input, TopKOperation op, int32_t k, uint32_t reduceAxes) noexcept
5919  {
5920  return mImpl->addTopK(input, op, k, reduceAxes);
5921  }
5922 
5934  IGatherLayer* addGather(ITensor& data, ITensor& indices, int32_t axis) noexcept
5935  {
5936  return mImpl->addGather(data, indices, axis);
5937  }
5938 
5953  {
5954  return mImpl->addRaggedSoftMax(input, bounds);
5955  }
5956 
5972  ITensor& input0, MatrixOperation op0, ITensor& input1, MatrixOperation op1) noexcept
5973  {
5974  return mImpl->addMatrixMultiply(input0, op0, input1, op1);
5975  }
5976 
5997  IConstantLayer* addConstant(Dims dimensions, Weights weights) noexcept
5998  {
5999  return mImpl->addConstant(dimensions, weights);
6000  }
6001 
6066  ITensor& input, int32_t layerCount, int32_t hiddenSize, int32_t maxSeqLen, RNNOperation op) noexcept
6067  {
6068  return mImpl->addRNNv2(input, layerCount, hiddenSize, maxSeqLen, op);
6069  }
6070 
6083  {
6084  return mImpl->addIdentity(input);
6085  }
6086 
6097  void removeTensor(ITensor& tensor) noexcept
6098  {
6099  mImpl->removeTensor(tensor);
6100  }
6101 
6109  void unmarkOutput(ITensor& tensor) noexcept
6110  {
6111  mImpl->unmarkOutput(tensor);
6112  }
6113 
6128  IPluginV2Layer* addPluginV2(ITensor* const* inputs, int32_t nbInputs, IPluginV2& plugin) noexcept
6129  {
6130  return mImpl->addPluginV2(inputs, nbInputs, plugin);
6131  }
6132 
6147  ISliceLayer* addSlice(ITensor& input, Dims start, Dims size, Dims stride) noexcept
6148  {
6149  return mImpl->addSlice(input, start, size, stride);
6150  }
6151 
6169  void setName(const char* name) noexcept
6170  {
6171  mImpl->setName(name);
6172  }
6173 
6183  const char* getName() const noexcept
6184  {
6185  return mImpl->getName();
6186  }
6187 
6201  IShapeLayer* addShape(ITensor& input) noexcept
6202  {
6203  return mImpl->addShape(input);
6204  }
6205 
6220  bool hasImplicitBatchDimension() const noexcept
6221  {
6222  return mImpl->hasImplicitBatchDimension();
6223  }
6224 
6238  bool markOutputForShapes(ITensor& tensor) noexcept
6239  {
6240  return mImpl->markOutputForShapes(tensor);
6241  }
6242 
6250  bool unmarkOutputForShapes(ITensor& tensor) noexcept
6251  {
6252  return mImpl->unmarkOutputForShapes(tensor);
6253  }
6254 
6269  {
6270  return mImpl->addParametricReLU(input, slope);
6271  }
6272 
6291  ITensor& input, int32_t nbOutputMaps, Dims kernelSize, Weights kernelWeights, Weights biasWeights) noexcept
6292  {
6293  return mImpl->addConvolutionNd(input, nbOutputMaps, kernelSize, kernelWeights, biasWeights);
6294  }
6295 
6310  IPoolingLayer* addPoolingNd(ITensor& input, PoolingType type, Dims windowSize) noexcept
6311  {
6312  return mImpl->addPoolingNd(input, type, windowSize);
6313  }
6314 
6329  //
6333  ITensor& input, int32_t nbOutputMaps, Dims kernelSize, Weights kernelWeights, Weights biasWeights) noexcept
6334  {
6335  return mImpl->addDeconvolutionNd(input, nbOutputMaps, kernelSize, kernelWeights, biasWeights);
6336  }
6337 
6369  ITensor& input, ScaleMode mode, Weights shift, Weights scale, Weights power, int32_t channelAxis) noexcept
6370  {
6371  return mImpl->addScaleNd(input, mode, shift, scale, power, channelAxis);
6372  }
6373 
6384  IResizeLayer* addResize(ITensor& input) noexcept
6385  {
6386  return mImpl->addResize(input);
6387  }
6388 
6401  TRT_DEPRECATED bool hasExplicitPrecision() const noexcept
6402  {
6403  return mImpl->hasExplicitPrecision();
6404  }
6405 
6417  ILoop* addLoop() noexcept
6418  {
6419  return mImpl->addLoop();
6420  }
6421 
6455  ISelectLayer* addSelect(ITensor& condition, ITensor& thenInput, ITensor& elseInput) noexcept
6456  {
6457  return mImpl->addSelect(condition, thenInput, elseInput);
6458  }
6459 
6473  IFillLayer* addFill(Dims dimensions, FillOperation op) noexcept
6474  {
6475  return mImpl->addFill(dimensions, op);
6476  }
6477 
6488  IPaddingLayer* addPaddingNd(ITensor& input, Dims prePadding, Dims postPadding) noexcept
6489  {
6490  return mImpl->addPaddingNd(input, prePadding, postPadding);
6491  }
6492 
6508  bool setWeightsName(Weights weights, const char* name) noexcept
6509  {
6510  return mImpl->setWeightsName(weights, name);
6511  }
6512 
6524  //
6527  void setErrorRecorder(IErrorRecorder* recorder) noexcept
6528  {
6529  mImpl->setErrorRecorder(recorder);
6530  }
6531 
6543  {
6544  return mImpl->getErrorRecorder();
6545  }
6546 
6561  IDequantizeLayer* addDequantize(ITensor& input, ITensor& scale) noexcept
6562  {
6563  return mImpl->addDequantize(input, scale);
6564  }
6565 
6580  IQuantizeLayer* addQuantize(ITensor& input, ITensor& scale) noexcept
6581  {
6582  return mImpl->addQuantize(input, scale);
6583  }
6584 
6585 protected:
6586  apiv::VNetworkDefinition* mImpl;
6587 };
6588 
6594 enum class CalibrationAlgoType : int32_t
6595 {
6596  kLEGACY_CALIBRATION = 0,
6597  kENTROPY_CALIBRATION = 1,
6598  kENTROPY_CALIBRATION_2 = 2,
6599  kMINMAX_CALIBRATION = 3,
6600 };
6601 
6603 template <>
6604 constexpr inline int32_t EnumMax<CalibrationAlgoType>() noexcept
6605 {
6606  return 4;
6607 }
6608 
6621 {
6622 public:
6628  virtual int32_t getBatchSize() const noexcept = 0;
6629 
6643  virtual bool getBatch(void* bindings[], const char* names[], int32_t nbBindings) noexcept = 0;
6644 
6659  virtual const void* readCalibrationCache(std::size_t& length) noexcept = 0;
6660 
6669  virtual void writeCalibrationCache(const void* ptr, std::size_t length) noexcept = 0;
6670 
6676  virtual CalibrationAlgoType getAlgorithm() noexcept = 0;
6677 
6678  virtual ~IInt8Calibrator() noexcept = default;
6679 };
6680 
6686 {
6687 public:
6691  CalibrationAlgoType getAlgorithm() noexcept override
6692  {
6693  return CalibrationAlgoType::kENTROPY_CALIBRATION;
6694  }
6695 
6696  virtual ~IInt8EntropyCalibrator() noexcept = default;
6697 };
6698 
6704 {
6705 public:
6709  CalibrationAlgoType getAlgorithm() noexcept override
6710  {
6711  return CalibrationAlgoType::kENTROPY_CALIBRATION_2;
6712  }
6713 
6714  virtual ~IInt8EntropyCalibrator2() noexcept = default;
6715 };
6716 
6721 {
6722 public:
6726  CalibrationAlgoType getAlgorithm() noexcept override
6727  {
6728  return CalibrationAlgoType::kMINMAX_CALIBRATION;
6729  }
6730 
6731  virtual ~IInt8MinMaxCalibrator() noexcept = default;
6732 };
6733 
6739 {
6740 public:
6744  CalibrationAlgoType getAlgorithm() noexcept override
6745  {
6746  return CalibrationAlgoType::kLEGACY_CALIBRATION;
6747  }
6748 
6755  virtual double getQuantile() const noexcept = 0;
6756 
6763  virtual double getRegressionCutoff() const noexcept = 0;
6764 
6777  virtual const void* readHistogramCache(std::size_t& length) noexcept = 0;
6778 
6787  virtual void writeHistogramCache(const void* ptr, std::size_t length) noexcept = 0;
6788 
6789  virtual ~IInt8LegacyCalibrator() noexcept = default;
6790 };
6791 
6803 {
6804 public:
6809  {
6810  return mImpl->getTensorFormat();
6811  }
6812 
6816  DataType getDataType() const noexcept
6817  {
6818  return mImpl->getDataType();
6819  }
6820 
6824  Dims getStrides() const noexcept
6825  {
6826  return mImpl->getStrides();
6827  }
6828 
6829 protected:
6830  virtual ~IAlgorithmIOInfo() noexcept = default;
6831  apiv::VAlgorithmIOInfo* mImpl;
6832 };
6833 
6846 {
6847 public:
6851  int64_t getImplementation() const noexcept
6852  {
6853  return mImpl->getImplementation();
6854  }
6855 
6859  int64_t getTactic() const noexcept
6860  {
6861  return mImpl->getTactic();
6862  }
6863 
6864 protected:
6865  virtual ~IAlgorithmVariant() noexcept = default;
6866  apiv::VAlgorithmVariant* mImpl;
6867 };
6868 
6878 {
6879 public:
6884  const char* getName() const noexcept
6885  {
6886  return mImpl->getName();
6887  }
6888 
6895  Dims getDimensions(int32_t index, OptProfileSelector select) const noexcept
6896  {
6897  return mImpl->getDimensions(index, select);
6898  }
6899 
6903  int32_t getNbInputs() const noexcept
6904  {
6905  return mImpl->getNbInputs();
6906  }
6907 
6911  int32_t getNbOutputs() const noexcept
6912  {
6913  return mImpl->getNbOutputs();
6914  }
6915 
6916 protected:
6917  virtual ~IAlgorithmContext() noexcept = default;
6918  apiv::VAlgorithmContext* mImpl;
6919 };
6920 
6930 class IAlgorithm : public INoCopy
6931 {
6932 public:
6943  TRT_DEPRECATED const IAlgorithmIOInfo& getAlgorithmIOInfo(int32_t index) const noexcept
6944  {
6945  return mImpl->getAlgorithmIOInfo(index);
6946  }
6947 
6951  const IAlgorithmVariant& getAlgorithmVariant() const noexcept
6952  {
6953  return mImpl->getAlgorithmVariant();
6954  }
6955 
6959  float getTimingMSec() const noexcept
6960  {
6961  return mImpl->getTimingMSec();
6962  }
6963 
6967  std::size_t getWorkspaceSize() const noexcept
6968  {
6969  return mImpl->getWorkspaceSize();
6970  }
6971 
6980  const IAlgorithmIOInfo* getAlgorithmIOInfoByIndex(int32_t index) const noexcept
6981  {
6982  return mImpl->getAlgorithmIOInfoByIndex(index);
6983  }
6984 
6985 protected:
6986  virtual ~IAlgorithm() noexcept = default;
6987  apiv::VAlgorithm* mImpl;
6988 }; // IAlgorithm
6989 
6999 {
7000 public:
7014  virtual int32_t selectAlgorithms(const IAlgorithmContext& context, const IAlgorithm* const* choices,
7015  int32_t nbChoices, int32_t* selection) noexcept
7016  = 0;
7027  virtual void reportAlgorithms(const IAlgorithmContext* const* algoContexts, const IAlgorithm* const* algoChoices,
7028  int32_t nbAlgorithms) noexcept
7029  = 0;
7030 
7031  virtual ~IAlgorithmSelector() noexcept = default;
7032 };
7033 
7040 using QuantizationFlags = uint32_t;
7041 
7049 enum class QuantizationFlag : int32_t
7050 {
7055 };
7056 
7058 template <>
7059 constexpr inline int32_t EnumMax<QuantizationFlag>() noexcept
7060 {
7061  return 1;
7062 }
7063 
7070 using BuilderFlags = uint32_t;
7071 
7079 enum class BuilderFlag : int32_t
7080 {
7081  kFP16 = 0,
7082  kINT8 = 1,
7083  kDEBUG = 2,
7084  kGPU_FALLBACK = 3,
7085  kSTRICT_TYPES = 4,
7086  kREFIT = 5,
7087  kDISABLE_TIMING_CACHE = 6,
7088 
7092  kTF32 = 7,
7093 
7095  kSPARSE_WEIGHTS = 8,
7096 
7102  kSAFETY_SCOPE = 9
7103 };
7104 
7106 template <>
7107 constexpr inline int32_t EnumMax<BuilderFlag>() noexcept
7108 {
7109  return 10;
7110 }
7111 
7120 enum class ProfilingVerbosity : int32_t
7121 {
7122  kDEFAULT = 0,
7123  kNONE = 1,
7124  kVERBOSE = 2,
7125 };
7126 
7128 template <>
7129 constexpr inline int32_t EnumMax<ProfilingVerbosity>() noexcept
7130 {
7131  return 3;
7132 }
7133 
7164 class ITimingCache : public INoCopy
7165 {
7166 public:
7167  virtual ~ITimingCache() noexcept = default;
7168 
7179  {
7180  return mImpl->serialize();
7181  }
7182 
7202  bool combine(const ITimingCache& inputCache, bool ignoreMismatch) noexcept
7203  {
7204  return mImpl->combine(inputCache, ignoreMismatch);
7205  }
7206 
7212  bool reset() noexcept
7213  {
7214  return mImpl->reset();
7215  }
7216 
7217 protected:
7218  apiv::VTimingCache* mImpl;
7219 };
7220 
7226 class IBuilderConfig : public INoCopy
7227 {
7228 public:
7229  virtual ~IBuilderConfig() noexcept = default;
7230 
7241  virtual void setMinTimingIterations(int32_t minTiming) noexcept
7242  {
7243  mImpl->setMinTimingIterations(minTiming);
7244  }
7245 
7253  virtual int32_t getMinTimingIterations() const noexcept
7254  {
7255  return mImpl->getMinTimingIterations();
7256  }
7257 
7266  virtual void setAvgTimingIterations(int32_t avgTiming) noexcept
7267  {
7268  mImpl->setAvgTimingIterations(avgTiming);
7269  }
7270 
7278  int32_t getAvgTimingIterations() const noexcept
7279  {
7280  return mImpl->getAvgTimingIterations();
7281  }
7282 
7291  void setEngineCapability(EngineCapability capability) noexcept
7292  {
7293  mImpl->setEngineCapability(capability);
7294  }
7295 
7304  {
7305  return mImpl->getEngineCapability();
7306  }
7307 
7313  void setInt8Calibrator(IInt8Calibrator* calibrator) noexcept
7314  {
7315  mImpl->setInt8Calibrator(calibrator);
7316  }
7317 
7322  {
7323  return mImpl->getInt8Calibrator();
7324  }
7325 
7333  void setMaxWorkspaceSize(std::size_t workspaceSize) noexcept
7334  {
7335  mImpl->setMaxWorkspaceSize(workspaceSize);
7336  }
7337 
7347  std::size_t getMaxWorkspaceSize() const noexcept
7348  {
7349  return mImpl->getMaxWorkspaceSize();
7350  }
7351 
7364  void setFlags(BuilderFlags builderFlags) noexcept
7365  {
7366  mImpl->setFlags(builderFlags);
7367  }
7368 
7376  BuilderFlags getFlags() const noexcept
7377  {
7378  return mImpl->getFlags();
7379  }
7380 
7388  void clearFlag(BuilderFlag builderFlag) noexcept
7389  {
7390  mImpl->clearFlag(builderFlag);
7391  }
7392 
7400  void setFlag(BuilderFlag builderFlag) noexcept
7401  {
7402  mImpl->setFlag(builderFlag);
7403  }
7404 
7412  bool getFlag(BuilderFlag builderFlag) const noexcept
7413  {
7414  return mImpl->getFlag(builderFlag);
7415  }
7416 
7427  void setDeviceType(const ILayer* layer, DeviceType deviceType) noexcept
7428  {
7429  mImpl->setDeviceType(layer, deviceType);
7430  }
7431 
7436  DeviceType getDeviceType(const ILayer* layer) const noexcept
7437  {
7438  return mImpl->getDeviceType(layer);
7439  }
7440 
7446  bool isDeviceTypeSet(const ILayer* layer) const noexcept
7447  {
7448  return mImpl->isDeviceTypeSet(layer);
7449  }
7450 
7456  void resetDeviceType(const ILayer* layer) noexcept
7457  {
7458  mImpl->resetDeviceType(layer);
7459  }
7460 
7465  bool canRunOnDLA(const ILayer* layer) const noexcept
7466  {
7467  return mImpl->canRunOnDLA(layer);
7468  }
7469 
7480  void setDLACore(int32_t dlaCore) noexcept
7481  {
7482  mImpl->setDLACore(dlaCore);
7483  }
7484 
7491  int32_t getDLACore() const noexcept
7492  {
7493  return mImpl->getDLACore();
7494  }
7495 
7501  void setDefaultDeviceType(DeviceType deviceType) noexcept
7502  {
7503  mImpl->setDefaultDeviceType(deviceType);
7504  }
7505 
7512  {
7513  return mImpl->getDefaultDeviceType();
7514  }
7515 
7521  void reset() noexcept
7522  {
7523  mImpl->reset();
7524  }
7525 
7535  TRT_DEPRECATED void destroy() noexcept
7536  {
7537  delete this;
7538  }
7539 
7547  void setProfileStream(const cudaStream_t stream) noexcept
7548  {
7549  return mImpl->setProfileStream(stream);
7550  }
7551 
7560  {
7561  return mImpl->getProfileStream();
7562  }
7563 
7575  int32_t addOptimizationProfile(const IOptimizationProfile* profile) noexcept
7576  {
7577  return mImpl->addOptimizationProfile(profile);
7578  }
7579 
7588  int32_t getNbOptimizationProfiles() const noexcept
7589  {
7590  return mImpl->getNbOptimizationProfiles();
7591  }
7592 
7601  {
7602  mImpl->setProfilingVerbosity(verbosity);
7603  }
7604 
7614  {
7615  return mImpl->getProfilingVerbosity();
7616  }
7617 
7622  void setAlgorithmSelector(IAlgorithmSelector* selector) noexcept
7623  {
7624  mImpl->setAlgorithmSelector(selector);
7625  }
7626 
7631  {
7632  return mImpl->getAlgorithmSelector();
7633  }
7634 
7645  bool setCalibrationProfile(const IOptimizationProfile* profile) noexcept
7646  {
7647  return mImpl->setCalibrationProfile(profile);
7648  }
7649 
7656  {
7657  return mImpl->getCalibrationProfile();
7658  }
7659 
7673  {
7674  mImpl->setQuantizationFlags(flags);
7675  }
7676 
7685  {
7686  return mImpl->getQuantizationFlags();
7687  }
7688 
7697  {
7698  mImpl->clearQuantizationFlag(flag);
7699  }
7700 
7709  {
7710  mImpl->setQuantizationFlag(flag);
7711  }
7712 
7720  bool getQuantizationFlag(QuantizationFlag flag) const noexcept
7721  {
7722  return mImpl->getQuantizationFlag(flag);
7723  }
7724 
7745  bool setTacticSources(TacticSources tacticSources) noexcept
7746  {
7747  return mImpl->setTacticSources(tacticSources);
7748  }
7749 
7761  {
7762  return mImpl->getTacticSources();
7763  }
7764 
7779  nvinfer1::ITimingCache* createTimingCache(const void* blob, std::size_t size) const noexcept
7780  {
7781  return mImpl->createTimingCache(blob, size);
7782  }
7783 
7802  bool setTimingCache(const ITimingCache& cache, bool ignoreMismatch) noexcept
7803  {
7804  return mImpl->setTimingCache(cache, ignoreMismatch);
7805  }
7806 
7812  const nvinfer1::ITimingCache* getTimingCache() const noexcept
7813  {
7814  return mImpl->getTimingCache();
7815  }
7816 
7817 protected:
7818  apiv::VBuilderConfig* mImpl;
7819 };
7820 
7828 
7838 enum class NetworkDefinitionCreationFlag : int32_t
7839 {
7844  kEXPLICIT_BATCH = 0,
7845 
7858  kEXPLICIT_PRECISION TRT_DEPRECATED_ENUM = 1,
7859 };
7860 
7862 template <>
7863 constexpr inline int32_t EnumMax<NetworkDefinitionCreationFlag>() noexcept
7864 {
7865  return 2;
7866 }
7867 
7875 class IBuilder : public INoCopy
7876 {
7877 public:
7878  virtual ~IBuilder() noexcept = default;
7879 
7888  void setMaxBatchSize(int32_t batchSize) noexcept
7889  {
7890  mImpl->setMaxBatchSize(batchSize);
7891  }
7892 
7901  int32_t getMaxBatchSize() const noexcept
7902  {
7903  return mImpl->getMaxBatchSize();
7904  }
7905 
7909  bool platformHasFastFp16() const noexcept
7910  {
7911  return mImpl->platformHasFastFp16();
7912  }
7913 
7917  bool platformHasFastInt8() const noexcept
7918  {
7919  return mImpl->platformHasFastInt8();
7920  }
7921 
7929  TRT_DEPRECATED void destroy() noexcept
7930  {
7931  delete this;
7932  }
7933 
7941  int32_t getMaxDLABatchSize() const noexcept
7942  {
7943  return mImpl->getMaxDLABatchSize();
7944  }
7945 
7949  int32_t getNbDLACores() const noexcept
7950  {
7951  return mImpl->getNbDLACores();
7952  }
7953 
7965  void setGpuAllocator(IGpuAllocator* allocator) noexcept
7966  {
7967  mImpl->setGpuAllocator(allocator);
7968  }
7969 
7976  {
7977  return mImpl->createBuilderConfig();
7978  }
7979 
7991  INetworkDefinition& network, IBuilderConfig& config) noexcept
7992  {
7993  return mImpl->buildEngineWithConfig(network, config);
7994  }
7995 
8008  {
8009  return mImpl->createNetworkV2(flags);
8010  }
8011 
8022  {
8023  return mImpl->createOptimizationProfile();
8024  }
8025 
8037  //
8040  void setErrorRecorder(IErrorRecorder* recorder) noexcept
8041  {
8042  mImpl->setErrorRecorder(recorder);
8043  }
8044 
8056  {
8057  return mImpl->getErrorRecorder();
8058  }
8059 
8063  void reset() noexcept
8064  {
8065  mImpl->reset();
8066  }
8067 
8071  bool platformHasTf32() const noexcept
8072  {
8073  return mImpl->platformHasTf32();
8074  }
8075 
8091  {
8092  return mImpl->buildSerializedNetwork(network, config);
8093  }
8094 
8112  bool isNetworkSupported(INetworkDefinition const& network, IBuilderConfig const& config) const noexcept
8113  {
8114  return mImpl->isNetworkSupported(network, config);
8115  }
8116 
8117 protected:
8118  apiv::VBuilder* mImpl;
8119 };
8120 
8121 } // namespace nvinfer1
8122 
8127 extern "C" TENSORRTAPI void* createInferBuilder_INTERNAL(void* logger, int32_t version) noexcept;
8128 
8129 namespace nvinfer1
8130 {
8131 namespace
8132 {
8133 
8141 inline IBuilder* createInferBuilder(ILogger& logger) noexcept
8142 {
8143  return static_cast<IBuilder*>(createInferBuilder_INTERNAL(&logger, NV_TENSORRT_VERSION));
8144 }
8145 
8146 } // namespace
8147 } // namespace nvinfer1
8148 
8149 #endif // NV_INFER_H
nvinfer1::IDeconvolutionLayer::getStrideNd
Dims getStrideNd() const noexcept
Get the multi-dimension stride of the deconvolution.
Definition: NvInfer.h:2687
nvinfer1::INetworkDefinition::removeTensor
void removeTensor(ITensor &tensor) noexcept
remove a tensor from the network definition.
Definition: NvInfer.h:6097
nvinfer1::IConvolutionLayer::setKernelSize
TRT_DEPRECATED void setKernelSize(DimsHW kernelSize) noexcept
Set the HW kernel size of the convolution.
Definition: NvInfer.h:999
nvinfer1::IFillLayer::setDimensions
void setDimensions(Dims dimensions) noexcept
Set the output tensor's dimensions.
Definition: NvInfer.h:5116
nvinfer1::LoopOutput
LoopOutput
Enum that describes kinds of loop outputs.
Definition: NvInfer.h:4754
nvinfer1::LayerType::kTOPK
TopK layer.
nvinfer1::IPoolingLayer::getPadding
TRT_DEPRECATED DimsHW getPadding() const noexcept
Get the padding for pooling.
Definition: NvInfer.h:1754
nvinfer1::IActivationLayer::getAlpha
float getAlpha() const noexcept
Get the alpha parameter.
Definition: NvInfer.h:1598
nvinfer1::IConvolutionLayer::getStrideNd
Dims getStrideNd() const noexcept
Get the multi-dimension stride of the convolution.
Definition: NvInfer.h:1326
nvinfer1::INetworkDefinition::getErrorRecorder
IErrorRecorder * getErrorRecorder() const noexcept
get the ErrorRecorder assigned to this interface.
Definition: NvInfer.h:6542
nvinfer1::INetworkDefinition::destroy
TRT_DEPRECATED void destroy() noexcept
Destroy this INetworkDefinition object.
Definition: NvInfer.h:5856
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:3991
nvinfer1::INetworkDefinition::addInput
ITensor * addInput(const char *name, DataType type, Dims dimensions) noexcept
Add an input tensor to the network.
Definition: NvInfer.h:5490
nvinfer1::IDeconvolutionLayer::getPostPadding
Dims getPostPadding() const noexcept
Get the padding.
Definition: NvInfer.h:2613
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:1370
nvinfer1::apiv::VShuffleLayer
Definition: NvInferImpl.h:607
nvinfer1::ITopKLayer::setReduceAxes
void setReduceAxes(uint32_t reduceAxes) noexcept
Set which axes to reduce for the layer.
Definition: NvInfer.h:4150
nvinfer1::IDeconvolutionLayer::getPadding
TRT_DEPRECATED DimsHW getPadding() const noexcept
Get the padding of the deconvolution.
Definition: NvInfer.h:2478
nvinfer1::ILRNLayer::setWindowSize
void setWindowSize(int32_t windowSize) noexcept
Set the LRN window size.
Definition: NvInfer.h:2000
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:4636
nvinfer1::IBuilderConfig::setAlgorithmSelector
void setAlgorithmSelector(IAlgorithmSelector *selector) noexcept
Set Algorithm Selector.
Definition: NvInfer.h:7622
nvinfer1::IPaddingLayer::setPrePaddingNd
void setPrePaddingNd(Dims padding) noexcept
Set the padding that is applied at the start of the tensor.
Definition: NvInfer.h:3642
nvinfer1::IShuffleLayer::setFirstTranspose
void setFirstTranspose(Permutation permutation) noexcept
Set the permutation applied by the first transpose operation.
Definition: NvInfer.h:3725
nvinfer1::SliceMode
SliceMode
Controls how ISliceLayer handles out of bounds coordinates.
Definition: NvInfer.h:3878
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:7521
NvInferRuntime.h
nvinfer1::IConvolutionLayer::setStride
TRT_DEPRECATED void setStride(DimsHW stride) noexcept
Get the stride of the convolution.
Definition: NvInfer.h:1049
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:3449
nvinfer1::IBuilderConfig::setFlag
void setFlag(BuilderFlag builderFlag) noexcept
Set a single build mode flag.
Definition: NvInfer.h:7400
nvinfer1::IDeconvolutionLayer::setPaddingNd
void setPaddingNd(Dims padding) noexcept
Set the multi-dimension padding of the deconvolution.
Definition: NvInfer.h:2705
nvinfer1::IRNNv2Layer::setOperation
void setOperation(RNNOperation op) noexcept
Set the operation of the RNN layer.
Definition: NvInfer.h:3141
nvinfer1::IFullyConnectedLayer
A fully connected layer in a network definition. This layer expects an input tensor of three or more ...
Definition: NvInfer.h:1439
nvinfer1::Permutation
Definition: NvInfer.h:3690
nvinfer1::INetworkDefinition::addSoftMax
ISoftMaxLayer * addSoftMax(ITensor &input) noexcept
Add a SoftMax layer to the network.
Definition: NvInfer.h:5644
nvinfer1::IPaddingLayer::setPostPaddingNd
void setPostPaddingNd(Dims padding) noexcept
Set the padding that is applied at the end of the tensor.
Definition: NvInfer.h:3668
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:1011
nvinfer1::IConstantLayer
Layer that represents a constant value.
Definition: NvInfer.h:4305
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:5684
nvinfer1::IParametricReLULayer
Layer that represents a parametric ReLU operation.
Definition: NvInfer.h:4368
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:6128
nvinfer1::IBuilderConfig::getCalibrationProfile
const IOptimizationProfile * getCalibrationProfile() noexcept
Get the current calibration profile.
Definition: NvInfer.h:7655
nvinfer1::EnumMax< RNNDirection >
constexpr int32_t EnumMax< RNNDirection >() noexcept
Maximum number of elements in RNNDirection enum.
Definition: NvInfer.h:3018
nvinfer1::INetworkDefinition::addPadding
TRT_DEPRECATED IPaddingLayer * addPadding(ITensor &input, DimsHW prePadding, DimsHW postPadding) noexcept
Add a padding layer to the network.
Definition: NvInfer.h:5746
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:6290
nvinfer1::IBuilder::getErrorRecorder
IErrorRecorder * getErrorRecorder() const noexcept
get the ErrorRecorder assigned to this interface.
Definition: NvInfer.h:8055
nvinfer1::ISoftMaxLayer::getAxes
uint32_t getAxes() const noexcept
Get the axis along which softmax occurs.
Definition: NvInfer.h:2306
nvinfer1::UnaryOperation::kFLOOR
Floor.
nvinfer1::INetworkDefinition
A network definition for input to the builder.
Definition: NvInfer.h:5450
nvinfer1::IBuilderConfig::getQuantizationFlag
bool getQuantizationFlag(QuantizationFlag flag) const noexcept
Returns true if the quantization flag is set.
Definition: NvInfer.h:7720
nvinfer1::IBuilderConfig::getFlag
bool getFlag(BuilderFlag builderFlag) const noexcept
Returns true if the build mode flag is set.
Definition: NvInfer.h:7412
nvinfer1::IQuantizeLayer::setAxis
void setAxis(int32_t axis) noexcept
Set the quantization axis.
Definition: NvInfer.h:5334
nvinfer1::UnaryOperation::kABS
Absolute value.
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:1856
nvinfer1::ITensor::setDimensions
void setDimensions(Dims dimensions) noexcept
Set the dimensions of a tensor.
Definition: NvInfer.h:233
nvinfer1::Weights
An array of weights used as a layer parameter.
Definition: NvInferRuntime.h:152
nvinfer1::IAlgorithmVariant
provides a unique 128-bit identifier, which along with the input and output information denotes the v...
Definition: NvInfer.h:6845
nvinfer1::UnaryOperation::kASINH
Inverse hyperbolic sine.
nvinfer1::IGatherLayer::getGatherAxis
int32_t getGatherAxis() const noexcept
Get the axis to gather on.
Definition: NvInfer.h:2877
nvinfer1::ITensor::isShapeTensor
bool isShapeTensor() const noexcept
Whether the tensor is a shape tensor.
Definition: NvInfer.h:471
nvinfer1::ITimingCache::combine
bool combine(const ITimingCache &inputCache, bool ignoreMismatch) noexcept
Combine input timing cache into local instance.
Definition: NvInfer.h:7202
nvinfer1::IConvolutionLayer::getNbGroups
int32_t getNbGroups() const noexcept
Get the number of groups of the convolution.
Definition: NvInfer.h:1121
nvinfer1::IPaddingLayer
Layer that represents a padding operation.
Definition: NvInfer.h:3578
nvinfer1::IBuilderConfig::canRunOnDLA
bool canRunOnDLA(const ILayer *layer) const noexcept
Checks if a layer can run on DLA.
Definition: NvInfer.h:7465
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:5546
nvinfer1::IConvolutionLayer
A convolution layer in a network definition.
Definition: NvInfer.h:987
nvinfer1::ITensor::setDynamicRange
bool setDynamicRange(float min, float max) noexcept
Set dynamic range for the tensor.
Definition: NvInfer.h:288
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:698
nvinfer1::IPoolingLayer::setStride
TRT_DEPRECATED void setStride(DimsHW stride) noexcept
Set the stride for pooling.
Definition: NvInfer.h:1712
nvinfer1::IActivationLayer::setActivationType
void setActivationType(ActivationType type) noexcept
Set the type of activation to be performed.
Definition: NvInfer.h:1550
nvinfer1::IRNNv2Layer::setDirection
void setDirection(RNNDirection op) noexcept
Set the direction of the RNN layer.
Definition: NvInfer.h:3183
nvinfer1::IHostMemory
Class to handle library allocated memory that is accessible to the user.
Definition: NvInferRuntime.h:170
nvinfer1::IResizeLayer::getOutputDimensions
Dims getOutputDimensions() const noexcept
Get the output dimensions.
Definition: NvInfer.h:4555
nvinfer1::IIdentityLayer
A layer that represents the identity function.
Definition: NvInfer.h:4291
nvinfer1::IConvolutionLayer::setPostPadding
void setPostPadding(Dims padding) noexcept
Set the multi-dimension post-padding of the convolution.
Definition: NvInfer.h:1242
nvinfer1::IRNNv2Layer::getOperation
RNNOperation getOperation() const noexcept
Get the operation of the RNN layer.
Definition: NvInfer.h:3150
nvinfer1::DeviceType
DeviceType
The device that this layer/network will execute on.
Definition: NvInferRuntime.h:628
nvinfer1::INetworkDefinition::getNbOutputs
int32_t getNbOutputs() const noexcept
Get the number of outputs in the network.
Definition: NvInfer.h:5828
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.
Definition: NvInfer.h:7120
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:6980
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:2296
nvinfer1::ActivationType::kSELU
Selu activation: x>0 ? beta * x : beta * (alpha*exp(x) - alpha)
nvinfer1::ProfilingVerbosity::kVERBOSE
Register layer names in NVTX message field and register layer detail in NVTX JSON payload field.
nvinfer1::IInt8EntropyCalibrator::getAlgorithm
CalibrationAlgoType getAlgorithm() noexcept override
Definition: NvInfer.h:6691
nvinfer1::IAlgorithmSelector
Interface implemented by application for selecting and reporting algorithms of a layer provided by th...
Definition: NvInfer.h:6998
nvinfer1::RNNInputMode
RNNInputMode
Enumerates the RNN input modes that may occur with an RNN layer.
Definition: NvInfer.h:3038
nvinfer1::IFullyConnectedLayer::setBiasWeights
void setBiasWeights(Weights weights) noexcept
Set the bias weights.
Definition: NvInfer.h:1491
nvinfer1::IBuilderConfig::getNbOptimizationProfiles
int32_t getNbOptimizationProfiles() const noexcept
Get number of optimization profiles.
Definition: NvInfer.h:7588
nvinfer1::IBuilderConfig::clearFlag
void clearFlag(BuilderFlag builderFlag) noexcept
clear a single build mode flag.
Definition: NvInfer.h:7388
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:141
nvinfer1::UnaryOperation::kSQRT
Square root.
nvinfer1::IBuilderConfig::getAvgTimingIterations
int32_t getAvgTimingIterations() const noexcept
Query the number of averaging iterations.
Definition: NvInfer.h:7278
nvinfer1::INetworkDefinition::addDequantize
IDequantizeLayer * addDequantize(ITensor &input, ITensor &scale) noexcept
Add a dequantization layer to the network.
Definition: NvInfer.h:6561
nvinfer1::IDeconvolutionLayer::setDilationNd
void setDilationNd(Dims dilation) noexcept
Set the multi-dimension dilation of the deconvolution.
Definition: NvInfer.h:2747
nvinfer1::IPaddingLayer::getPostPaddingNd
Dims getPostPaddingNd() const noexcept
Get the padding that is applied at the end of the tensor.
Definition: NvInfer.h:3680
nvinfer1::ITopKLayer::getOperation
TopKOperation getOperation() const noexcept
Get the operation for the layer.
Definition: NvInfer.h:4118
nvinfer1::UnaryOperation::kRECIP
Reciprocal.
nvinfer1::IDeconvolutionLayer::getNbGroups
int32_t getNbGroups() const noexcept
Get the number of groups for a deconvolution.
Definition: NvInfer.h:2508
nvinfer1::INetworkDefinition::hasImplicitBatchDimension
bool hasImplicitBatchDimension() const noexcept
Query whether the network was created with an implicit batch dimension.
Definition: NvInfer.h:6220
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:4597
nvinfer1::ITripLimitLayer
Definition: NvInfer.h:4907
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:3737
nvinfer1::LayerType::kSCALE
Scale layer.
nvinfer1::IBuilderConfig::addOptimizationProfile
int32_t addOptimizationProfile(const IOptimizationProfile *profile) noexcept
Add an optimization profile.
Definition: NvInfer.h:7575
nvinfer1::INetworkDefinition::addElementWise
IElementWiseLayer * addElementWise(ITensor &input1, ITensor &input2, ElementWiseOperation op) noexcept
Add an elementwise layer to the network.
Definition: NvInfer.h:5710
nvinfer1::IPluginV2
Plugin class for user-implemented layers.
Definition: NvInferRuntimeCommon.h:414
nvinfer1::IAlgorithmIOInfo
Carries information about input or output of the algorithm. IAlgorithmIOInfo for all the input and ou...
Definition: NvInfer.h:6802
nvinfer1::IAlgorithm::getTimingMSec
float getTimingMSec() const noexcept
The time in milliseconds to execute the algorithm.
Definition: NvInfer.h:6959
nvinfer1::ILRNLayer::setK
void setK(float k) noexcept
Set the LRN K value.
Definition: NvInfer.h:2063
nvinfer1::Dims32
Definition: NvInferRuntimeCommon.h:194
nvinfer1::IInt8MinMaxCalibrator
Definition: NvInfer.h:6720
nvinfer1::IAlgorithmIOInfo::getTensorFormat
TensorFormat getTensorFormat() const noexcept
Return TensorFormat of the input/output of algorithm.
Definition: NvInfer.h:6808
nvinfer1::INetworkDefinition::markOutput
void markOutput(ITensor &tensor) noexcept
Mark a tensor as a network output.
Definition: NvInfer.h:5502
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:5074
nvinfer1::TensorFormats
uint32_t TensorFormats
It is capable of representing one or more TensorFormat by binary OR operations, e....
Definition: NvInfer.h:141
nvinfer1::apiv::VGatherLayer
Definition: NvInferImpl.h:530
nvinfer1::IAlgorithmContext::getNbInputs
int32_t getNbInputs() const noexcept
Return number of inputs of the algorithm.
Definition: NvInfer.h:6903
nvinfer1::ITensor::setType
void setType(DataType type) noexcept
Set the data type of a tensor.
Definition: NvInfer.h:261
nvinfer1::IPoolingLayer::setPoolingType
void setPoolingType(PoolingType type) noexcept
Set the type of activation to be performed.
Definition: NvInfer.h:1660
nvinfer1::ActivationType::kSOFTSIGN
Softsign activation: x / (1+|x|)
nvinfer1::BuilderFlag::kGPU_FALLBACK
Enable layers marked to execute on GPU if layer cannot execute on DLA.
nvinfer1::SliceMode::kDEFAULT
Fail with error when the coordinates are out of bounds. This is the default.
nvinfer1::ITensor::resetDynamicRange
void resetDynamicRange() noexcept
Undo effect of setDynamicRange.
Definition: NvInfer.h:385
nvinfer1::IBuilder::destroy
TRT_DEPRECATED void destroy() noexcept
Destroy this object.
Definition: NvInfer.h:7929
nvinfer1::INetworkDefinition::addRaggedSoftMax
IRaggedSoftMaxLayer * addRaggedSoftMax(ITensor &input, ITensor &bounds) noexcept
Add a RaggedSoftMax layer to the network.
Definition: NvInfer.h:5952
nvinfer1::ITensor::setLocation
void setLocation(TensorLocation location) noexcept
Set the storage location of a tensor.
Definition: NvInfer.h:367
nvinfer1::LayerType::kPADDING
Padding layer.
nvinfer1::MatrixOperation::kTRANSPOSE
Like kNONE, but transpose the matrix dimensions.
nvinfer1::BuilderFlag::kREFIT
Enable building a refittable engine.
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:8090
nvinfer1::INetworkDefinition::addSelect
ISelectLayer * addSelect(ITensor &condition, ITensor &thenInput, ITensor &elseInput) noexcept
Add a select layer to the network.
Definition: NvInfer.h:6455
nvinfer1::IDeconvolutionLayer::setPrePadding
void setPrePadding(Dims padding) noexcept
Set the multi-dimension pre-padding of the deconvolution.
Definition: NvInfer.h:2575
nvinfer1::IRNNv2Layer
An RNN layer in a network definition, version 2.
Definition: NvInfer.h:3086
nvinfer1::ILRNLayer::getAlpha
float getAlpha() const noexcept
Get the LRN alpha value.
Definition: NvInfer.h:2031
nvinfer1::IAlgorithmIOInfo::getDataType
DataType getDataType() const noexcept
Return DataType of the input/output of algorithm.
Definition: NvInfer.h:6816
nvinfer1::ITensor::setBroadcastAcrossBatch
void setBroadcastAcrossBatch(bool broadcastAcrossBatch) noexcept
Set whether to enable broadcast of tensor across the batch.
Definition: NvInfer.h:326
nvinfer1::IPoolingLayer::setPaddingMode
void setPaddingMode(PaddingMode paddingMode) noexcept
Set the padding mode.
Definition: NvInfer.h:1879
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:1459
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:1252
nvinfer1::IResizeLayer::getAlignCorners
TRT_DEPRECATED bool getAlignCorners() const noexcept
True if align corners has been set.
Definition: NvInfer.h:4649
nvinfer1::IPoolingLayer::getWindowSize
TRT_DEPRECATED DimsHW getWindowSize() const noexcept
Get the window size for pooling.
Definition: NvInfer.h:1696
nvinfer1::ILoop::addRecurrence
IRecurrenceLayer * addRecurrence(ITensor &initialValue) noexcept
Create a recurrence layer for this loop with initialValue as its first input.
Definition: NvInfer.h:4970
nvinfer1::IFillLayer::getDimensions
Dims getDimensions() const noexcept
Get the output tensor's dimensions.
Definition: NvInfer.h:5131
nvinfer1::DimsHW
Descriptor for two-dimensional spatial data.
Definition: NvInferLegacyDims.h:110
nvinfer1::IBuilderConfig::getProfileStream
cudaStream_t getProfileStream() const noexcept
Get the cuda stream that is used to profile this network.
Definition: NvInfer.h:7559
nvinfer1::IPoolingLayer::getStrideNd
Dims getStrideNd() const noexcept
Get the multi-dimension stride for pooling.
Definition: NvInfer.h:1938
nvinfer1::apiv::VTripLimitLayer
Definition: NvInferImpl.h:718
nvinfer1::IShuffleLayer::getReshapeDimensions
Dims getReshapeDimensions() const noexcept
Get the reshaped dimensions.
Definition: NvInfer.h:3775
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:7917
nvinfer1::ResizeMode
ResizeMode
Enumerates various modes of resize in the resize layer. Resize mode set using setResizeMode().
Definition: NvInfer.h:4380
nvinfer1::TensorFormat
TensorFormat
Format of the input/output tensors.
Definition: NvInferRuntimeCommon.h:225
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:3251
nvinfer1::ILoopOutputLayer
Definition: NvInfer.h:4849
nvinfer1::EnumMax< MatrixOperation >
constexpr int32_t EnumMax< MatrixOperation >() noexcept
Maximum number of elements in MatrixOperation enum.
Definition: NvInfer.h:4200
nvinfer1::INetworkDefinition::addUnary
IUnaryLayer * addUnary(ITensor &input, UnaryOperation operation) noexcept
Add a unary layer to the network.
Definition: NvInfer.h:5729
nvinfer1::UnaryOperation::kSINH
Hyperbolic sine.
nvinfer1::IConvolutionLayer::setBiasWeights
void setBiasWeights(Weights weights) noexcept
Set the bias weights for the convolution.
Definition: NvInfer.h:1160
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:6332
nvinfer1::IBuilder::createNetworkV2
nvinfer1::INetworkDefinition * createNetworkV2(NetworkDefinitionCreationFlags flags) noexcept
Create a network definition object.
Definition: NvInfer.h:8007
nvinfer1::IAlgorithmIOInfo::getStrides
Dims getStrides() const noexcept
Return strides of the input/output tensor of algorithm.
Definition: NvInfer.h:6824
nvinfer1::IPoolingLayer::setPaddingNd
void setPaddingNd(Dims padding) noexcept
Set the multi-dimension padding for pooling.
Definition: NvInfer.h:1957
nvinfer1::ILayer::getNbOutputs
int32_t getNbOutputs() const noexcept
Get the number of outputs of a layer.
Definition: NvInfer.h:571
nvinfer1::RNNGateType::kRESET
Reset gate (r).
nvinfer1::IPoolingLayer::getPoolingType
PoolingType getPoolingType() const noexcept
Get the type of activation to be performed.
Definition: NvInfer.h:1670
nvinfer1::IDeconvolutionLayer::setNbOutputMaps
void setNbOutputMaps(int32_t nbOutputMaps) noexcept
Set the number of output feature maps for the deconvolution.
Definition: NvInfer.h:2406
nvinfer1::INetworkDefinition::markOutputForShapes
bool markOutputForShapes(ITensor &tensor) noexcept
Enable tensor's value to be computed by IExecutionContext::getShapeBinding.
Definition: NvInfer.h:6238
nvinfer1::LoopOutput::kREVERSE
Output value is concatenation of values of tensor for each iteration, in reverse order.
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:3558
nvinfer1::ILogger
Application-implemented logging interface for the builder, engine and runtime.
Definition: NvInferRuntimeCommon.h:1194
nvinfer1::IAlgorithmContext
Describes the context and requirements, that could be fulfilled by one or more instances of IAlgorith...
Definition: NvInfer.h:6877
nvinfer1::ISliceLayer::getStart
Dims getStart() const noexcept
Get the start offset for the slice layer.
Definition: NvInfer.h:3948
nvinfer1::ILayer::outputTypeIsSet
bool outputTypeIsSet(int32_t index) const noexcept
whether the output type has been set for this layer
Definition: NvInfer.h:711
nvinfer1::IConvolutionLayer::getPrePadding
Dims getPrePadding() const noexcept
Get the pre-padding.
Definition: NvInfer.h:1225
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:1091
nvinfer1::EnumMax< QuantizationFlag >
constexpr int32_t EnumMax< QuantizationFlag >() noexcept
Maximum number of quantization flags in QuantizationFlag enum.
Definition: NvInfer.h:7059
nvinfer1::IScaleLayer::setChannelAxis
void setChannelAxis(int32_t channelAxis) noexcept
Set the channel axis.
Definition: NvInfer.h:2242
nvinfer1::IIteratorLayer::setReverse
void setReverse(bool reverse) noexcept
Definition: NvInfer.h:4940
nvinfer1::INetworkDefinition::addShuffle
IShuffleLayer * addShuffle(ITensor &input) noexcept
Add a shuffle layer to the network.
Definition: NvInfer.h:5760
nvinfer1::INetworkDefinition::unmarkOutput
void unmarkOutput(ITensor &tensor) noexcept
unmark a tensor as a network output.
Definition: NvInfer.h:6109
nvinfer1::QuantizationFlag::kCALIBRATE_BEFORE_FUSION
nvinfer1::ICudaEngine
An engine for executing inference on a built network, with functionally unsafe features.
Definition: NvInferRuntime.h:1258
nvinfer1::QuantizationFlags
uint32_t QuantizationFlags
Represents one or more QuantizationFlag values using binary OR operations.
Definition: NvInfer.h:7040
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:148
nvinfer1::ILayer::setPrecision
void setPrecision(DataType dataType) noexcept
Set the computational precision of this layer.
Definition: NvInfer.h:619
nvinfer1::IPoolingLayer::getWindowSizeNd
Dims getWindowSizeNd() const noexcept
Get the multi-dimension window size for pooling.
Definition: NvInfer.h:1913
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:3834
nvinfer1::IRaggedSoftMaxLayer
A RaggedSoftmax layer in a network definition.
Definition: NvInfer.h:4273
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:3548
nvinfer1::IScaleLayer::setScale
void setScale(Weights scale) noexcept
Set the scale value.
Definition: NvInfer.h:2176
nvinfer1::IConvolutionLayer::getDilationNd
Dims getDilationNd() const noexcept
Get the multi-dimension dilation of the convolution.
Definition: NvInfer.h:1380
nvinfer1::IShuffleLayer::setReshapeDimensions
void setReshapeDimensions(Dims dimensions) noexcept
Set the reshaped dimensions.
Definition: NvInfer.h:3762
nvinfer1::IBuilderConfig::clearQuantizationFlag
void clearQuantizationFlag(QuantizationFlag flag) noexcept
clear a quantization flag.
Definition: NvInfer.h:7696
nvinfer1::ILRNLayer::getK
float getK() const noexcept
Get the LRN K value.
Definition: NvInfer.h:2073
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:4875
nvinfer1::EnumMax< RNNInputMode >
constexpr int32_t EnumMax< RNNInputMode >() noexcept
Maximum number of elements in RNNInputMode enum.
Definition: NvInfer.h:3046
nvinfer1::IFullyConnectedLayer::setKernelWeights
void setKernelWeights(Weights weights) noexcept
Set the kernel weights, given as a KxC matrix in row-major order.
Definition: NvInfer.h:1469
nvinfer1::IRNNv2Layer::getDirection
RNNDirection getDirection() const noexcept
Get the direction of the RNN layer.
Definition: NvInfer.h:3192
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:6895
nvinfer1::IDeconvolutionLayer::setKernelWeights
void setKernelWeights(Weights weights) noexcept
Set the kernel weights for the deconvolution.
Definition: NvInfer.h:2522
nvinfer1::apiv::VIdentityLayer
Definition: NvInferImpl.h:661
nvinfer1::ITensor::getDynamicRangeMin
float getDynamicRangeMin() const noexcept
Get minimum of dynamic range.
Definition: NvInfer.h:395
nvinfer1::ElementWiseOperation
ElementWiseOperation
Enumerates the binary operations that may be performed by an ElementWise layer.
Definition: NvInfer.h:2774
nvinfer1::apiv::VReduceLayer
Definition: NvInferImpl.h:583
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:2146
nvinfer1::INetworkDefinition::addQuantize
IQuantizeLayer * addQuantize(ITensor &input, ITensor &scale) noexcept
Add a quantization layer to the network.
Definition: NvInfer.h:6580
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:2221
nvinfer1::IBuilderConfig::getInt8Calibrator
IInt8Calibrator * getInt8Calibrator() const noexcept
Get Int8 Calibration interface.
Definition: NvInfer.h:7321
nvinfer1::IDeconvolutionLayer::getKernelWeights
Weights getKernelWeights() const noexcept
Get the kernel weights for the deconvolution.
Definition: NvInfer.h:2532
nvinfer1::ISliceLayer
Slices an input tensor into an output tensor based on the offset and strides.
Definition: NvInfer.h:3921
nvinfer1::TacticSources
int32_t uint32_t TacticSources
Represents a collection of one or more TacticSource values combine using bitwise-OR operations.
Definition: NvInferImpl.h:152
nvinfer1::IConvolutionLayer::getDilation
TRT_DEPRECATED DimsHW getDilation() const noexcept
Get the dilation for a convolution.
Definition: NvInfer.h:1198
nvinfer1::IMatrixMultiplyLayer::setOperation
void setOperation(int32_t index, MatrixOperation op) noexcept
Set the operation for an input tensor.
Definition: NvInfer.h:4239
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:424
nvinfer1::LayerType::kSHAPE
Shape layer.
nvinfer1::IPoolingLayer::setWindowSize
TRT_DEPRECATED void setWindowSize(DimsHW windowSize) noexcept
Set the window size for pooling.
Definition: NvInfer.h:1684
nvinfer1::ScaleMode
ScaleMode
Controls how shift, scale and power are applied in a Scale layer.
Definition: NvInfer.h:2088
nvinfer1::IBuilderConfig::getTacticSources
TacticSources getTacticSources() const noexcept
Get tactic sources.
Definition: NvInfer.h:7760
nvinfer1::PaddingMode::kEXPLICIT_ROUND_DOWN
Use explicit padding, rounding output size down.
nvinfer1::apiv::VSliceLayer
Definition: NvInferImpl.h:620
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:6967
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:5997
nvinfer1::LayerType::kRESIZE
Resize Layer.
nvinfer1::ReduceOperation
ReduceOperation
Enumerates the reduce operations that may be performed by a Reduce layer.
Definition: NvInfer.h:3477
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:3886
nvinfer1::IIteratorLayer
Definition: NvInfer.h:4920
nvinfer1::IBuilderConfig::setProfilingVerbosity
void setProfilingVerbosity(ProfilingVerbosity verbosity) noexcept
Set verbosity level of layer information exposed in NVTX annotations.
Definition: NvInfer.h:7600
nvinfer1::IShuffleLayer::setZeroIsPlaceholder
void setZeroIsPlaceholder(bool zeroIsPlaceholder) noexcept
Set meaning of 0 in reshape dimensions.
Definition: NvInfer.h:3850
nvinfer1::IResizeLayer::setOutputDimensions
void setOutputDimensions(Dims dimensions) noexcept
Set the output dimensions.
Definition: NvInfer.h:4545
nvinfer1::INetworkDefinition::unmarkOutputForShapes
bool unmarkOutputForShapes(ITensor &tensor) noexcept
Undo markOutputForShapes.
Definition: NvInfer.h:6250
nvinfer1::INetworkDefinition::getNbLayers
int32_t getNbLayers() const noexcept
Get the number of layers in the network.
Definition: NvInfer.h:5772
nvinfer1::BuilderFlag
BuilderFlag
List of valid modes that the builder can enable when creating an engine from a network definition.
Definition: NvInfer.h:7079
nvinfer1::IActivationLayer::setAlpha
void setAlpha(float alpha) noexcept
Set the alpha parameter (must be finite).
Definition: NvInfer.h:1575
nvinfer1::IActivationLayer::setBeta
void setBeta(float beta) noexcept
Set the beta parameter (must be finite).
Definition: NvInfer.h:1589
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:7501
nvinfer1::EnumMax< TopKOperation >
constexpr int32_t EnumMax< TopKOperation >() noexcept
Maximum number of elements in TopKOperation enum.
Definition: NvInfer.h:4088
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:2639
nvinfer1::IIteratorLayer::getReverse
bool getReverse() const noexcept
True if and only if reversing input.
Definition: NvInfer.h:4946
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:4869
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:1769
nvinfer1::IDeconvolutionLayer::getBiasWeights
Weights getBiasWeights() const noexcept
Get the bias weights for the deconvolution.
Definition: NvInfer.h:2557
nvinfer1::EnumMax< ScaleMode >
constexpr int32_t EnumMax< ScaleMode >() noexcept
Maximum number of elements in ScaleMode enum.
Definition: NvInfer.h:2097
nvinfer1::IElementWiseLayer::getOperation
ElementWiseOperation getOperation() const noexcept
Get the binary operation for the layer.
Definition: NvInfer.h:2845
nvinfer1::IConvolutionLayer::setNbOutputMaps
void setNbOutputMaps(int32_t nbOutputMaps) noexcept
Set the number of output maps for the convolution.
Definition: NvInfer.h:1023
nvinfer1::ILayer::precisionIsSet
bool precisionIsSet() const noexcept
whether the computational precision has been set for this layer
Definition: NvInfer.h:643
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:6508
nvinfer1
The TensorRT API version 1 namespace.
nvinfer1::INetworkDefinition::addPaddingNd
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:6488
nvinfer1::EnumMax< RNNGateType >
constexpr int32_t EnumMax< RNNGateType >() noexcept
Maximum number of elements in RNNGateType enum.
Definition: NvInfer.h:3070
nvinfer1::IConvolutionLayer::setPadding
TRT_DEPRECATED void setPadding(DimsHW padding) noexcept
Set the padding of the convolution.
Definition: NvInfer.h:1079
nvinfer1::ILayer
Base class for all layer classes in a network definition.
Definition: NvInfer.h:511
nvinfer1::IRNNv2Layer::getCellState
ITensor * getCellState() const noexcept
Get the initial cell state of the RNN.
Definition: NvInfer.h:3348
nvinfer1::EnumMax< ReduceOperation >
constexpr int32_t EnumMax< ReduceOperation >() noexcept
Maximum number of elements in ReduceOperation enum.
Definition: NvInfer.h:3488
nvinfer1::ITensor::getAllowedFormats
TensorFormats getAllowedFormats() const noexcept
Get a bitmask of TensorFormat values that the tensor supports. For a shape tensor,...
Definition: NvInfer.h:437
nvinfer1::IConvolutionLayer::setStrideNd
void setStrideNd(Dims stride) noexcept
Set the multi-dimension stride of the convolution.
Definition: NvInfer.h:1316
nvinfer1::IPoolingLayer::setWindowSizeNd
void setWindowSizeNd(Dims windowSize) noexcept
Set the multi-dimension window size for pooling.
Definition: NvInfer.h:1903
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:3933
nvinfer1::EnumMax< ProfilingVerbosity >
constexpr int32_t EnumMax< ProfilingVerbosity >() noexcept
Maximum number of profile verbosity levels in ProfilingVerbosity enum.
Definition: NvInfer.h:7129
nvinfer1::UnaryOperation::kATANH
Inverse hyperbolic tangent.
nvinfer1::IResizeLayer::setCoordinateTransformation
void setCoordinateTransformation(ResizeCoordinateTransformation coordTransform) noexcept
Set coordinate transformation function.
Definition: NvInfer.h:4684
nvinfer1::UnaryOperation::kEXP
Exponentiation.
nvinfer1::IConvolutionLayer::setKernelSizeNd
void setKernelSizeNd(Dims kernelSize) noexcept
Set the multi-dimension kernel size of the convolution.
Definition: NvInfer.h:1291
nvinfer1::IReduceLayer::setReduceAxes
void setReduceAxes(uint32_t reduceAxes) noexcept
Set the axes over which to reduce.
Definition: NvInfer.h:3528
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:5884
nvinfer1::UnaryOperation::kATAN
Inverse tangent.
nvinfer1::ILoop
Definition: NvInfer.h:4961
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:2547
nvinfer1::IPluginV2Layer
Layer type for pluginV2.
Definition: NvInfer.h:3367
nvinfer1::LayerType::kIDENTITY
Identity layer.
nvinfer1::ISliceLayer::setMode
void setMode(SliceMode mode) noexcept
Set the slice mode.
Definition: NvInfer.h:4016
nvinfer1::apiv::VConstantLayer
Definition: NvInferImpl.h:666
nvinfer1::IReduceLayer::setOperation
void setOperation(ReduceOperation op) noexcept
Set the reduce operation for the layer.
Definition: NvInfer.h:3508
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:1828
nvinfer1::INetworkDefinition::addConcatenation
IConcatenationLayer * addConcatenation(ITensor *const *inputs, int32_t nbInputs) noexcept
Add a concatenation layer to the network.
Definition: NvInfer.h:5661
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:4768
nvinfer1::IBuilder::platformHasFastFp16
bool platformHasFastFp16() const noexcept
Determine whether the platform has fast native fp16.
Definition: NvInfer.h:7909
nvinfer1::IDeconvolutionLayer::getNbOutputMaps
int32_t getNbOutputMaps() const noexcept
Get the number of output feature maps for the deconvolution.
Definition: NvInfer.h:2416
nvinfer1::LayerType::kDECONVOLUTION
Deconvolution layer.
nvinfer1::ITimingCache::serialize
nvinfer1::IHostMemory * serialize() const noexcept
Serialize a timing cache to IHostMemory object.
Definition: NvInfer.h:7178
nvinfer1::IRNNv2Layer::getHiddenSize
int32_t getHiddenSize() const noexcept
Get the hidden size of the RNN.
Definition: NvInfer.h:3093
nvinfer1::INetworkDefinition::addResize
IResizeLayer * addResize(ITensor &input) noexcept
Add a resize layer to the network.
Definition: NvInfer.h:6384
nvinfer1::IPaddingLayer::getPrePaddingNd
Dims getPrePaddingNd() const noexcept
Get the padding that is applied at the start of the tensor.
Definition: NvInfer.h:3654
nvinfer1::IElementWiseLayer
A elementwise layer in a network definition.
Definition: NvInfer.h:2821
nvinfer1::IBuilderConfig::setTacticSources
bool setTacticSources(TacticSources tacticSources) noexcept
Set tactic sources.
Definition: NvInfer.h:7745
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:4249
nvinfer1::UnaryOperation::kACOSH
Inverse hyperbolic cosine.
nvinfer1::IConvolutionLayer::getBiasWeights
Weights getBiasWeights() const noexcept
Get the bias weights for the convolution.
Definition: NvInfer.h:1170
nvinfer1::INetworkDefinition::setErrorRecorder
void setErrorRecorder(IErrorRecorder *recorder) noexcept
Set the ErrorRecorder for this interface.
Definition: NvInfer.h:6527
nvinfer1::apiv::VRaggedSoftMaxLayer
Definition: NvInferImpl.h:656
nvinfer1::IDeconvolutionLayer::setPostPadding
void setPostPadding(Dims padding) noexcept
Set the multi-dimension post-padding of the deconvolution.
Definition: NvInfer.h:2603
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:542
nvinfer1::RNNGateType
RNNGateType
Identifies an individual gate within an RNN cell.
Definition: NvInfer.h:3058
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:684
nvinfer1::ILoopBoundaryLayer::getLoop
ILoop * getLoop() const noexcept
Return pointer to ILoop associated with this boundary layer.
Definition: NvInfer.h:4794
nvinfer1::IConvolutionLayer::setKernelWeights
void setKernelWeights(Weights weights) noexcept
Set the kernel weights for the convolution.
Definition: NvInfer.h:1135
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:1449
nvinfer1::IFullyConnectedLayer::getKernelWeights
Weights getKernelWeights() const noexcept
Get the kernel weights.
Definition: NvInfer.h:1479
nvinfer1::apiv::VTensor
Definition: NvInferImpl.h:316
nvinfer1::EnumMax< CalibrationAlgoType >
constexpr int32_t EnumMax< CalibrationAlgoType >() noexcept
Maximum number of elements in CalibrationAlgoType enum.
Definition: NvInfer.h:6604
nvinfer1::ITopKLayer::setK
void setK(int32_t k) noexcept
Set the k value for the layer.
Definition: NvInfer.h:4130
nvinfer1::ITensor::getDimensions
Dims getDimensions() const noexcept
Get the dimensions of a tensor.
Definition: NvInfer.h:246
nvinfer1::INetworkDefinition::addSlice
ISliceLayer * addSlice(ITensor &input, Dims start, Dims size, Dims stride) noexcept
Add a slice layer to the network.
Definition: NvInfer.h:6147
nvinfer1::IBuilderConfig::getDLACore
int32_t getDLACore() const noexcept
Get the DLA core that the engine executes on.
Definition: NvInfer.h:7491
nvinfer1::NetworkDefinitionCreationFlag::kEXPLICIT_PRECISION
nvinfer1::IResizeLayer::getCoordinateTransformation
ResizeCoordinateTransformation getCoordinateTransformation() const noexcept
Get coordinate transformation function.
Definition: NvInfer.h:4694
nvinfer1::IResizeLayer::setNearestRounding
void setNearestRounding(ResizeRoundMode value) noexcept
Set rounding mode for nearest neighbor resize.
Definition: NvInfer.h:4733
nvinfer1::IBuilderConfig::getEngineCapability
EngineCapability getEngineCapability() const noexcept
Query EngineCapability flow configured for the builder.
Definition: NvInfer.h:7303
nvinfer1::IDeconvolutionLayer::setNbGroups
void setNbGroups(int32_t nbGroups) noexcept
Set the number of groups for a deconvolution.
Definition: NvInfer.h:2498
nvinfer1::ILoop::addTripLimit
ITripLimitLayer * addTripLimit(ITensor &tensor, TripLimit limit) noexcept
Add a trip-count limiter, based on the given tensor.
Definition: NvInfer.h:4991
nvinfer1::INetworkDefinition::addFill
IFillLayer * addFill(Dims dimensions, FillOperation op) noexcept
Add a fill layer to the network.
Definition: NvInfer.h:6473
nvinfer1::ILayer::setName
void setName(const char *name) noexcept
Set the name of a layer.
Definition: NvInfer.h:531
nvinfer1::IUnaryLayer::setOperation
void setOperation(UnaryOperation op) noexcept
Set the unary operation for the layer.
Definition: NvInfer.h:3439
nvinfer1::UnaryOperation
UnaryOperation
Enumerates the unary operations that may be performed by a Unary layer.
Definition: NvInfer.h:3392
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:7164
nvinfer1::LoopOutput::kLAST_VALUE
Output value is value of tensor for last iteration.
nvinfer1::MatrixOperation::kNONE
nvinfer1::BuilderFlag::kSAFETY_SCOPE
nvinfer1::ILRNLayer::getWindowSize
int32_t getWindowSize() const noexcept
Get the LRN window size.
Definition: NvInfer.h:2010
nvinfer1::IPoolingLayer::getPrePadding
Dims getPrePadding() const noexcept
Get the pre-padding.
Definition: NvInfer.h:1838
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:563
nvinfer1::IResizeLayer::getNearestRounding
ResizeRoundMode getNearestRounding() const noexcept
Get rounding mode for nearest neighbor resize.
Definition: NvInfer.h:4743
nvinfer1::ISliceLayer::getSize
Dims getSize() const noexcept
Get dimensions of the output slice.
Definition: NvInfer.h:3977
nvinfer1::EnumMax< RNNOperation >
constexpr int32_t EnumMax< RNNOperation >() noexcept
Maximum number of elements in RNNOperation enum.
Definition: NvInfer.h:2998
nvinfer1::IScaleLayer::setPower
void setPower(Weights power) noexcept
Set the power value.
Definition: NvInfer.h:2196
nvinfer1::IShapeLayer
Layer type for getting shape of a tensor.
Definition: NvInfer.h:4068
nvinfer1::SliceMode::kWRAP
Coordinates wrap around periodically.
nvinfer1::ITensor::getName
const char * getName() const noexcept
Get the tensor name.
Definition: NvInfer.h:214
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:5918
nvinfer1::IDequantizeLayer::setAxis
void setAxis(int32_t axis) noexcept
Set the quantization axis.
Definition: NvInfer.h:5421
nvinfer1::ILRNLayer::getBeta
float getBeta() const noexcept
Get the LRN beta value.
Definition: NvInfer.h:2052
nvinfer1::apiv::VTopKLayer
Definition: NvInferImpl.h:638
nvinfer1::ILayer::setInput
void setInput(int32_t index, ITensor &tensor) noexcept
Replace an input of this layer with a specific tensor.
Definition: NvInfer.h:599
nvinfer1::NetworkDefinitionCreationFlag
NetworkDefinitionCreationFlag
List of immutable network properties expressed at network creation time. NetworkDefinitionCreationFla...
Definition: NvInfer.h:7838
nvinfer1::IBuilderConfig::getMaxWorkspaceSize
std::size_t getMaxWorkspaceSize() const noexcept
Get the maximum workspace size.
Definition: NvInfer.h:7347
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:5039
nvinfer1::IScaleLayer::setShift
void setShift(Weights shift) noexcept
Set the shift value.
Definition: NvInfer.h:2156
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:955
nvinfer1::IFillLayer::setAlpha
void setAlpha(double alpha) noexcept
Set the alpha parameter.
Definition: NvInfer.h:5169
nvinfer1::IPaddingLayer::getPostPadding
TRT_DEPRECATED DimsHW getPostPadding() const noexcept
Get the padding that is applied at the end of the tensor.
Definition: NvInfer.h:3628
nvinfer1::IBuilderConfig::setEngineCapability
void setEngineCapability(EngineCapability capability) noexcept
Configure the builder to target specified EngineCapability flow.
Definition: NvInfer.h:7291
nvinfer1::IBuilderConfig::getDeviceType
DeviceType getDeviceType(const ILayer *layer) const noexcept
Get the device that this layer executes on.
Definition: NvInfer.h:7436
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:1866
nvinfer1::IInt8LegacyCalibrator::getAlgorithm
CalibrationAlgoType getAlgorithm() noexcept override
Definition: NvInfer.h:6744
nvinfer1::IScaleLayer::setMode
void setMode(ScaleMode mode) noexcept
Set the scale mode.
Definition: NvInfer.h:2136
nvinfer1::IConvolutionLayer::getPaddingMode
PaddingMode getPaddingMode() const noexcept
Get the padding mode.
Definition: NvInfer.h:1278
nvinfer1::INetworkDefinition::addActivation
IActivationLayer * addActivation(ITensor &input, ActivationType type) noexcept
Add an activation layer to the network.
Definition: NvInfer.h:5566
nvinfer1::ITimingCache::reset
bool reset() noexcept
Empty the timing cache.
Definition: NvInfer.h:7212
nvinfer1::MatrixOperation
MatrixOperation
Enumerates the operations that may be performed on a tensor by IMatrixMultiplyLayer before multiplica...
Definition: NvInfer.h:4176
nvinfer1::ILayer::getOutput
ITensor * getOutput(int32_t index) const noexcept
Get the layer output corresponding to the given index.
Definition: NvInfer.h:582
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:6884
nvinfer1::ResizeSelector::kFORMULA
Use formula to map the original index.
nvinfer1::IOptimizationProfile
Optimization profile for dynamic input dimensions and shape tensors.
Definition: NvInferRuntime.h:1067
nvinfer1::PoolingType
PoolingType
The type of pooling to perform in a pooling layer.
Definition: NvInfer.h:1622
nvinfer1::ITensor::getDynamicRangeMax
float getDynamicRangeMax() const noexcept
Get maximum of dynamic range.
Definition: NvInfer.h:405
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:5604
nvinfer1::ILRNLayer::setBeta
void setBeta(float beta) noexcept
Set the LRN beta value.
Definition: NvInfer.h:2042
nvinfer1::ILayer::resetOutputType
void resetOutputType(int32_t index) noexcept
reset the output type for this layer
Definition: NvInfer.h:723
nvinfer1::ITensor::getType
DataType getType() const noexcept
Get the data type of a tensor.
Definition: NvInfer.h:273
nvinfer1::IActivationLayer::getActivationType
ActivationType getActivationType() const noexcept
Get the type of activation to be performed.
Definition: NvInfer.h:1560
nvinfer1::LayerType::kSLICE
Slice layer.
nvinfer1::ResizeSelector
ResizeSelector
The coordinate selector when resize to single pixel output.
Definition: NvInfer.h:4453
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:3311
nvinfer1::ILayer::getPrecision
DataType getPrecision() const noexcept
get the computational precision of this layer
Definition: NvInfer.h:631
nvinfer1::IRNNv2Layer::getSequenceLengths
ITensor * getSequenceLengths() const noexcept
Get the sequence lengths specified for the RNN.
Definition: NvInfer.h:3132
nvinfer1::DataType
DataType
The type of weights and tensors.
Definition: NvInferRuntimeCommon.h:155
nvinfer1::IBuilder::setMaxBatchSize
void setMaxBatchSize(int32_t batchSize) noexcept
Set the maximum batch size.
Definition: NvInfer.h:7888
nvinfer1::IDeconvolutionLayer::getKernelSizeNd
Dims getKernelSizeNd() const noexcept
Get the multi-dimension kernel size of the deconvolution.
Definition: NvInfer.h:2662
nvinfer1::IBuilderConfig::setQuantizationFlags
void setQuantizationFlags(QuantizationFlags flags) noexcept
Set the quantization flags.
Definition: NvInfer.h:7672
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:7901
nvinfer1::IBuilderConfig::resetDeviceType
void resetDeviceType(const ILayer *layer) noexcept
reset the DeviceType for this layer
Definition: NvInfer.h:7456
nvinfer1::IConcatenationLayer
A concatenation layer in a network definition.
Definition: NvInfer.h:2328
nvinfer1::LayerType::kSOFTMAX
SoftMax layer.
nvinfer1::IShuffleLayer
Layer type for shuffling data.
Definition: NvInfer.h:3713
nvinfer1::IPaddingLayer::getPrePadding
TRT_DEPRECATED DimsHW getPrePadding() const noexcept
Get the padding that is applied at the start of the tensor.
Definition: NvInfer.h:3602
nvinfer1::IShuffleLayer::getZeroIsPlaceholder
bool getZeroIsPlaceholder() const noexcept
Get meaning of 0 in reshape dimensions.
Definition: NvInfer.h:3863
nvinfer1::IScaleLayer::getShift
Weights getShift() const noexcept
Get the shift value.
Definition: NvInfer.h:2166
nvinfer1::RNNOperation
RNNOperation
Enumerates the RNN operations that may be performed by an RNN layer.
Definition: NvInfer.h:2988
nvinfer1::ITensor
A tensor in a network definition.
Definition: NvInfer.h:187
nvinfer1::IConvolutionLayer::getKernelSizeNd
Dims getKernelSizeNd() const noexcept
Get the multi-dimension kernel size of the convolution.
Definition: NvInfer.h:1301
nvinfer1::ActivationType::kTANH
TanH activation.
nvinfer1::IRecurrenceLayer
Definition: NvInfer.h:4804
nvinfer1::IBuilderConfig::getFlags
BuilderFlags getFlags() const noexcept
Get the build mode flags for this builder config. Defaults to 0.
Definition: NvInfer.h:7376
nvinfer1::INetworkDefinition::addLoop
ILoop * addLoop() noexcept
Add a loop to the network.
Definition: NvInfer.h:6417
nvinfer1::ResizeSelector::kUPPER
Select the upper left pixel.
nvinfer1::apiv::VPaddingLayer
Definition: NvInferImpl.h:594
nvinfer1::LayerType::kTRIP_LIMIT
Loop Trip limit layer.
nvinfer1::apiv::VUnaryLayer
Definition: NvInferImpl.h:576
nvinfer1::IRNNv2Layer::getDataLength
int32_t getDataLength() const noexcept
Get the maximum data length of the RNN.
Definition: NvInfer.h:3101
nvinfer1::IPoolingLayer::getPaddingMode
PaddingMode getPaddingMode() const noexcept
Get the padding mode.
Definition: NvInfer.h:1890
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 to gather on. The axis must be less than the number of dimensions in the data input.
Definition: NvInfer.h:2867
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:2899
nvinfer1::IBuilderConfig::setProfileStream
void setProfileStream(const cudaStream_t stream) noexcept
Set the cuda stream that is used to profile this network.
Definition: NvInfer.h:7547
nvinfer1::UnaryOperation::kTAN
Tangent.
nvinfer1::apiv::VBuilderConfig
Definition: NvInferImpl.h:894
nvinfer1::BuilderFlag::kTF32
nvinfer1::IBuilder::createBuilderConfig
nvinfer1::IBuilderConfig * createBuilderConfig() noexcept
Create a builder configuration object.
Definition: NvInfer.h:7975
nvinfer1::ILayer::resetPrecision
void resetPrecision() noexcept
reset the computational precision for this layer
Definition: NvInfer.h:653
nvinfer1::ScaleMode::kUNIFORM
Identical coefficients across all elements of the tensor.
nvinfer1::ILRNLayer
A LRN layer in a network definition.
Definition: NvInfer.h:1988
nvinfer1::RNNDirection
RNNDirection
Enumerates the RNN direction that may be performed by an RNN layer.
Definition: NvInfer.h:3010
nvinfer1::IBuilderConfig::getDefaultDeviceType
DeviceType getDefaultDeviceType() const noexcept
Get the default DeviceType which was set by setDefaultDeviceType.
Definition: NvInfer.h:7511
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:5786
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:5151
nvinfer1::IBuilder::reset
void reset() noexcept
Resets the builder state to default values.
Definition: NvInfer.h:8063
nvinfer1::TripLimit
TripLimit
Enum that describes kinds of trip limits.
Definition: NvInfer.h:4774
nvinfer1::IReduceLayer
Layer that represents a reduction operator across Shape, Int32, Float, and Half tensors.
Definition: NvInfer.h:3500
nvinfer1::IResizeLayer::getResizeMode
ResizeMode getResizeMode() const noexcept
Get resize mode for an input tensor.
Definition: NvInfer.h:4619
nvinfer1::IMatrixMultiplyLayer
Layer that represents a Matrix Multiplication.
Definition: NvInfer.h:4230
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:1782
nvinfer1::ElementWiseOperation::kXOR
Logical XOR of two elements.
nvinfer1::IDequantizeLayer::getAxis
int32_t getAxis() const noexcept
Get the quantization axis.
Definition: NvInfer.h:5410
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:4339
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:5066
nvinfer1::INetworkDefinition::addPooling
TRT_DEPRECATED IPoolingLayer * addPooling(ITensor &input, PoolingType type, DimsHW windowSize) noexcept
Add a pooling layer to the network.
Definition: NvInfer.h:5585
nvinfer1::INoCopy
Forward declaration of IPluginFactory for use by other interfaces.
Definition: NvInferRuntime.h:78
nvinfer1::ISliceLayer::setSize
void setSize(Dims size) noexcept
Set the dimensions of the output slice.
Definition: NvInfer.h:3962
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:3285
nvinfer1::IInt8EntropyCalibrator2
Definition: NvInfer.h:6703
nvinfer1::apiv::VMatrixMultiplyLayer
Definition: NvInferImpl.h:649
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:6401
nvinfer1::IFillLayer
Generate an output tensor with specified mode.
Definition: NvInfer.h:5104
nvinfer1::LayerType::kCONSTANT
Constant layer.
nvinfer1::QuantizationFlag
QuantizationFlag
List of valid flags for quantizing the network to int8.
Definition: NvInfer.h:7049
nvinfer1::IFillLayer::getAlpha
double getAlpha() const noexcept
Get the value of alpha parameter.
Definition: NvInfer.h:5184
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:5016
nvinfer1::IBuilderConfig::setQuantizationFlag
void setQuantizationFlag(QuantizationFlag flag) noexcept
Set a single quantization flag.
Definition: NvInfer.h:7708
nvinfer1::IInt8Calibrator
Application-implemented interface for calibration.
Definition: NvInfer.h:6620
nvinfer1::IErrorRecorder
Reference counted application-implemented error reporting interface for TensorRT objects.
Definition: NvInferRuntimeCommon.h:1373
nvinfer1::IBuilder::setGpuAllocator
void setGpuAllocator(IGpuAllocator *allocator) noexcept
Set the GPU allocator.
Definition: NvInfer.h:7965
nvinfer1::LayerType::kRECURRENCE
Loop Recurrence layer.
nvinfer1::ITopKLayer
Layer that represents a TopK reduction.
Definition: NvInfer.h:4100
nvinfer1::IResizeLayer::setResizeMode
void setResizeMode(ResizeMode resizeMode) noexcept
Set resize mode for an input tensor.
Definition: NvInfer.h:4609
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:3590
nvinfer1::ResizeRoundMode
ResizeRoundMode
The rounding mode for nearest neighbor resize.
Definition: NvInfer.h:4480
nvinfer1::IConvolutionLayer::getPaddingNd
Dims getPaddingNd() const noexcept
Get the multi-dimension padding of the convolution.
Definition: NvInfer.h:1356
nvinfer1::IIteratorLayer::getAxis
int32_t getAxis() const noexcept
Get axis being iterated over.
Definition: NvInfer.h:4930
nvinfer1::ResizeCoordinateTransformation::kASYMMETRIC
nvinfer1::OptProfileSelector
OptProfileSelector
When setting or querying optimization profile parameters (such as shape tensor inputs or dynamic dime...
Definition: NvInferRuntime.h:1031
nvinfer1::ITensor::getLocation
TensorLocation getLocation() const noexcept
Get the storage location of a tensor.
Definition: NvInfer.h:352
nvinfer1::IConvolutionLayer::setPrePadding
void setPrePadding(Dims padding) noexcept
Set the multi-dimension pre-padding of the convolution.
Definition: NvInfer.h:1215
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:5052
nvinfer1::IConcatenationLayer::setAxis
void setAxis(int32_t axis) noexcept
Set the axis along which concatenation occurs.
Definition: NvInfer.h:2341
nvinfer1::ILayer::getNbInputs
int32_t getNbInputs() const noexcept
Get the number of inputs of a layer.
Definition: NvInfer.h:550
nvinfer1::IConstantLayer::getWeights
Weights getWeights() const noexcept
Get the weights for the layer.
Definition: NvInfer.h:4327
nvinfer1::INetworkDefinition::addGather
IGatherLayer * addGather(ITensor &data, ITensor &indices, int32_t axis) noexcept
Add a gather layer to the network.
Definition: NvInfer.h:5934
nvinfer1::IDeconvolutionLayer::getDilationNd
Dims getDilationNd() const noexcept
Get the multi-dimension dilation of the deconvolution.
Definition: NvInfer.h:2757
nvinfer1::INetworkDefinition::getOutput
ITensor * getOutput(int32_t index) const noexcept
Get the output tensor specified by the given index.
Definition: NvInfer.h:5844
NvInferLegacyDims.h
nvinfer1::INetworkDefinition::addIdentity
IIdentityLayer * addIdentity(ITensor &input) noexcept
Add an identity layer.
Definition: NvInfer.h:6082
nvinfer1::IDeconvolutionLayer::setStride
TRT_DEPRECATED void setStride(DimsHW stride) noexcept
Get the stride of the deconvolution.
Definition: NvInfer.h:2432
nvinfer1::apiv::VSelectLayer
Definition: NvInferImpl.h:742
nvinfer1::ITensor::dynamicRangeIsSet
bool dynamicRangeIsSet() const noexcept
Query whether dynamic range is set.
Definition: NvInfer.h:377
nvinfer1::LayerType::kREDUCE
Reduce layer.
nvinfer1::NetworkDefinitionCreationFlags
uint32_t NetworkDefinitionCreationFlags
Represents one or more NetworkDefinitionCreationFlag flags using binary OR operations....
Definition: NvInfer.h:7827
nvinfer1::IInt8EntropyCalibrator
Definition: NvInfer.h:6685
nvinfer1::EnumMax< UnaryOperation >
constexpr int32_t EnumMax< UnaryOperation >() noexcept
Maximum number of elements in UnaryOperation enum.
Definition: NvInfer.h:3419
nvinfer1::IGatherLayer
Definition: NvInfer.h:2858
nvinfer1::IDeconvolutionLayer::getPrePadding
Dims getPrePadding() const noexcept
Get the pre-padding.
Definition: NvInfer.h:2585
nvinfer1::apiv::VElementWiseLayer
Definition: NvInferImpl.h:523
nvinfer1::ResizeCoordinateTransformation::kALIGN_CORNERS
nvinfer1::UnaryOperation::kSIN
Sine.
nvinfer1::IConstantLayer::getDimensions
Dims getDimensions() const noexcept
Get the dimensions for the layer.
Definition: NvInfer.h:4351
nvinfer1::IFillLayer::setOperation
void setOperation(FillOperation op) noexcept
Set the fill operation for the layer.
Definition: NvInfer.h:5141
nvinfer1::IBuilderConfig::getMinTimingIterations
virtual int32_t getMinTimingIterations() const noexcept
Query the number of minimization iterations.
Definition: NvInfer.h:7253
nvinfer1::IIteratorLayer::setAxis
void setAxis(int32_t axis) noexcept
Set axis to iterate over.
Definition: NvInfer.h:4924
nvinfer1::IDeconvolutionLayer::getPaddingNd
Dims getPaddingNd() const noexcept
Get the multi-dimension padding of the deconvolution.
Definition: NvInfer.h:2717
nvinfer1::IReduceLayer::getReduceAxes
uint32_t getReduceAxes() const noexcept
Get the axes over which to reduce for the layer.
Definition: NvInfer.h:3538
nvinfer1::Dims32::MAX_DIMS
static constexpr int32_t MAX_DIMS
The maximum number of dimensions supported for a tensor.
Definition: NvInferRuntimeCommon.h:198
nvinfer1::IElementWiseLayer::setOperation
void setOperation(ElementWiseOperation op) noexcept
Set the binary operation for the layer.
Definition: NvInfer.h:2833
nvinfer1::IBuilderConfig::setAvgTimingIterations
virtual void setAvgTimingIterations(int32_t avgTiming) noexcept
Set the number of averaging iterations used when timing layers.
Definition: NvInfer.h:7266
nvinfer1::ITensor::setName
void setName(const char *name) noexcept
Set the tensor name.
Definition: NvInfer.h:202
nvinfer1::IPoolingLayer::getPaddingNd
Dims getPaddingNd() const noexcept
Get the multi-dimension padding for pooling.
Definition: NvInfer.h:1969
nvinfer1::apiv::VRNNv2Layer
Definition: NvInferImpl.h:539
nvinfer1::IBuilderConfig::setMinTimingIterations
virtual void setMinTimingIterations(int32_t minTiming) noexcept
Set the number of minimization iterations used when timing layers.
Definition: NvInfer.h:7241
nvinfer1::EnumMax< LayerType >
constexpr int32_t EnumMax< LayerType >() noexcept
Maximum number of elements in LayerType enum.
Definition: NvInfer.h:130
nvinfer1::LayerType::kCONVOLUTION
Convolution layer.
nvinfer1::BuilderFlags
uint32_t BuilderFlags
Represents one or more QuantizationFlag values using binary OR operations, e.g., 1U << BuilderFlag::k...
Definition: NvInfer.h:7070
nvinfer1::IInt8MinMaxCalibrator::getAlgorithm
CalibrationAlgoType getAlgorithm() noexcept override
Definition: NvInfer.h:6726
nvinfer1::ElementWiseOperation::kPROD
Product of the two elements.
nvinfer1::IFillLayer::getBeta
double getBeta() const noexcept
Get the value of beta parameter.
Definition: NvInfer.h:5217
nvinfer1::IConvolutionLayer::setNbGroups
void setNbGroups(int32_t nbGroups) noexcept
Set the number of groups for a convolution.
Definition: NvInfer.h:1111
nvinfer1::ILoopBoundaryLayer
Definition: NvInfer.h:4790
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:1344
nvinfer1::EngineCapability
EngineCapability
List of supported engine capability flows.
Definition: NvInferRuntime.h:104
nvinfer1::IAlgorithm
Describes a variation of execution of a layer. An algorithm is represented by IAlgorithmVariant and t...
Definition: NvInfer.h:6930
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:3260
nvinfer1::LayerType::kLRN
LRN layer.
nvinfer1::apiv::VRecurrenceLayer
Definition: NvInferImpl.h:705
nvinfer1::IBuilder::createOptimizationProfile
nvinfer1::IOptimizationProfile * createOptimizationProfile() noexcept
Create a new optimization profile.
Definition: NvInfer.h:8021
nvinfer1::IBuilderConfig::setDLACore
void setDLACore(int32_t dlaCore) noexcept
Sets the DLA core used by the network.
Definition: NvInfer.h:7480
nvinfer1::IResizeLayer::setSelectorForSinglePixel
void setSelectorForSinglePixel(ResizeSelector selector) noexcept
Set coordinate selector function when resized to single pixel.
Definition: NvInfer.h:4709
nvinfer1::IBuilderConfig::getAlgorithmSelector
IAlgorithmSelector * getAlgorithmSelector() const noexcept
Get Algorithm Selector.
Definition: NvInfer.h:7630
nvinfer1::INetworkDefinition::getNbInputs
int32_t getNbInputs() const noexcept
Get the number of inputs in the network.
Definition: NvInfer.h:5798
nvinfer1::ITensor::isExecutionTensor
bool isExecutionTensor() const noexcept
Whether the tensor is an execution tensor.
Definition: NvInfer.h:494
nvinfer1::ILoop::setName
void setName(const char *name) noexcept
Set the name of the loop.
Definition: NvInfer.h:5029
nvinfer1::IBuilderConfig::setFlags
void setFlags(BuilderFlags builderFlags) noexcept
Set the build mode flags to turn on builder options for this network.
Definition: NvInfer.h:7364
nvinfer1::ResizeCoordinateTransformation
ResizeCoordinateTransformation
The resize coordinate transformation function.
Definition: NvInfer.h:4403
nvinfer1::IConvolutionLayer::getStride
TRT_DEPRECATED DimsHW getStride() const noexcept
Get the stride of the convolution.
Definition: NvInfer.h:1059
nvinfer1::IBuilderConfig::getTimingCache
const nvinfer1::ITimingCache * getTimingCache() const noexcept
Get the pointer to the timing cache from current IBuilderConfig.
Definition: NvInfer.h:7812
nvinfer1::IShuffleLayer::setSecondTranspose
void setSecondTranspose(Permutation permutation) noexcept
Set the permutation applied by the second transpose operation.
Definition: NvInfer.h:3822
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:6368
nvinfer1::RNNGateType::kHIDDEN
Hidden gate (h).
nvinfer1::IBuilderConfig::setDeviceType
void setDeviceType(const ILayer *layer, DeviceType deviceType) noexcept
Set the device that this layer must execute on.
Definition: NvInfer.h:7427
nvinfer1::apiv::VTimingCache
Definition: NvInferImpl.h:886
nvinfer1::LayerType::kUNARY
UnaryOp operation Layer.
nvinfer1::IInt8LegacyCalibrator
Definition: NvInfer.h:6738
nvinfer1::INetworkDefinition::addParametricReLU
IParametricReLULayer * addParametricReLU(ITensor &input, ITensor &slope) noexcept
Add a parametric ReLU layer to the network.
Definition: NvInfer.h:6268
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:1810
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:5525
nvinfer1::apiv::VPluginV2Layer
Definition: NvInferImpl.h:570
nvinfer1::IConvolutionLayer::setDilation
TRT_DEPRECATED void setDilation(DimsHW dilation) noexcept
Set the dilation for a convolution.
Definition: NvInfer.h:1186
nvinfer1::IScaleLayer::getPower
Weights getPower() const noexcept
Get the power value.
Definition: NvInfer.h:2206
cudaStream_t
struct CUstream_st * cudaStream_t
Forward declaration of cudaStream_t.
Definition: NvInferRuntimeCommon.h:109
nvinfer1::IQuantizeLayer::getAxis
int32_t getAxis() const noexcept
Get the quantization axis.
Definition: NvInfer.h:5323
nvinfer1::UnaryOperation::kACOS
Inverse cosine.
nvinfer1::UnaryOperation::kCOS
Cosine.
nvinfer1::IPluginV2Layer::getPlugin
IPluginV2 & getPlugin() noexcept
Get the plugin for the layer.
Definition: NvInfer.h:3375
nvinfer1::IConvolutionLayer::getKernelWeights
Weights getKernelWeights() const noexcept
Get the kernel weights of the convolution.
Definition: NvInfer.h:1145
nvinfer1::IScaleLayer
A Scale layer in a network definition.
Definition: NvInfer.h:2128
nvinfer1::INetworkDefinition::getName
const char * getName() const noexcept
Returns the name associated with the network.
Definition: NvInfer.h:6183
nvinfer1::IDeconvolutionLayer::setPadding
TRT_DEPRECATED void setPadding(DimsHW padding) noexcept
Set the padding of the deconvolution.
Definition: NvInfer.h:2464
nvinfer1::IConstantLayer::setWeights
void setWeights(Weights weights) noexcept
Set the weights for the layer.
Definition: NvInfer.h:4317
nvinfer1::RNNOperation::kGRU
Three-gate network consisting of Gated Recurrent Units.
nvinfer1::UnaryOperation::kNOT
Logical NOT.
nvinfer1::ISliceLayer::getStride
Dims getStride() const noexcept
Get the stride for the output slice.
Definition: NvInfer.h:4006
nvinfer1::ILRNLayer::setAlpha
void setAlpha(float alpha) noexcept
Set the LRN alpha value.
Definition: NvInfer.h:2021
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:7990
nvinfer1::ISoftMaxLayer
A Softmax layer in a network definition.
Definition: NvInfer.h:2263
nvinfer1::IPoolingLayer::getStride
TRT_DEPRECATED DimsHW getStride() const noexcept
Get the stride for pooling.
Definition: NvInfer.h:1724
nvinfer1::INetworkDefinition::addPoolingNd
IPoolingLayer * addPoolingNd(ITensor &input, PoolingType type, Dims windowSize) noexcept
Add a multi-dimension pooling layer to the network.
Definition: NvInfer.h:6310
nvinfer1::INetworkDefinition::setName
void setName(const char *name) noexcept
Sets the name of the network.
Definition: NvInfer.h:6169
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:8071
nvinfer1::IRNNv2Layer::getMaxSeqLength
int32_t getMaxSeqLength() const noexcept
Get the maximum sequence length of the RNN.
Definition: NvInfer.h:3097
nvinfer1::IFullyConnectedLayer::getBiasWeights
Weights getBiasWeights() const noexcept
Get the bias weights.
Definition: NvInfer.h:1501
nvinfer1::IBuilderConfig
Holds properties for configuring a builder to produce an engine.
Definition: NvInfer.h:7226
nvinfer1::IDeconvolutionLayer::setPaddingMode
void setPaddingMode(PaddingMode paddingMode) noexcept
Set the padding mode.
Definition: NvInfer.h:2627
nvinfer1::IBuilderConfig::setCalibrationProfile
bool setCalibrationProfile(const IOptimizationProfile *profile) noexcept
Add a calibration profile.
Definition: NvInfer.h:7645
nvinfer1::IDeconvolutionLayer::setKernelSize
TRT_DEPRECATED void setKernelSize(DimsHW kernelSize) noexcept
Set the HW kernel size of the convolution.
Definition: NvInfer.h:2382
nvinfer1::INetworkDefinition::getInput
ITensor * getInput(int32_t index) const noexcept
Get the input tensor specified by the given index.
Definition: NvInfer.h:5814
nvinfer1::IDeconvolutionLayer::getStride
TRT_DEPRECATED DimsHW getStride() const noexcept
Get the stride of the deconvolution.
Definition: NvInfer.h:2444
nvinfer1::IRNNv2Layer::getHiddenState
ITensor * getHiddenState() const noexcept
Get the initial hidden state of the RNN.
Definition: NvInfer.h:3320
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:1799
nvinfer1::apiv::VParametricReLULayer
Definition: NvInferImpl.h:675
nvinfer1::EnumMax< NetworkDefinitionCreationFlag >
constexpr int32_t EnumMax< NetworkDefinitionCreationFlag >() noexcept
Maximum number of elements in NetworkDefinitionCreationFlag enum.
Definition: NvInfer.h:7863
nvinfer1::EnumMax< TripLimit >
constexpr int32_t EnumMax< TripLimit >() noexcept
Maximum number of elements in TripLimit enum.
Definition: NvInfer.h:4783
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:3294
nvinfer1::IResizeLayer
A resize layer in a network definition.
Definition: NvInfer.h:4526
nvinfer1::LayerType::kELEMENTWISE
Elementwise layer.
nvinfer1::apiv::VShapeLayer
Definition: NvInferImpl.h:633
nvinfer1::INetworkDefinition::addMatrixMultiply
IMatrixMultiplyLayer * addMatrixMultiply(ITensor &input0, MatrixOperation op0, ITensor &input1, MatrixOperation op1) noexcept
Add a MatrixMultiply layer to the network.
Definition: NvInfer.h:5971
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:6943
nvinfer1::IBuilderConfig::getProfilingVerbosity
ProfilingVerbosity getProfilingVerbosity() const noexcept
Get verbosity level of layer information exposed in NVTX annotations.
Definition: NvInfer.h:7613
nvinfer1::IDeconvolutionLayer::setKernelSizeNd
void setKernelSizeNd(Dims kernelSize) noexcept
Set the multi-dimension kernel size of the deconvolution.
Definition: NvInfer.h:2652
nvinfer1::IBuilderConfig::isDeviceTypeSet
bool isDeviceTypeSet(const ILayer *layer) const noexcept
whether the DeviceType has been explicitly set for this layer
Definition: NvInfer.h:7446
nvinfer1::ITensor::isNetworkInput
bool isNetworkInput() const noexcept
Whether the tensor is a network input.
Definition: NvInfer.h:296
nvinfer1::IGatherLayer::setNbElementWiseDims
void setNbElementWiseDims(int32_t k) noexcept
Set the number of leading dimensions of indices tensor to be handled elementwise. k must be 0 if ther...
Definition: NvInfer.h:2889
nvinfer1::IResizeLayer::setScales
void setScales(const float *scales, int32_t nbScales) noexcept
Set the resize scales.
Definition: NvInfer.h:4578
nvinfer1::ILayer::getType
LayerType getType() const noexcept
Return the type of a layer.
Definition: NvInfer.h:519
nvinfer1::IPoolingLayer
A Pooling layer in a network definition.
Definition: NvInfer.h:1650
nvinfer1::apiv::VNetworkDefinition
Definition: NvInferImpl.h:773
nvinfer1::IConvolutionLayer::setPaddingMode
void setPaddingMode(PaddingMode paddingMode) noexcept
Set the padding mode.
Definition: NvInfer.h:1266
nvinfer1::IInt8EntropyCalibrator2::getAlgorithm
CalibrationAlgoType getAlgorithm() noexcept override
Definition: NvInfer.h:6709
nvinfer1::ITopKLayer::getReduceAxes
uint32_t getReduceAxes() const noexcept
Get the axes to reduce for the layer.
Definition: NvInfer.h:4160
nvinfer1::IBuilderConfig::createTimingCache
nvinfer1::ITimingCache * createTimingCache(const void *blob, std::size_t size) const noexcept
Create timing cache.
Definition: NvInfer.h:7779
nvinfer1::IRNNv2Layer::setCellState
void setCellState(ITensor &cell) noexcept
Set the initial cell state of the LSTM with the provided cell ITensor.
Definition: NvInfer.h:3339
nvinfer1::IGpuAllocator
Application-implemented class for controlling allocation on the GPU.
Definition: NvInferRuntimeCommon.h:1103
nvinfer1::IPoolingLayer::setStrideNd
void setStrideNd(Dims stride) noexcept
Set the multi-dimension stride for pooling.
Definition: NvInfer.h:1928
nvinfer1::anonymous_namespace{NvInfer.h}::createInferBuilder
IBuilder * createInferBuilder(ILogger &logger) noexcept
Create an instance of an IBuilder class.
Definition: NvInfer.h:8141
nvinfer1::IUnaryLayer
Layer that represents an unary operation.
Definition: NvInfer.h:3431
nvinfer1::IAlgorithmVariant::getTactic
int64_t getTactic() const noexcept
Return tactic of the algorithm.
Definition: NvInfer.h:6859
nvinfer1::IReduceLayer::getOperation
ReduceOperation getOperation() const noexcept
Get the reduce operation for the layer.
Definition: NvInfer.h:3518
nvinfer1::IPoolingLayer::setPadding
TRT_DEPRECATED void setPadding(DimsHW padding) noexcept
Set the padding for pooling.
Definition: NvInfer.h:1740
nvinfer1::ISliceLayer::getMode
SliceMode getMode() const noexcept
Get the slice mode.
Definition: NvInfer.h:4026
nvinfer1::IBuilder
Builds an engine from a network definition.
Definition: NvInfer.h:7875
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:3616
nvinfer1::IBuilderConfig::setInt8Calibrator
void setInt8Calibrator(IInt8Calibrator *calibrator) noexcept
Set Int8 Calibration interface.
Definition: NvInfer.h:7313
nvinfer1::IFillLayer::setBeta
void setBeta(double beta) noexcept
Set the beta parameter.
Definition: NvInfer.h:5202
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:8112
nvinfer1::LayerType::kCONCATENATION
Concatenation layer.
nvinfer1::apiv::VBuilder
Definition: NvInferImpl.h:944
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:4108
nvinfer1::LayerType::kACTIVATION
Activation layer.
nvinfer1::IAlgorithm::getAlgorithmVariant
const IAlgorithmVariant & getAlgorithmVariant() const noexcept
Returns the algorithm variant.
Definition: NvInfer.h:6951
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:2394
nvinfer1::IQuantizeLayer
A Quantize layer in a network definition.
Definition: NvInfer.h:5312
nvinfer1::INetworkDefinition::addShape
IShapeLayer * addShape(ITensor &input) noexcept
Add a shape layer to the network.
Definition: NvInfer.h:6201
nvinfer1::LayerType::kPARAMETRIC_RELU
Parametric ReLU layer.
nvinfer1::TopKOperation
TopKOperation
Enumerates the operations that may be performed by a TopK layer.
Definition: NvInfer.h:4080
nvinfer1::IAlgorithmVariant::getImplementation
int64_t getImplementation() const noexcept
Return implementation of the algorithm.
Definition: NvInfer.h:6851
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:5004
nvinfer1::IRNNv2Layer::getLayerCount
int32_t getLayerCount() const noexcept
Get the layer count of the RNN.
Definition: NvInfer.h:3089
nvinfer1::TensorLocation
TensorLocation
The location for tensor data storage, device or host.
Definition: NvInferRuntime.h:242
nvinfer1::ITopKLayer::getK
int32_t getK() const noexcept
Get the k value for the layer.
Definition: NvInfer.h:4140
nvinfer1::LayerType::kFULLY_CONNECTED
Fully connected layer.
nvinfer1::IActivationLayer::getBeta
float getBeta() const noexcept
Get the beta parameter.
Definition: NvInfer.h:1607
nvinfer1::IBuilder::getNbDLACores
int32_t getNbDLACores() const noexcept
Return the number of DLA engines available to this builder.
Definition: NvInfer.h:7949
nvinfer1::IResizeLayer::getSelectorForSinglePixel
ResizeSelector getSelectorForSinglePixel() const noexcept
Get the coordinate selector function when resized to single pixel.
Definition: NvInfer.h:4719
nvinfer1::RNNGateType::kFORGET
Forget gate (f).
nvinfer1::IBuilderConfig::setMaxWorkspaceSize
void setMaxWorkspaceSize(std::size_t workspaceSize) noexcept
Set the maximum workspace size.
Definition: NvInfer.h:7333
nvinfer1::IConvolutionLayer::getNbOutputMaps
int32_t getNbOutputMaps() const noexcept
Get the number of output maps for the convolution.
Definition: NvInfer.h:1033
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:7941
nvinfer1::IRNNv2Layer::getInputMode
RNNInputMode getInputMode() const noexcept
Get the input mode of the RNN layer.
Definition: NvInfer.h:3168
nvinfer1::IAlgorithmContext::getNbOutputs
int32_t getNbOutputs() const noexcept
Return number of outputs of the algorithm.
Definition: NvInfer.h:6911
nvinfer1::IBuilderConfig::getQuantizationFlags
QuantizationFlags getQuantizationFlags() const noexcept
Get the quantization flags.
Definition: NvInfer.h:7684
nvinfer1::IConcatenationLayer::getAxis
int32_t getAxis() const noexcept
Get the axis along which concatenation occurs.
Definition: NvInfer.h:2351
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:5631
TRT_DEPRECATED
#define TRT_DEPRECATED
< Items that are marked as deprecated will be removed in a future release.
Definition: NvInferRuntimeCommon.h:76
nvinfer1::LayerType::kMATRIX_MULTIPLY
Matrix multiply layer.
nvinfer1::IDeconvolutionLayer::setStrideNd
void setStrideNd(Dims stride) noexcept
Set the multi-dimension stride of the deconvolution.
Definition: NvInfer.h:2677
nvinfer1::ITensor::getBroadcastAcrossBatch
bool getBroadcastAcrossBatch() const noexcept
Check if tensor is broadcast across the batch.
Definition: NvInfer.h:342
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:6065
nvinfer1::ITensor::isNetworkOutput
bool isNetworkOutput() const noexcept
Whether the tensor is a network output.
Definition: NvInfer.h:304
nvinfer1::IBuilderConfig::setTimingCache
bool setTimingCache(const ITimingCache &cache, bool ignoreMismatch) noexcept
Attach a timing cache to IBuilderConfig.
Definition: NvInfer.h:7802
nvinfer1::ResizeRoundMode::kHALF_UP
Round half up.
nvinfer1::IScaleLayer::getScale
Weights getScale() const noexcept
Get the scale value.
Definition: NvInfer.h:2186
nvinfer1::IActivationLayer
An Activation layer in a network definition.
Definition: NvInfer.h:1540
nvinfer1::CalibrationAlgoType
CalibrationAlgoType
Version of calibration algorithm to use.
Definition: NvInfer.h:6594
nvinfer1::IBuilder::setErrorRecorder
void setErrorRecorder(IErrorRecorder *recorder) noexcept
Set the ErrorRecorder for this interface.
Definition: NvInfer.h:8040
nvinfer1::IDequantizeLayer
A Dequantize layer in a network definition.
Definition: NvInfer.h:5399
nvinfer1::LayerType::kPOOLING
Pooling layer.
nvinfer1::IBuilderConfig::destroy
TRT_DEPRECATED void destroy() noexcept
De-allocates any internally allocated memory.
Definition: NvInfer.h:7535
nvinfer1::EnumMax< BuilderFlag >
constexpr int32_t EnumMax< BuilderFlag >() noexcept
Maximum number of builder flags in BuilderFlag enum.
Definition: NvInfer.h:7107
nvinfer1::IRNNv2Layer::setInputMode
void setInputMode(RNNInputMode op) noexcept
Set the input mode of the RNN layer.
Definition: NvInfer.h:3159
nvinfer1::IDeconvolutionLayer
A deconvolution layer in a network definition.
Definition: NvInfer.h:2368
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:3120