TensorRT  8.0.0
NvInfer.h
Go to the documentation of this file.
1 /*
2  * Copyright 1993-2021 NVIDIA Corporation. All rights reserved.
3  *
4  * NOTICE TO LICENSEE:
5  *
6  * This source code and/or documentation ("Licensed Deliverables") are
7  * subject to NVIDIA intellectual property rights under U.S. and
8  * international Copyright laws.
9  *
10  * These Licensed Deliverables contained herein is PROPRIETARY and
11  * CONFIDENTIAL to NVIDIA and is being provided under the terms and
12  * conditions of a form of NVIDIA software license agreement by and
13  * between NVIDIA and Licensee ("License Agreement") or electronically
14  * accepted by Licensee. Notwithstanding any terms or conditions to
15  * the contrary in the License Agreement, reproduction or disclosure
16  * of the Licensed Deliverables to any third party without the express
17  * written consent of NVIDIA is prohibited.
18  *
19  * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
20  * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
21  * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS
22  * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
23  * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
24  * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
25  * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
26  * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
27  * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
28  * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
29  * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
30  * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
31  * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
32  * OF THESE LICENSED DELIVERABLES.
33  *
34  * U.S. Government End Users. These Licensed Deliverables are a
35  * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
36  * 1995), consisting of "commercial computer software" and "commercial
37  * computer software documentation" as such terms are used in 48
38  * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
39  * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
40  * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
41  * U.S. Government End Users acquire the Licensed Deliverables with
42  * only those rights set forth herein.
43  *
44  * Any use of the Licensed Deliverables in individual and commercial
45  * software must include, in the user documentation and internal
46  * comments to the code, the above Disclaimer and U.S. Government End
47  * Users Notice.
48  */
49 
50 #ifndef NV_INFER_H
51 #define NV_INFER_H
52 
53 #include "NvInferLegacyDims.h"
54 #include "NvInferRuntime.h"
55 
64 //
67 
73 
79 namespace nvinfer1
80 {
81 
89 enum class LayerType : int32_t
90 {
91  kCONVOLUTION = 0,
92  kFULLY_CONNECTED = 1,
93  kACTIVATION = 2,
94  kPOOLING = 3,
95  kLRN = 4,
96  kSCALE = 5,
97  kSOFTMAX = 6,
98  kDECONVOLUTION = 7,
99  kCONCATENATION = 8,
100  kELEMENTWISE = 9,
101  kPLUGIN = 10,
102  kUNARY = 11,
103  kPADDING = 12,
104  kSHUFFLE = 13,
105  kREDUCE = 14,
106  kTOPK = 15,
107  kGATHER = 16,
108  kMATRIX_MULTIPLY = 17,
109  kRAGGED_SOFTMAX = 18,
110  kCONSTANT = 19,
111  kRNN_V2 = 20,
112  kIDENTITY = 21,
113  kPLUGIN_V2 = 22,
114  kSLICE = 23,
115  kSHAPE = 24,
116  kPARAMETRIC_RELU = 25,
117  kRESIZE = 26,
118  kTRIP_LIMIT = 27,
119  kRECURRENCE = 28,
120  kITERATOR = 29,
121  kLOOP_OUTPUT = 30,
122  kSELECT = 31,
123  kFILL = 32,
124  kQUANTIZE = 33,
125  kDEQUANTIZE = 34,
126 };
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 
2328 {
2329 public:
2340  void setAxis(int32_t axis) noexcept
2341  {
2342  mImpl->setAxis(axis);
2343  }
2344 
2350  int32_t getAxis() const noexcept
2351  {
2352  return mImpl->getAxis();
2353  }
2354 
2355 protected:
2356  virtual ~IConcatenationLayer() noexcept = default;
2357  apiv::VConcatenationLayer* mImpl;
2358 };
2359 
2368 {
2369 public:
2381  TRT_DEPRECATED void setKernelSize(DimsHW kernelSize) noexcept
2382  {
2383  mImpl->setKernelSize(kernelSize);
2384  }
2385 
2394  {
2395  return mImpl->getKernelSize();
2396  }
2397 
2405  void setNbOutputMaps(int32_t nbOutputMaps) noexcept
2406  {
2407  mImpl->setNbOutputMaps(nbOutputMaps);
2408  }
2409 
2415  int32_t getNbOutputMaps() const noexcept
2416  {
2417  return mImpl->getNbOutputMaps();
2418  }
2419 
2431  TRT_DEPRECATED void setStride(DimsHW stride) noexcept
2432  {
2433  mImpl->setStride(stride);
2434  }
2435 
2444  {
2445  return mImpl->getStride();
2446  }
2447 
2463  TRT_DEPRECATED void setPadding(DimsHW padding) noexcept
2464  {
2465  mImpl->setPadding(padding);
2466  }
2467 
2478  {
2479  return mImpl->getPadding();
2480  }
2481 
2497  void setNbGroups(int32_t nbGroups) noexcept
2498  {
2499  mImpl->setNbGroups(nbGroups);
2500  }
2501 
2507  int32_t getNbGroups() const noexcept
2508  {
2509  return mImpl->getNbGroups();
2510  }
2511 
2521  void setKernelWeights(Weights weights) noexcept
2522  {
2523  mImpl->setKernelWeights(weights);
2524  }
2525 
2531  Weights getKernelWeights() const noexcept
2532  {
2533  return mImpl->getKernelWeights();
2534  }
2535 
2546  void setBiasWeights(Weights weights) noexcept
2547  {
2548  mImpl->setBiasWeights(weights);
2549  }
2550 
2556  Weights getBiasWeights() const noexcept
2557  {
2558  return mImpl->getBiasWeights();
2559  }
2560 
2574  void setPrePadding(Dims padding) noexcept
2575  {
2576  mImpl->setPrePadding(padding);
2577  }
2578 
2584  Dims getPrePadding() const noexcept
2585  {
2586  return mImpl->getPrePadding();
2587  }
2588 
2602  void setPostPadding(Dims padding) noexcept
2603  {
2604  mImpl->setPostPadding(padding);
2605  }
2606 
2612  Dims getPostPadding() const noexcept
2613  {
2614  return mImpl->getPostPadding();
2615  }
2616 
2626  void setPaddingMode(PaddingMode paddingMode) noexcept
2627  {
2628  mImpl->setPaddingMode(paddingMode);
2629  }
2630 
2638  PaddingMode getPaddingMode() const noexcept
2639  {
2640  return mImpl->getPaddingMode();
2641  }
2642 
2651  void setKernelSizeNd(Dims kernelSize) noexcept
2652  {
2653  mImpl->setKernelSizeNd(kernelSize);
2654  }
2655 
2661  Dims getKernelSizeNd() const noexcept
2662  {
2663  return mImpl->getKernelSizeNd();
2664  }
2665 
2676  void setStrideNd(Dims stride) noexcept
2677  {
2678  mImpl->setStrideNd(stride);
2679  }
2680 
2686  Dims getStrideNd() const noexcept
2687  {
2688  return mImpl->getStrideNd();
2689  }
2690 
2704  void setPaddingNd(Dims padding) noexcept
2705  {
2706  mImpl->setPaddingNd(padding);
2707  }
2708 
2716  Dims getPaddingNd() const noexcept
2717  {
2718  return mImpl->getPaddingNd();
2719  }
2720 
2738  using ILayer::setInput;
2739 
2746  void setDilationNd(Dims dilation) noexcept
2747  {
2748  mImpl->setDilationNd(dilation);
2749  }
2750 
2756  Dims getDilationNd() const noexcept
2757  {
2758  return mImpl->getDilationNd();
2759  }
2760 
2761 protected:
2762  virtual ~IDeconvolutionLayer() noexcept = default;
2763  apiv::VDeconvolutionLayer* mImpl;
2764 };
2765 
2773 enum class ElementWiseOperation : int32_t
2774 {
2775  kSUM = 0,
2776  kPROD = 1,
2777  kMAX = 2,
2778  kMIN = 3,
2779  kSUB = 4,
2780  kDIV = 5,
2781  kPOW = 6,
2782  kFLOOR_DIV = 7,
2783  kAND = 8,
2784  kOR = 9,
2785  kXOR = 10,
2786  kEQUAL = 11,
2787  kGREATER = 12,
2788  kLESS = 13
2789 };
2790 
2791 namespace impl
2792 {
2794 template <>
2796 {
2797  static constexpr int32_t kVALUE = 14;
2798 };
2799 } // namespace impl
2800 
2809 //!
2816 {
2817 public:
2828  {
2829  return mImpl->setOperation(op);
2830  }
2831 
2840  {
2841  return mImpl->getOperation();
2842  }
2843 
2844 protected:
2845  apiv::VElementWiseLayer* mImpl;
2846  virtual ~IElementWiseLayer() noexcept = default;
2847 };
2848 
2852 class IGatherLayer : public ILayer
2853 {
2854 public:
2861  void setGatherAxis(int32_t axis) noexcept
2862  {
2863  mImpl->setGatherAxis(axis);
2864  }
2865 
2871  int32_t getGatherAxis() const noexcept
2872  {
2873  return mImpl->getGatherAxis();
2874  }
2875 
2883  void setNbElementWiseDims(int32_t k) noexcept
2884  {
2885  mImpl->setNbElementWiseDims(k);
2886  }
2887 
2893  int32_t getNbElementWiseDims() const noexcept
2894  {
2895  return mImpl->getNbElementWiseDims();
2896  }
2897 
2898 protected:
2899  apiv::VGatherLayer* mImpl;
2900  virtual ~IGatherLayer() noexcept = default;
2901 };
2902 
2982 enum class RNNOperation : int32_t
2983 {
2984  kRELU = 0,
2985  kTANH = 1,
2986  kLSTM = 2,
2987  kGRU = 3
2988 };
2989 
2991 template <>
2992 constexpr inline int32_t EnumMax<RNNOperation>() noexcept
2993 {
2994  return 4;
2995 }
2996 
3004 enum class RNNDirection : int32_t
3005 {
3006  kUNIDIRECTION = 0,
3007  kBIDIRECTION = 1
3008 };
3009 
3011 template <>
3012 constexpr inline int32_t EnumMax<RNNDirection>() noexcept
3013 {
3014  return 2;
3015 }
3016 
3032 enum class RNNInputMode : int32_t
3033 {
3034  kLINEAR = 0,
3035  kSKIP = 1
3036 };
3037 
3039 template <>
3040 constexpr inline int32_t EnumMax<RNNInputMode>() noexcept
3041 {
3042  return 2;
3043 }
3044 
3052 enum class RNNGateType : int32_t
3053 {
3054  kINPUT = 0,
3055  kOUTPUT = 1,
3056  kFORGET = 2,
3057  kUPDATE = 3,
3058  kRESET = 4,
3059  kCELL = 5,
3060  kHIDDEN = 6
3061 };
3062 
3063 template <>
3064 constexpr inline int32_t EnumMax<RNNGateType>() noexcept
3065 {
3066  return 7;
3067 }
3068 
3081 {
3082 public:
3083  int32_t getLayerCount() const noexcept
3084  {
3085  return mImpl->getLayerCount();
3086  }
3087  int32_t getHiddenSize() const noexcept
3088  {
3089  return mImpl->getHiddenSize();
3090  }
3091  int32_t getMaxSeqLength() const noexcept
3092  {
3093  return mImpl->getMaxSeqLength();
3094  }
3095  int32_t getDataLength() const noexcept
3096  {
3097  return mImpl->getDataLength();
3098  }
3099 
3114  void setSequenceLengths(ITensor& seqLengths) noexcept
3115  {
3116  return mImpl->setSequenceLengths(seqLengths);
3117  }
3118 
3126  ITensor* getSequenceLengths() const noexcept
3127  {
3128  return mImpl->getSequenceLengths();
3129  }
3130 
3135  void setOperation(RNNOperation op) noexcept
3136  {
3137  mImpl->setOperation(op);
3138  }
3139 
3144  RNNOperation getOperation() const noexcept
3145  {
3146  return mImpl->getOperation();
3147  }
3148 
3153  void setInputMode(RNNInputMode op) noexcept
3154  {
3155  mImpl->setInputMode(op);
3156  }
3157 
3162  RNNInputMode getInputMode() const noexcept
3163  {
3164  return mImpl->getInputMode();
3165  }
3166 
3177  void setDirection(RNNDirection op) noexcept
3178  {
3179  mImpl->setDirection(op);
3180  }
3181 
3186  RNNDirection getDirection() const noexcept
3187  {
3188  return mImpl->getDirection();
3189  }
3190 
3245  void setWeightsForGate(int32_t layerIndex, RNNGateType gate, bool isW, Weights weights) noexcept
3246  {
3247  mImpl->setWeightsForGate(layerIndex, gate, isW, weights);
3248  }
3249 
3254  Weights getWeightsForGate(int32_t layerIndex, RNNGateType gate, bool isW) const noexcept
3255  {
3256  return mImpl->getWeightsForGate(layerIndex, gate, isW);
3257  }
3258 
3279  void setBiasForGate(int32_t layerIndex, RNNGateType gate, bool isW, Weights bias) noexcept
3280  {
3281  mImpl->setBiasForGate(layerIndex, gate, isW, bias);
3282  }
3283 
3288  Weights getBiasForGate(int32_t layerIndex, RNNGateType gate, bool isW) const noexcept
3289  {
3290  return mImpl->getBiasForGate(layerIndex, gate, isW);
3291  }
3292 
3305  void setHiddenState(ITensor& hidden) noexcept
3306  {
3307  mImpl->setHiddenState(hidden);
3308  }
3309 
3314  ITensor* getHiddenState() const noexcept
3315  {
3316  return mImpl->getHiddenState();
3317  }
3318 
3333  void setCellState(ITensor& cell) noexcept
3334  {
3335  mImpl->setCellState(cell);
3336  }
3337 
3342  ITensor* getCellState() const noexcept
3343  {
3344  return mImpl->getCellState();
3345  }
3346 
3347 protected:
3348  apiv::VRNNv2Layer* mImpl;
3349  virtual ~IRNNv2Layer() noexcept = default;
3350 };
3351 
3361 class IPluginV2Layer : public ILayer
3362 {
3363 public:
3369  IPluginV2& getPlugin() noexcept
3370  {
3371  return mImpl->getPlugin();
3372  }
3373 
3374 protected:
3375  apiv::VPluginV2Layer* mImpl;
3376  virtual ~IPluginV2Layer() noexcept = default;
3377 };
3378 
3386 enum class UnaryOperation : int32_t
3387 {
3388  kEXP = 0,
3389  kLOG = 1,
3390  kSQRT = 2,
3391  kRECIP = 3,
3392  kABS = 4,
3393  kNEG = 5,
3394  kSIN = 6,
3395  kCOS = 7,
3396  kTAN = 8,
3397  kSINH = 9,
3398  kCOSH = 10,
3399  kASIN = 11,
3400  kACOS = 12,
3401  kATAN = 13,
3402  kASINH = 14,
3403  kACOSH = 15,
3404  kATANH = 16,
3405  kCEIL = 17,
3406  kFLOOR = 18,
3407  kERF = 19,
3408  kNOT = 20
3409 };
3410 
3412 template <>
3413 constexpr inline int32_t EnumMax<UnaryOperation>() noexcept
3414 {
3415  return 21;
3416 }
3417 
3425 class IUnaryLayer : public ILayer
3426 {
3427 public:
3433  void setOperation(UnaryOperation op) noexcept
3434  {
3435  mImpl->setOperation(op);
3436  }
3437 
3443  UnaryOperation getOperation() const noexcept
3444  {
3445  return mImpl->getOperation();
3446  }
3447 
3448 protected:
3449  apiv::VUnaryLayer* mImpl;
3450  virtual ~IUnaryLayer() noexcept = default;
3451 };
3452 
3471 enum class ReduceOperation : int32_t
3472 {
3473  kSUM = 0,
3474  kPROD = 1,
3475  kMAX = 2,
3476  kMIN = 3,
3477  kAVG = 4
3478 };
3479 
3481 template <>
3482 constexpr inline int32_t EnumMax<ReduceOperation>() noexcept
3483 {
3484  return 5;
3485 }
3486 
3494 class IReduceLayer : public ILayer
3495 {
3496 public:
3502  void setOperation(ReduceOperation op) noexcept
3503  {
3504  mImpl->setOperation(op);
3505  }
3506 
3513  {
3514  return mImpl->getOperation();
3515  }
3516 
3522  void setReduceAxes(uint32_t reduceAxes) noexcept
3523  {
3524  mImpl->setReduceAxes(reduceAxes);
3525  }
3526 
3532  uint32_t getReduceAxes() const noexcept
3533  {
3534  return mImpl->getReduceAxes();
3535  }
3536 
3542  void setKeepDimensions(bool keepDimensions) noexcept
3543  {
3544  mImpl->setKeepDimensions(keepDimensions);
3545  }
3546 
3552  bool getKeepDimensions() const noexcept
3553  {
3554  return mImpl->getKeepDimensions();
3555  }
3556 
3557 protected:
3558  apiv::VReduceLayer* mImpl;
3559  virtual ~IReduceLayer() noexcept = default;
3560 };
3561 
3572 class IPaddingLayer : public ILayer
3573 {
3574 public:
3584  TRT_DEPRECATED void setPrePadding(DimsHW padding) noexcept
3585  {
3586  mImpl->setPrePadding(padding);
3587  }
3588 
3597  {
3598  return mImpl->getPrePadding();
3599  }
3600 
3610  TRT_DEPRECATED void setPostPadding(DimsHW padding) noexcept
3611  {
3612  mImpl->setPostPadding(padding);
3613  }
3614 
3623  {
3624  return mImpl->getPostPadding();
3625  }
3626 
3636  void setPrePaddingNd(Dims padding) noexcept
3637  {
3638  mImpl->setPrePaddingNd(padding);
3639  }
3640 
3648  Dims getPrePaddingNd() const noexcept
3649  {
3650  return mImpl->getPrePaddingNd();
3651  }
3652 
3662  void setPostPaddingNd(Dims padding) noexcept
3663  {
3664  mImpl->setPostPaddingNd(padding);
3665  }
3666 
3674  Dims getPostPaddingNd() const noexcept
3675  {
3676  return mImpl->getPostPaddingNd();
3677  }
3678 
3679 protected:
3680  apiv::VPaddingLayer* mImpl;
3681  virtual ~IPaddingLayer() noexcept = default;
3682 };
3683 
3685 {
3692  int32_t order[Dims::MAX_DIMS];
3693 };
3694 
3707 class IShuffleLayer : public ILayer
3708 {
3709 public:
3719  void setFirstTranspose(Permutation permutation) noexcept
3720  {
3721  mImpl->setFirstTranspose(permutation);
3722  }
3723 
3732  {
3733  return mImpl->getFirstTranspose();
3734  }
3735 
3756  void setReshapeDimensions(Dims dimensions) noexcept
3757  {
3758  mImpl->setReshapeDimensions(dimensions);
3759  }
3760 
3769  Dims getReshapeDimensions() const noexcept
3770  {
3771  return mImpl->getReshapeDimensions();
3772  }
3773 
3779  //
3793  using ILayer::setInput;
3794 
3807  void setSecondTranspose(Permutation permutation) noexcept
3808  {
3809  mImpl->setSecondTranspose(permutation);
3810  }
3811 
3820  {
3821  return mImpl->getSecondTranspose();
3822  }
3823 
3835  void setZeroIsPlaceholder(bool zeroIsPlaceholder) noexcept
3836  {
3837  return mImpl->setZeroIsPlaceholder(zeroIsPlaceholder);
3838  }
3839 
3848  bool getZeroIsPlaceholder() const noexcept
3849  {
3850  return mImpl->getZeroIsPlaceholder();
3851  }
3852 
3853 protected:
3854  apiv::VShuffleLayer* mImpl;
3855  virtual ~IShuffleLayer() noexcept = default;
3856 };
3857 
3863 enum class SliceMode : int32_t
3864 {
3865  kDEFAULT = 0,
3866  kWRAP = 1,
3867 };
3868 
3870 template <>
3871 constexpr inline int32_t EnumMax<SliceMode>() noexcept
3872 {
3873  return 2;
3874 }
3875 
3906 class ISliceLayer : public ILayer
3907 {
3908 public:
3918  void setStart(Dims start) noexcept
3919  {
3920  mImpl->setStart(start);
3921  }
3922 
3933  Dims getStart() const noexcept
3934  {
3935  return mImpl->getStart();
3936  }
3937 
3947  void setSize(Dims size) noexcept
3948  {
3949  return mImpl->setSize(size);
3950  }
3951 
3962  Dims getSize() const noexcept
3963  {
3964  return mImpl->getSize();
3965  }
3966 
3976  void setStride(Dims stride) noexcept
3977  {
3978  mImpl->setStride(stride);
3979  }
3980 
3991  Dims getStride() const noexcept
3992  {
3993  return mImpl->getStride();
3994  }
3995 
4001  void setMode(SliceMode mode) noexcept
4002  {
4003  mImpl->setMode(mode);
4004  }
4005 
4011  SliceMode getMode() const noexcept
4012  {
4013  return mImpl->getMode();
4014  }
4015 
4034  using ILayer::setInput;
4035 
4036 protected:
4037  apiv::VSliceLayer* mImpl;
4038  virtual ~ISliceLayer() noexcept = default;
4039 };
4040 
4053 class IShapeLayer : public ILayer
4054 {
4055 protected:
4056  apiv::VShapeLayer* mImpl;
4057  virtual ~IShapeLayer() noexcept = default;
4058 };
4059 
4065 enum class TopKOperation : int32_t
4066 {
4067  kMAX = 0,
4068  kMIN = 1,
4069 };
4070 
4072 template <>
4073 constexpr inline int32_t EnumMax<TopKOperation>() noexcept
4074 {
4075  return 2;
4076 }
4077 
4085 class ITopKLayer : public ILayer
4086 {
4087 public:
4093  void setOperation(TopKOperation op) noexcept
4094  {
4095  mImpl->setOperation(op);
4096  }
4097 
4103  TopKOperation getOperation() const noexcept
4104  {
4105  return mImpl->getOperation();
4106  }
4107 
4115  void setK(int32_t k) noexcept
4116  {
4117  mImpl->setK(k);
4118  }
4119 
4125  int32_t getK() const noexcept
4126  {
4127  return mImpl->getK();
4128  }
4129 
4135  void setReduceAxes(uint32_t reduceAxes) noexcept
4136  {
4137  mImpl->setReduceAxes(reduceAxes);
4138  }
4139 
4145  uint32_t getReduceAxes() const noexcept
4146  {
4147  return mImpl->getReduceAxes();
4148  }
4149 
4150 protected:
4151  apiv::VTopKLayer* mImpl;
4152  virtual ~ITopKLayer() noexcept = default;
4153 };
4154 
4161 enum class MatrixOperation : int32_t
4162 {
4166  kNONE,
4167 
4169  kTRANSPOSE,
4170 
4180  kVECTOR
4181 };
4182 
4184 template <>
4185 constexpr inline int32_t EnumMax<MatrixOperation>() noexcept
4186 {
4187  return 3;
4188 }
4189 
4216 {
4217 public:
4224  void setOperation(int32_t index, MatrixOperation op) noexcept
4225  {
4226  mImpl->setOperation(index, op);
4227  }
4228 
4234  MatrixOperation getOperation(int32_t index) const noexcept
4235  {
4236  return mImpl->getOperation(index);
4237  }
4238 
4239 protected:
4241  virtual ~IMatrixMultiplyLayer() noexcept = default;
4242 };
4243 
4259 {
4260 protected:
4262  virtual ~IRaggedSoftMaxLayer() noexcept = default;
4263 };
4264 
4276 class IIdentityLayer : public ILayer
4277 {
4278 protected:
4279  apiv::VIdentityLayer* mImpl;
4280  virtual ~IIdentityLayer() noexcept = default;
4281 };
4282 
4290 class IConstantLayer : public ILayer
4291 {
4292 public:
4302  void setWeights(Weights weights) noexcept
4303  {
4304  mImpl->setWeights(weights);
4305  }
4306 
4312  Weights getWeights() const noexcept
4313  {
4314  return mImpl->getWeights();
4315  }
4316 
4324  void setDimensions(Dims dimensions) noexcept
4325  {
4326  mImpl->setDimensions(dimensions);
4327  }
4328 
4336  Dims getDimensions() const noexcept
4337  {
4338  return mImpl->getDimensions();
4339  }
4340 
4341 protected:
4342  apiv::VConstantLayer* mImpl;
4343  virtual ~IConstantLayer() noexcept = default;
4344 };
4345 
4354 {
4355 protected:
4357  virtual ~IParametricReLULayer() noexcept = default;
4358 };
4359 
4365 enum class ResizeMode : int32_t
4366 {
4367  kNEAREST = 0,
4368  kLINEAR = 1
4369 };
4370 
4371 namespace impl
4372 {
4374 template <>
4376 {
4377  static constexpr int32_t kVALUE = 2;
4378 };
4379 } // namespace impl
4380 
4389 {
4402  kALIGN_CORNERS = 0,
4403 
4410  kASYMMETRIC = 1,
4411 
4418  kHALF_PIXEL = 2,
4419 };
4420 
4421 namespace impl
4422 {
4424 template <>
4426 {
4427  static constexpr int32_t kVALUE = 3;
4428 };
4429 } // namespace impl
4430 
4438 enum class ResizeSelector : int32_t
4439 {
4441  kFORMULA = 0,
4442 
4444  kUPPER = 1,
4445 };
4446 
4447 namespace impl
4448 {
4450 template <>
4452 {
4453  static constexpr int32_t kVALUE = 2;
4454 };
4455 } // namespace impl
4456 
4465 enum class ResizeRoundMode : int32_t
4466 {
4468  kHALF_UP = 0,
4469 
4471  kHALF_DOWN = 1,
4472 
4474  kFLOOR = 2,
4475 
4477  kCEIL = 3,
4478 };
4479 
4480 namespace impl
4481 {
4483 template <>
4485 {
4486  static constexpr int32_t kVALUE = 4;
4487 };
4488 } // namespace impl
4489 
4511 class IResizeLayer : public ILayer
4512 {
4513 public:
4530  void setOutputDimensions(Dims dimensions) noexcept
4531  {
4532  return mImpl->setOutputDimensions(dimensions);
4533  }
4534 
4540  Dims getOutputDimensions() const noexcept
4541  {
4542  return mImpl->getOutputDimensions();
4543  }
4544 
4563  void setScales(const float* scales, int32_t nbScales) noexcept
4564  {
4565  mImpl->setScales(scales, nbScales);
4566  }
4567 
4582  int32_t getScales(int32_t size, float* scales) const noexcept
4583  {
4584  return mImpl->getScales(size, scales);
4585  }
4586 
4594  void setResizeMode(ResizeMode resizeMode) noexcept
4595  {
4596  mImpl->setResizeMode(resizeMode);
4597  }
4598 
4604  ResizeMode getResizeMode() const noexcept
4605  {
4606  return mImpl->getResizeMode();
4607  }
4608 
4621  TRT_DEPRECATED void setAlignCorners(bool alignCorners) noexcept
4622  {
4623  mImpl->setAlignCorners(alignCorners);
4624  }
4625 
4634  TRT_DEPRECATED bool getAlignCorners() const noexcept
4635  {
4636  return mImpl->getAlignCorners();
4637  }
4638 
4658  using ILayer::setInput;
4659 
4670  {
4671  mImpl->setCoordinateTransformation(coordTransform);
4672  }
4673 
4680  {
4681  return mImpl->getCoordinateTransformation();
4682  }
4683 
4695  {
4696  mImpl->setSelectorForSinglePixel(selector);
4697  }
4698 
4705  {
4706  return mImpl->getSelectorForSinglePixel();
4707  }
4708 
4719  {
4720  mImpl->setNearestRounding(value);
4721  }
4722 
4729  {
4730  return mImpl->getNearestRounding();
4731  }
4732 
4733 protected:
4734  virtual ~IResizeLayer() noexcept = default;
4735  apiv::VResizeLayer* mImpl;
4736 };
4737 
4739 enum class LoopOutput : int32_t
4740 {
4742  kLAST_VALUE = 0,
4743 
4745  kCONCATENATE = 1,
4746 
4748  kREVERSE = 2
4749 };
4750 
4752 template <>
4753 constexpr inline int32_t EnumMax<LoopOutput>() noexcept
4754 {
4755  return 3;
4756 }
4757 
4759 enum class TripLimit : int32_t
4760 {
4761 
4762  kCOUNT = 0,
4763  kWHILE = 1
4764 };
4765 
4767 template <>
4768 constexpr inline int32_t EnumMax<TripLimit>() noexcept
4769 {
4770  return 2;
4771 }
4772 
4773 class ILoop;
4774 
4776 {
4777 public:
4779  ILoop* getLoop() const noexcept
4780  {
4781  return mBoundary->getLoop();
4782  }
4783 
4784 protected:
4785  virtual ~ILoopBoundaryLayer() noexcept = default;
4786  apiv::VLoopBoundaryLayer* mBoundary;
4787 };
4788 
4790 {
4791 public:
4797  //
4810  using ILayer::setInput;
4811 
4812 protected:
4813  virtual ~IRecurrenceLayer() noexcept = default;
4814  apiv::VRecurrenceLayer* mImpl;
4815 };
4816 
4835 {
4836 public:
4837  LoopOutput getLoopOutput() const noexcept
4838  {
4839  return mImpl->getLoopOutput();
4840  }
4841 
4854  void setAxis(int32_t axis) noexcept
4855  {
4856  mImpl->setAxis(axis);
4857  }
4858 
4860  int32_t getAxis() const noexcept
4861  {
4862  return mImpl->getAxis();
4863  }
4864 
4870  //
4885  using ILayer::setInput;
4886 
4887 protected:
4888  virtual ~ILoopOutputLayer() noexcept = default;
4889  apiv::VLoopOutputLayer* mImpl;
4890 };
4891 
4893 {
4894 public:
4895  TripLimit getTripLimit() const noexcept
4896  {
4897  return mImpl->getTripLimit();
4898  }
4899 
4900 protected:
4901  virtual ~ITripLimitLayer() noexcept = default;
4902  apiv::VTripLimitLayer* mImpl;
4903 };
4904 
4906 {
4907 public:
4909  void setAxis(int32_t axis) noexcept
4910  {
4911  mImpl->setAxis(axis);
4912  }
4913 
4915  int32_t getAxis() const noexcept
4916  {
4917  return mImpl->getAxis();
4918  }
4919 
4925  void setReverse(bool reverse) noexcept
4926  {
4927  mImpl->setReverse(reverse);
4928  }
4929 
4931  bool getReverse() const noexcept
4932  {
4933  return mImpl->getReverse();
4934  }
4935 
4936 protected:
4937  virtual ~IIteratorLayer() noexcept = default;
4938  apiv::VIteratorLayer* mImpl;
4939 };
4940 
4946 class ILoop : public INoCopy
4947 {
4948 public:
4955  IRecurrenceLayer* addRecurrence(ITensor& initialValue) noexcept
4956  {
4957  return mImpl->addRecurrence(initialValue);
4958  }
4959 
4976  ITripLimitLayer* addTripLimit(ITensor& tensor, TripLimit limit) noexcept
4977  {
4978  return mImpl->addTripLimit(tensor, limit);
4979  }
4980 
4989  IIteratorLayer* addIterator(ITensor& tensor, int32_t axis = 0, bool reverse = false) noexcept
4990  {
4991  return mImpl->addIterator(tensor, axis, reverse);
4992  }
4993 
5001  ILoopOutputLayer* addLoopOutput(ITensor& tensor, LoopOutput outputKind, int32_t axis = 0) noexcept
5002  {
5003  return mImpl->addLoopOutput(tensor, outputKind, axis);
5004  }
5005 
5014  void setName(const char* name) noexcept
5015  {
5016  mImpl->setName(name);
5017  }
5018 
5024  const char* getName() const noexcept
5025  {
5026  return mImpl->getName();
5027  }
5028 
5029 protected:
5030  virtual ~ILoop() noexcept = default;
5031  apiv::VLoop* mImpl;
5032 };
5033 
5037 class ISelectLayer : public ILayer
5038 {
5039 protected:
5040  virtual ~ISelectLayer() noexcept = default;
5041  apiv::VSelectLayer* mImpl;
5042 };
5043 
5051 enum class FillOperation : int32_t
5052 {
5053  kLINSPACE = 0,
5054  kRANDOM_UNIFORM = 1
5055 };
5056 
5058 template <>
5059 constexpr inline int32_t EnumMax<FillOperation>() noexcept
5060 {
5061  return 2;
5062 }
5063 
5089 class IFillLayer : public ILayer
5090 {
5091 public:
5100  //
5101  void setDimensions(Dims dimensions) noexcept
5102  {
5103  mImpl->setDimensions(dimensions);
5104  }
5105 
5116  Dims getDimensions() const noexcept
5117  {
5118  return mImpl->getDimensions();
5119  }
5120 
5126  void setOperation(FillOperation op) noexcept
5127  {
5128  mImpl->setOperation(op);
5129  }
5130 
5136  FillOperation getOperation() const noexcept
5137  {
5138  return mImpl->getOperation();
5139  }
5140 
5153  //
5154  void setAlpha(double alpha) noexcept
5155  {
5156  mImpl->setAlpha(alpha);
5157  }
5158 
5169  double getAlpha() const noexcept
5170  {
5171  return mImpl->getAlpha();
5172  }
5173 
5187  void setBeta(double beta) noexcept
5188  {
5189  mImpl->setBeta(beta);
5190  }
5191 
5202  double getBeta() const noexcept
5203  {
5204  return mImpl->getBeta();
5205  }
5206 
5233  using ILayer::setInput;
5234 
5235 protected:
5236  virtual ~IFillLayer() noexcept = default;
5237  apiv::VFillLayer* mImpl;
5238 };
5239 
5297 class IQuantizeLayer : public ILayer
5298 {
5299 public:
5308  int32_t getAxis() const noexcept
5309  {
5310  return mImpl->getAxis();
5311  }
5319  void setAxis(int32_t axis) noexcept
5320  {
5321  mImpl->setAxis(axis);
5322  }
5323 
5324 protected:
5325  virtual ~IQuantizeLayer() noexcept = default;
5326  apiv::VQuantizeLayer* mImpl;
5327 };
5328 
5384 class IDequantizeLayer : public ILayer
5385 {
5386 public:
5395  int32_t getAxis() const noexcept
5396  {
5397  return mImpl->getAxis();
5398  }
5406  void setAxis(int32_t axis) noexcept
5407  {
5408  mImpl->setAxis(axis);
5409  }
5410 
5411 protected:
5412  virtual ~IDequantizeLayer() noexcept = default;
5413  apiv::VDequantizeLayer* mImpl;
5414 };
5415 
5436 {
5437 public:
5438  virtual ~INetworkDefinition() noexcept = default;
5439 
5475  ITensor* addInput(const char* name, DataType type, Dims dimensions) noexcept
5476  {
5477  return mImpl->addInput(name, type, dimensions);
5478  }
5479 
5487  void markOutput(ITensor& tensor) noexcept
5488  {
5489  mImpl->markOutput(tensor);
5490  }
5491 
5511  ITensor& input, int32_t nbOutputMaps, DimsHW kernelSize, Weights kernelWeights, Weights biasWeights) noexcept
5512  {
5513  return mImpl->addConvolution(input, nbOutputMaps, kernelSize, kernelWeights, biasWeights);
5514  }
5515 
5532  ITensor& input, int32_t nbOutputs, Weights kernelWeights, Weights biasWeights) noexcept
5533  {
5534  return mImpl->addFullyConnected(input, nbOutputs, kernelWeights, biasWeights);
5535  }
5536 
5552  {
5553  return mImpl->addActivation(input, type);
5554  }
5555 
5570  TRT_DEPRECATED IPoolingLayer* addPooling(ITensor& input, PoolingType type, DimsHW windowSize) noexcept
5571  {
5572  return mImpl->addPooling(input, type, windowSize);
5573  }
5574 
5589  ILRNLayer* addLRN(ITensor& input, int32_t window, float alpha, float beta, float k) noexcept
5590  {
5591  return mImpl->addLRN(input, window, alpha, beta, k);
5592  }
5593 
5616  IScaleLayer* addScale(ITensor& input, ScaleMode mode, Weights shift, Weights scale, Weights power) noexcept
5617  {
5618  return mImpl->addScale(input, mode, shift, scale, power);
5619  }
5620 
5630  {
5631  return mImpl->addSoftMax(input);
5632  }
5633 
5646  IConcatenationLayer* addConcatenation(ITensor* const* inputs, int32_t nbInputs) noexcept
5647  {
5648  return mImpl->addConcatenation(inputs, nbInputs);
5649  }
5650 
5670  ITensor& input, int32_t nbOutputMaps, DimsHW kernelSize, Weights kernelWeights, Weights biasWeights) noexcept
5671  {
5672  return mImpl->addDeconvolution(input, nbOutputMaps, kernelSize, kernelWeights, biasWeights);
5673  }
5674 
5696  {
5697  return mImpl->addElementWise(input1, input2, op);
5698  }
5699 
5714  IUnaryLayer* addUnary(ITensor& input, UnaryOperation operation) noexcept
5715  {
5716  return mImpl->addUnary(input, operation);
5717  }
5718 
5731  TRT_DEPRECATED IPaddingLayer* addPadding(ITensor& input, DimsHW prePadding, DimsHW postPadding) noexcept
5732  {
5733  return mImpl->addPadding(input, prePadding, postPadding);
5734  }
5735 
5746  {
5747  return mImpl->addShuffle(input);
5748  }
5749 
5757  int32_t getNbLayers() const noexcept
5758  {
5759  return mImpl->getNbLayers();
5760  }
5761 
5771  ILayer* getLayer(int32_t index) const noexcept
5772  {
5773  return mImpl->getLayer(index);
5774  }
5775 
5783  int32_t getNbInputs() const noexcept
5784  {
5785  return mImpl->getNbInputs();
5786  }
5787 
5799  ITensor* getInput(int32_t index) const noexcept
5800  {
5801  return mImpl->getInput(index);
5802  }
5803 
5813  int32_t getNbOutputs() const noexcept
5814  {
5815  return mImpl->getNbOutputs();
5816  }
5817 
5829  ITensor* getOutput(int32_t index) const noexcept
5830  {
5831  return mImpl->getOutput(index);
5832  }
5833 
5841  TRT_DEPRECATED void destroy() noexcept
5842  {
5843  delete this;
5844  }
5845 
5870  ITensor& input, ReduceOperation operation, uint32_t reduceAxes, bool keepDimensions) noexcept
5871  {
5872  return mImpl->addReduce(input, operation, reduceAxes, keepDimensions);
5873  }
5874 
5903  ITopKLayer* addTopK(ITensor& input, TopKOperation op, int32_t k, uint32_t reduceAxes) noexcept
5904  {
5905  return mImpl->addTopK(input, op, k, reduceAxes);
5906  }
5907 
5919  IGatherLayer* addGather(ITensor& data, ITensor& indices, int32_t axis) noexcept
5920  {
5921  return mImpl->addGather(data, indices, axis);
5922  }
5923 
5938  {
5939  return mImpl->addRaggedSoftMax(input, bounds);
5940  }
5941 
5957  ITensor& input0, MatrixOperation op0, ITensor& input1, MatrixOperation op1) noexcept
5958  {
5959  return mImpl->addMatrixMultiply(input0, op0, input1, op1);
5960  }
5961 
5982  IConstantLayer* addConstant(Dims dimensions, Weights weights) noexcept
5983  {
5984  return mImpl->addConstant(dimensions, weights);
5985  }
5986 
6051  ITensor& input, int32_t layerCount, int32_t hiddenSize, int32_t maxSeqLen, RNNOperation op) noexcept
6052  {
6053  return mImpl->addRNNv2(input, layerCount, hiddenSize, maxSeqLen, op);
6054  }
6055 
6068  {
6069  return mImpl->addIdentity(input);
6070  }
6071 
6082  void removeTensor(ITensor& tensor) noexcept
6083  {
6084  mImpl->removeTensor(tensor);
6085  }
6086 
6094  void unmarkOutput(ITensor& tensor) noexcept
6095  {
6096  mImpl->unmarkOutput(tensor);
6097  }
6098 
6113  IPluginV2Layer* addPluginV2(ITensor* const* inputs, int32_t nbInputs, IPluginV2& plugin) noexcept
6114  {
6115  return mImpl->addPluginV2(inputs, nbInputs, plugin);
6116  }
6117 
6132  ISliceLayer* addSlice(ITensor& input, Dims start, Dims size, Dims stride) noexcept
6133  {
6134  return mImpl->addSlice(input, start, size, stride);
6135  }
6136 
6154  void setName(const char* name) noexcept
6155  {
6156  mImpl->setName(name);
6157  }
6158 
6168  const char* getName() const noexcept
6169  {
6170  return mImpl->getName();
6171  }
6172 
6186  IShapeLayer* addShape(ITensor& input) noexcept
6187  {
6188  return mImpl->addShape(input);
6189  }
6190 
6205  bool hasImplicitBatchDimension() const noexcept
6206  {
6207  return mImpl->hasImplicitBatchDimension();
6208  }
6209 
6223  bool markOutputForShapes(ITensor& tensor) noexcept
6224  {
6225  return mImpl->markOutputForShapes(tensor);
6226  }
6227 
6235  bool unmarkOutputForShapes(ITensor& tensor) noexcept
6236  {
6237  return mImpl->unmarkOutputForShapes(tensor);
6238  }
6239 
6254  {
6255  return mImpl->addParametricReLU(input, slope);
6256  }
6257 
6276  ITensor& input, int32_t nbOutputMaps, Dims kernelSize, Weights kernelWeights, Weights biasWeights) noexcept
6277  {
6278  return mImpl->addConvolutionNd(input, nbOutputMaps, kernelSize, kernelWeights, biasWeights);
6279  }
6280 
6295  IPoolingLayer* addPoolingNd(ITensor& input, PoolingType type, Dims windowSize) noexcept
6296  {
6297  return mImpl->addPoolingNd(input, type, windowSize);
6298  }
6299 
6314  //
6318  ITensor& input, int32_t nbOutputMaps, Dims kernelSize, Weights kernelWeights, Weights biasWeights) noexcept
6319  {
6320  return mImpl->addDeconvolutionNd(input, nbOutputMaps, kernelSize, kernelWeights, biasWeights);
6321  }
6322 
6354  ITensor& input, ScaleMode mode, Weights shift, Weights scale, Weights power, int32_t channelAxis) noexcept
6355  {
6356  return mImpl->addScaleNd(input, mode, shift, scale, power, channelAxis);
6357  }
6358 
6369  IResizeLayer* addResize(ITensor& input) noexcept
6370  {
6371  return mImpl->addResize(input);
6372  }
6373 
6386  TRT_DEPRECATED bool hasExplicitPrecision() const noexcept
6387  {
6388  return mImpl->hasExplicitPrecision();
6389  }
6390 
6402  ILoop* addLoop() noexcept
6403  {
6404  return mImpl->addLoop();
6405  }
6406 
6440  ISelectLayer* addSelect(ITensor& condition, ITensor& thenInput, ITensor& elseInput) noexcept
6441  {
6442  return mImpl->addSelect(condition, thenInput, elseInput);
6443  }
6444 
6458  IFillLayer* addFill(Dims dimensions, FillOperation op) noexcept
6459  {
6460  return mImpl->addFill(dimensions, op);
6461  }
6462 
6473  IPaddingLayer* addPaddingNd(ITensor& input, Dims prePadding, Dims postPadding) noexcept
6474  {
6475  return mImpl->addPaddingNd(input, prePadding, postPadding);
6476  }
6477 
6493  bool setWeightsName(Weights weights, const char* name) noexcept
6494  {
6495  return mImpl->setWeightsName(weights, name);
6496  }
6497 
6509  //
6512  void setErrorRecorder(IErrorRecorder* recorder) noexcept
6513  {
6514  mImpl->setErrorRecorder(recorder);
6515  }
6516 
6528  {
6529  return mImpl->getErrorRecorder();
6530  }
6531 
6546  IDequantizeLayer* addDequantize(ITensor& input, ITensor& scale) noexcept
6547  {
6548  return mImpl->addDequantize(input, scale);
6549  }
6550 
6565  IQuantizeLayer* addQuantize(ITensor& input, ITensor& scale) noexcept
6566  {
6567  return mImpl->addQuantize(input, scale);
6568  }
6569 
6570 protected:
6571  apiv::VNetworkDefinition* mImpl;
6572 };
6573 
6579 enum class CalibrationAlgoType : int32_t
6580 {
6581  kLEGACY_CALIBRATION = 0,
6582  kENTROPY_CALIBRATION = 1,
6583  kENTROPY_CALIBRATION_2 = 2,
6584  kMINMAX_CALIBRATION = 3,
6585 };
6586 
6588 template <>
6589 constexpr inline int32_t EnumMax<CalibrationAlgoType>() noexcept
6590 {
6591  return 4;
6592 }
6593 
6606 {
6607 public:
6613  virtual int32_t getBatchSize() const noexcept = 0;
6614 
6628  virtual bool getBatch(void* bindings[], const char* names[], int32_t nbBindings) noexcept = 0;
6629 
6644  virtual const void* readCalibrationCache(std::size_t& length) noexcept = 0;
6645 
6654  virtual void writeCalibrationCache(const void* ptr, std::size_t length) noexcept = 0;
6655 
6661  virtual CalibrationAlgoType getAlgorithm() noexcept = 0;
6662 
6663  virtual ~IInt8Calibrator() noexcept = default;
6664 };
6665 
6671 {
6672 public:
6676  CalibrationAlgoType getAlgorithm() noexcept override
6677  {
6678  return CalibrationAlgoType::kENTROPY_CALIBRATION;
6679  }
6680 
6681  virtual ~IInt8EntropyCalibrator() noexcept = default;
6682 };
6683 
6689 {
6690 public:
6694  CalibrationAlgoType getAlgorithm() noexcept override
6695  {
6696  return CalibrationAlgoType::kENTROPY_CALIBRATION_2;
6697  }
6698 
6699  virtual ~IInt8EntropyCalibrator2() noexcept = default;
6700 };
6701 
6706 {
6707 public:
6711  CalibrationAlgoType getAlgorithm() noexcept override
6712  {
6713  return CalibrationAlgoType::kMINMAX_CALIBRATION;
6714  }
6715 
6716  virtual ~IInt8MinMaxCalibrator() noexcept = default;
6717 };
6718 
6724 {
6725 public:
6729  CalibrationAlgoType getAlgorithm() noexcept override
6730  {
6731  return CalibrationAlgoType::kLEGACY_CALIBRATION;
6732  }
6733 
6740  virtual double getQuantile() const noexcept = 0;
6741 
6748  virtual double getRegressionCutoff() const noexcept = 0;
6749 
6762  virtual const void* readHistogramCache(std::size_t& length) noexcept = 0;
6763 
6772  virtual void writeHistogramCache(const void* ptr, std::size_t length) noexcept = 0;
6773 
6774  virtual ~IInt8LegacyCalibrator() noexcept = default;
6775 };
6776 
6788 {
6789 public:
6794  {
6795  return mImpl->getTensorFormat();
6796  }
6797 
6801  DataType getDataType() const noexcept
6802  {
6803  return mImpl->getDataType();
6804  }
6805 
6809  Dims getStrides() const noexcept
6810  {
6811  return mImpl->getStrides();
6812  }
6813 
6814 protected:
6815  virtual ~IAlgorithmIOInfo() noexcept = default;
6816  apiv::VAlgorithmIOInfo* mImpl;
6817 };
6818 
6831 {
6832 public:
6836  int64_t getImplementation() const noexcept
6837  {
6838  return mImpl->getImplementation();
6839  }
6840 
6844  int64_t getTactic() const noexcept
6845  {
6846  return mImpl->getTactic();
6847  }
6848 
6849 protected:
6850  virtual ~IAlgorithmVariant() noexcept = default;
6851  apiv::VAlgorithmVariant* mImpl;
6852 };
6853 
6863 {
6864 public:
6869  const char* getName() const noexcept
6870  {
6871  return mImpl->getName();
6872  }
6873 
6880  Dims getDimensions(int32_t index, OptProfileSelector select) const noexcept
6881  {
6882  return mImpl->getDimensions(index, select);
6883  }
6884 
6888  int32_t getNbInputs() const noexcept
6889  {
6890  return mImpl->getNbInputs();
6891  }
6892 
6896  int32_t getNbOutputs() const noexcept
6897  {
6898  return mImpl->getNbOutputs();
6899  }
6900 
6901 protected:
6902  virtual ~IAlgorithmContext() noexcept = default;
6903  apiv::VAlgorithmContext* mImpl;
6904 };
6905 
6915 class IAlgorithm : public INoCopy
6916 {
6917 public:
6928  TRT_DEPRECATED const IAlgorithmIOInfo& getAlgorithmIOInfo(int32_t index) const noexcept
6929  {
6930  return mImpl->getAlgorithmIOInfo(index);
6931  }
6932 
6936  const IAlgorithmVariant& getAlgorithmVariant() const noexcept
6937  {
6938  return mImpl->getAlgorithmVariant();
6939  }
6940 
6944  float getTimingMSec() const noexcept
6945  {
6946  return mImpl->getTimingMSec();
6947  }
6948 
6952  std::size_t getWorkspaceSize() const noexcept
6953  {
6954  return mImpl->getWorkspaceSize();
6955  }
6956 
6965  const IAlgorithmIOInfo* getAlgorithmIOInfoByIndex(int32_t index) const noexcept
6966  {
6967  return mImpl->getAlgorithmIOInfoByIndex(index);
6968  }
6969 
6970 protected:
6971  virtual ~IAlgorithm() noexcept = default;
6972  apiv::VAlgorithm* mImpl;
6973 }; // IAlgorithm
6974 
6984 {
6985 public:
6999  virtual int32_t selectAlgorithms(const IAlgorithmContext& context, const IAlgorithm* const* choices,
7000  int32_t nbChoices, int32_t* selection) noexcept
7001  = 0;
7012  virtual void reportAlgorithms(const IAlgorithmContext* const* algoContexts, const IAlgorithm* const* algoChoices,
7013  int32_t nbAlgorithms) noexcept
7014  = 0;
7015 
7016  virtual ~IAlgorithmSelector() noexcept = default;
7017 };
7018 
7025 using QuantizationFlags = uint32_t;
7026 
7034 enum class QuantizationFlag : int32_t
7035 {
7040 };
7041 
7043 template <>
7044 constexpr inline int32_t EnumMax<QuantizationFlag>() noexcept
7045 {
7046  return 1;
7047 }
7048 
7055 using BuilderFlags = uint32_t;
7056 
7064 enum class BuilderFlag : int32_t
7065 {
7066  kFP16 = 0,
7067  kINT8 = 1,
7068  kDEBUG = 2,
7069  kGPU_FALLBACK = 3,
7070  kSTRICT_TYPES = 4,
7071  kREFIT = 5,
7072  kDISABLE_TIMING_CACHE = 6,
7073 
7077  kTF32 = 7,
7078 
7080  kSPARSE_WEIGHTS = 8
7081 };
7082 
7084 template <>
7085 constexpr inline int32_t EnumMax<BuilderFlag>() noexcept
7086 {
7087  return 9;
7088 }
7089 
7098 enum class ProfilingVerbosity : int32_t
7099 {
7100  kDEFAULT = 0,
7101  kNONE = 1,
7102  kVERBOSE = 2,
7103 };
7104 
7106 template <>
7107 constexpr inline int32_t EnumMax<ProfilingVerbosity>() noexcept
7108 {
7109  return 3;
7110 }
7111 
7142 class ITimingCache : public INoCopy
7143 {
7144 public:
7145  virtual ~ITimingCache() noexcept = default;
7146 
7157  {
7158  return mImpl->serialize();
7159  }
7160 
7180  bool combine(const ITimingCache& inputCache, bool ignoreMismatch) noexcept
7181  {
7182  return mImpl->combine(inputCache, ignoreMismatch);
7183  }
7184 
7190  bool reset() noexcept
7191  {
7192  return mImpl->reset();
7193  }
7194 
7195 protected:
7196  apiv::VTimingCache* mImpl;
7197 };
7198 
7204 class IBuilderConfig : public INoCopy
7205 {
7206 public:
7207  virtual ~IBuilderConfig() noexcept = default;
7208 
7219  virtual void setMinTimingIterations(int32_t minTiming) noexcept
7220  {
7221  mImpl->setMinTimingIterations(minTiming);
7222  }
7223 
7231  virtual int32_t getMinTimingIterations() const noexcept
7232  {
7233  return mImpl->getMinTimingIterations();
7234  }
7235 
7244  virtual void setAvgTimingIterations(int32_t avgTiming) noexcept
7245  {
7246  mImpl->setAvgTimingIterations(avgTiming);
7247  }
7248 
7256  int32_t getAvgTimingIterations() const noexcept
7257  {
7258  return mImpl->getAvgTimingIterations();
7259  }
7260 
7269  void setEngineCapability(EngineCapability capability) noexcept
7270  {
7271  mImpl->setEngineCapability(capability);
7272  }
7273 
7282  {
7283  return mImpl->getEngineCapability();
7284  }
7285 
7291  void setInt8Calibrator(IInt8Calibrator* calibrator) noexcept
7292  {
7293  mImpl->setInt8Calibrator(calibrator);
7294  }
7295 
7300  {
7301  return mImpl->getInt8Calibrator();
7302  }
7303 
7311  void setMaxWorkspaceSize(std::size_t workspaceSize) noexcept
7312  {
7313  mImpl->setMaxWorkspaceSize(workspaceSize);
7314  }
7315 
7325  std::size_t getMaxWorkspaceSize() const noexcept
7326  {
7327  return mImpl->getMaxWorkspaceSize();
7328  }
7329 
7342  void setFlags(BuilderFlags builderFlags) noexcept
7343  {
7344  mImpl->setFlags(builderFlags);
7345  }
7346 
7354  BuilderFlags getFlags() const noexcept
7355  {
7356  return mImpl->getFlags();
7357  }
7358 
7366  void clearFlag(BuilderFlag builderFlag) noexcept
7367  {
7368  mImpl->clearFlag(builderFlag);
7369  }
7370 
7378  void setFlag(BuilderFlag builderFlag) noexcept
7379  {
7380  mImpl->setFlag(builderFlag);
7381  }
7382 
7390  bool getFlag(BuilderFlag builderFlag) const noexcept
7391  {
7392  return mImpl->getFlag(builderFlag);
7393  }
7394 
7405  void setDeviceType(const ILayer* layer, DeviceType deviceType) noexcept
7406  {
7407  mImpl->setDeviceType(layer, deviceType);
7408  }
7409 
7414  DeviceType getDeviceType(const ILayer* layer) const noexcept
7415  {
7416  return mImpl->getDeviceType(layer);
7417  }
7418 
7424  bool isDeviceTypeSet(const ILayer* layer) const noexcept
7425  {
7426  return mImpl->isDeviceTypeSet(layer);
7427  }
7428 
7434  void resetDeviceType(const ILayer* layer) noexcept
7435  {
7436  mImpl->resetDeviceType(layer);
7437  }
7438 
7443  bool canRunOnDLA(const ILayer* layer) const noexcept
7444  {
7445  return mImpl->canRunOnDLA(layer);
7446  }
7447 
7458  void setDLACore(int32_t dlaCore) noexcept
7459  {
7460  mImpl->setDLACore(dlaCore);
7461  }
7462 
7469  int32_t getDLACore() const noexcept
7470  {
7471  return mImpl->getDLACore();
7472  }
7473 
7479  void setDefaultDeviceType(DeviceType deviceType) noexcept
7480  {
7481  mImpl->setDefaultDeviceType(deviceType);
7482  }
7483 
7490  {
7491  return mImpl->getDefaultDeviceType();
7492  }
7493 
7499  void reset() noexcept
7500  {
7501  mImpl->reset();
7502  }
7503 
7513  TRT_DEPRECATED void destroy() noexcept
7514  {
7515  delete this;
7516  }
7517 
7525  void setProfileStream(const cudaStream_t stream) noexcept
7526  {
7527  return mImpl->setProfileStream(stream);
7528  }
7529 
7538  {
7539  return mImpl->getProfileStream();
7540  }
7541 
7553  int32_t addOptimizationProfile(const IOptimizationProfile* profile) noexcept
7554  {
7555  return mImpl->addOptimizationProfile(profile);
7556  }
7557 
7566  int32_t getNbOptimizationProfiles() const noexcept
7567  {
7568  return mImpl->getNbOptimizationProfiles();
7569  }
7570 
7579  {
7580  mImpl->setProfilingVerbosity(verbosity);
7581  }
7582 
7592  {
7593  return mImpl->getProfilingVerbosity();
7594  }
7595 
7600  void setAlgorithmSelector(IAlgorithmSelector* selector) noexcept
7601  {
7602  mImpl->setAlgorithmSelector(selector);
7603  }
7604 
7609  {
7610  return mImpl->getAlgorithmSelector();
7611  }
7612 
7623  bool setCalibrationProfile(const IOptimizationProfile* profile) noexcept
7624  {
7625  return mImpl->setCalibrationProfile(profile);
7626  }
7627 
7634  {
7635  return mImpl->getCalibrationProfile();
7636  }
7637 
7651  {
7652  mImpl->setQuantizationFlags(flags);
7653  }
7654 
7663  {
7664  return mImpl->getQuantizationFlags();
7665  }
7666 
7675  {
7676  mImpl->clearQuantizationFlag(flag);
7677  }
7678 
7687  {
7688  mImpl->setQuantizationFlag(flag);
7689  }
7690 
7698  bool getQuantizationFlag(QuantizationFlag flag) const noexcept
7699  {
7700  return mImpl->getQuantizationFlag(flag);
7701  }
7702 
7723  bool setTacticSources(TacticSources tacticSources) noexcept
7724  {
7725  return mImpl->setTacticSources(tacticSources);
7726  }
7727 
7739  {
7740  return mImpl->getTacticSources();
7741  }
7742 
7757  nvinfer1::ITimingCache* createTimingCache(const void* blob, std::size_t size) const noexcept
7758  {
7759  return mImpl->createTimingCache(blob, size);
7760  }
7761 
7780  bool setTimingCache(const ITimingCache& cache, bool ignoreMismatch) noexcept
7781  {
7782  return mImpl->setTimingCache(cache, ignoreMismatch);
7783  }
7784 
7790  const nvinfer1::ITimingCache* getTimingCache() const noexcept
7791  {
7792  return mImpl->getTimingCache();
7793  }
7794 
7795 protected:
7796  apiv::VBuilderConfig* mImpl;
7797 };
7798 
7806 
7816 enum class NetworkDefinitionCreationFlag : int32_t
7817 {
7822  kEXPLICIT_BATCH = 0,
7823 
7836  kEXPLICIT_PRECISION TRT_DEPRECATED_ENUM = 1,
7837 };
7838 
7840 template <>
7841 constexpr inline int32_t EnumMax<NetworkDefinitionCreationFlag>() noexcept
7842 {
7843  return 2;
7844 }
7845 
7853 class IBuilder : public INoCopy
7854 {
7855 public:
7856  virtual ~IBuilder() noexcept = default;
7857 
7866  void setMaxBatchSize(int32_t batchSize) noexcept
7867  {
7868  mImpl->setMaxBatchSize(batchSize);
7869  }
7870 
7879  int32_t getMaxBatchSize() const noexcept
7880  {
7881  return mImpl->getMaxBatchSize();
7882  }
7883 
7887  bool platformHasFastFp16() const noexcept
7888  {
7889  return mImpl->platformHasFastFp16();
7890  }
7891 
7895  bool platformHasFastInt8() const noexcept
7896  {
7897  return mImpl->platformHasFastInt8();
7898  }
7899 
7907  TRT_DEPRECATED void destroy() noexcept
7908  {
7909  delete this;
7910  }
7911 
7919  int32_t getMaxDLABatchSize() const noexcept
7920  {
7921  return mImpl->getMaxDLABatchSize();
7922  }
7923 
7927  int32_t getNbDLACores() const noexcept
7928  {
7929  return mImpl->getNbDLACores();
7930  }
7931 
7943  void setGpuAllocator(IGpuAllocator* allocator) noexcept
7944  {
7945  mImpl->setGpuAllocator(allocator);
7946  }
7947 
7954  {
7955  return mImpl->createBuilderConfig();
7956  }
7957 
7969  INetworkDefinition& network, IBuilderConfig& config) noexcept
7970  {
7971  return mImpl->buildEngineWithConfig(network, config);
7972  }
7973 
7986  {
7987  return mImpl->createNetworkV2(flags);
7988  }
7989 
8000  {
8001  return mImpl->createOptimizationProfile();
8002  }
8003 
8015  //
8018  void setErrorRecorder(IErrorRecorder* recorder) noexcept
8019  {
8020  mImpl->setErrorRecorder(recorder);
8021  }
8022 
8034  {
8035  return mImpl->getErrorRecorder();
8036  }
8037 
8041  void reset() noexcept
8042  {
8043  mImpl->reset();
8044  }
8045 
8049  bool platformHasTf32() const noexcept
8050  {
8051  return mImpl->platformHasTf32();
8052  }
8053 
8069  {
8070  return mImpl->buildSerializedNetwork(network, config);
8071  }
8072 
8073 protected:
8074  apiv::VBuilder* mImpl;
8075 };
8076 
8077 } // namespace nvinfer1
8078 
8083 extern "C" TENSORRTAPI void* createInferBuilder_INTERNAL(void* logger, int32_t version) noexcept;
8084 
8085 namespace nvinfer1
8086 {
8087 namespace
8088 {
8089 
8097 inline IBuilder* createInferBuilder(ILogger& logger) noexcept
8098 {
8099  return static_cast<IBuilder*>(createInferBuilder_INTERNAL(&logger, NV_TENSORRT_VERSION));
8100 }
8101 
8102 } // namespace
8103 } // namespace nvinfer1
8104 
8105 #endif // NV_INFER_H
nvinfer1::IDeconvolutionLayer::getStrideNd
Dims getStrideNd() const noexcept
Get the multi-dimension stride of the deconvolution.
Definition: NvInfer.h:2686
nvinfer1::INetworkDefinition::removeTensor
void removeTensor(ITensor &tensor) noexcept
remove a tensor from the network definition.
Definition: NvInfer.h:6082
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:5101
nvinfer1::LoopOutput
LoopOutput
Enum that describes kinds of loop outputs.
Definition: NvInfer.h:4739
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:6527
nvinfer1::INetworkDefinition::destroy
TRT_DEPRECATED void destroy() noexcept
Destroy this INetworkDefinition object.
Definition: NvInfer.h:5841
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:3976
nvinfer1::INetworkDefinition::addInput
ITensor * addInput(const char *name, DataType type, Dims dimensions) noexcept
Add an input tensor to the network.
Definition: NvInfer.h:5475
nvinfer1::IDeconvolutionLayer::getPostPadding
Dims getPostPadding() const noexcept
Get the padding.
Definition: NvInfer.h:2612
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:613
nvinfer1::ITopKLayer::setReduceAxes
void setReduceAxes(uint32_t reduceAxes) noexcept
Set which axes to reduce for the layer.
Definition: NvInfer.h:4135
nvinfer1::IDeconvolutionLayer::getPadding
TRT_DEPRECATED DimsHW getPadding() const noexcept
Get the padding of the deconvolution.
Definition: NvInfer.h:2477
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:4621
nvinfer1::IBuilderConfig::setAlgorithmSelector
void setAlgorithmSelector(IAlgorithmSelector *selector) noexcept
Set Algorithm Selector.
Definition: NvInfer.h:7600
nvinfer1::IPaddingLayer::setPrePaddingNd
void setPrePaddingNd(Dims padding) noexcept
Set the padding that is applied at the start of the tensor.
Definition: NvInfer.h:3636
nvinfer1::IShuffleLayer::setFirstTranspose
void setFirstTranspose(Permutation permutation) noexcept
Set the permutation applied by the first transpose operation.
Definition: NvInfer.h:3719
nvinfer1::SliceMode
SliceMode
Controls how ISliceLayer handles out of bounds coordinates.
Definition: NvInfer.h:3863
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:7499
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:3443
nvinfer1::IBuilderConfig::setFlag
void setFlag(BuilderFlag builderFlag) noexcept
Set a single build mode flag.
Definition: NvInfer.h:7378
nvinfer1::IDeconvolutionLayer::setPaddingNd
void setPaddingNd(Dims padding) noexcept
Set the multi-dimension padding of the deconvolution.
Definition: NvInfer.h:2704
nvinfer1::IRNNv2Layer::setOperation
void setOperation(RNNOperation op) noexcept
Set the operation of the RNN layer.
Definition: NvInfer.h:3135
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:3684
nvinfer1::INetworkDefinition::addSoftMax
ISoftMaxLayer * addSoftMax(ITensor &input) noexcept
Add a SoftMax layer to the network.
Definition: NvInfer.h:5629
nvinfer1::IPaddingLayer::setPostPaddingNd
void setPostPaddingNd(Dims padding) noexcept
Set the padding that is applied at the end of the tensor.
Definition: NvInfer.h:3662
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:4290
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:5669
nvinfer1::IParametricReLULayer
Layer that represents a parametric ReLU operation.
Definition: NvInfer.h:4353
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:6113
nvinfer1::IBuilderConfig::getCalibrationProfile
const IOptimizationProfile * getCalibrationProfile() noexcept
Get the current calibration profile.
Definition: NvInfer.h:7633
nvinfer1::EnumMax< RNNDirection >
constexpr int32_t EnumMax< RNNDirection >() noexcept
Maximum number of elements in RNNDirection enum.
Definition: NvInfer.h:3012
nvinfer1::INetworkDefinition::addPadding
TRT_DEPRECATED IPaddingLayer * addPadding(ITensor &input, DimsHW prePadding, DimsHW postPadding) noexcept
Add a padding layer to the network.
Definition: NvInfer.h:5731
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:6275
nvinfer1::IBuilder::getErrorRecorder
IErrorRecorder * getErrorRecorder() const noexcept
get the ErrorRecorder assigned to this interface.
Definition: NvInfer.h:8033
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:5435
nvinfer1::IBuilderConfig::getQuantizationFlag
bool getQuantizationFlag(QuantizationFlag flag) const noexcept
Returns true if the quantization flag is set.
Definition: NvInfer.h:7698
nvinfer1::IBuilderConfig::getFlag
bool getFlag(BuilderFlag builderFlag) const noexcept
Returns true if the build mode flag is set.
Definition: NvInfer.h:7390
nvinfer1::IQuantizeLayer::setAxis
void setAxis(int32_t axis) noexcept
Set the quantization axis.
Definition: NvInfer.h:5319
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:145
nvinfer1::IAlgorithmVariant
provides a unique 128-bit identifier, which along with the input and output information denotes the v...
Definition: NvInfer.h:6830
nvinfer1::UnaryOperation::kASINH
Inverse hyperbolic sine.
nvinfer1::IGatherLayer::getGatherAxis
int32_t getGatherAxis() const noexcept
Get the axis to gather on.
Definition: NvInfer.h:2871
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:7180
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:3572
nvinfer1::IBuilderConfig::canRunOnDLA
bool canRunOnDLA(const ILayer *layer) const noexcept
Checks if a layer can run on DLA.
Definition: NvInfer.h:7443
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:5531
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:3177
nvinfer1::IHostMemory
Class to handle library allocated memory that is accessible to the user.
Definition: NvInferRuntime.h:163
nvinfer1::IResizeLayer::getOutputDimensions
Dims getOutputDimensions() const noexcept
Get the output dimensions.
Definition: NvInfer.h:4540
nvinfer1::IIdentityLayer
A layer that represents the identity function.
Definition: NvInfer.h:4276
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:3144
nvinfer1::DeviceType
DeviceType
The device that this layer/network will execute on.
Definition: NvInferRuntime.h:621
nvinfer1::INetworkDefinition::getNbOutputs
int32_t getNbOutputs() const noexcept
Get the number of outputs in the network.
Definition: NvInfer.h:5813
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:7098
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:6965
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:6676
nvinfer1::IAlgorithmSelector
Interface implemented by application for selecting and reporting algorithms of a layer provided by th...
Definition: NvInfer.h:6983
nvinfer1::RNNInputMode
RNNInputMode
Enumerates the RNN input modes that may occur with an RNN layer.
Definition: NvInfer.h:3032
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:7566
nvinfer1::IBuilderConfig::clearFlag
void clearFlag(BuilderFlag builderFlag) noexcept
clear a single build mode flag.
Definition: NvInfer.h:7366
nvinfer1::ResizeRoundMode::kHALF_DOWN
Round half down.
nvinfer1::impl::EnumMaxImpl
Declaration of EnumMaxImpl struct to store maximum number of elements in an enumeration type.
Definition: NvInferRuntimeCommon.h:136
nvinfer1::UnaryOperation::kSQRT
Square root.
nvinfer1::IBuilderConfig::getAvgTimingIterations
int32_t getAvgTimingIterations() const noexcept
Query the number of averaging iterations.
Definition: NvInfer.h:7256
nvinfer1::INetworkDefinition::addDequantize
IDequantizeLayer * addDequantize(ITensor &input, ITensor &scale) noexcept
Add a dequantization layer to the network.
Definition: NvInfer.h:6546
nvinfer1::IDeconvolutionLayer::setDilationNd
void setDilationNd(Dims dilation) noexcept
Set the multi-dimension dilation of the deconvolution.
Definition: NvInfer.h:2746
nvinfer1::IPaddingLayer::getPostPaddingNd
Dims getPostPaddingNd() const noexcept
Get the padding that is applied at the end of the tensor.
Definition: NvInfer.h:3674
nvinfer1::ITopKLayer::getOperation
TopKOperation getOperation() const noexcept
Get the operation for the layer.
Definition: NvInfer.h:4103
nvinfer1::UnaryOperation::kRECIP
Reciprocal.
nvinfer1::IDeconvolutionLayer::getNbGroups
int32_t getNbGroups() const noexcept
Get the number of groups for a deconvolution.
Definition: NvInfer.h:2507
nvinfer1::INetworkDefinition::hasImplicitBatchDimension
bool hasImplicitBatchDimension() const noexcept
Query whether the network was created with an implicit batch dimension.
Definition: NvInfer.h:6205
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:4582
nvinfer1::ITripLimitLayer
Definition: NvInfer.h:4892
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:3731
nvinfer1::LayerType::kSCALE
Scale layer.
nvinfer1::IBuilderConfig::addOptimizationProfile
int32_t addOptimizationProfile(const IOptimizationProfile *profile) noexcept
Add an optimization profile.
Definition: NvInfer.h:7553
nvinfer1::INetworkDefinition::addElementWise
IElementWiseLayer * addElementWise(ITensor &input1, ITensor &input2, ElementWiseOperation op) noexcept
Add an elementwise layer to the network.
Definition: NvInfer.h:5695
nvinfer1::IPluginV2
Plugin class for user-implemented layers.
Definition: NvInferRuntimeCommon.h:409
nvinfer1::IAlgorithmIOInfo
Carries information about input or output of the algorithm. IAlgorithmIOInfo for all the input and ou...
Definition: NvInfer.h:6787
nvinfer1::IAlgorithm::getTimingMSec
float getTimingMSec() const noexcept
The time in milliseconds to execute the algorithm.
Definition: NvInfer.h:6944
nvinfer1::ILRNLayer::setK
void setK(float k) noexcept
Set the LRN K value.
Definition: NvInfer.h:2063
nvinfer1::Dims32
Definition: NvInferRuntimeCommon.h:189
nvinfer1::IInt8MinMaxCalibrator
Definition: NvInfer.h:6705
nvinfer1::IAlgorithmIOInfo::getTensorFormat
TensorFormat getTensorFormat() const noexcept
Return TensorFormat of the input/output of algorithm.
Definition: NvInfer.h:6793
nvinfer1::INetworkDefinition::markOutput
void markOutput(ITensor &tensor) noexcept
Mark a tensor as a network output.
Definition: NvInfer.h:5487
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:5059
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:536
nvinfer1::IAlgorithmContext::getNbInputs
int32_t getNbInputs() const noexcept
Return number of inputs of the algorithm.
Definition: NvInfer.h:6888
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:7907
nvinfer1::INetworkDefinition::addRaggedSoftMax
IRaggedSoftMaxLayer * addRaggedSoftMax(ITensor &input, ITensor &bounds) noexcept
Add a RaggedSoftMax layer to the network.
Definition: NvInfer.h:5937
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:8068
nvinfer1::INetworkDefinition::addSelect
ISelectLayer * addSelect(ITensor &condition, ITensor &thenInput, ITensor &elseInput) noexcept
Add a select layer to the network.
Definition: NvInfer.h:6440
nvinfer1::IDeconvolutionLayer::setPrePadding
void setPrePadding(Dims padding) noexcept
Set the multi-dimension pre-padding of the deconvolution.
Definition: NvInfer.h:2574
nvinfer1::IRNNv2Layer
An RNN layer in a network definition, version 2.
Definition: NvInfer.h:3080
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:6801
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:4634
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:4955
nvinfer1::IFillLayer::getDimensions
Dims getDimensions() const noexcept
Get the output tensor's dimensions.
Definition: NvInfer.h:5116
nvinfer1::DimsHW
Descriptor for two-dimensional spatial data.
Definition: NvInferLegacyDims.h:98
nvinfer1::IBuilderConfig::getProfileStream
cudaStream_t getProfileStream() const noexcept
Get the cuda stream that is used to profile this network.
Definition: NvInfer.h:7537
nvinfer1::IPoolingLayer::getStrideNd
Dims getStrideNd() const noexcept
Get the multi-dimension stride for pooling.
Definition: NvInfer.h:1938
nvinfer1::apiv::VTripLimitLayer
Definition: NvInferImpl.h:724
nvinfer1::IShuffleLayer::getReshapeDimensions
Dims getReshapeDimensions() const noexcept
Get the reshaped dimensions.
Definition: NvInfer.h:3769
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:7895
nvinfer1::ResizeMode
ResizeMode
Enumerates various modes of resize in the resize layer. Resize mode set using setResizeMode().
Definition: NvInfer.h:4365
nvinfer1::TensorFormat
TensorFormat
Format of the input/output tensors.
Definition: NvInferRuntimeCommon.h:220
nvinfer1::IRNNv2Layer::setWeightsForGate
void setWeightsForGate(int32_t layerIndex, RNNGateType gate, bool isW, Weights weights) noexcept
Set the weight parameters for an individual gate in the RNN.
Definition: NvInfer.h:3245
nvinfer1::ILoopOutputLayer
Definition: NvInfer.h:4834
nvinfer1::EnumMax< MatrixOperation >
constexpr int32_t EnumMax< MatrixOperation >() noexcept
Maximum number of elements in MatrixOperation enum.
Definition: NvInfer.h:4185
nvinfer1::INetworkDefinition::addUnary
IUnaryLayer * addUnary(ITensor &input, UnaryOperation operation) noexcept
Add a unary layer to the network.
Definition: NvInfer.h:5714
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:6317
nvinfer1::IBuilder::createNetworkV2
nvinfer1::INetworkDefinition * createNetworkV2(NetworkDefinitionCreationFlags flags) noexcept
Create a network definition object.
Definition: NvInfer.h:7985
nvinfer1::IAlgorithmIOInfo::getStrides
Dims getStrides() const noexcept
Return strides of the input/output tensor of algorithm.
Definition: NvInfer.h:6809
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:2405
nvinfer1::INetworkDefinition::markOutputForShapes
bool markOutputForShapes(ITensor &tensor) noexcept
Enable tensor's value to be computed by IExecutionContext::getShapeBinding.
Definition: NvInfer.h:6223
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:3552
nvinfer1::ILogger
Application-implemented logging interface for the builder, engine and runtime.
Definition: NvInferRuntimeCommon.h:1175
nvinfer1::IAlgorithmContext
Describes the context and requirements, that could be fulfilled by one or more instances of IAlgorith...
Definition: NvInfer.h:6862
nvinfer1::ISliceLayer::getStart
Dims getStart() const noexcept
Get the start offset for the slice layer.
Definition: NvInfer.h:3933
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:7044
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:4925
nvinfer1::INetworkDefinition::addShuffle
IShuffleLayer * addShuffle(ITensor &input) noexcept
Add a shuffle layer to the network.
Definition: NvInfer.h:5745
nvinfer1::INetworkDefinition::unmarkOutput
void unmarkOutput(ITensor &tensor) noexcept
unmark a tensor as a network output.
Definition: NvInfer.h:6094
nvinfer1::QuantizationFlag::kCALIBRATE_BEFORE_FUSION
nvinfer1::ICudaEngine
An engine for executing inference on a built network, with functionally unsafe features.
Definition: NvInferRuntime.h:1231
nvinfer1::QuantizationFlags
uint32_t QuantizationFlags
Represents one or more QuantizationFlag values using binary OR operations.
Definition: NvInfer.h:7025
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:3819
nvinfer1::IRaggedSoftMaxLayer
A RaggedSoftmax layer in a network definition.
Definition: NvInfer.h:4258
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:3542
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:3756
nvinfer1::IBuilderConfig::clearQuantizationFlag
void clearQuantizationFlag(QuantizationFlag flag) noexcept
clear a quantization flag.
Definition: NvInfer.h:7674
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:4860
nvinfer1::EnumMax< RNNInputMode >
constexpr int32_t EnumMax< RNNInputMode >() noexcept
Maximum number of elements in RNNInputMode enum.
Definition: NvInfer.h:3040
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:3186
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:6880
nvinfer1::IDeconvolutionLayer::setKernelWeights
void setKernelWeights(Weights weights) noexcept
Set the kernel weights for the deconvolution.
Definition: NvInfer.h:2521
nvinfer1::apiv::VIdentityLayer
Definition: NvInferImpl.h:667
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:2773
nvinfer1::apiv::VReduceLayer
Definition: NvInferImpl.h:589
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:6565
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:7299
nvinfer1::IDeconvolutionLayer::getKernelWeights
Weights getKernelWeights() const noexcept
Get the kernel weights for the deconvolution.
Definition: NvInfer.h:2531
nvinfer1::ISliceLayer
Slices an input tensor into an output tensor based on the offset and strides.
Definition: NvInfer.h:3906
nvinfer1::TacticSources
int32_t uint32_t TacticSources
Represents a collection of one or more TacticSource values combine using bitwise-OR operations.
Definition: NvInferImpl.h:158
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:4224
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:7738
nvinfer1::PaddingMode::kEXPLICIT_ROUND_DOWN
Use explicit padding, rounding output size down.
nvinfer1::apiv::VSliceLayer
Definition: NvInferImpl.h:626
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:6952
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:5982
nvinfer1::LayerType::kRESIZE
Resize Layer.
nvinfer1::ReduceOperation
ReduceOperation
Enumerates the reduce operations that may be performed by a Reduce layer.
Definition: NvInfer.h:3471
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:3871
nvinfer1::IIteratorLayer
Definition: NvInfer.h:4905
nvinfer1::IBuilderConfig::setProfilingVerbosity
void setProfilingVerbosity(ProfilingVerbosity verbosity) noexcept
Set verbosity level of layer information exposed in NVTX annotations.
Definition: NvInfer.h:7578
nvinfer1::IShuffleLayer::setZeroIsPlaceholder
void setZeroIsPlaceholder(bool zeroIsPlaceholder) noexcept
Set meaning of 0 in reshape dimensions.
Definition: NvInfer.h:3835
nvinfer1::IResizeLayer::setOutputDimensions
void setOutputDimensions(Dims dimensions) noexcept
Set the output dimensions.
Definition: NvInfer.h:4530
nvinfer1::INetworkDefinition::unmarkOutputForShapes
bool unmarkOutputForShapes(ITensor &tensor) noexcept
Undo markOutputForShapes.
Definition: NvInfer.h:6235
nvinfer1::INetworkDefinition::getNbLayers
int32_t getNbLayers() const noexcept
Get the number of layers in the network.
Definition: NvInfer.h:5757
nvinfer1::BuilderFlag
BuilderFlag
List of valid modes that the builder can enable when creating an engine from a network definition.
Definition: NvInfer.h:7064
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:7479
nvinfer1::EnumMax< TopKOperation >
constexpr int32_t EnumMax< TopKOperation >() noexcept
Maximum number of elements in TopKOperation enum.
Definition: NvInfer.h:4073
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:2638
nvinfer1::IIteratorLayer::getReverse
bool getReverse() const noexcept
True if and only if reversing input.
Definition: NvInfer.h:4931
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:4854
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:2556
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:2839
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:6493
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:6473
nvinfer1::EnumMax< RNNGateType >
constexpr int32_t EnumMax< RNNGateType >() noexcept
Maximum number of elements in RNNGateType enum.
Definition: NvInfer.h:3064
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:3342
nvinfer1::EnumMax< ReduceOperation >
constexpr int32_t EnumMax< ReduceOperation >() noexcept
Maximum number of elements in ReduceOperation enum.
Definition: NvInfer.h:3482
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:3918
nvinfer1::EnumMax< ProfilingVerbosity >
constexpr int32_t EnumMax< ProfilingVerbosity >() noexcept
Maximum number of profile verbosity levels in ProfilingVerbosity enum.
Definition: NvInfer.h:7107
nvinfer1::UnaryOperation::kATANH
Inverse hyperbolic tangent.
nvinfer1::IResizeLayer::setCoordinateTransformation
void setCoordinateTransformation(ResizeCoordinateTransformation coordTransform) noexcept
Set coordinate transformation function.
Definition: NvInfer.h:4669
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:3522
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:5869
nvinfer1::UnaryOperation::kATAN
Inverse tangent.
nvinfer1::ILoop
Definition: NvInfer.h:4946
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:2546
nvinfer1::IPluginV2Layer
Layer type for pluginV2.
Definition: NvInfer.h:3361
nvinfer1::LayerType::kIDENTITY
Identity layer.
nvinfer1::ISliceLayer::setMode
void setMode(SliceMode mode) noexcept
Set the slice mode.
Definition: NvInfer.h:4001
nvinfer1::apiv::VConstantLayer
Definition: NvInferImpl.h:672
nvinfer1::IReduceLayer::setOperation
void setOperation(ReduceOperation op) noexcept
Set the reduce operation for the layer.
Definition: NvInfer.h:3502
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:5646
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:4753
nvinfer1::IBuilder::platformHasFastFp16
bool platformHasFastFp16() const noexcept
Determine whether the platform has fast native fp16.
Definition: NvInfer.h:7887
nvinfer1::IDeconvolutionLayer::getNbOutputMaps
int32_t getNbOutputMaps() const noexcept
Get the number of output feature maps for the deconvolution.
Definition: NvInfer.h:2415
nvinfer1::LayerType::kDECONVOLUTION
Deconvolution layer.
nvinfer1::ITimingCache::serialize
nvinfer1::IHostMemory * serialize() const noexcept
Serialize a timing cache to IHostMemory object.
Definition: NvInfer.h:7156
nvinfer1::IRNNv2Layer::getHiddenSize
int32_t getHiddenSize() const noexcept
Get the hidden size of the RNN.
Definition: NvInfer.h:3087
nvinfer1::INetworkDefinition::addResize
IResizeLayer * addResize(ITensor &input) noexcept
Add a resize layer to the network.
Definition: NvInfer.h:6369
nvinfer1::IPaddingLayer::getPrePaddingNd
Dims getPrePaddingNd() const noexcept
Get the padding that is applied at the start of the tensor.
Definition: NvInfer.h:3648
nvinfer1::IElementWiseLayer
A elementwise layer in a network definition.
Definition: NvInfer.h:2815
nvinfer1::IBuilderConfig::setTacticSources
bool setTacticSources(TacticSources tacticSources) noexcept
Set tactic sources.
Definition: NvInfer.h:7723
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:4234
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:6512
nvinfer1::apiv::VRaggedSoftMaxLayer
Definition: NvInferImpl.h:662
nvinfer1::IDeconvolutionLayer::setPostPadding
void setPostPadding(Dims padding) noexcept
Set the multi-dimension post-padding of the deconvolution.
Definition: NvInfer.h:2602
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:3052
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:4779
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
cudaStream_t
struct CUstream_st * cudaStream_t
Forward declaration of cudaStream_t.
Definition: NvInferRuntimeCommon.h:107
nvinfer1::IFullyConnectedLayer::getKernelWeights
Weights getKernelWeights() const noexcept
Get the kernel weights.
Definition: NvInfer.h:1479
nvinfer1::apiv::VTensor
Definition: NvInferImpl.h:322
nvinfer1::EnumMax< CalibrationAlgoType >
constexpr int32_t EnumMax< CalibrationAlgoType >() noexcept
Maximum number of elements in CalibrationAlgoType enum.
Definition: NvInfer.h:6589
nvinfer1::ITopKLayer::setK
void setK(int32_t k) noexcept
Set the k value for the layer.
Definition: NvInfer.h:4115
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:6132
nvinfer1::IBuilderConfig::getDLACore
int32_t getDLACore() const noexcept
Get the DLA core that the engine executes on.
Definition: NvInfer.h:7469
nvinfer1::NetworkDefinitionCreationFlag::kEXPLICIT_PRECISION
nvinfer1::IResizeLayer::getCoordinateTransformation
ResizeCoordinateTransformation getCoordinateTransformation() const noexcept
Get coordinate transformation function.
Definition: NvInfer.h:4679
nvinfer1::IResizeLayer::setNearestRounding
void setNearestRounding(ResizeRoundMode value) noexcept
Set rounding mode for nearest neighbor resize.
Definition: NvInfer.h:4718
nvinfer1::IBuilderConfig::getEngineCapability
EngineCapability getEngineCapability() const noexcept
Query EngineCapability flow configured for the builder.
Definition: NvInfer.h:7281
nvinfer1::IDeconvolutionLayer::setNbGroups
void setNbGroups(int32_t nbGroups) noexcept
Set the number of groups for a deconvolution.
Definition: NvInfer.h:2497
nvinfer1::ILoop::addTripLimit
ITripLimitLayer * addTripLimit(ITensor &tensor, TripLimit limit) noexcept
Add a trip-count limiter, based on the given tensor.
Definition: NvInfer.h:4976
nvinfer1::INetworkDefinition::addFill
IFillLayer * addFill(Dims dimensions, FillOperation op) noexcept
Add a fill layer to the network.
Definition: NvInfer.h:6458
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:3433
nvinfer1::UnaryOperation
UnaryOperation
Enumerates the unary operations that may be performed by a Unary layer.
Definition: NvInfer.h:3386
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:7142
nvinfer1::LoopOutput::kLAST_VALUE
Output value is value of tensor for last iteration.
nvinfer1::MatrixOperation::kNONE
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:4728
nvinfer1::ISliceLayer::getSize
Dims getSize() const noexcept
Get dimensions of the output slice.
Definition: NvInfer.h:3962
nvinfer1::EnumMax< RNNOperation >
constexpr int32_t EnumMax< RNNOperation >() noexcept
Maximum number of elements in RNNOperation enum.
Definition: NvInfer.h:2992
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:4053
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:5903
nvinfer1::IDequantizeLayer::setAxis
void setAxis(int32_t axis) noexcept
Set the quantization axis.
Definition: NvInfer.h:5406
nvinfer1::ILRNLayer::getBeta
float getBeta() const noexcept
Get the LRN beta value.
Definition: NvInfer.h:2052
nvinfer1::apiv::VTopKLayer
Definition: NvInferImpl.h:644
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:7816
nvinfer1::IBuilderConfig::getMaxWorkspaceSize
std::size_t getMaxWorkspaceSize() const noexcept
Get the maximum workspace size.
Definition: NvInfer.h:7325
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:5024
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:5154
nvinfer1::IPaddingLayer::getPostPadding
TRT_DEPRECATED DimsHW getPostPadding() const noexcept
Get the padding that is applied at the end of the tensor.
Definition: NvInfer.h:3622
nvinfer1::IBuilderConfig::setEngineCapability
void setEngineCapability(EngineCapability capability) noexcept
Configure the builder to target specified EngineCapability flow.
Definition: NvInfer.h:7269
nvinfer1::IBuilderConfig::getDeviceType
DeviceType getDeviceType(const ILayer *layer) const noexcept
Get the device that this layer executes on.
Definition: NvInfer.h:7414
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:6729
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:5551
nvinfer1::ITimingCache::reset
bool reset() noexcept
Empty the timing cache.
Definition: NvInfer.h:7190
nvinfer1::MatrixOperation
MatrixOperation
Enumerates the operations that may be performed on a tensor by IMatrixMultiplyLayer before multiplica...
Definition: NvInfer.h:4161
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:6869
nvinfer1::ResizeSelector::kFORMULA
Use formula to map the original index.
nvinfer1::IOptimizationProfile
Optimization profile for dynamic input dimensions and shape tensors.
Definition: NvInferRuntime.h:1055
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:5589
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:4438
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:3305
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:3126
nvinfer1::DataType
DataType
The type of weights and tensors.
Definition: NvInferRuntimeCommon.h:150
nvinfer1::IBuilder::setMaxBatchSize
void setMaxBatchSize(int32_t batchSize) noexcept
Set the maximum batch size.
Definition: NvInfer.h:7866
nvinfer1::IDeconvolutionLayer::getKernelSizeNd
Dims getKernelSizeNd() const noexcept
Get the multi-dimension kernel size of the deconvolution.
Definition: NvInfer.h:2661
nvinfer1::IBuilderConfig::setQuantizationFlags
void setQuantizationFlags(QuantizationFlags flags) noexcept
Set the quantization flags.
Definition: NvInfer.h:7650
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:7879
nvinfer1::IBuilderConfig::resetDeviceType
void resetDeviceType(const ILayer *layer) noexcept
reset the DeviceType for this layer
Definition: NvInfer.h:7434
nvinfer1::IConcatenationLayer
A concatenation layer in a network definition.
Definition: NvInfer.h:2327
nvinfer1::LayerType::kSOFTMAX
SoftMax layer.
nvinfer1::IShuffleLayer
Layer type for shuffling data.
Definition: NvInfer.h:3707
nvinfer1::IPaddingLayer::getPrePadding
TRT_DEPRECATED DimsHW getPrePadding() const noexcept
Get the padding that is applied at the start of the tensor.
Definition: NvInfer.h:3596
nvinfer1::IShuffleLayer::getZeroIsPlaceholder
bool getZeroIsPlaceholder() const noexcept
Get meaning of 0 in reshape dimensions.
Definition: NvInfer.h:3848
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:2982
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:4789
nvinfer1::IBuilderConfig::getFlags
BuilderFlags getFlags() const noexcept
Get the build mode flags for this builder config. Defaults to 0.
Definition: NvInfer.h:7354
nvinfer1::INetworkDefinition::addLoop
ILoop * addLoop() noexcept
Add a loop to the network.
Definition: NvInfer.h:6402
nvinfer1::ResizeSelector::kUPPER
Select the upper left pixel.
nvinfer1::apiv::VPaddingLayer
Definition: NvInferImpl.h:600
nvinfer1::LayerType::kTRIP_LIMIT
Loop Trip limit layer.
nvinfer1::apiv::VUnaryLayer
Definition: NvInferImpl.h:582
nvinfer1::IRNNv2Layer::getDataLength
int32_t getDataLength() const noexcept
Get the maximum data length of the RNN.
Definition: NvInfer.h:3095
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:2861
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:2893
nvinfer1::IBuilderConfig::setProfileStream
void setProfileStream(const cudaStream_t stream) noexcept
Set the cuda stream that is used to profile this network.
Definition: NvInfer.h:7525
nvinfer1::UnaryOperation::kTAN
Tangent.
nvinfer1::apiv::VBuilderConfig
Definition: NvInferImpl.h:900
nvinfer1::BuilderFlag::kTF32
nvinfer1::IBuilder::createBuilderConfig
nvinfer1::IBuilderConfig * createBuilderConfig() noexcept
Create a builder configuration object.
Definition: NvInfer.h:7953
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:3004
nvinfer1::IBuilderConfig::getDefaultDeviceType
DeviceType getDefaultDeviceType() const noexcept
Get the default DeviceType which was set by setDefaultDeviceType.
Definition: NvInfer.h:7489
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:5771
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:5136
nvinfer1::IBuilder::reset
void reset() noexcept
Resets the builder state to default values.
Definition: NvInfer.h:8041
nvinfer1::TripLimit
TripLimit
Enum that describes kinds of trip limits.
Definition: NvInfer.h:4759
nvinfer1::IReduceLayer
Layer that represents a reduction operator across Shape, Int32, Float, and Half tensors.
Definition: NvInfer.h:3494
nvinfer1::IResizeLayer::getResizeMode
ResizeMode getResizeMode() const noexcept
Get resize mode for an input tensor.
Definition: NvInfer.h:4604
nvinfer1::IMatrixMultiplyLayer
Layer that represents a Matrix Multiplication.
Definition: NvInfer.h:4215
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:5395
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:4324
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:5051
nvinfer1::INetworkDefinition::addPooling
TRT_DEPRECATED IPoolingLayer * addPooling(ITensor &input, PoolingType type, DimsHW windowSize) noexcept
Add a pooling layer to the network.
Definition: NvInfer.h:5570
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:3947
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:3279
nvinfer1::IInt8EntropyCalibrator2
Definition: NvInfer.h:6688
nvinfer1::apiv::VMatrixMultiplyLayer
Definition: NvInferImpl.h:655
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:6386
nvinfer1::IFillLayer
Generate an output tensor with specified mode.
Definition: NvInfer.h:5089
nvinfer1::LayerType::kCONSTANT
Constant layer.
nvinfer1::QuantizationFlag
QuantizationFlag
List of valid flags for quantizing the network to int8.
Definition: NvInfer.h:7034
nvinfer1::IFillLayer::getAlpha
double getAlpha() const noexcept
Get the value of alpha parameter.
Definition: NvInfer.h:5169
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:5001
nvinfer1::IBuilderConfig::setQuantizationFlag
void setQuantizationFlag(QuantizationFlag flag) noexcept
Set a single quantization flag.
Definition: NvInfer.h:7686
nvinfer1::IInt8Calibrator
Application-implemented interface for calibration.
Definition: NvInfer.h:6605
nvinfer1::IErrorRecorder
Reference counted application-implemented error reporting interface for TensorRT objects.
Definition: NvInferRuntimeCommon.h:1353
nvinfer1::IBuilder::setGpuAllocator
void setGpuAllocator(IGpuAllocator *allocator) noexcept
Set the GPU allocator.
Definition: NvInfer.h:7943
nvinfer1::LayerType::kRECURRENCE
Loop Recurrence layer.
nvinfer1::ITopKLayer
Layer that represents a TopK reduction.
Definition: NvInfer.h:4085
nvinfer1::IResizeLayer::setResizeMode
void setResizeMode(ResizeMode resizeMode) noexcept
Set resize mode for an input tensor.
Definition: NvInfer.h:4594
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:3584
nvinfer1::ResizeRoundMode
ResizeRoundMode
The rounding mode for nearest neighbor resize.
Definition: NvInfer.h:4465
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:4915
nvinfer1::ResizeCoordinateTransformation::kASYMMETRIC
nvinfer1::OptProfileSelector
OptProfileSelector
When setting or querying optimization profile parameters (such as shape tensor inputs or dynamic dime...
Definition: NvInferRuntime.h:1019
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:5037
nvinfer1::IConcatenationLayer::setAxis
void setAxis(int32_t axis) noexcept
Set the axis along which concatenation occurs.
Definition: NvInfer.h:2340
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:4312
nvinfer1::INetworkDefinition::addGather
IGatherLayer * addGather(ITensor &data, ITensor &indices, int32_t axis) noexcept
Add a gather layer to the network.
Definition: NvInfer.h:5919
nvinfer1::IDeconvolutionLayer::getDilationNd
Dims getDilationNd() const noexcept
Get the multi-dimension dilation of the deconvolution.
Definition: NvInfer.h:2756
nvinfer1::INetworkDefinition::getOutput
ITensor * getOutput(int32_t index) const noexcept
Get the output tensor specified by the given index.
Definition: NvInfer.h:5829
nvinfer1::INetworkDefinition::addIdentity
IIdentityLayer * addIdentity(ITensor &input) noexcept
Add an identity layer.
Definition: NvInfer.h:6067
nvinfer1::IDeconvolutionLayer::setStride
TRT_DEPRECATED void setStride(DimsHW stride) noexcept
Get the stride of the deconvolution.
Definition: NvInfer.h:2431
nvinfer1::apiv::VSelectLayer
Definition: NvInferImpl.h:748
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:7805
nvinfer1::IInt8EntropyCalibrator
Definition: NvInfer.h:6670
nvinfer1::EnumMax< UnaryOperation >
constexpr int32_t EnumMax< UnaryOperation >() noexcept
Maximum number of elements in UnaryOperation enum.
Definition: NvInfer.h:3413
nvinfer1::IGatherLayer
Definition: NvInfer.h:2852
nvinfer1::IDeconvolutionLayer::getPrePadding
Dims getPrePadding() const noexcept
Get the pre-padding.
Definition: NvInfer.h:2584
nvinfer1::apiv::VElementWiseLayer
Definition: NvInferImpl.h:529
nvinfer1::ResizeCoordinateTransformation::kALIGN_CORNERS
nvinfer1::UnaryOperation::kSIN
Sine.
nvinfer1::IConstantLayer::getDimensions
Dims getDimensions() const noexcept
Get the dimensions for the layer.
Definition: NvInfer.h:4336
nvinfer1::IFillLayer::setOperation
void setOperation(FillOperation op) noexcept
Set the fill operation for the layer.
Definition: NvInfer.h:5126
nvinfer1::IBuilderConfig::getMinTimingIterations
virtual int32_t getMinTimingIterations() const noexcept
Query the number of minimization iterations.
Definition: NvInfer.h:7231
nvinfer1::IIteratorLayer::setAxis
void setAxis(int32_t axis) noexcept
Set axis to iterate over.
Definition: NvInfer.h:4909
nvinfer1::IDeconvolutionLayer::getPaddingNd
Dims getPaddingNd() const noexcept
Get the multi-dimension padding of the deconvolution.
Definition: NvInfer.h:2716
nvinfer1::IReduceLayer::getReduceAxes
uint32_t getReduceAxes() const noexcept
Get the axes over which to reduce for the layer.
Definition: NvInfer.h:3532
nvinfer1::Dims32::MAX_DIMS
static constexpr int32_t MAX_DIMS
The maximum number of dimensions supported for a tensor.
Definition: NvInferRuntimeCommon.h:193
nvinfer1::IElementWiseLayer::setOperation
void setOperation(ElementWiseOperation op) noexcept
Set the binary operation for the layer.
Definition: NvInfer.h:2827
nvinfer1::IBuilderConfig::setAvgTimingIterations
virtual void setAvgTimingIterations(int32_t avgTiming) noexcept
Set the number of averaging iterations used when timing layers.
Definition: NvInfer.h:7244
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:545
nvinfer1::IBuilderConfig::setMinTimingIterations
virtual void setMinTimingIterations(int32_t minTiming) noexcept
Set the number of minimization iterations used when timing layers.
Definition: NvInfer.h:7219
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:7055
nvinfer1::IInt8MinMaxCalibrator::getAlgorithm
CalibrationAlgoType getAlgorithm() noexcept override
Definition: NvInfer.h:6711
nvinfer1::ElementWiseOperation::kPROD
Product of the two elements.
nvinfer1::IFillLayer::getBeta
double getBeta() const noexcept
Get the value of beta parameter.
Definition: NvInfer.h:5202
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:4775
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:103
nvinfer1::IAlgorithm
Describes a variation of execution of a layer. An algorithm is represented by IAlgorithmVariant and t...
Definition: NvInfer.h:6915
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:3254
nvinfer1::LayerType::kLRN
LRN layer.
nvinfer1::apiv::VRecurrenceLayer
Definition: NvInferImpl.h:711
nvinfer1::IBuilder::createOptimizationProfile
nvinfer1::IOptimizationProfile * createOptimizationProfile() noexcept
Create a new optimization profile.
Definition: NvInfer.h:7999
nvinfer1::IBuilderConfig::setDLACore
void setDLACore(int32_t dlaCore) noexcept
Sets the DLA core used by the network.
Definition: NvInfer.h:7458
nvinfer1::IResizeLayer::setSelectorForSinglePixel
void setSelectorForSinglePixel(ResizeSelector selector) noexcept
Set coordinate selector function when resized to single pixel.
Definition: NvInfer.h:4694
nvinfer1::IBuilderConfig::getAlgorithmSelector
IAlgorithmSelector * getAlgorithmSelector() const noexcept
Get Algorithm Selector.
Definition: NvInfer.h:7608
nvinfer1::INetworkDefinition::getNbInputs
int32_t getNbInputs() const noexcept
Get the number of inputs in the network.
Definition: NvInfer.h:5783
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:5014
nvinfer1::IBuilderConfig::setFlags
void setFlags(BuilderFlags builderFlags) noexcept
Set the build mode flags to turn on builder options for this network.
Definition: NvInfer.h:7342
nvinfer1::ResizeCoordinateTransformation
ResizeCoordinateTransformation
The resize coordinate transformation function.
Definition: NvInfer.h:4388
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:7790
nvinfer1::IShuffleLayer::setSecondTranspose
void setSecondTranspose(Permutation permutation) noexcept
Set the permutation applied by the second transpose operation.
Definition: NvInfer.h:3807
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:6353
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:7405
nvinfer1::apiv::VTimingCache
Definition: NvInferImpl.h:892
nvinfer1::LayerType::kUNARY
UnaryOp operation Layer.
nvinfer1::IInt8LegacyCalibrator
Definition: NvInfer.h:6723
nvinfer1::INetworkDefinition::addParametricReLU
IParametricReLULayer * addParametricReLU(ITensor &input, ITensor &slope) noexcept
Add a parametric ReLU layer to the network.
Definition: NvInfer.h:6253
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:5510
nvinfer1::apiv::VPluginV2Layer
Definition: NvInferImpl.h:576
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
nvinfer1::IQuantizeLayer::getAxis
int32_t getAxis() const noexcept
Get the quantization axis.
Definition: NvInfer.h:5308
nvinfer1::UnaryOperation::kACOS
Inverse cosine.
nvinfer1::UnaryOperation::kCOS
Cosine.
nvinfer1::IPluginV2Layer::getPlugin
IPluginV2 & getPlugin() noexcept
Get the plugin for the layer.
Definition: NvInfer.h:3369
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:6168
nvinfer1::IDeconvolutionLayer::setPadding
TRT_DEPRECATED void setPadding(DimsHW padding) noexcept
Set the padding of the deconvolution.
Definition: NvInfer.h:2463
nvinfer1::IConstantLayer::setWeights
void setWeights(Weights weights) noexcept
Set the weights for the layer.
Definition: NvInfer.h:4302
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:3991
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:7968
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:6295
nvinfer1::INetworkDefinition::setName
void setName(const char *name) noexcept
Sets the name of the network.
Definition: NvInfer.h:6154
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:8049
nvinfer1::IRNNv2Layer::getMaxSeqLength
int32_t getMaxSeqLength() const noexcept
Get the maximum sequence length of the RNN.
Definition: NvInfer.h:3091
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:7204
nvinfer1::IDeconvolutionLayer::setPaddingMode
void setPaddingMode(PaddingMode paddingMode) noexcept
Set the padding mode.
Definition: NvInfer.h:2626
nvinfer1::IBuilderConfig::setCalibrationProfile
bool setCalibrationProfile(const IOptimizationProfile *profile) noexcept
Add a calibration profile.
Definition: NvInfer.h:7623
nvinfer1::IDeconvolutionLayer::setKernelSize
TRT_DEPRECATED void setKernelSize(DimsHW kernelSize) noexcept
Set the HW kernel size of the convolution.
Definition: NvInfer.h:2381
nvinfer1::INetworkDefinition::getInput
ITensor * getInput(int32_t index) const noexcept
Get the input tensor specified by the given index.
Definition: NvInfer.h:5799
nvinfer1::IDeconvolutionLayer::getStride
TRT_DEPRECATED DimsHW getStride() const noexcept
Get the stride of the deconvolution.
Definition: NvInfer.h:2443
nvinfer1::IRNNv2Layer::getHiddenState
ITensor * getHiddenState() const noexcept
Get the initial hidden state of the RNN.
Definition: NvInfer.h:3314
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:681
nvinfer1::EnumMax< NetworkDefinitionCreationFlag >
constexpr int32_t EnumMax< NetworkDefinitionCreationFlag >() noexcept
Maximum number of elements in NetworkDefinitionCreationFlag enum.
Definition: NvInfer.h:7841
nvinfer1::EnumMax< TripLimit >
constexpr int32_t EnumMax< TripLimit >() noexcept
Maximum number of elements in TripLimit enum.
Definition: NvInfer.h:4768
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:3288
nvinfer1::IResizeLayer
A resize layer in a network definition.
Definition: NvInfer.h:4511
nvinfer1::LayerType::kELEMENTWISE
Elementwise layer.
nvinfer1::apiv::VShapeLayer
Definition: NvInferImpl.h:639
nvinfer1::INetworkDefinition::addMatrixMultiply
IMatrixMultiplyLayer * addMatrixMultiply(ITensor &input0, MatrixOperation op0, ITensor &input1, MatrixOperation op1) noexcept
Add a MatrixMultiply layer to the network.
Definition: NvInfer.h:5956
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:6928
nvinfer1::IBuilderConfig::getProfilingVerbosity
ProfilingVerbosity getProfilingVerbosity() const noexcept
Get verbosity level of layer information exposed in NVTX annotations.
Definition: NvInfer.h:7591
nvinfer1::IDeconvolutionLayer::setKernelSizeNd
void setKernelSizeNd(Dims kernelSize) noexcept
Set the multi-dimension kernel size of the deconvolution.
Definition: NvInfer.h:2651
nvinfer1::IBuilderConfig::isDeviceTypeSet
bool isDeviceTypeSet(const ILayer *layer) const noexcept
whether the DeviceType has been explicitly set for this layer
Definition: NvInfer.h:7424
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:2883
nvinfer1::IResizeLayer::setScales
void setScales(const float *scales, int32_t nbScales) noexcept
Set the resize scales.
Definition: NvInfer.h:4563
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:779
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:6694
nvinfer1::ITopKLayer::getReduceAxes
uint32_t getReduceAxes() const noexcept
Get the axes to reduce for the layer.
Definition: NvInfer.h:4145
nvinfer1::IBuilderConfig::createTimingCache
nvinfer1::ITimingCache * createTimingCache(const void *blob, std::size_t size) const noexcept
Create timing cache.
Definition: NvInfer.h:7757
nvinfer1::IRNNv2Layer::setCellState
void setCellState(ITensor &cell) noexcept
Set the initial cell state of the LSTM with the provided cell ITensor.
Definition: NvInfer.h:3333
nvinfer1::IGpuAllocator
Application-implemented class for controlling allocation on the GPU.
Definition: NvInferRuntimeCommon.h:1093
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:8097
nvinfer1::IUnaryLayer
Layer that represents an unary operation.
Definition: NvInfer.h:3425
nvinfer1::IAlgorithmVariant::getTactic
int64_t getTactic() const noexcept
Return tactic of the algorithm.
Definition: NvInfer.h:6844
nvinfer1::IReduceLayer::getOperation
ReduceOperation getOperation() const noexcept
Get the reduce operation for the layer.
Definition: NvInfer.h:3512
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:4011
nvinfer1::IBuilder
Builds an engine from a network definition.
Definition: NvInfer.h:7853
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:3610
nvinfer1::IBuilderConfig::setInt8Calibrator
void setInt8Calibrator(IInt8Calibrator *calibrator) noexcept
Set Int8 Calibration interface.
Definition: NvInfer.h:7291
nvinfer1::IFillLayer::setBeta
void setBeta(double beta) noexcept
Set the beta parameter.
Definition: NvInfer.h:5187
nvinfer1::LayerType::kCONCATENATION
Concatenation layer.
nvinfer1::apiv::VBuilder
Definition: NvInferImpl.h:950
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:4093
nvinfer1::LayerType::kACTIVATION
Activation layer.
nvinfer1::IAlgorithm::getAlgorithmVariant
const IAlgorithmVariant & getAlgorithmVariant() const noexcept
Returns the algorithm variant.
Definition: NvInfer.h:6936
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:2393
nvinfer1::IQuantizeLayer
A Quantize layer in a network definition.
Definition: NvInfer.h:5297
nvinfer1::INetworkDefinition::addShape
IShapeLayer * addShape(ITensor &input) noexcept
Add a shape layer to the network.
Definition: NvInfer.h:6186
nvinfer1::LayerType::kPARAMETRIC_RELU
Parametric ReLU layer.
nvinfer1::TopKOperation
TopKOperation
Enumerates the operations that may be performed by a TopK layer.
Definition: NvInfer.h:4065
nvinfer1::IAlgorithmVariant::getImplementation
int64_t getImplementation() const noexcept
Return implementation of the algorithm.
Definition: NvInfer.h:6836
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:4989
nvinfer1::IRNNv2Layer::getLayerCount
int32_t getLayerCount() const noexcept
Get the layer count of the RNN.
Definition: NvInfer.h:3083
nvinfer1::TensorLocation
TensorLocation
The location for tensor data storage, device or host.
Definition: NvInferRuntime.h:235
nvinfer1::ITopKLayer::getK
int32_t getK() const noexcept
Get the k value for the layer.
Definition: NvInfer.h:4125
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:7927
nvinfer1::IResizeLayer::getSelectorForSinglePixel
ResizeSelector getSelectorForSinglePixel() const noexcept
Get the coordinate selector function when resized to single pixel.
Definition: NvInfer.h:4704
nvinfer1::RNNGateType::kFORGET
Forget gate (f).
nvinfer1::IBuilderConfig::setMaxWorkspaceSize
void setMaxWorkspaceSize(std::size_t workspaceSize) noexcept
Set the maximum workspace size.
Definition: NvInfer.h:7311
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:7919
nvinfer1::IRNNv2Layer::getInputMode
RNNInputMode getInputMode() const noexcept
Get the input mode of the RNN layer.
Definition: NvInfer.h:3162
nvinfer1::IAlgorithmContext::getNbOutputs
int32_t getNbOutputs() const noexcept
Return number of outputs of the algorithm.
Definition: NvInfer.h:6896
nvinfer1::IBuilderConfig::getQuantizationFlags
QuantizationFlags getQuantizationFlags() const noexcept
Get the quantization flags.
Definition: NvInfer.h:7662
nvinfer1::IConcatenationLayer::getAxis
int32_t getAxis() const noexcept
Get the axis along which concatenation occurs.
Definition: NvInfer.h:2350
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:5616
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:2676
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:6050
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:7780
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:6579
nvinfer1::IBuilder::setErrorRecorder
void setErrorRecorder(IErrorRecorder *recorder) noexcept
Set the ErrorRecorder for this interface.
Definition: NvInfer.h:8018
nvinfer1::IDequantizeLayer
A Dequantize layer in a network definition.
Definition: NvInfer.h:5384
nvinfer1::LayerType::kPOOLING
Pooling layer.
nvinfer1::IBuilderConfig::destroy
TRT_DEPRECATED void destroy() noexcept
De-allocates any internally allocated memory.
Definition: NvInfer.h:7513
nvinfer1::EnumMax< BuilderFlag >
constexpr int32_t EnumMax< BuilderFlag >() noexcept
Maximum number of builder flags in BuilderFlag enum.
Definition: NvInfer.h:7085
nvinfer1::IRNNv2Layer::setInputMode
void setInputMode(RNNInputMode op) noexcept
Set the input mode of the RNN layer.
Definition: NvInfer.h:3153
nvinfer1::IDeconvolutionLayer
A deconvolution layer in a network definition.
Definition: NvInfer.h:2367
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:3114