TensorRT  7.2.3.4
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 "NvInferRuntime.h"
54 
63 //
66 
72 
78 namespace nvinfer1
79 {
80 
85 class Dims2 : public Dims
86 {
87 public:
92  {
93  nbDims = 2;
94  d[0] = d[1] = 0;
95  }
96 
103  Dims2(int32_t d0, int32_t d1)
104  {
105  nbDims = 2;
106  d[0] = d0;
107  d[1] = d1;
108  }
109 };
110 
115 class DimsHW : public Dims2
116 {
117 public:
122  : Dims2()
123  {
125  }
126 
133  DimsHW(int32_t height, int32_t width)
134  : Dims2(height, width)
135  {
137  }
138 
144  int32_t& h()
145  {
146  return d[0];
147  }
148 
154  int32_t h() const
155  {
156  return d[0];
157  }
158 
164  int32_t& w()
165  {
166  return d[1];
167  }
168 
174  int32_t w() const
175  {
176  return d[1];
177  }
178 };
179 
184 class Dims3 : public Dims
185 {
186 public:
191  {
192  nbDims = 3;
193  d[0] = d[1] = d[2] = 0;
194  }
195 
203  Dims3(int32_t d0, int32_t d1, int32_t d2)
204  {
205  nbDims = 3;
206  d[0] = d0;
207  d[1] = d1;
208  d[2] = d2;
209  }
210 };
211 
218 class TRT_DEPRECATED DimsCHW : public Dims3
219 {
220 public:
225  : Dims3()
226  {
227  type[0] = DimensionType::kCHANNEL;
228  type[1] = type[2] = DimensionType::kSPATIAL;
229  }
230 
238  DimsCHW(int32_t channels, int32_t height, int32_t width)
239  : Dims3(channels, height, width)
240  {
241  type[0] = DimensionType::kCHANNEL;
242  type[1] = type[2] = DimensionType::kSPATIAL;
243  }
244 
250  int32_t& c()
251  {
252  return d[0];
253  }
254 
260  int32_t c() const
261  {
262  return d[0];
263  }
264 
270  int32_t& h()
271  {
272  return d[1];
273  }
274 
280  int32_t h() const
281  {
282  return d[1];
283  }
284 
290  int32_t& w()
291  {
292  return d[2];
293  }
294 
300  int32_t w() const
301  {
302  return d[2];
303  }
304 };
305 
310 class Dims4 : public Dims
311 {
312 public:
317  {
318  nbDims = 4;
319  d[0] = d[1] = d[2] = d[3] = 0;
320  }
321 
330  Dims4(int32_t d0, int32_t d1, int32_t d2, int32_t d3)
331  {
332  nbDims = 4;
333  d[0] = d0;
334  d[1] = d1;
335  d[2] = d2;
336  d[3] = d3;
337  }
338 };
339 
346 class TRT_DEPRECATED DimsNCHW : public Dims4
347 {
348 public:
353  : Dims4()
354  {
355  type[0] = DimensionType::kINDEX;
356  type[1] = DimensionType::kCHANNEL;
357  type[2] = type[3] = DimensionType::kSPATIAL;
358  }
359 
368  DimsNCHW(int32_t batchSize, int32_t channels, int32_t height, int32_t width)
369  : Dims4(batchSize, channels, height, width)
370  {
371  type[0] = DimensionType::kINDEX;
372  type[1] = DimensionType::kCHANNEL;
373  type[2] = type[3] = DimensionType::kSPATIAL;
374  }
375 
381  int32_t& n()
382  {
383  return d[0];
384  }
385 
391  int32_t n() const
392  {
393  return d[0];
394  }
395 
401  int32_t& c()
402  {
403  return d[1];
404  }
405 
411  int32_t c() const
412  {
413  return d[1];
414  }
415 
421  int32_t& h()
422  {
423  return d[2];
424  }
425 
431  int32_t h() const
432  {
433  return d[2];
434  }
435 
441  int32_t& w()
442  {
443  return d[3];
444  }
445 
451  int32_t w() const
452  {
453  return d[3];
454  }
455 };
456 
464 enum class LayerType : int32_t
465 {
466  kCONVOLUTION = 0,
467  kFULLY_CONNECTED = 1,
468  kACTIVATION = 2,
469  kPOOLING = 3,
470  kLRN = 4,
471  kSCALE = 5,
472  kSOFTMAX = 6,
473  kDECONVOLUTION = 7,
474  kCONCATENATION = 8,
475  kELEMENTWISE = 9,
476  kPLUGIN = 10,
477  kRNN = 11,
478  kUNARY = 12,
479  kPADDING = 13,
480  kSHUFFLE = 14,
481  kREDUCE = 15,
482  kTOPK = 16,
483  kGATHER = 17,
484  kMATRIX_MULTIPLY = 18,
485  kRAGGED_SOFTMAX = 19,
486  kCONSTANT = 20,
487  kRNN_V2 = 21,
488  kIDENTITY = 22,
489  kPLUGIN_V2 = 23,
490  kSLICE = 24,
491  kSHAPE = 25,
492  kPARAMETRIC_RELU = 26,
493  kRESIZE = 27,
494  kTRIP_LIMIT = 28,
495  kRECURRENCE = 29,
496  kITERATOR = 30,
497  kLOOP_OUTPUT = 31,
498  kSELECT = 32,
499  kFILL = 33
500 };
501 
503 template <>
504 constexpr inline int32_t EnumMax<LayerType>()
505 {
506  return 34;
507 }
508 
522 class ITensor
523 {
524 public:
537  virtual void setName(const char* name) TRTNOEXCEPT = 0;
538 
546  virtual const char* getName() const TRTNOEXCEPT = 0;
547 
562  virtual void setDimensions(Dims dimensions) TRTNOEXCEPT = 0; // only valid for input tensors
563 
572  virtual Dims getDimensions() const TRTNOEXCEPT = 0;
573 
584  virtual void setType(DataType type) TRTNOEXCEPT = 0;
585 
593  virtual DataType getType() const TRTNOEXCEPT = 0;
594 
605  virtual bool setDynamicRange(float min, float max) TRTNOEXCEPT = 0;
606 
615  TRT_DEPRECATED virtual float getDynamicRange() const TRTNOEXCEPT = 0;
616 
620  virtual bool isNetworkInput() const TRTNOEXCEPT = 0;
621 
625  virtual bool isNetworkOutput() const TRTNOEXCEPT = 0;
626 
627 protected:
628  virtual ~ITensor() {}
629 
630 public:
648  virtual void setBroadcastAcrossBatch(bool broadcastAcrossBatch) TRTNOEXCEPT = 0;
649 
661  virtual bool getBroadcastAcrossBatch() const TRTNOEXCEPT = 0;
662 
668  virtual TensorLocation getLocation() const TRTNOEXCEPT = 0;
669 
680  virtual void setLocation(TensorLocation location) TRTNOEXCEPT = 0;
681 
687  virtual bool dynamicRangeIsSet() const TRTNOEXCEPT = 0;
688 
692  virtual void resetDynamicRange() TRTNOEXCEPT = 0;
693 
699  virtual float getDynamicRangeMin() const TRTNOEXCEPT = 0;
700 
706  virtual float getDynamicRangeMax() const TRTNOEXCEPT = 0;
707 
722  virtual void setAllowedFormats(TensorFormats formats) TRTNOEXCEPT = 0;
723 
732  virtual TensorFormats getAllowedFormats() const TRTNOEXCEPT = 0;
733 
763  virtual bool isShapeTensor() const TRTNOEXCEPT = 0;
764 
783  virtual bool isExecutionTensor() const TRTNOEXCEPT = 0;
784 };
785 
793 class ILayer
794 {
795 public:
801  virtual LayerType getType() const TRTNOEXCEPT = 0;
802 
810  virtual void setName(const char* name) TRTNOEXCEPT = 0;
811 
815 
818  virtual const char* getName() const TRTNOEXCEPT = 0;
819 
823  virtual int32_t getNbInputs() const TRTNOEXCEPT = 0;
824 
833  virtual ITensor* getInput(int32_t index) const TRTNOEXCEPT = 0;
834 
838  virtual int32_t getNbOutputs() const TRTNOEXCEPT = 0;
839 
846  virtual ITensor* getOutput(int32_t index) const TRTNOEXCEPT = 0;
847 
853  //
862  virtual void setInput(int32_t index, ITensor& tensor) TRTNOEXCEPT = 0;
863 
878 
879  virtual void setPrecision(DataType dataType) TRTNOEXCEPT = 0;
880 
887 
888  virtual DataType getPrecision() const TRTNOEXCEPT = 0;
889 
896 
897  virtual bool precisionIsSet() const TRTNOEXCEPT = 0;
898 
903 
904  virtual void resetPrecision() TRTNOEXCEPT = 0;
905 
931 
932  virtual void setOutputType(int32_t index, DataType dataType) TRTNOEXCEPT = 0;
933 
942 
943  virtual DataType getOutputType(int32_t index) const TRTNOEXCEPT = 0;
944 
952 
953  virtual bool outputTypeIsSet(int32_t index) const TRTNOEXCEPT = 0;
954 
961 
962  virtual void resetOutputType(int32_t index) TRTNOEXCEPT = 0;
963 
964 protected:
965  virtual ~ILayer() {}
966 };
967 
1190 enum class PaddingMode : int32_t
1191 {
1192  kEXPLICIT_ROUND_DOWN = 0,
1193  kEXPLICIT_ROUND_UP = 1,
1194  kSAME_UPPER = 2,
1195  kSAME_LOWER = 3,
1196  kCAFFE_ROUND_DOWN = 4,
1197  kCAFFE_ROUND_UP = 5
1198 };
1199 
1201 template <>
1202 constexpr inline int32_t EnumMax<PaddingMode>()
1203 {
1204  return 6;
1205 }
1206 
1220 {
1221 public:
1231  TRT_DEPRECATED virtual void setKernelSize(DimsHW kernelSize) TRTNOEXCEPT = 0;
1232 
1240  TRT_DEPRECATED virtual DimsHW getKernelSize() const TRTNOEXCEPT = 0;
1241 
1249  virtual void setNbOutputMaps(int32_t nbOutputMaps) TRTNOEXCEPT = 0;
1250 
1256  virtual int32_t getNbOutputMaps() const TRTNOEXCEPT = 0;
1257 
1269  TRT_DEPRECATED virtual void setStride(DimsHW stride) TRTNOEXCEPT = 0;
1270 
1276  TRT_DEPRECATED virtual DimsHW getStride() const TRTNOEXCEPT = 0;
1277 
1293  TRT_DEPRECATED virtual void setPadding(DimsHW padding) TRTNOEXCEPT = 0;
1294 
1302  TRT_DEPRECATED virtual DimsHW getPadding() const TRTNOEXCEPT = 0;
1303 
1319  virtual void setNbGroups(int32_t nbGroups) TRTNOEXCEPT = 0;
1320 
1326  virtual int32_t getNbGroups() const TRTNOEXCEPT = 0;
1327 
1337  virtual void setKernelWeights(Weights weights) TRTNOEXCEPT = 0;
1338 
1344  virtual Weights getKernelWeights() const TRTNOEXCEPT = 0;
1345 
1356  virtual void setBiasWeights(Weights weights) TRTNOEXCEPT = 0;
1357 
1363  virtual Weights getBiasWeights() const TRTNOEXCEPT = 0;
1364 
1376  TRT_DEPRECATED virtual void setDilation(DimsHW dilation) TRTNOEXCEPT = 0;
1377 
1385  TRT_DEPRECATED virtual DimsHW getDilation() const TRTNOEXCEPT = 0;
1386 
1387 protected:
1388  virtual ~IConvolutionLayer() {}
1389 
1390 public:
1403  virtual void setPrePadding(Dims padding) TRTNOEXCEPT = 0;
1404 
1410  virtual Dims getPrePadding() const TRTNOEXCEPT = 0;
1411 
1424  virtual void setPostPadding(Dims padding) TRTNOEXCEPT = 0;
1425 
1431  virtual Dims getPostPadding() const TRTNOEXCEPT = 0;
1432 
1442  virtual void setPaddingMode(PaddingMode paddingMode) TRTNOEXCEPT = 0;
1443 
1451  virtual PaddingMode getPaddingMode() const TRTNOEXCEPT = 0;
1452 
1461  virtual void setKernelSizeNd(Dims kernelSize) TRTNOEXCEPT = 0;
1462 
1468  virtual Dims getKernelSizeNd() const TRTNOEXCEPT = 0;
1469 
1479  virtual void setStrideNd(Dims stride) TRTNOEXCEPT = 0;
1480 
1486  virtual Dims getStrideNd() const TRTNOEXCEPT = 0;
1487 
1501  virtual void setPaddingNd(Dims padding) TRTNOEXCEPT = 0;
1502 
1510  virtual Dims getPaddingNd() const TRTNOEXCEPT = 0;
1511 
1521  virtual void setDilationNd(Dims dilation) TRTNOEXCEPT = 0;
1522 
1528  virtual Dims getDilationNd() const TRTNOEXCEPT = 0;
1529 
1548  void setInput(int32_t index, ITensor& tensor) _TENSORRT_OVERRIDE TRTNOEXCEPT = 0;
1549 };
1550 
1581 {
1582 public:
1590  virtual void setNbOutputChannels(int32_t nbOutputs) TRTNOEXCEPT = 0;
1591 
1597  virtual int32_t getNbOutputChannels() const TRTNOEXCEPT = 0;
1598 
1604  virtual void setKernelWeights(Weights weights) TRTNOEXCEPT = 0;
1605 
1611  virtual Weights getKernelWeights() const TRTNOEXCEPT = 0;
1612 
1620  virtual void setBiasWeights(Weights weights) TRTNOEXCEPT = 0;
1621 
1627  virtual Weights getBiasWeights() const TRTNOEXCEPT = 0;
1628 
1629 protected:
1630  virtual ~IFullyConnectedLayer() {}
1631 
1632 public:
1649  void setInput(int32_t index, ITensor& tensor) _TENSORRT_OVERRIDE TRTNOEXCEPT = 0;
1650 };
1651 
1663 class IActivationLayer : public ILayer
1664 {
1665 public:
1673  virtual void setActivationType(ActivationType type) TRTNOEXCEPT = 0;
1674 
1680  virtual ActivationType getActivationType() const TRTNOEXCEPT = 0;
1681 
1682 protected:
1683  virtual ~IActivationLayer() {}
1684 public:
1695  virtual void setAlpha(float alpha) TRTNOEXCEPT = 0;
1696 
1706  virtual void setBeta(float beta) TRTNOEXCEPT = 0;
1707 
1712  virtual float getAlpha() const TRTNOEXCEPT = 0;
1713 
1718  virtual float getBeta() const TRTNOEXCEPT = 0;
1719 };
1720 
1726 enum class PoolingType : int32_t
1727 {
1728  kMAX = 0, // Maximum over elements
1729  kAVERAGE = 1, // Average over elements. If the tensor is padded, the count includes the padding
1730  kMAX_AVERAGE_BLEND = 2 // Blending between max and average pooling: (1-blendFactor)*maxPool + blendFactor*avgPool
1731 };
1732 
1734 template <>
1735 constexpr inline int32_t EnumMax<PoolingType>()
1736 {
1737  return 3;
1738 }
1739 
1751 class IPoolingLayer : public ILayer
1752 {
1753 public:
1761  virtual void setPoolingType(PoolingType type) TRTNOEXCEPT = 0;
1762 
1768  virtual PoolingType getPoolingType() const TRTNOEXCEPT = 0;
1769 
1779  TRT_DEPRECATED virtual void setWindowSize(DimsHW windowSize) TRTNOEXCEPT = 0;
1780 
1788  TRT_DEPRECATED virtual DimsHW getWindowSize() const TRTNOEXCEPT = 0;
1789 
1801  TRT_DEPRECATED virtual void setStride(DimsHW stride) TRTNOEXCEPT = 0;
1802 
1810  TRT_DEPRECATED virtual DimsHW getStride() const TRTNOEXCEPT = 0;
1811 
1823  TRT_DEPRECATED virtual void setPadding(DimsHW padding) TRTNOEXCEPT = 0;
1824 
1834  TRT_DEPRECATED virtual DimsHW getPadding() const TRTNOEXCEPT = 0;
1835 
1846  virtual void setBlendFactor(float blendFactor) TRTNOEXCEPT = 0;
1847 
1856  virtual float getBlendFactor() const TRTNOEXCEPT = 0;
1857 
1871  virtual void setAverageCountExcludesPadding(bool exclusive) TRTNOEXCEPT = 0;
1872 
1879  virtual bool getAverageCountExcludesPadding() const TRTNOEXCEPT = 0;
1880 
1881 protected:
1882  virtual ~IPoolingLayer() {}
1883 
1884 public:
1897  virtual void setPrePadding(Dims padding) TRTNOEXCEPT = 0;
1898 
1904  virtual Dims getPrePadding() const TRTNOEXCEPT = 0;
1905 
1918  virtual void setPostPadding(Dims padding) TRTNOEXCEPT = 0;
1919 
1925  virtual Dims getPostPadding() const TRTNOEXCEPT = 0;
1926 
1935  virtual void setPaddingMode(PaddingMode paddingMode) TRTNOEXCEPT = 0;
1936 
1943  virtual PaddingMode getPaddingMode() const TRTNOEXCEPT = 0;
1944 
1952  virtual void setWindowSizeNd(Dims windowSize) TRTNOEXCEPT = 0;
1953 
1959  virtual Dims getWindowSizeNd() const TRTNOEXCEPT = 0;
1960 
1970  virtual void setStrideNd(Dims stride) TRTNOEXCEPT = 0;
1971 
1977  virtual Dims getStrideNd() const TRTNOEXCEPT = 0;
1978 
1992  virtual void setPaddingNd(Dims padding) TRTNOEXCEPT = 0;
1993 
2001  virtual Dims getPaddingNd() const TRTNOEXCEPT = 0;
2002 };
2003 
2013 class ILRNLayer : public ILayer
2014 {
2015 public:
2025  virtual void setWindowSize(int32_t windowSize) TRTNOEXCEPT = 0;
2026 
2032  virtual int32_t getWindowSize() const TRTNOEXCEPT = 0;
2033 
2040  virtual void setAlpha(float alpha) TRTNOEXCEPT = 0;
2041 
2047  virtual float getAlpha() const TRTNOEXCEPT = 0;
2048 
2055  virtual void setBeta(float beta) TRTNOEXCEPT = 0;
2056 
2062  virtual float getBeta() const TRTNOEXCEPT = 0;
2063 
2070  virtual void setK(float k) TRTNOEXCEPT = 0;
2071 
2077  virtual float getK() const TRTNOEXCEPT = 0;
2078 
2079 protected:
2080  virtual ~ILRNLayer() {}
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>()
2098 {
2099  return 3;
2100 }
2101 
2124 class IScaleLayer : public ILayer
2125 {
2126 public:
2132  virtual void setMode(ScaleMode mode) TRTNOEXCEPT = 0;
2133 
2139  virtual ScaleMode getMode() const TRTNOEXCEPT = 0;
2140 
2146  virtual void setShift(Weights shift) TRTNOEXCEPT = 0;
2147 
2153  virtual Weights getShift() const TRTNOEXCEPT = 0;
2154 
2160  virtual void setScale(Weights scale) TRTNOEXCEPT = 0;
2161 
2167  virtual Weights getScale() const TRTNOEXCEPT = 0;
2168 
2174  virtual void setPower(Weights power) TRTNOEXCEPT = 0;
2175 
2181  virtual Weights getPower() const TRTNOEXCEPT = 0;
2182 
2183 protected:
2184  virtual ~IScaleLayer() {}
2185 
2186 public:
2199  virtual int32_t getChannelAxis() const TRTNOEXCEPT = 0;
2200 };
2201 
2213 class ISoftMaxLayer : public ILayer
2214 {
2215 protected:
2216  virtual ~ISoftMaxLayer() {}
2217 public:
2247  virtual void setAxes(uint32_t axes) TRTNOEXCEPT = 0;
2248 
2254  virtual uint32_t getAxes() const TRTNOEXCEPT = 0;
2255 };
2256 
2269 {
2270 protected:
2271  virtual ~IConcatenationLayer() {}
2272 
2273 public:
2284  virtual void setAxis(int32_t axis) TRTNOEXCEPT = 0;
2285 
2291  virtual int32_t getAxis() const TRTNOEXCEPT = 0;
2292 };
2293 
2304 {
2305 public:
2317  TRT_DEPRECATED virtual void setKernelSize(DimsHW kernelSize) TRTNOEXCEPT = 0;
2318 
2326  TRT_DEPRECATED virtual DimsHW getKernelSize() const TRTNOEXCEPT = 0;
2327 
2335  virtual void setNbOutputMaps(int32_t nbOutputMaps) TRTNOEXCEPT = 0;
2336 
2342  virtual int32_t getNbOutputMaps() const TRTNOEXCEPT = 0;
2343 
2355  TRT_DEPRECATED virtual void setStride(DimsHW stride) TRTNOEXCEPT = 0;
2356 
2364  TRT_DEPRECATED virtual DimsHW getStride() const TRTNOEXCEPT = 0;
2365 
2381  TRT_DEPRECATED virtual void setPadding(DimsHW padding) TRTNOEXCEPT = 0;
2382 
2392  TRT_DEPRECATED virtual DimsHW getPadding() const TRTNOEXCEPT = 0;
2393 
2409  virtual void setNbGroups(int32_t nbGroups) TRTNOEXCEPT = 0;
2410 
2416  virtual int32_t getNbGroups() const TRTNOEXCEPT = 0;
2417 
2427  virtual void setKernelWeights(Weights weights) TRTNOEXCEPT = 0;
2428 
2434  virtual Weights getKernelWeights() const TRTNOEXCEPT = 0;
2435 
2446  virtual void setBiasWeights(Weights weights) TRTNOEXCEPT = 0;
2447 
2453  virtual Weights getBiasWeights() const TRTNOEXCEPT = 0;
2454 
2455 protected:
2456  virtual ~IDeconvolutionLayer() {}
2457 
2458 public:
2472  virtual void setPrePadding(Dims padding) TRTNOEXCEPT = 0;
2473 
2479  virtual Dims getPrePadding() const TRTNOEXCEPT = 0;
2480 
2494  virtual void setPostPadding(Dims padding) TRTNOEXCEPT = 0;
2495 
2501  virtual Dims getPostPadding() const TRTNOEXCEPT = 0;
2502 
2512  virtual void setPaddingMode(PaddingMode paddingMode) TRTNOEXCEPT = 0;
2513 
2521  virtual PaddingMode getPaddingMode() const TRTNOEXCEPT = 0;
2522 
2531  virtual void setKernelSizeNd(Dims kernelSize) TRTNOEXCEPT = 0;
2532 
2538  virtual Dims getKernelSizeNd() const TRTNOEXCEPT = 0;
2539 
2550  virtual void setStrideNd(Dims stride) TRTNOEXCEPT = 0;
2551 
2557  virtual Dims getStrideNd() const TRTNOEXCEPT = 0;
2558 
2572  virtual void setPaddingNd(Dims padding) TRTNOEXCEPT = 0;
2573 
2581  virtual Dims getPaddingNd() const TRTNOEXCEPT = 0;
2582 
2600  void setInput(int32_t index, ITensor& tensor) _TENSORRT_OVERRIDE TRTNOEXCEPT = 0;
2601 
2608  virtual void setDilationNd(Dims dilation) TRTNOEXCEPT = 0;
2609 
2615  virtual Dims getDilationNd() const TRTNOEXCEPT = 0;
2616 };
2617 
2625 enum class ElementWiseOperation : int32_t
2626 {
2627  kSUM = 0,
2628  kPROD = 1,
2629  kMAX = 2,
2630  kMIN = 3,
2631  kSUB = 4,
2632  kDIV = 5,
2633  kPOW = 6,
2634  kFLOOR_DIV = 7,
2635  kAND = 8,
2636  kOR = 9,
2637  kXOR = 10,
2638  kEQUAL = 11,
2639  kGREATER = 12,
2640  kLESS = 13
2641 };
2642 
2644 template <>
2645 constexpr inline int32_t EnumMax<ElementWiseOperation>()
2646 {
2647  return 14;
2648 }
2649 
2658 //!
2665 {
2666 public:
2676  virtual void setOperation(ElementWiseOperation op) TRTNOEXCEPT = 0;
2677 
2685  virtual ElementWiseOperation getOperation() const TRTNOEXCEPT = 0;
2686 
2687 protected:
2688  virtual ~IElementWiseLayer() {}
2689 };
2690 
2694 class IGatherLayer : public ILayer
2695 {
2696 public:
2703  virtual void setGatherAxis(int32_t axis) TRTNOEXCEPT = 0;
2704 
2710  virtual int32_t getGatherAxis() const TRTNOEXCEPT = 0;
2711 
2719  virtual void setNbElementWiseDims(int32_t k) TRTNOEXCEPT = 0;
2720 
2726  virtual int32_t getNbElementWiseDims() const TRTNOEXCEPT = 0;
2727 
2728 protected:
2729  virtual ~IGatherLayer() {}
2730 };
2731 
2811 enum class RNNOperation : int32_t
2812 {
2813  kRELU = 0,
2814  kTANH = 1,
2815  kLSTM = 2,
2816  kGRU = 3
2817 };
2818 
2820 template <>
2821 constexpr inline int32_t EnumMax<RNNOperation>()
2822 {
2823  return 4;
2824 }
2825 
2833 enum class RNNDirection : int32_t
2834 {
2835  kUNIDIRECTION = 0,
2836  kBIDIRECTION = 1
2837 };
2838 
2840 template <>
2841 constexpr inline int32_t EnumMax<RNNDirection>()
2842 {
2843  return 2;
2844 }
2845 
2861 enum class RNNInputMode : int32_t
2862 {
2863  kLINEAR = 0,
2864  kSKIP = 1
2865 };
2866 
2868 template <>
2869 constexpr inline int32_t EnumMax<RNNInputMode>()
2870 {
2871  return 2;
2872 }
2873 
2887 class TRT_DEPRECATED IRNNLayer : public ILayer
2888 {
2889 public:
2895  virtual uint32_t getLayerCount() const TRTNOEXCEPT = 0;
2896 
2905  virtual std::size_t getHiddenSize() const TRTNOEXCEPT = 0;
2906 
2915  virtual int32_t getSeqLength() const TRTNOEXCEPT = 0;
2916 
2922  virtual void setOperation(RNNOperation op) TRTNOEXCEPT = 0;
2923 
2929  virtual RNNOperation getOperation() const TRTNOEXCEPT = 0;
2930 
2936  virtual void setInputMode(RNNInputMode op) TRTNOEXCEPT = 0;
2937 
2943  virtual RNNInputMode getInputMode() const TRTNOEXCEPT = 0;
2944 
2956  virtual void setDirection(RNNDirection op) TRTNOEXCEPT = 0;
2957 
2963  virtual RNNDirection getDirection() const TRTNOEXCEPT = 0;
2964 
3079  virtual void setWeights(Weights weights) TRTNOEXCEPT = 0;
3080 
3086  virtual Weights getWeights() const TRTNOEXCEPT = 0;
3087 
3139  virtual void setBias(Weights bias) TRTNOEXCEPT = 0;
3140 
3146  virtual Weights getBias() const TRTNOEXCEPT = 0;
3147 
3154  virtual int32_t getDataLength() const TRTNOEXCEPT = 0;
3155 
3173  virtual void setHiddenState(ITensor& hidden) TRTNOEXCEPT = 0;
3174 
3180  virtual ITensor* getHiddenState() const TRTNOEXCEPT = 0;
3181 
3201  virtual void setCellState(ITensor& cell) TRTNOEXCEPT = 0;
3202 
3208  virtual ITensor* getCellState() const TRTNOEXCEPT = 0;
3209 
3210 protected:
3211  virtual ~IRNNLayer() {}
3212 };
3213 
3221 enum class RNNGateType : int32_t
3222 {
3223  kINPUT = 0,
3224  kOUTPUT = 1,
3225  kFORGET = 2,
3226  kUPDATE = 3,
3227  kRESET = 4,
3228  kCELL = 5,
3229  kHIDDEN = 6
3230 };
3231 
3233 template <>
3234 constexpr inline int32_t EnumMax<RNNGateType>()
3235 {
3236  return 7;
3237 }
3238 
3250 class TRT_DEPRECATED IRNNv2Layer : public ILayer
3251 {
3252 public:
3253  virtual int32_t getLayerCount() const TRTNOEXCEPT = 0;
3254  virtual int32_t getHiddenSize() const TRTNOEXCEPT = 0;
3255  virtual int32_t getMaxSeqLength() const TRTNOEXCEPT = 0;
3256  virtual int32_t getDataLength() const TRTNOEXCEPT = 0;
3257 
3272  virtual void setSequenceLengths(ITensor& seqLengths) TRTNOEXCEPT = 0;
3273 
3281  virtual ITensor* getSequenceLengths() const TRTNOEXCEPT = 0;
3282 
3287  virtual void setOperation(RNNOperation op) TRTNOEXCEPT = 0;
3288 
3293  virtual RNNOperation getOperation() const TRTNOEXCEPT = 0;
3294 
3299  virtual void setInputMode(RNNInputMode op) TRTNOEXCEPT = 0;
3300 
3305  virtual RNNInputMode getInputMode() const TRTNOEXCEPT = 0;
3306 
3311  virtual void setDirection(RNNDirection op) TRTNOEXCEPT = 0;
3312 
3317  virtual RNNDirection getDirection() const TRTNOEXCEPT = 0;
3318 
3336  virtual void setWeightsForGate(int32_t layerIndex, RNNGateType gate, bool isW, Weights weights) TRTNOEXCEPT = 0;
3337 
3342  virtual Weights getWeightsForGate(int32_t layerIndex, RNNGateType gate, bool isW) const TRTNOEXCEPT = 0;
3343 
3359  virtual void setBiasForGate(int32_t layerIndex, RNNGateType gate, bool isW, Weights bias) TRTNOEXCEPT = 0;
3360 
3365  virtual Weights getBiasForGate(int32_t layerIndex, RNNGateType gate, bool isW) const TRTNOEXCEPT = 0;
3366 
3379  virtual void setHiddenState(ITensor& hidden) TRTNOEXCEPT = 0;
3380 
3385  virtual ITensor* getHiddenState() const TRTNOEXCEPT = 0;
3386 
3401  virtual void setCellState(ITensor& cell) TRTNOEXCEPT = 0;
3402 
3407  virtual ITensor* getCellState() const TRTNOEXCEPT = 0;
3408 
3409 protected:
3410  virtual ~IRNNv2Layer() {}
3411 };
3412 
3420 class TRT_DEPRECATED IOutputDimensionsFormula
3421 {
3422 public:
3438  virtual DimsHW compute(DimsHW inputDims, DimsHW kernelSize, DimsHW stride, DimsHW padding, DimsHW dilation, const char* layerName) const TRTNOEXCEPT = 0;
3439 
3440  virtual ~IOutputDimensionsFormula() {}
3441 };
3442 
3454 class TRT_DEPRECATED IPluginLayer : public ILayer
3455 {
3456 public:
3462  virtual IPlugin& getPlugin() TRTNOEXCEPT = 0;
3463 
3464 protected:
3465  virtual ~IPluginLayer() {}
3466 };
3467 
3477 class IPluginV2Layer : public ILayer
3478 {
3479 public:
3485  virtual IPluginV2& getPlugin() TRTNOEXCEPT = 0;
3486 
3487 protected:
3488  virtual ~IPluginV2Layer() {}
3489 };
3490 
3498 enum class UnaryOperation : int32_t
3499 {
3500  kEXP = 0,
3501  kLOG = 1,
3502  kSQRT = 2,
3503  kRECIP = 3,
3504  kABS = 4,
3505  kNEG = 5,
3506  kSIN = 6,
3507  kCOS = 7,
3508  kTAN = 8,
3509  kSINH = 9,
3510  kCOSH = 10,
3511  kASIN = 11,
3512  kACOS = 12,
3513  kATAN = 13,
3514  kASINH = 14,
3515  kACOSH = 15,
3516  kATANH = 16,
3517  kCEIL = 17,
3518  kFLOOR = 18,
3519  kERF = 19,
3520  kNOT = 20
3521 };
3522 
3524 template <>
3525 constexpr inline int32_t EnumMax<UnaryOperation>()
3526 {
3527  return 21;
3528 }
3529 
3537 class IUnaryLayer : public ILayer
3538 {
3539 public:
3545  virtual void setOperation(UnaryOperation op) TRTNOEXCEPT = 0;
3546 
3552  virtual UnaryOperation getOperation() const TRTNOEXCEPT = 0;
3553 
3554 protected:
3555  virtual ~IUnaryLayer() {}
3556 };
3557 
3576 enum class ReduceOperation : int32_t
3577 {
3578  kSUM = 0,
3579  kPROD = 1,
3580  kMAX = 2,
3581  kMIN = 3,
3582  kAVG = 4
3583 };
3584 
3586 template <>
3587 constexpr inline int32_t EnumMax<ReduceOperation>()
3588 {
3589  return 5;
3590 }
3591 
3599 class IReduceLayer : public ILayer
3600 {
3601 public:
3607  virtual void setOperation(ReduceOperation op) TRTNOEXCEPT = 0;
3608 
3614  virtual ReduceOperation getOperation() const TRTNOEXCEPT = 0;
3615 
3621  virtual void setReduceAxes(uint32_t reduceAxes) TRTNOEXCEPT = 0;
3622 
3628  virtual uint32_t getReduceAxes() const TRTNOEXCEPT = 0;
3629 
3635  virtual void setKeepDimensions(bool keepDimensions) TRTNOEXCEPT = 0;
3636 
3642  virtual bool getKeepDimensions() const TRTNOEXCEPT = 0;
3643 
3644 protected:
3645  virtual ~IReduceLayer() {}
3646 };
3647 
3658 class IPaddingLayer : public ILayer
3659 {
3660 public:
3670  TRT_DEPRECATED virtual void setPrePadding(DimsHW padding) TRTNOEXCEPT = 0;
3671 
3679  TRT_DEPRECATED virtual DimsHW getPrePadding() const TRTNOEXCEPT = 0;
3680 
3690  TRT_DEPRECATED virtual void setPostPadding(DimsHW padding) TRTNOEXCEPT = 0;
3691 
3699  TRT_DEPRECATED virtual DimsHW getPostPadding() const TRTNOEXCEPT = 0;
3700 
3701 protected:
3702  virtual ~IPaddingLayer() {}
3703 
3704 public:
3714  virtual void setPrePaddingNd(Dims padding) TRTNOEXCEPT = 0;
3715 
3723  virtual Dims getPrePaddingNd() const TRTNOEXCEPT = 0;
3724 
3734  virtual void setPostPaddingNd(Dims padding) TRTNOEXCEPT = 0;
3735 
3743  virtual Dims getPostPaddingNd() const TRTNOEXCEPT = 0;
3744 };
3745 
3747 {
3755 };
3756 
3769 class IShuffleLayer : public ILayer
3770 {
3771 public:
3781  virtual void setFirstTranspose(Permutation permutation) TRTNOEXCEPT = 0;
3782 
3790  virtual Permutation getFirstTranspose() const TRTNOEXCEPT = 0;
3791 
3812  virtual void setReshapeDimensions(Dims dimensions) TRTNOEXCEPT = 0;
3813 
3822  virtual Dims getReshapeDimensions() const TRTNOEXCEPT = 0;
3823 
3829  //
3843  void setInput(int32_t index, ITensor& tensor) _TENSORRT_OVERRIDE TRTNOEXCEPT = 0;
3844 
3857  virtual void setSecondTranspose(Permutation permutation) TRTNOEXCEPT = 0;
3858 
3866  virtual Permutation getSecondTranspose() const TRTNOEXCEPT = 0;
3867 
3868 protected:
3869  virtual ~IShuffleLayer() {}
3870 
3871 public:
3883  virtual void setZeroIsPlaceholder(bool zeroIsPlaceholder) = 0;
3884 
3893  virtual bool getZeroIsPlaceholder() const = 0;
3894 };
3895 
3901 enum class SliceMode : int32_t
3902 {
3903  kDEFAULT = 0,
3904  kWRAP = 1,
3905 };
3906 
3908 template <>
3909 constexpr inline int32_t EnumMax<SliceMode>()
3910 {
3911  return 2;
3912 }
3913 
3942 class ISliceLayer : public ILayer
3943 {
3944 public:
3954  virtual void setStart(Dims start) TRTNOEXCEPT = 0;
3955 
3966  virtual Dims getStart() const TRTNOEXCEPT = 0;
3967 
3977  virtual void setSize(Dims size) TRTNOEXCEPT = 0;
3978 
3989  virtual Dims getSize() const TRTNOEXCEPT = 0;
3990 
4000  virtual void setStride(Dims stride) TRTNOEXCEPT = 0;
4001 
4012  virtual Dims getStride() const TRTNOEXCEPT = 0;
4013 
4019  virtual void setMode(SliceMode mode) TRTNOEXCEPT = 0;
4020 
4026  virtual SliceMode getMode() const TRTNOEXCEPT = 0;
4027 
4046  void setInput(int32_t index, ITensor& tensor) _TENSORRT_OVERRIDE TRTNOEXCEPT = 0;
4047 
4048 protected:
4049  virtual ~ISliceLayer() {}
4050 };
4051 
4064 class IShapeLayer : public ILayer
4065 {
4066 protected:
4067  virtual ~IShapeLayer() {}
4068 };
4069 
4075 enum class TopKOperation : int32_t
4076 {
4077  kMAX = 0,
4078  kMIN = 1,
4079 };
4080 
4082 template <>
4083 constexpr inline int32_t EnumMax<TopKOperation>()
4084 {
4085  return 2;
4086 }
4087 
4095 class ITopKLayer : public ILayer
4096 {
4097 public:
4103  virtual void setOperation(TopKOperation op) TRTNOEXCEPT = 0;
4104 
4110  virtual TopKOperation getOperation() const TRTNOEXCEPT = 0;
4111 
4119  virtual void setK(int32_t k) TRTNOEXCEPT = 0;
4120 
4126  virtual int32_t getK() const TRTNOEXCEPT = 0;
4127 
4133  virtual void setReduceAxes(uint32_t reduceAxes) TRTNOEXCEPT = 0;
4134 
4140  virtual uint32_t getReduceAxes() const TRTNOEXCEPT = 0;
4141 
4142 protected:
4143  virtual ~ITopKLayer() {}
4144 };
4145 
4152 enum class MatrixOperation : int32_t
4153 {
4157  kNONE,
4158 
4160  kTRANSPOSE,
4161 
4171  kVECTOR
4172 };
4173 
4175 template <>
4176 constexpr inline int32_t EnumMax<MatrixOperation>()
4177 {
4178  return 3;
4179 }
4180 
4207 {
4208 public:
4215  virtual void setOperation(int32_t index, MatrixOperation op) TRTNOEXCEPT = 0;
4216 
4222  virtual MatrixOperation getOperation(int32_t index) const TRTNOEXCEPT = 0;
4223 
4232  TRT_DEPRECATED virtual void setTranspose(int32_t index, bool val) TRTNOEXCEPT = 0;
4233 
4241  TRT_DEPRECATED virtual bool getTranspose(int32_t index) const TRTNOEXCEPT = 0;
4242 
4243 protected:
4244  virtual ~IMatrixMultiplyLayer() {}
4245 };
4246 
4262 {
4263 protected:
4264  virtual ~IRaggedSoftMaxLayer() {}
4265 };
4266 
4277 class IIdentityLayer : public ILayer
4278 {
4279 protected:
4280  virtual ~IIdentityLayer() {}
4281 };
4282 
4290 class IConstantLayer : public ILayer
4291 {
4292 public:
4302  virtual void setWeights(Weights weights) TRTNOEXCEPT = 0;
4303 
4309  virtual Weights getWeights() const TRTNOEXCEPT = 0;
4310 
4318  virtual void setDimensions(Dims dimensions) TRTNOEXCEPT = 0;
4319 
4327  virtual Dims getDimensions() const TRTNOEXCEPT = 0;
4328 
4329 protected:
4330  virtual ~IConstantLayer() {}
4331 };
4332 
4341 {
4342 protected:
4343  virtual ~IParametricReLULayer() noexcept {}
4344 };
4345 
4351 enum class ResizeMode : int32_t
4352 {
4353  kNEAREST = 0,
4354  kLINEAR = 1
4355 };
4356 
4358 template <>
4359 constexpr inline int32_t EnumMax<ResizeMode>()
4360 {
4361  return 2;
4362 }
4363 
4384 class IResizeLayer : public ILayer
4385 {
4386 public:
4402  virtual void setOutputDimensions(Dims dimensions) TRTNOEXCEPT = 0;
4403 
4409  virtual Dims getOutputDimensions() const TRTNOEXCEPT = 0;
4410 
4429  virtual void setScales(const float* scales, int32_t nbScales) TRTNOEXCEPT = 0;
4430 
4445  virtual int32_t getScales(int32_t size, float* scales) const TRTNOEXCEPT = 0;
4446 
4454  virtual void setResizeMode(ResizeMode resizeMode) TRTNOEXCEPT = 0;
4455 
4461  virtual ResizeMode getResizeMode() const TRTNOEXCEPT = 0;
4462 
4472  virtual void setAlignCorners(bool alignCorners) TRTNOEXCEPT = 0;
4473 
4479  virtual bool getAlignCorners() const TRTNOEXCEPT = 0;
4480 
4500  void setInput(int32_t index, ITensor& tensor) _TENSORRT_OVERRIDE TRTNOEXCEPT = 0;
4501 
4502 protected:
4503  virtual ~IResizeLayer() {}
4504 };
4505 
4507 enum class LoopOutput : int32_t
4508 {
4510  kLAST_VALUE = 0,
4511 
4513  kCONCATENATE = 1,
4514 
4516  kREVERSE = 2
4517 };
4518 
4520 template <>
4521 constexpr inline int32_t EnumMax<LoopOutput>()
4522 {
4523  return 3;
4524 }
4525 
4527 enum class TripLimit : int32_t
4528 {
4529 
4530  kCOUNT = 0,
4531  kWHILE = 1
4532 };
4533 
4535 template <>
4536 constexpr inline int32_t EnumMax<TripLimit>()
4537 {
4538  return 2;
4539 }
4540 
4541 class ILoop;
4542 
4544 {
4545 public:
4547  virtual ILoop* getLoop() const noexcept = 0;
4548 };
4549 
4551 {
4552 public:
4558  //
4571  void setInput(int32_t index, ITensor& tensor) _TENSORRT_OVERRIDE TRTNOEXCEPT = 0;
4572 };
4573 
4592 {
4593 public:
4594  virtual LoopOutput getLoopOutput() const noexcept = 0;
4595 
4608  virtual void setAxis(int32_t axis) noexcept = 0;
4609 
4611  virtual int32_t getAxis() const noexcept = 0;
4612 
4618  //
4633  void setInput(int32_t index, ITensor& tensor) _TENSORRT_OVERRIDE TRTNOEXCEPT = 0;
4634 };
4635 
4637 {
4638 public:
4639  virtual TripLimit getTripLimit() const noexcept = 0;
4640 };
4641 
4643 {
4644 public:
4646  virtual void setAxis(int32_t axis) noexcept = 0;
4647 
4649  virtual int32_t getAxis() const noexcept = 0;
4650 
4656  virtual void setReverse(bool reverse) noexcept = 0;
4657 
4659  virtual bool getReverse() const noexcept = 0;
4660 };
4661 
4665 class ILoop
4666 {
4667 public:
4673  //
4675  virtual IRecurrenceLayer* addRecurrence(ITensor& initialValue) noexcept = 0;
4676 
4693  virtual ITripLimitLayer* addTripLimit(ITensor& tensor, TripLimit limit) noexcept = 0;
4694 
4703  virtual IIteratorLayer* addIterator(ITensor& tensor, int32_t axis = 0, bool reverse = false) noexcept = 0;
4704 
4712  virtual ILoopOutputLayer* addLoopOutput(ITensor& tensor, LoopOutput outputKind, int32_t axis = 0) noexcept = 0;
4713 
4722  virtual void setName(const char* name) noexcept = 0;
4723 
4729  virtual const char* getName() const noexcept = 0;
4730 
4731 protected:
4732  virtual ~ILoop() {}
4733 };
4734 
4738 class ISelectLayer : public ILayer
4739 {
4740 protected:
4741  virtual ~ISelectLayer() {}
4742 };
4743 
4751 enum class FillOperation : int32_t
4752 {
4753  kLINSPACE = 0,
4754  kRANDOM_UNIFORM = 1
4755 };
4756 
4758 template <>
4759 constexpr inline int32_t EnumMax<FillOperation>()
4760 {
4761  return 2;
4762 }
4763 
4782 class IFillLayer : public ILayer
4783 {
4784 public:
4793  //
4794  virtual void setDimensions(Dims dimensions) noexcept = 0;
4795 
4806  virtual Dims getDimensions() const noexcept = 0;
4807 
4813  virtual void setOperation(FillOperation op) noexcept = 0;
4814 
4820  virtual FillOperation getOperation() const noexcept = 0;
4821 
4834  //
4835  virtual void setAlpha(double alpha) noexcept = 0;
4836 
4847  virtual double getAlpha() const noexcept = 0;
4848 
4862  virtual void setBeta(double beta) noexcept = 0;
4863 
4874  virtual double getBeta() const noexcept = 0;
4875 
4902  void setInput(int32_t index, ITensor& tensor) _TENSORRT_OVERRIDE TRTNOEXCEPT = 0;
4903 
4904 protected:
4905  virtual ~IFillLayer() {}
4906 };
4907 
4928 {
4929 public:
4935 
4965  virtual ITensor* addInput(const char* name, DataType type, Dims dimensions) TRTNOEXCEPT = 0;
4966 
4974  virtual void markOutput(ITensor& tensor) TRTNOEXCEPT = 0;
4975 
4994  TRT_DEPRECATED virtual IConvolutionLayer* addConvolution(ITensor& input, int32_t nbOutputMaps, DimsHW kernelSize,
4995  Weights kernelWeights, Weights biasWeights) TRTNOEXCEPT = 0;
4996 
5013  ITensor& input, int32_t nbOutputs, Weights kernelWeights, Weights biasWeights) TRTNOEXCEPT = 0;
5014 
5030 
5045  TRT_DEPRECATED virtual IPoolingLayer* addPooling(
5046  ITensor& input, PoolingType type, DimsHW windowSize) TRTNOEXCEPT = 0;
5047 
5062  virtual ILRNLayer* addLRN(ITensor& input, int32_t window, float alpha, float beta, float k) TRTNOEXCEPT = 0;
5063 
5084  virtual IScaleLayer* addScale(ITensor& input, ScaleMode mode, Weights shift, Weights scale, Weights power) TRTNOEXCEPT = 0;
5085 
5094  virtual ISoftMaxLayer* addSoftMax(ITensor& input) TRTNOEXCEPT = 0;
5095 
5108  virtual IConcatenationLayer* addConcatenation(ITensor* const* inputs, int32_t nbInputs) TRTNOEXCEPT = 0;
5109 
5128  TRT_DEPRECATED virtual IDeconvolutionLayer* addDeconvolution(ITensor& input, int32_t nbOutputMaps,
5129  DimsHW kernelSize, Weights kernelWeights, Weights biasWeights) TRTNOEXCEPT = 0;
5130 
5152 
5212  TRT_DEPRECATED virtual IRNNLayer* addRNN(ITensor& inputs, int32_t layerCount, std::size_t hiddenSize,
5213  int32_t maxSeqLen, RNNOperation op, RNNInputMode mode, RNNDirection dir, Weights weights,
5214  Weights bias) TRTNOEXCEPT = 0;
5215 
5232  TRT_DEPRECATED virtual IPluginLayer* addPlugin(
5233  ITensor* const* inputs, int32_t nbInputs, IPlugin& plugin) TRTNOEXCEPT = 0;
5234 
5249  virtual IUnaryLayer* addUnary(ITensor& input, UnaryOperation operation) TRTNOEXCEPT = 0;
5250 
5263  TRT_DEPRECATED virtual IPaddingLayer* addPadding(
5264  ITensor& input, DimsHW prePadding, DimsHW postPadding) TRTNOEXCEPT = 0;
5265 
5275  virtual IShuffleLayer* addShuffle(ITensor& input) TRTNOEXCEPT = 0;
5276 
5291  TRT_DEPRECATED virtual void setPoolingOutputDimensionsFormula(IOutputDimensionsFormula* formula) TRTNOEXCEPT = 0;
5292 
5304  TRT_DEPRECATED virtual IOutputDimensionsFormula& getPoolingOutputDimensionsFormula() const TRTNOEXCEPT = 0;
5305 
5320  TRT_DEPRECATED virtual void setConvolutionOutputDimensionsFormula(
5321  IOutputDimensionsFormula* formula) TRTNOEXCEPT = 0;
5322 
5335 
5350  TRT_DEPRECATED virtual void setDeconvolutionOutputDimensionsFormula(
5351  IOutputDimensionsFormula* formula) TRTNOEXCEPT = 0;
5352 
5365 
5373  virtual int32_t getNbLayers() const TRTNOEXCEPT = 0;
5374 
5384  virtual ILayer* getLayer(int32_t index) const TRTNOEXCEPT = 0;
5385 
5393  virtual int32_t getNbInputs() const TRTNOEXCEPT = 0;
5394 
5404  virtual ITensor* getInput(int32_t index) const TRTNOEXCEPT = 0; // adding inputs invalidates indexing here
5405 
5415  virtual int32_t getNbOutputs() const TRTNOEXCEPT = 0;
5416 
5426  virtual ITensor* getOutput(int32_t index) const TRTNOEXCEPT = 0; // adding outputs invalidates indexing here
5427 
5431  virtual void destroy() TRTNOEXCEPT = 0;
5432 
5433 protected:
5434  virtual ~INetworkDefinition() {}
5435 
5436 public:
5460  virtual IReduceLayer* addReduce(ITensor& input, ReduceOperation operation, uint32_t reduceAxes, bool keepDimensions) TRTNOEXCEPT = 0;
5461 
5490  virtual ITopKLayer* addTopK(ITensor& input, TopKOperation op, int32_t k, uint32_t reduceAxes) TRTNOEXCEPT = 0;
5491 
5503  virtual IGatherLayer* addGather(ITensor& data, ITensor& indices, int32_t axis) TRTNOEXCEPT = 0;
5504 
5518  virtual IRaggedSoftMaxLayer* addRaggedSoftMax(ITensor& input, ITensor& bounds) TRTNOEXCEPT = 0;
5519 
5535  ITensor& input0, MatrixOperation op0, ITensor& input1, MatrixOperation op1) TRTNOEXCEPT = 0;
5536 
5554  TRT_DEPRECATED virtual IMatrixMultiplyLayer* addMatrixMultiply(
5555  ITensor& input0, bool transpose0, ITensor& input1, bool transpose1) TRTNOEXCEPT = 0;
5556 
5577  virtual IConstantLayer* addConstant(Dims dimensions, Weights weights) TRTNOEXCEPT = 0;
5578 
5642  TRT_DEPRECATED virtual IRNNv2Layer* addRNNv2(
5643  ITensor& input, int32_t layerCount, int32_t hiddenSize, int32_t maxSeqLen, RNNOperation op) TRTNOEXCEPT = 0;
5644 
5661  TRT_DEPRECATED virtual IPluginLayer* addPluginExt(
5662  ITensor* const* inputs, int32_t nbInputs, IPluginExt& plugin) TRTNOEXCEPT = 0;
5663 
5675  virtual IIdentityLayer* addIdentity(ITensor& input) TRTNOEXCEPT = 0;
5676 
5687  virtual void removeTensor(ITensor& tensor) TRTNOEXCEPT = 0;
5688 
5696  virtual void unmarkOutput(ITensor& tensor) TRTNOEXCEPT = 0;
5697 
5712  virtual IPluginV2Layer* addPluginV2(ITensor* const* inputs, int32_t nbInputs, IPluginV2& plugin) TRTNOEXCEPT = 0;
5713 
5728  virtual ISliceLayer* addSlice(ITensor& input, Dims start, Dims size, Dims stride) TRTNOEXCEPT = 0;
5729 
5747  virtual void setName(const char* name) TRTNOEXCEPT = 0;
5748 
5758  virtual const char* getName() const TRTNOEXCEPT = 0;
5759 
5773  virtual IShapeLayer* addShape(ITensor& input) TRTNOEXCEPT = 0;
5774 
5789  virtual bool hasImplicitBatchDimension() const TRTNOEXCEPT = 0;
5790 
5804  virtual bool markOutputForShapes(ITensor& tensor) TRTNOEXCEPT = 0;
5805 
5813  virtual bool unmarkOutputForShapes(ITensor& tensor) TRTNOEXCEPT = 0;
5814 
5828  virtual IParametricReLULayer* addParametricReLU(ITensor& input, ITensor& slope) noexcept = 0;
5829 
5847  virtual IConvolutionLayer* addConvolutionNd(ITensor& input, int32_t nbOutputMaps, Dims kernelSize,
5848  Weights kernelWeights, Weights biasWeights) TRTNOEXCEPT = 0;
5849 
5864  virtual IPoolingLayer* addPoolingNd(ITensor& input, PoolingType type, Dims windowSize) TRTNOEXCEPT = 0;
5865 
5880  //
5883  virtual IDeconvolutionLayer* addDeconvolutionNd(ITensor& input, int32_t nbOutputMaps, Dims kernelSize,
5884  Weights kernelWeights, Weights biasWeights) TRTNOEXCEPT = 0;
5885 
5912  virtual IScaleLayer* addScaleNd(ITensor& input, ScaleMode mode, Weights shift, Weights scale, Weights power,
5913  int32_t channelAxis) TRTNOEXCEPT = 0;
5914 
5925  virtual IResizeLayer* addResize(ITensor& input) TRTNOEXCEPT = 0;
5926 
5937  virtual bool hasExplicitPrecision() const TRTNOEXCEPT = 0;
5938 
5948  virtual ILoop* addLoop() noexcept = 0;
5949 
5981  virtual ISelectLayer* addSelect(ITensor& condition, ITensor& thenInput, ITensor& elseInput) TRTNOEXCEPT = 0;
5982 
5993  virtual IFillLayer* addFill(Dims dimensions, FillOperation op) noexcept = 0;
5994 
6005  virtual IPaddingLayer* addPaddingNd(
6006  ITensor& input, Dims prePadding, Dims postPadding) TRTNOEXCEPT = 0;
6007 };
6008 
6014 enum class CalibrationAlgoType : int32_t
6015 {
6016  kLEGACY_CALIBRATION = 0,
6017  kENTROPY_CALIBRATION = 1,
6018  kENTROPY_CALIBRATION_2 = 2,
6019  kMINMAX_CALIBRATION = 3,
6020 };
6021 
6023 template <>
6024 constexpr inline int32_t EnumMax<CalibrationAlgoType>()
6025 {
6026  return 4;
6027 }
6028 
6041 {
6042 public:
6048  virtual int32_t getBatchSize() const TRTNOEXCEPT = 0;
6049 
6063  virtual bool getBatch(void* bindings[], const char* names[], int32_t nbBindings) TRTNOEXCEPT = 0;
6064 
6079  virtual const void* readCalibrationCache(std::size_t& length) TRTNOEXCEPT = 0;
6080 
6089  virtual void writeCalibrationCache(const void* ptr, std::size_t length) TRTNOEXCEPT = 0;
6090 
6097 
6098  virtual ~IInt8Calibrator() {}
6099 };
6100 
6106 {
6107 public:
6111  CalibrationAlgoType getAlgorithm() TRTNOEXCEPT override { return CalibrationAlgoType::kENTROPY_CALIBRATION; }
6112 
6113  virtual ~IInt8EntropyCalibrator() {}
6114 };
6115 
6121 {
6122 public:
6126  CalibrationAlgoType getAlgorithm() TRTNOEXCEPT override { return CalibrationAlgoType::kENTROPY_CALIBRATION_2; }
6127 
6128  virtual ~IInt8EntropyCalibrator2() {}
6129 };
6130 
6136 {
6137 public:
6141  CalibrationAlgoType getAlgorithm() TRTNOEXCEPT override { return CalibrationAlgoType::kMINMAX_CALIBRATION; }
6142 
6143  virtual ~IInt8MinMaxCalibrator() {}
6144 };
6145 
6151 {
6152 public:
6156  CalibrationAlgoType getAlgorithm() TRTNOEXCEPT override { return CalibrationAlgoType::kLEGACY_CALIBRATION; }
6157 
6164  virtual double getQuantile() const TRTNOEXCEPT = 0;
6165 
6172  virtual double getRegressionCutoff() const TRTNOEXCEPT = 0;
6173 
6186  virtual const void* readHistogramCache(std::size_t& length) TRTNOEXCEPT = 0;
6187 
6196  virtual void writeHistogramCache(const void* ptr, std::size_t length) TRTNOEXCEPT = 0;
6197 
6198  virtual ~IInt8LegacyCalibrator() {}
6199 };
6200 
6212 {
6213 public:
6217  virtual TensorFormat getTensorFormat() const TRTNOEXCEPT = 0;
6218 
6222  virtual DataType getDataType() const TRTNOEXCEPT = 0;
6223 
6227  virtual Dims getStrides() const TRTNOEXCEPT = 0;
6228 
6229 protected:
6230  virtual ~IAlgorithmIOInfo() {}
6231 };
6232 
6245 {
6246 public:
6250  virtual int64_t getImplementation() const TRTNOEXCEPT = 0;
6251 
6255  virtual int64_t getTactic() const TRTNOEXCEPT = 0;
6256 
6257 protected:
6258  virtual ~IAlgorithmVariant() {}
6259 };
6260 
6270 {
6271 public:
6276  virtual const char* getName() const TRTNOEXCEPT = 0;
6277 
6284  virtual Dims getDimensions(int32_t index, OptProfileSelector select) const TRTNOEXCEPT = 0;
6285 
6289  virtual int32_t getNbInputs() const TRTNOEXCEPT = 0;
6290 
6294  virtual int32_t getNbOutputs() const TRTNOEXCEPT = 0;
6295 
6296 protected:
6297  virtual ~IAlgorithmContext() {}
6298 };
6299 
6310 {
6311 public:
6318  virtual const IAlgorithmIOInfo& getAlgorithmIOInfo(int32_t index) const TRTNOEXCEPT = 0;
6319 
6323  virtual const IAlgorithmVariant& getAlgorithmVariant() const TRTNOEXCEPT = 0;
6324 
6328  virtual float getTimingMSec() const TRTNOEXCEPT = 0;
6329 
6333  virtual std::size_t getWorkspaceSize() const TRTNOEXCEPT = 0;
6334 
6335 protected:
6336  virtual ~IAlgorithm() {}
6337 };
6338 
6348 {
6349 public:
6363  virtual int32_t selectAlgorithms(const IAlgorithmContext& context, const IAlgorithm* const* choices,
6364  int32_t nbChoices, int32_t* selection) TRTNOEXCEPT = 0;
6375  virtual void reportAlgorithms(const IAlgorithmContext* const* algoContexts, const IAlgorithm* const* algoChoices,
6376  int32_t nbAlgorithms) TRTNOEXCEPT = 0;
6377 
6378  virtual ~IAlgorithmSelector() {}
6379 };
6380 
6387 typedef uint32_t QuantizationFlags;
6388 
6396 enum class QuantizationFlag : int32_t
6397 {
6402 };
6403 
6405 template <>
6406 constexpr inline int32_t EnumMax<QuantizationFlag>()
6407 {
6408  return 1;
6409 }
6410 
6417 typedef uint32_t BuilderFlags;
6418 
6426 enum class BuilderFlag : int32_t
6427 {
6428  kFP16 = 0,
6429  kINT8 = 1,
6430  kDEBUG = 2,
6431  kGPU_FALLBACK = 3,
6432  kSTRICT_TYPES = 4,
6433  kREFIT = 5,
6434  kDISABLE_TIMING_CACHE = 6,
6435 
6439  kTF32 = 7
6440 };
6441 
6443 template <>
6444 constexpr inline int32_t EnumMax<BuilderFlag>()
6445 {
6446  return 8;
6447 }
6448 
6457 enum class ProfilingVerbosity : int32_t
6458 {
6459  kDEFAULT = 0,
6460  kNONE = 1,
6461  kVERBOSE = 2,
6462 };
6463 
6465 template <>
6466 constexpr inline int32_t EnumMax<ProfilingVerbosity>()
6467 {
6468  return 3;
6469 }
6470 
6471 
6479 enum class TacticSource : int32_t
6480 {
6482  kCUBLAS = 0,
6483  kCUBLAS_LT = 1
6484 };
6485 
6487 template <>
6488 constexpr inline int32_t EnumMax<TacticSource>()
6489 {
6490  return 2;
6491 }
6492 
6499 using TacticSources = uint32_t;
6500 
6507 {
6508 public:
6519  virtual void setMinTimingIterations(int32_t minTiming) TRTNOEXCEPT = 0;
6520 
6528  virtual int32_t getMinTimingIterations() const TRTNOEXCEPT = 0;
6529 
6538  virtual void setAvgTimingIterations(int32_t avgTiming) TRTNOEXCEPT = 0;
6539 
6547  virtual int32_t getAvgTimingIterations() const TRTNOEXCEPT = 0;
6548 
6557  virtual void setEngineCapability(EngineCapability capability) TRTNOEXCEPT = 0;
6558 
6566  virtual EngineCapability getEngineCapability() const TRTNOEXCEPT = 0;
6567 
6573  virtual void setInt8Calibrator(IInt8Calibrator* calibrator) TRTNOEXCEPT = 0;
6574 
6578  virtual IInt8Calibrator* getInt8Calibrator() const TRTNOEXCEPT = 0;
6579 
6587  virtual void setMaxWorkspaceSize(std::size_t workspaceSize) TRTNOEXCEPT = 0;
6588 
6598  virtual std::size_t getMaxWorkspaceSize() const TRTNOEXCEPT = 0;
6599 
6612  virtual void setFlags(BuilderFlags builderFlags) TRTNOEXCEPT = 0;
6613 
6621  virtual BuilderFlags getFlags() const TRTNOEXCEPT = 0;
6622 
6630  virtual void clearFlag(BuilderFlag builderFlag) TRTNOEXCEPT = 0;
6631 
6639  virtual void setFlag(BuilderFlag builderFlag) TRTNOEXCEPT = 0;
6640 
6648  virtual bool getFlag(BuilderFlag builderFlag) const TRTNOEXCEPT = 0;
6649 
6660  virtual void setDeviceType(const ILayer* layer, DeviceType deviceType) TRTNOEXCEPT = 0;
6661 
6666  virtual DeviceType getDeviceType(const ILayer* layer) const TRTNOEXCEPT = 0;
6667 
6673  virtual bool isDeviceTypeSet(const ILayer* layer) const TRTNOEXCEPT = 0;
6674 
6680  virtual void resetDeviceType(const ILayer* layer) TRTNOEXCEPT = 0;
6681 
6686  virtual bool canRunOnDLA(const ILayer* layer) const TRTNOEXCEPT = 0;
6687 
6698  virtual void setDLACore(int32_t dlaCore) TRTNOEXCEPT = 0;
6699 
6706  virtual int32_t getDLACore() const TRTNOEXCEPT = 0;
6707 
6713  virtual void setDefaultDeviceType(DeviceType deviceType) TRTNOEXCEPT = 0;
6714 
6720  virtual DeviceType getDefaultDeviceType() const TRTNOEXCEPT = 0;
6721 
6727  virtual void reset() TRTNOEXCEPT = 0;
6728 
6734  virtual void destroy() TRTNOEXCEPT = 0;
6735 
6743  virtual void setProfileStream(const cudaStream_t stream) TRTNOEXCEPT = 0;
6744 
6752  virtual cudaStream_t getProfileStream() const TRTNOEXCEPT = 0;
6753 
6765  virtual int32_t addOptimizationProfile(const IOptimizationProfile* profile) noexcept = 0;
6766 
6775  virtual int32_t getNbOptimizationProfiles() const noexcept = 0;
6776 
6777 protected:
6778  virtual ~IBuilderConfig() {}
6779 
6780 public:
6788  virtual void setProfilingVerbosity(ProfilingVerbosity verbosity) TRTNOEXCEPT = 0;
6789 
6799 
6804  virtual void setAlgorithmSelector(IAlgorithmSelector* selector) TRTNOEXCEPT = 0;
6805 
6810 
6820  virtual bool setCalibrationProfile(const IOptimizationProfile* profile) noexcept = 0;
6821 
6827  virtual const IOptimizationProfile* getCalibrationProfile() noexcept = 0;
6828 
6841  virtual void setQuantizationFlags(QuantizationFlags flags) TRTNOEXCEPT = 0;
6842 
6851 
6859  virtual void clearQuantizationFlag(QuantizationFlag flag) TRTNOEXCEPT = 0;
6860 
6868  virtual void setQuantizationFlag(QuantizationFlag flag) TRTNOEXCEPT = 0;
6869 
6877  virtual bool getQuantizationFlag(QuantizationFlag flag) const TRTNOEXCEPT = 0;
6878 
6899  virtual bool setTacticSources(TacticSources tacticSources) TRTNOEXCEPT = 0;
6900 
6911  virtual TacticSources getTacticSources() const TRTNOEXCEPT = 0;
6912 };
6913 
6923 
6933 enum class NetworkDefinitionCreationFlag : int32_t
6934 {
6939  kEXPLICIT_BATCH = 0,
6940 
6953  kEXPLICIT_PRECISION = 1,
6954 };
6955 
6957 template <>
6958 constexpr inline int32_t EnumMax<NetworkDefinitionCreationFlag>()
6959 {
6960  return 2;
6961 }
6962 
6971 {
6972 public:
6984  TRT_DEPRECATED virtual nvinfer1::INetworkDefinition* createNetwork() TRTNOEXCEPT = 0;
6985 
6994  virtual void setMaxBatchSize(int32_t batchSize) TRTNOEXCEPT = 0;
6995 
7004  virtual int32_t getMaxBatchSize() const TRTNOEXCEPT = 0;
7005 
7015  TRT_DEPRECATED virtual void setMaxWorkspaceSize(std::size_t workspaceSize) TRTNOEXCEPT = 0;
7016 
7026  TRT_DEPRECATED virtual std::size_t getMaxWorkspaceSize() const TRTNOEXCEPT = 0;
7027 
7040  TRT_DEPRECATED virtual void setHalf2Mode(bool mode) TRTNOEXCEPT = 0;
7041 
7049  TRT_DEPRECATED virtual bool getHalf2Mode() const TRTNOEXCEPT = 0;
7050 
7059  TRT_DEPRECATED virtual void setDebugSync(bool sync) TRTNOEXCEPT = 0;
7060 
7068  TRT_DEPRECATED virtual bool getDebugSync() const TRTNOEXCEPT = 0;
7069 
7080  TRT_DEPRECATED virtual void setMinFindIterations(int32_t minFind) TRTNOEXCEPT = 0;
7081 
7089  TRT_DEPRECATED virtual int32_t getMinFindIterations() const TRTNOEXCEPT = 0;
7090 
7101  TRT_DEPRECATED virtual void setAverageFindIterations(int32_t avgFind) TRTNOEXCEPT = 0;
7102 
7110  TRT_DEPRECATED virtual int32_t getAverageFindIterations() const TRTNOEXCEPT = 0;
7111 
7119  TRT_DEPRECATED virtual nvinfer1::ICudaEngine* buildCudaEngine(
7121 
7125  virtual bool platformHasFastFp16() const TRTNOEXCEPT = 0;
7126 
7130  virtual bool platformHasFastInt8() const TRTNOEXCEPT = 0;
7131 
7135  virtual void destroy() TRTNOEXCEPT = 0;
7136 
7148  TRT_DEPRECATED virtual void setInt8Mode(bool mode) TRTNOEXCEPT = 0;
7149 
7157  TRT_DEPRECATED virtual bool getInt8Mode() const TRTNOEXCEPT = 0;
7158 
7164  TRT_DEPRECATED virtual void setInt8Calibrator(IInt8Calibrator* calibrator) TRTNOEXCEPT = 0;
7165 
7178  TRT_DEPRECATED virtual void setDeviceType(ILayer* layer, DeviceType deviceType) TRTNOEXCEPT = 0;
7179 
7186  TRT_DEPRECATED virtual DeviceType getDeviceType(const ILayer* layer) const TRTNOEXCEPT = 0;
7187 
7195  TRT_DEPRECATED virtual bool isDeviceTypeSet(const ILayer* layer) const TRTNOEXCEPT = 0;
7196 
7204  TRT_DEPRECATED virtual void resetDeviceType(ILayer* layer) TRTNOEXCEPT = 0;
7205 
7212  TRT_DEPRECATED virtual bool canRunOnDLA(const ILayer* layer) const TRTNOEXCEPT = 0;
7213 
7221  TRT_DEPRECATED virtual void setDefaultDeviceType(DeviceType deviceType) TRTNOEXCEPT = 0;
7222 
7228  TRT_DEPRECATED virtual DeviceType getDefaultDeviceType() const TRTNOEXCEPT = 0;
7229 
7237  virtual int32_t getMaxDLABatchSize() const TRTNOEXCEPT = 0;
7238 
7248  TRT_DEPRECATED virtual void allowGPUFallback(bool setFallBackMode) TRTNOEXCEPT = 0;
7249 
7253  virtual int32_t getNbDLACores() const TRTNOEXCEPT = 0;
7254 
7265  TRT_DEPRECATED virtual void setDLACore(int32_t dlaCore) TRTNOEXCEPT = 0;
7266 
7273  TRT_DEPRECATED virtual int32_t getDLACore() const TRTNOEXCEPT = 0;
7274 
7280  TRT_DEPRECATED virtual void reset(nvinfer1::INetworkDefinition& network) TRTNOEXCEPT = 0;
7281 
7282 protected:
7283  virtual ~IBuilder()
7284  {
7285  }
7286 
7287 public:
7299  virtual void setGpuAllocator(IGpuAllocator* allocator) TRTNOEXCEPT = 0;
7300 
7312  TRT_DEPRECATED virtual void setFp16Mode(bool mode) TRTNOEXCEPT = 0;
7313 
7321  TRT_DEPRECATED virtual bool getFp16Mode() const TRTNOEXCEPT = 0;
7322 
7341  TRT_DEPRECATED virtual void setStrictTypeConstraints(bool mode) TRTNOEXCEPT = 0;
7342 
7350  TRT_DEPRECATED virtual bool getStrictTypeConstraints() const TRTNOEXCEPT = 0;
7351 
7357  TRT_DEPRECATED virtual void setRefittable(bool canRefit) TRTNOEXCEPT = 0;
7358 
7366  TRT_DEPRECATED virtual bool getRefittable() const TRTNOEXCEPT = 0;
7367 
7373  TRT_DEPRECATED virtual void setEngineCapability(EngineCapability capability) TRTNOEXCEPT = 0;
7374 
7382  TRT_DEPRECATED virtual EngineCapability getEngineCapability() const TRTNOEXCEPT = 0;
7383 
7390 
7398  INetworkDefinition& network, IBuilderConfig& config) TRTNOEXCEPT = 0;
7399 
7400 
7413 
7414 
7425 
7435  //
7438  virtual void setErrorRecorder(IErrorRecorder* recorder) TRTNOEXCEPT = 0;
7439 
7450  virtual IErrorRecorder* getErrorRecorder() const TRTNOEXCEPT = 0;
7451 
7455  virtual void reset() TRTNOEXCEPT = 0;
7456 
7460  virtual bool platformHasTf32() const TRTNOEXCEPT = 0;
7461 };
7462 
7463 } // namespace nvinfer1
7464 
7469 extern "C" TENSORRTAPI void* createInferBuilder_INTERNAL(void* logger, int32_t version);
7470 
7471 namespace nvinfer1
7472 {
7473 namespace
7474 {
7483 {
7484  return static_cast<IBuilder*>(createInferBuilder_INTERNAL(&logger, NV_TENSORRT_VERSION));
7485 }
7486 }
7487 }
7488 
7489 #endif
nvinfer1::IAlgorithmSelector::reportAlgorithms
virtual void reportAlgorithms(const IAlgorithmContext *const *algoContexts, const IAlgorithm *const *algoChoices, int32_t nbAlgorithms)=0
Called by TensorRT to report choices it made.
nvinfer1::IFullyConnectedLayer::setInput
void setInput(int32_t index, ITensor &tensor) _TENSORRT_OVERRIDE=0
Append or replace an input of this layer with a specific tensor.
nvinfer1::LoopOutput
LoopOutput
Enum that describes kinds of loop outputs.
Definition: NvInfer.h:4507
nvinfer1::IActivationLayer::getBeta
virtual float getBeta() const =0
Get the beta parameter.
nvinfer1::LayerType::kTOPK
TopK layer.
nvinfer1::IDeconvolutionLayer::setInput
void setInput(int32_t index, ITensor &tensor) _TENSORRT_OVERRIDE=0
Append or replace an input of this layer with a specific tensor.
nvinfer1::IBuilder::setHalf2Mode
virtual TRT_DEPRECATED void setHalf2Mode(bool mode)=0
Set whether half2 mode is used.
nvinfer1::LayerType::kPLUGIN
Plugin layer.
nvinfer1::IAlgorithm::getAlgorithmIOInfo
virtual const IAlgorithmIOInfo & getAlgorithmIOInfo(int32_t index) const =0
Returns the format of an Algorithm input or output. Algorithm inputs are incrementally numbered first...
nvinfer1::Dims3::Dims3
Dims3()
Construct an empty Dims3 object.
Definition: NvInfer.h:190
nvinfer1::ITensor::getLocation
virtual TensorLocation getLocation() const =0
Get the storage location of a tensor.
nvinfer1::EnumMax< ElementWiseOperation >
constexpr int32_t EnumMax< ElementWiseOperation >()
Maximum number of elements in ElementWiseOperation enum.
Definition: NvInfer.h:2645
nvinfer1::ITensor::getDynamicRangeMax
virtual float getDynamicRangeMax() const =0
Get maximum of dynamic range.
nvinfer1::IConvolutionLayer::setKernelSize
virtual TRT_DEPRECATED void setKernelSize(DimsHW kernelSize)=0
Set the HW kernel size of the convolution.
nvinfer1::IBuilder::setInt8Calibrator
virtual TRT_DEPRECATED void setInt8Calibrator(IInt8Calibrator *calibrator)=0
Set Int8 Calibration interface.
nvinfer1::IBuilderConfig::setProfileStream
virtual void setProfileStream(const cudaStream_t stream)=0
Set the cudaStream that is used to profile this network.
nvinfer1::IConvolutionLayer::setDilation
virtual TRT_DEPRECATED void setDilation(DimsHW dilation)=0
Set the dilation for a convolution.
nvinfer1::INetworkDefinition::addLoop
virtual ILoop * addLoop() noexcept=0
Add a loop to the network.
nvinfer1::IPluginV2Layer::getPlugin
virtual IPluginV2 & getPlugin()=0
Get the plugin for the layer.
nvinfer1::PaddingMode::kEXPLICIT_ROUND_UP
Use explicit padding, rounding output size up.
nvinfer1::ISliceLayer::getSize
virtual Dims getSize() const =0
Get dimensions of the output slice.
nvinfer1::IBuilder::canRunOnDLA
virtual TRT_DEPRECATED bool canRunOnDLA(const ILayer *layer) const =0
Checks if a layer can run on DLA.
nvinfer1::IBuilder::setDeviceType
virtual TRT_DEPRECATED void setDeviceType(ILayer *layer, DeviceType deviceType)=0
Set the device that this layer must execute on.
nvinfer1::SliceMode
SliceMode
Controls how ISliceLayer handles out of bounds coordinates.
Definition: NvInfer.h:3901
nvinfer1::PaddingMode::kSAME_LOWER
Use SAME padding, with prePadding >= postPadding.
nvinfer1::RNNGateType::kUPDATE
Update gate (z).
nvinfer1::IBuilder::setErrorRecorder
virtual void setErrorRecorder(IErrorRecorder *recorder)=0
Set the ErrorRecorder for this interface.
NvInferRuntime.h
nvinfer1::IConcatenationLayer::getAxis
virtual int32_t getAxis() const =0
Get the axis along which concatenation occurs.
nvinfer1::IMatrixMultiplyLayer::getTranspose
virtual TRT_DEPRECATED bool getTranspose(int32_t index) const =0
Get the transpose flag for an input tensor.
nvinfer1::DimsNCHW::n
int32_t n() const
Get the index count.
Definition: NvInfer.h:391
nvinfer1::INetworkDefinition::setName
virtual void setName(const char *name)=0
Sets the name of the network.
nvinfer1::IFullyConnectedLayer
A fully connected layer in a network definition. This layer expects an input tensor of three or more ...
Definition: NvInfer.h:1580
nvinfer1::Permutation
Definition: NvInfer.h:3746
nvinfer1::LayerType::kRNN
RNN layer.
nvinfer1::IBuilder::setDefaultDeviceType
virtual TRT_DEPRECATED void setDefaultDeviceType(DeviceType deviceType)=0
Sets the default DeviceType to be used by the builder. It ensures that all the layers that can run on...
nvinfer1::RNNInputMode::kSKIP
No operation is performed on the first recurrent layer.
nvinfer1::ITensor::setLocation
virtual void setLocation(TensorLocation location)=0
Set the storage location of a tensor.
nvinfer1::IBuilder::setEngineCapability
virtual TRT_DEPRECATED void setEngineCapability(EngineCapability capability)=0
Configure the builder to target specified EngineCapability flow.
nvinfer1::Dims::nbDims
int32_t nbDims
The number of dimensions.
Definition: NvInferRuntimeCommon.h:231
nvinfer1::IConstantLayer
Layer that represents a constant value.
Definition: NvInfer.h:4290
nvinfer1::PaddingMode::kCAFFE_ROUND_DOWN
Use CAFFE padding, rounding output size down, uses prePadding value.
nvinfer1::LayerType::kGATHER
Gather layer.
nvinfer1::Dims4::Dims4
Dims4()
Construct an empty Dims2 object.
Definition: NvInfer.h:316
nvinfer1::IActivationLayer::getAlpha
virtual float getAlpha() const =0
Get the alpha parameter.
nvinfer1::IParametricReLULayer
Layer that represents a parametric ReLU operation.
Definition: NvInfer.h:4340
nvinfer1::IBuilderConfig::clearQuantizationFlag
virtual void clearQuantizationFlag(QuantizationFlag flag)=0
clear a quantization flag.
nvinfer1::ILoop::addIterator
virtual IIteratorLayer * addIterator(ITensor &tensor, int32_t axis=0, bool reverse=false) noexcept=0
Return layer that subscripts tensor by loop iteration.
nvinfer1::IDeconvolutionLayer::getKernelWeights
virtual Weights getKernelWeights() const =0
Get the kernel weights for the deconvolution.
nvinfer1::IIteratorLayer::getAxis
virtual int32_t getAxis() const noexcept=0
Get axis being iterated over.
nvinfer1::IAlgorithmVariant::getImplementation
virtual int64_t getImplementation() const =0
Return implementation of the algorithm.
nvinfer1::INetworkDefinition::addResize
virtual IResizeLayer * addResize(ITensor &input)=0
Add a resize layer to the network.
nvinfer1::ElementWiseOperation::kMIN
Minimum of the two elements.
nvinfer1::IBuilder::resetDeviceType
virtual TRT_DEPRECATED void resetDeviceType(ILayer *layer)=0
reset the DeviceType for this layer
nvinfer1::UnaryOperation::kFLOOR
Floor.
nvinfer1::INetworkDefinition
A network definition for input to the builder.
Definition: NvInfer.h:4927
nvinfer1::IPluginLayer
Layer type for plugins.
Definition: NvInfer.h:3454
nvinfer1::IShuffleLayer::setFirstTranspose
virtual void setFirstTranspose(Permutation permutation)=0
Set the permutation applied by the first transpose operation.
nvinfer1::IReduceLayer::setReduceAxes
virtual void setReduceAxes(uint32_t reduceAxes)=0
Set the axes over which to reduce.
nvinfer1::UnaryOperation::kABS
Absolute value.
nvinfer1::ScaleMode::kCHANNEL
Per-channel coefficients.
nvinfer1::Weights
An array of weights used as a layer parameter.
Definition: NvInferRuntime.h:110
nvinfer1::IAlgorithmVariant
provides a unique 128-bit identifier, which along with the input and output information denotes the v...
Definition: NvInfer.h:6244
nvinfer1::UnaryOperation::kASINH
Inverse hyperbolic sine.
nvinfer1::INetworkDefinition::setConvolutionOutputDimensionsFormula
virtual TRT_DEPRECATED void setConvolutionOutputDimensionsFormula(IOutputDimensionsFormula *formula)=0
Set the convolution output dimensions formula.
nvinfer1::INetworkDefinition::unmarkOutputForShapes
virtual bool unmarkOutputForShapes(ITensor &tensor)=0
Undo markOutputForShapes.
nvinfer1::IBuilder::getMinFindIterations
virtual TRT_DEPRECATED int32_t getMinFindIterations() const =0
Query the number of minimization iterations.
nvinfer1::IPaddingLayer::setPrePadding
virtual TRT_DEPRECATED void setPrePadding(DimsHW padding)=0
Set the padding that is applied at the start of the tensor.
nvinfer1::IPaddingLayer
Layer that represents a padding operation.
Definition: NvInfer.h:3658
nvinfer1::ISliceLayer::setMode
virtual void setMode(SliceMode mode)=0
Set the slice mode.
nvinfer1::INetworkDefinition::addSelect
virtual ISelectLayer * addSelect(ITensor &condition, ITensor &thenInput, ITensor &elseInput)=0
Add a select layer to the network.
nvinfer1::DimsCHW
Descriptor for data with one channel dimension and two spatial dimensions.
Definition: NvInfer.h:218
nvinfer1::IConvolutionLayer
A convolution layer in a network definition.
Definition: NvInfer.h:1219
nvinfer1::IUnaryLayer::setOperation
virtual void setOperation(UnaryOperation op)=0
Set the unary operation for the layer.
nvinfer1::LayerType::kRNN_V2
RNNv2 layer.
nvinfer1::IBuilder::platformHasFastFp16
virtual bool platformHasFastFp16() const =0
Determine whether the platform has fast native fp16.
nvinfer1::INetworkDefinition::addDeconvolutionNd
virtual IDeconvolutionLayer * addDeconvolutionNd(ITensor &input, int32_t nbOutputMaps, Dims kernelSize, Weights kernelWeights, Weights biasWeights)=0
Add a multi-dimension deconvolution layer to the network.
nvinfer1::IIdentityLayer
A layer that represents the identity function.
Definition: NvInfer.h:4277
nvinfer1::ILayer::getOutput
virtual ITensor * getOutput(int32_t index) const =0
Get the layer output corresponding to the given index.
nvinfer1::DeviceType
DeviceType
The device that this layer/network will execute on.
Definition: NvInferRuntime.h:739
nvinfer1::IAlgorithm::getAlgorithmVariant
virtual const IAlgorithmVariant & getAlgorithmVariant() const =0
Returns the algorithm variant.
nvinfer1::RNNDirection::kBIDIRECTION
Network iterates from first to last and vice versa and outputs concatenated.
nvinfer1::IIteratorLayer::getReverse
virtual bool getReverse() const noexcept=0
True if and only if reversing input.
nvinfer1::IBuilderConfig::getMinTimingIterations
virtual int32_t getMinTimingIterations() const =0
Query the number of minimization iterations.
nvinfer1::IDeconvolutionLayer::setKernelWeights
virtual void setKernelWeights(Weights weights)=0
Set the kernel weights for the deconvolution.
nvinfer1::IInt8Calibrator::writeCalibrationCache
virtual void writeCalibrationCache(const void *ptr, std::size_t length)=0
Save a calibration cache.
nvinfer1::ProfilingVerbosity
ProfilingVerbosity
List of verbosity levels of layer information exposed in NVTX annotations.
Definition: NvInfer.h:6457
nvinfer1::ITensor::getDynamicRangeMin
virtual float getDynamicRangeMin() const =0
Get minimum of dynamic range.
nvinfer1::ProfilingVerbosity::kVERBOSE
Register layer names in NVTX message field and register layer detail in NVTX JSON payload field.
nvinfer1::IConvolutionLayer::setPadding
virtual TRT_DEPRECATED void setPadding(DimsHW padding)=0
Set the padding of the convolution.
nvinfer1::IBuilder::createNetwork
virtual TRT_DEPRECATED nvinfer1::INetworkDefinition * createNetwork()=0
Create a network definition object where all tensors have an implicit batch dimension.
nvinfer1::IAlgorithmSelector
Interface implemented by application for selecting and reporting algorithms of a layer provided by th...
Definition: NvInfer.h:6347
nvinfer1::IFullyConnectedLayer::setNbOutputChannels
virtual void setNbOutputChannels(int32_t nbOutputs)=0
Set the number of output channels K from the fully connected layer.
nvinfer1::IConvolutionLayer::setKernelSizeNd
virtual void setKernelSizeNd(Dims kernelSize)=0
Set the multi-dimension kernel size of the convolution.
nvinfer1::RNNInputMode
RNNInputMode
Enumerates the RNN input modes that may occur with an RNN layer.
Definition: NvInfer.h:2861
nvinfer1::IDeconvolutionLayer::getPaddingNd
virtual Dims getPaddingNd() const =0
Get the multi-dimension padding of the deconvolution.
nvinfer1::UnaryOperation::kSQRT
Square root.
nvinfer1::EnumMax< PaddingMode >
constexpr int32_t EnumMax< PaddingMode >()
Maximum number of elements in PaddingMode enum.
Definition: NvInfer.h:1202
nvinfer1::NetworkDefinitionCreationFlags
uint32_t NetworkDefinitionCreationFlags
This bitset is capable of representing one or more NetworkDefinitionCreationFlag flags constructed wi...
Definition: NvInfer.h:6922
nvinfer1::IAlgorithm::getTimingMSec
virtual float getTimingMSec() const =0
The time in milliseconds to execute the algorithm.
nvinfer1::IDeconvolutionLayer::setPadding
virtual TRT_DEPRECATED void setPadding(DimsHW padding)=0
Set the padding of the deconvolution.
nvinfer1::INetworkDefinition::markOutputForShapes
virtual bool markOutputForShapes(ITensor &tensor)=0
Enable tensor's value to be computed by IExecutionContext::getShapeBinding.
nvinfer1::IBuilder::setStrictTypeConstraints
virtual TRT_DEPRECATED void setStrictTypeConstraints(bool mode)=0
Set whether or not type constraints are strict.
nvinfer1::ITensor::setDimensions
virtual void setDimensions(Dims dimensions)=0
Set the dimensions of a tensor.
nvinfer1::UnaryOperation::kRECIP
Reciprocal.
nvinfer1::IConvolutionLayer::getDilationNd
virtual Dims getDilationNd() const =0
Get the multi-dimension dilation of the convolution.
nvinfer1::IBuilder::setInt8Mode
virtual TRT_DEPRECATED void setInt8Mode(bool mode)=0
Set whether or not quantized 8-bit kernels are permitted.
nvinfer1::ITripLimitLayer
Definition: NvInfer.h:4636
nvinfer1::LayerType::kRAGGED_SOFTMAX
Ragged softmax layer.
nvinfer1::LayerType::kSCALE
Scale layer.
nvinfer1::IPluginV2
Plugin class for user-implemented layers.
Definition: NvInferRuntimeCommon.h:433
nvinfer1::IBuilder::platformHasFastInt8
virtual bool platformHasFastInt8() const =0
Determine whether the platform has fast native int8.
nvinfer1::IDeconvolutionLayer::setNbGroups
virtual void setNbGroups(int32_t nbGroups)=0
Set the number of groups for a deconvolution.
nvinfer1::IAlgorithmIOInfo
Carries information about input or output of the algorithm. IAlgorithmIOInfo for all the input and ou...
Definition: NvInfer.h:6211
nvinfer1::ITensor::setType
virtual void setType(DataType type)=0
Set the data type of a tensor.
nvinfer1::IBuilder::reset
virtual void reset()=0
Resets the builder state to default values.
nvinfer1::TacticSource
TacticSource
List of tactic sources for TensorRT.
Definition: NvInfer.h:6479
nvinfer1::ITopKLayer::getReduceAxes
virtual uint32_t getReduceAxes() const =0
Get the axes to reduce for the layer.
nvinfer1::IInt8MinMaxCalibrator
Definition: NvInfer.h:6135
nvinfer1::ILoop::getName
virtual const char * getName() const noexcept=0
Return the name of the loop.
nvinfer1::INetworkDefinition::hasExplicitPrecision
virtual bool hasExplicitPrecision() const =0
True if network is an explicit precision network.
nvinfer1::IPoolingLayer::getPostPadding
virtual Dims getPostPadding() const =0
Get the padding.
nvinfer1::IShuffleLayer::setInput
void setInput(int32_t index, ITensor &tensor) _TENSORRT_OVERRIDE=0
Append or replace an input of this layer with a specific tensor.
nvinfer1::ITensor::setBroadcastAcrossBatch
virtual void setBroadcastAcrossBatch(bool broadcastAcrossBatch)=0
Set whether to enable broadcast of tensor across the batch.
nvinfer1::ILoop::addLoopOutput
virtual ILoopOutputLayer * addLoopOutput(ITensor &tensor, LoopOutput outputKind, int32_t axis=0) noexcept=0
Make an output for this loop, based on the given tensor.
nvinfer1::TensorFormats
uint32_t TensorFormats
It is capable of representing one or more TensorFormat by binary OR operations, e....
Definition: NvInferRuntimeCommon.h:243
nvinfer1::INetworkDefinition::addUnary
virtual IUnaryLayer * addUnary(ITensor &input, UnaryOperation operation)=0
Add a unary layer to the network.
nvinfer1::IFillLayer::getDimensions
virtual Dims getDimensions() const noexcept=0
Get the output tensor's dimensions.
nvinfer1::IPaddingLayer::setPostPadding
virtual TRT_DEPRECATED void setPostPadding(DimsHW padding)=0
Set the padding that is applied at the end of the tensor.
nvinfer1::IInt8Calibrator::getBatchSize
virtual int32_t getBatchSize() const =0
Get the batch size used for calibration batches.
nvinfer1::IBuilderConfig::setEngineCapability
virtual void setEngineCapability(EngineCapability capability)=0
Configure the builder to target specified EngineCapability flow.
nvinfer1::IFillLayer::getBeta
virtual double getBeta() const noexcept=0
Get the value of beta parameter.
nvinfer1::ITensor::getDynamicRange
virtual TRT_DEPRECATED float getDynamicRange() const =0
Get dynamic range for the tensor.
nvinfer1::INetworkDefinition::addDeconvolution
virtual TRT_DEPRECATED IDeconvolutionLayer * addDeconvolution(ITensor &input, int32_t nbOutputMaps, DimsHW kernelSize, Weights kernelWeights, Weights biasWeights)=0
Add a deconvolution layer to the network.
nvinfer1::DimsCHW::h
int32_t h() const
Get the height.
Definition: NvInfer.h:280
nvinfer1::IConcatenationLayer::setAxis
virtual void setAxis(int32_t axis)=0
Set the axis along which concatenation occurs.
nvinfer1::IBuilderConfig::getProfileStream
virtual cudaStream_t getProfileStream() const =0
Get the cudaStream that is used to profile this network.
nvinfer1::INetworkDefinition::markOutput
virtual void markOutput(ITensor &tensor)=0
Mark a tensor as a network output.
nvinfer1::BuilderFlag::kGPU_FALLBACK
Enable layers marked to execute on GPU if layer cannot execute on DLA.
nvinfer1::SliceMode::kDEFAULT
Fail with error when the coordinates are out of bounds. This is the default.
nvinfer1::DimsNCHW::DimsNCHW
DimsNCHW()
Construct an empty DimsNCHW object.
Definition: NvInfer.h:352
nvinfer1::IElementWiseLayer::getOperation
virtual ElementWiseOperation getOperation() const =0
Get the binary operation for the layer.
nvinfer1::IShuffleLayer::setZeroIsPlaceholder
virtual void setZeroIsPlaceholder(bool zeroIsPlaceholder)=0
Set meaning of 0 in reshape dimensions.
nvinfer1::ISliceLayer::getMode
virtual SliceMode getMode() const =0
Get the slice mode.
nvinfer1::LayerType::kPADDING
Padding layer.
nvinfer1::MatrixOperation::kTRANSPOSE
Like kNONE, but transpose the matrix dimensions.
nvinfer1::EnumMax< ProfilingVerbosity >
constexpr int32_t EnumMax< ProfilingVerbosity >()
Maximum number of profile verbosity levels in ProfilingVerbosity enum.
Definition: NvInfer.h:6466
nvinfer1::IMatrixMultiplyLayer::setOperation
virtual void setOperation(int32_t index, MatrixOperation op)=0
Set the operation for an input tensor.
nvinfer1::BuilderFlag::kREFIT
Enable building a refittable engine.
nvinfer1::ISliceLayer::setStride
virtual void setStride(Dims stride)=0
Set the stride for computing the output slice data.
nvinfer1::DimsNCHW::n
int32_t & n()
Get the index count.
Definition: NvInfer.h:381
nvinfer1::IConvolutionLayer::getPostPadding
virtual Dims getPostPadding() const =0
Get the post-padding.
nvinfer1::INetworkDefinition::addPaddingNd
virtual IPaddingLayer * addPaddingNd(ITensor &input, Dims prePadding, Dims postPadding)=0
Add a padding layer to the network. Only 2D padding is currently supported.
nvinfer1::IConvolutionLayer::getPaddingNd
virtual Dims getPaddingNd() const =0
Get the multi-dimension padding of the convolution.
nvinfer1::IRNNv2Layer
An RNN layer in a network definition, version 2.
Definition: NvInfer.h:3250
nvinfer1::IBuilderConfig::getTacticSources
virtual TacticSources getTacticSources() const =0
Get tactic sources.
nvinfer1::IBuilder::setMinFindIterations
virtual TRT_DEPRECATED void setMinFindIterations(int32_t minFind)=0
Set the number of minimization iterations used when timing layers.
nvinfer1::IBuilderConfig::setAvgTimingIterations
virtual void setAvgTimingIterations(int32_t avgTiming)=0
Set the number of averaging iterations used when timing layers.
nvinfer1::ISliceLayer::setSize
virtual void setSize(Dims size)=0
Set the dimensions of the output slice.
nvinfer1::ITensor::getAllowedFormats
virtual TensorFormats getAllowedFormats() const =0
Get a bitmask of TensorFormat values that the tensor supports. For a shape tensor,...
nvinfer1::UnaryOperation::kCEIL
Ceiling.
nvinfer1::ElementWiseOperation::kAND
Logical AND of two elements.
nvinfer1::IBuilder::getDeviceType
virtual TRT_DEPRECATED DeviceType getDeviceType(const ILayer *layer) const =0
Get the device that this layer executes on.
nvinfer1::BuilderFlag::kINT8
Enable Int8 layer selection, with FP32 fallback with FP16 fallback if kFP16 also specified.
nvinfer1::IFillLayer::getOperation
virtual FillOperation getOperation() const noexcept=0
Get the fill operation for the layer.
nvinfer1::IBuilderConfig::resetDeviceType
virtual void resetDeviceType(const ILayer *layer)=0
reset the DeviceType for this layer
nvinfer1::IConvolutionLayer::setDilationNd
virtual void setDilationNd(Dims dilation)=0
Set the multi-dimension dilation of the convolution.
nvinfer1::ILoopOutputLayer::getAxis
virtual int32_t getAxis() const noexcept=0
Get axis being concatenated over.
nvinfer1::IRNNLayer
A RNN layer in a network definition.
Definition: NvInfer.h:2887
nvinfer1::IBuilder::getRefittable
virtual TRT_DEPRECATED bool getRefittable() const =0
Query whether or not engines will be refittable.
nvinfer1::IConvolutionLayer::setBiasWeights
virtual void setBiasWeights(Weights weights)=0
Set the bias weights for the convolution.
nvinfer1::ILoop::addRecurrence
virtual IRecurrenceLayer * addRecurrence(ITensor &initialValue) noexcept=0
Create a recurrence layer for this loop with initialValue as its first input.
nvinfer1::INetworkDefinition::getNbInputs
virtual int32_t getNbInputs() const =0
Get the number of inputs in the network.
nvinfer1::IPoolingLayer::getStride
virtual TRT_DEPRECATED DimsHW getStride() const =0
Get the stride for pooling.
nvinfer1::EnumMax< QuantizationFlag >
constexpr int32_t EnumMax< QuantizationFlag >()
Maximum number of quantization flags in QuantizationFlag enum.
Definition: NvInfer.h:6406
nvinfer1::INetworkDefinition::addConstant
virtual IConstantLayer * addConstant(Dims dimensions, Weights weights)=0
Add a constant layer to the network.
nvinfer1::DimsHW
Descriptor for two-dimensional spatial data.
Definition: NvInfer.h:115
nvinfer1::IInt8LegacyCalibrator::getQuantile
virtual double getQuantile() const =0
The quantile (between 0 and 1) that will be used to select the region maximum when the quantile metho...
nvinfer1::EnumMax< CalibrationAlgoType >
constexpr int32_t EnumMax< CalibrationAlgoType >()
Maximum number of elements in CalibrationAlgoType enum.
Definition: NvInfer.h:6024
nvinfer1::INetworkDefinition::addScaleNd
virtual IScaleLayer * addScaleNd(ITensor &input, ScaleMode mode, Weights shift, Weights scale, Weights power, int32_t channelAxis)=0
Add a multi-dimension scale layer to the network.
nvinfer1::UnaryOperation::kASIN
Inverse sine.
nvinfer1::LayerType::kFILL
Fill layer.
nvinfer1::IBuilderConfig::isDeviceTypeSet
virtual bool isDeviceTypeSet(const ILayer *layer) const =0
whether the DeviceType has been explicitly set for this layer
nvinfer1::IPoolingLayer::setWindowSize
virtual TRT_DEPRECATED void setWindowSize(DimsHW windowSize)=0
Set the window size for pooling.
nvinfer1::ResizeMode
ResizeMode
Enumerates various modes of resize in the resize layer. Resize mode set using setResizeMode().
Definition: NvInfer.h:4351
nvinfer1::ITensor::resetDynamicRange
virtual void resetDynamicRange()=0
Undo effect of setDynamicRange.
nvinfer1::TensorFormat
TensorFormat
Format of the input/output tensors.
Definition: NvInferRuntimeCommon.h:258
nvinfer1::ILoopOutputLayer
Definition: NvInfer.h:4591
nvinfer1::ISliceLayer::getStride
virtual Dims getStride() const =0
Get the stride for the output slice.
nvinfer1::INetworkDefinition::addRNNv2
virtual TRT_DEPRECATED IRNNv2Layer * addRNNv2(ITensor &input, int32_t layerCount, int32_t hiddenSize, int32_t maxSeqLen, RNNOperation op)=0
Add an layerCount deep RNN layer to the network with hiddenSize internal states that can take a batch...
nvinfer1::IReduceLayer::getReduceAxes
virtual uint32_t getReduceAxes() const =0
Get the axes over which to reduce for the layer.
nvinfer1::ITopKLayer::getOperation
virtual TopKOperation getOperation() const =0
Get the operation for the layer.
nvinfer1::IFillLayer::setOperation
virtual void setOperation(FillOperation op) noexcept=0
Set the fill operation for the layer.
nvinfer1::UnaryOperation::kSINH
Hyperbolic sine.
nvinfer1::IResizeLayer::getScales
virtual int32_t getScales(int32_t size, float *scales) const =0
Copies resize scales to scales[0, ..., nbScales-1], where nbScales is the number of scales that were ...
nvinfer1::INetworkDefinition::addInput
virtual ITensor * addInput(const char *name, DataType type, Dims dimensions)=0
Add an input tensor to the network.
nvinfer1::INetworkDefinition::addFill
virtual IFillLayer * addFill(Dims dimensions, FillOperation op) noexcept=0
Add a fill layer to the network.
nvinfer1::RNNGateType::kCELL
Cell gate (c).
nvinfer1::IBuilderConfig::clearFlag
virtual void clearFlag(BuilderFlag builderFlag)=0
clear a single build mode flag.
nvinfer1::ILRNLayer::setK
virtual void setK(float k)=0
Set the LRN K value.
nvinfer1::Dims
Structure to define the dimensions of a tensor.
Definition: NvInferRuntimeCommon.h:227
nvinfer1::INetworkDefinition::addPoolingNd
virtual IPoolingLayer * addPoolingNd(ITensor &input, PoolingType type, Dims windowSize)=0
Add a multi-dimension pooling layer to the network.
nvinfer1::IBuilderConfig::getQuantizationFlag
virtual bool getQuantizationFlag(QuantizationFlag flag) const =0
Returns true if the quantization flag is set.
nvinfer1::IDeconvolutionLayer::getNbOutputMaps
virtual int32_t getNbOutputMaps() const =0
Get the number of output feature maps for the deconvolution.
nvinfer1::RNNGateType::kRESET
Reset gate (r).
nvinfer1::IDeconvolutionLayer::getStride
virtual TRT_DEPRECATED DimsHW getStride() const =0
Get the stride of the deconvolution.
nvinfer1::IResizeLayer::setScales
virtual void setScales(const float *scales, int32_t nbScales)=0
Set the resize scales.
nvinfer1::DimsCHW::h
int32_t & h()
Get the height.
Definition: NvInfer.h:270
nvinfer1::Permutation::order
int32_t order[Dims::MAX_DIMS]
Definition: NvInfer.h:3754
nvinfer1::LoopOutput::kREVERSE
Output value is concatenation of values of tensor for each iteration, in reverse order.
nvinfer1::IConvolutionLayer::getPrePadding
virtual Dims getPrePadding() const =0
Get the pre-padding.
nvinfer1::ILogger
Application-implemented logging interface for the builder, engine and runtime.
Definition: NvInferRuntimeCommon.h:1109
nvinfer1::IBuilder::getFp16Mode
virtual TRT_DEPRECATED bool getFp16Mode() const =0
Query whether 16-bit kernels are permitted.
nvinfer1::IGatherLayer::setGatherAxis
virtual void setGatherAxis(int32_t axis)=0
Set the axis to gather on. The axis must be less than the number of dimensions in the data input.
nvinfer1::EnumMax< ScaleMode >
constexpr int32_t EnumMax< ScaleMode >()
Maximum number of elements in ScaleMode enum.
Definition: NvInfer.h:2097
nvinfer1::DimsCHW::c
int32_t & c()
Get the channel count.
Definition: NvInfer.h:250
nvinfer1::IAlgorithmContext
Describes the context and requirements, that could be fulfilled by one or more instances of IAlgorith...
Definition: NvInfer.h:6269
nvinfer1::IConvolutionLayer::setPaddingMode
virtual void setPaddingMode(PaddingMode paddingMode)=0
Set the padding mode.
nvinfer1::IScaleLayer::getScale
virtual Weights getScale() const =0
Get the scale value.
nvinfer1::IActivationLayer::setActivationType
virtual void setActivationType(ActivationType type)=0
Set the type of activation to be performed.
nvinfer1::DimsNCHW::c
int32_t & c()
Get the channel count.
Definition: NvInfer.h:401
nvinfer1::IDeconvolutionLayer::setPaddingMode
virtual void setPaddingMode(PaddingMode paddingMode)=0
Set the padding mode.
nvinfer1::IPoolingLayer::setWindowSizeNd
virtual void setWindowSizeNd(Dims windowSize)=0
Set the multi-dimension window size for pooling.
nvinfer1::IBuilder::setMaxWorkspaceSize
virtual TRT_DEPRECATED void setMaxWorkspaceSize(std::size_t workspaceSize)=0
Set the maximum workspace size.
nvinfer1::IBuilderConfig::getDeviceType
virtual DeviceType getDeviceType(const ILayer *layer) const =0
Get the device that this layer executes on.
nvinfer1::QuantizationFlag::kCALIBRATE_BEFORE_FUSION
nvinfer1::ITensor::isShapeTensor
virtual bool isShapeTensor() const =0
Whether the tensor is a shape tensor.
nvinfer1::INetworkDefinition::getOutput
virtual ITensor * getOutput(int32_t index) const =0
Get the output tensor specified by the given index.
nvinfer1::IBuilder::getInt8Mode
virtual TRT_DEPRECATED bool getInt8Mode() const =0
Query whether Int8 mode is used.
nvinfer1::EnumMax< FillOperation >
constexpr int32_t EnumMax< FillOperation >()
Maximum number of elements in FillOperation enum.
Definition: NvInfer.h:4759
nvinfer1::IConvolutionLayer::setInput
void setInput(int32_t index, ITensor &tensor) _TENSORRT_OVERRIDE=0
Append or replace an input of this layer with a specific tensor.
nvinfer1::ICudaEngine
An engine for executing inference on a built network, with functionally unsafe features.
Definition: NvInferRuntime.h:1190
nvinfer1::QuantizationFlags
uint32_t QuantizationFlags
Represents a collection of one or more QuantizationFlag values using binary OR operations.
Definition: NvInfer.h:6387
nvinfer1::BuilderFlag::kFP16
Enable FP16 layer selection, with FP32 fallback.
nvinfer1::ActivationType
ActivationType
Enumerates the types of activation to perform in an activation layer.
Definition: NvInferRuntimeCommon.h:141
nvinfer1::IFullyConnectedLayer::setBiasWeights
virtual void setBiasWeights(Weights weights)=0
Set the bias weights.
nvinfer1::IBuilder::buildCudaEngine
virtual TRT_DEPRECATED nvinfer1::ICudaEngine * buildCudaEngine(nvinfer1::INetworkDefinition &network)=0
Build a CUDA engine from a network definition.
nvinfer1::ILayer::precisionIsSet
virtual bool precisionIsSet() const =0
whether the computational precision has been set for this layer
nvinfer1::LayerType::kLOOP_OUTPUT
Loop output layer.
nvinfer1::IRaggedSoftMaxLayer
A RaggedSoftmax layer in a network definition.
Definition: NvInfer.h:4261
nvinfer1::INetworkDefinition::addSlice
virtual ISliceLayer * addSlice(ITensor &input, Dims start, Dims size, Dims stride)=0
Add a slice layer to the network.
nvinfer1::IBuilderConfig::getProfilingVerbosity
virtual ProfilingVerbosity getProfilingVerbosity() const =0
Get verbosity level of layer information exposed in NVTX annotations.
nvinfer1::INetworkDefinition::getPoolingOutputDimensionsFormula
virtual TRT_DEPRECATED IOutputDimensionsFormula & getPoolingOutputDimensionsFormula() const =0
Get the pooling output dimensions formula.
nvinfer1::IPaddingLayer::getPostPaddingNd
virtual Dims getPostPaddingNd() const =0
Get the padding that is applied at the end of the tensor.
nvinfer1::IInt8LegacyCalibrator::writeHistogramCache
virtual void writeHistogramCache(const void *ptr, std::size_t length)=0
Save a histogram cache.
nvinfer1::PaddingMode::kSAME_UPPER
Use SAME padding, with prePadding <= postPadding.
nvinfer1::IBuilder::buildEngineWithConfig
virtual nvinfer1::ICudaEngine * buildEngineWithConfig(INetworkDefinition &network, IBuilderConfig &config)=0
Builds an engine for the given INetworkDefinition and given IBuilderConfig.
nvinfer1::IDeconvolutionLayer::getPadding
virtual TRT_DEPRECATED DimsHW getPadding() const =0
Get the padding of the deconvolution.
nvinfer1::IBuilderConfig::setInt8Calibrator
virtual void setInt8Calibrator(IInt8Calibrator *calibrator)=0
Set Int8 Calibration interface.
nvinfer1::IDeconvolutionLayer::setPrePadding
virtual void setPrePadding(Dims padding)=0
Set the multi-dimension pre-padding of the deconvolution.
nvinfer1::ILRNLayer::setAlpha
virtual void setAlpha(float alpha)=0
Set the LRN alpha value.
TRTNOEXCEPT
#define TRTNOEXCEPT
Definition: NvInferRuntimeCommon.h:103
nvinfer1::DimsHW::DimsHW
DimsHW(int32_t height, int32_t width)
Construct a DimsHW given height and width.
Definition: NvInfer.h:133
nvinfer1::Dims::d
int32_t d[MAX_DIMS]
The extent of each dimension.
Definition: NvInferRuntimeCommon.h:232
nvinfer1::IScaleLayer::getChannelAxis
virtual int32_t getChannelAxis() const =0
Get the channel axis.
nvinfer1::IConvolutionLayer::setPrePadding
virtual void setPrePadding(Dims padding)=0
Set the multi-dimension pre-padding of the convolution.
nvinfer1::ILayer::getNbInputs
virtual int32_t getNbInputs() const =0
Get the number of inputs of a layer.
nvinfer1::ElementWiseOperation
ElementWiseOperation
Enumerates the binary operations that may be performed by an ElementWise layer.
Definition: NvInfer.h:2625
nvinfer1::IBuilderConfig::getNbOptimizationProfiles
virtual int32_t getNbOptimizationProfiles() const noexcept=0
Get number of optimization profiles.
nvinfer1::FillOperation::kRANDOM_UNIFORM
Generate a tensor with random values drawn from a uniform distribution.
nvinfer1::IBuilderConfig::setTacticSources
virtual bool setTacticSources(TacticSources tacticSources)=0
Set tactic sources.
nvinfer1::LayerType::kPLUGIN_V2
PluginV2 layer.
nvinfer1::ElementWiseOperation::kDIV
Divide the first element by the second.
nvinfer1::IInt8Calibrator::getBatch
virtual bool getBatch(void *bindings[], const char *names[], int32_t nbBindings)=0
Get a batch of input for calibration.
nvinfer1::RNNOperation::kRELU
Single gate RNN w/ ReLU activation function.
nvinfer1::ISliceLayer
Slices an input tensor into an output tensor based on the offset and strides.
Definition: NvInfer.h:3942
nvinfer1::INetworkDefinition::addPadding
virtual TRT_DEPRECATED IPaddingLayer * addPadding(ITensor &input, DimsHW prePadding, DimsHW postPadding)=0
Add a padding layer to the network.
nvinfer1::IReduceLayer::getKeepDimensions
virtual bool getKeepDimensions() const =0
Get the boolean that specifies whether or not to keep the reduced dimensions for the layer.
nvinfer1::EnumMax< RNNOperation >
constexpr int32_t EnumMax< RNNOperation >()
Maximum number of elements in RNNOperation enum.
Definition: NvInfer.h:2821
nvinfer1::LayerType::kSHAPE
Shape layer.
nvinfer1::ScaleMode
ScaleMode
Controls how shift, scale and power are applied in a Scale layer.
Definition: NvInfer.h:2088
nvinfer1::IAlgorithmSelector::selectAlgorithms
virtual int32_t selectAlgorithms(const IAlgorithmContext &context, const IAlgorithm *const *choices, int32_t nbChoices, int32_t *selection)=0
Select Algorithms for a layer from the given list of algorithm choices.
nvinfer1::PaddingMode::kEXPLICIT_ROUND_DOWN
Use explicit padding, rounding output size down.
nvinfer1::TacticSource::kCUBLAS
cuBLAS tactics.
nvinfer1::ITensor::dynamicRangeIsSet
virtual bool dynamicRangeIsSet() const =0
Query whether dynamic range is set.
nvinfer1::ElementWiseOperation::kOR
Logical OR of two elements.
nvinfer1::ILayer::setPrecision
virtual void setPrecision(DataType dataType)=0
Set the computational precision of this layer.
nvinfer1::LayerType::kRESIZE
Resize Layer.
nvinfer1::IBuilder::getEngineCapability
virtual TRT_DEPRECATED EngineCapability getEngineCapability() const =0
Query EngineCapability flow configured for the builder.
nvinfer1::IPoolingLayer::getPaddingMode
virtual PaddingMode getPaddingMode() const =0
Get the padding mode.
nvinfer1::IBuilderConfig::setQuantizationFlag
virtual void setQuantizationFlag(QuantizationFlag flag)=0
Set a single quantization flag.
nvinfer1::IBuilderConfig::getAvgTimingIterations
virtual int32_t getAvgTimingIterations() const =0
Query the number of averaging iterations.
nvinfer1::IConstantLayer::getDimensions
virtual Dims getDimensions() const =0
Get the dimensions for the layer.
nvinfer1::Dims::type
TRT_DEPRECATED DimensionType type[MAX_DIMS]
Definition: NvInferRuntimeCommon.h:233
nvinfer1::ReduceOperation
ReduceOperation
Enumerates the reduce operations that may be performed by a Reduce layer.
Definition: NvInfer.h:3576
nvinfer1::IIteratorLayer
Definition: NvInfer.h:4642
nvinfer1::IDeconvolutionLayer::getPrePadding
virtual Dims getPrePadding() const =0
Get the pre-padding.
nvinfer1::anonymous_namespace{NvInfer.h}::createInferBuilder
IBuilder * createInferBuilder(ILogger &logger)
Create an instance of an IBuilder class.
Definition: NvInfer.h:7482
nvinfer1::IResizeLayer::getAlignCorners
virtual bool getAlignCorners() const =0
True if align corners has been set.
nvinfer1::IBuilderConfig::getFlag
virtual bool getFlag(BuilderFlag builderFlag) const =0
Returns true if the build mode flag is set.
nvinfer1::BuilderFlag
BuilderFlag
List of valid modes that the builder can enable when creating an engine from a network definition.
Definition: NvInfer.h:6426
nvinfer1::IGatherLayer::getNbElementWiseDims
virtual int32_t getNbElementWiseDims() const =0
Get the number of leading dimensions of indices tensor to be handled elementwise.
nvinfer1::INetworkDefinition::setPoolingOutputDimensionsFormula
virtual TRT_DEPRECATED void setPoolingOutputDimensionsFormula(IOutputDimensionsFormula *formula)=0
Set the pooling output dimensions formula.
nvinfer1::IResizeLayer::setAlignCorners
virtual void setAlignCorners(bool alignCorners)=0
Set whether to align corners while resizing.
nvinfer1::IPoolingLayer::setStride
virtual TRT_DEPRECATED void setStride(DimsHW stride)=0
Set the stride for pooling.
nvinfer1::IIteratorLayer::setAxis
virtual void setAxis(int32_t axis) noexcept=0
Set axis to iterate over.
nvinfer1::ILRNLayer::setBeta
virtual void setBeta(float beta)=0
Set the LRN beta value.
nvinfer1::ElementWiseOperation::kPOW
The first element to the power of the second element.
nvinfer1::IScaleLayer::setPower
virtual void setPower(Weights power)=0
Set the power value.
nvinfer1::IAlgorithmContext::getDimensions
virtual Dims getDimensions(int32_t index, OptProfileSelector select) const =0
Get the minimum / optimum / maximum dimensions for input or output tensor.
nvinfer1::IScaleLayer::setScale
virtual void setScale(Weights scale)=0
Set the scale value.
nvinfer1::IInt8MinMaxCalibrator::getAlgorithm
CalibrationAlgoType getAlgorithm() override
Definition: NvInfer.h:6141
nvinfer1::IConstantLayer::getWeights
virtual Weights getWeights() const =0
Get the weights for the layer.
nvinfer1::ITensor::setName
virtual void setName(const char *name)=0
Set the tensor name.
nvinfer1::IScaleLayer::getPower
virtual Weights getPower() const =0
Get the power value.
nvinfer1::IBuilder::getAverageFindIterations
virtual TRT_DEPRECATED int32_t getAverageFindIterations() const =0
Query the number of averaging iterations.
nvinfer1
The TensorRT API version 1 namespace.
nvinfer1::ILayer
Base class for all layer classes in a network definition.
Definition: NvInfer.h:793
nvinfer1::DimsNCHW::h
int32_t & h()
Get the height.
Definition: NvInfer.h:421
nvinfer1::INetworkDefinition::hasImplicitBatchDimension
virtual bool hasImplicitBatchDimension() const =0
Query whether the network was created with an implicit batch dimension.
nvinfer1::EnumMax< MatrixOperation >
constexpr int32_t EnumMax< MatrixOperation >()
Maximum number of elements in MatrixOperation enum.
Definition: NvInfer.h:4176
nvinfer1::IBuilderConfig::setFlag
virtual void setFlag(BuilderFlag builderFlag)=0
Set a single build mode flag.
nvinfer1::IPoolingLayer::getWindowSizeNd
virtual Dims getWindowSizeNd() const =0
Get the multi-dimension window size for pooling.
nvinfer1::INetworkDefinition::addShuffle
virtual IShuffleLayer * addShuffle(ITensor &input)=0
Add a shuffle layer to the network.
nvinfer1::INetworkDefinition::addTopK
virtual ITopKLayer * addTopK(ITensor &input, TopKOperation op, int32_t k, uint32_t reduceAxes)=0
Add a TopK layer to the network.
nvinfer1::IBuilderConfig::getQuantizationFlags
virtual QuantizationFlags getQuantizationFlags() const =0
Get the quantization flags.
nvinfer1::INetworkDefinition::removeTensor
virtual void removeTensor(ITensor &tensor)=0
remove a tensor from the network definition.
nvinfer1::INetworkDefinition::addPlugin
virtual TRT_DEPRECATED IPluginLayer * addPlugin(ITensor *const *inputs, int32_t nbInputs, IPlugin &plugin)=0
Add a plugin layer to the network.
nvinfer1::IBuilderConfig::setMinTimingIterations
virtual void setMinTimingIterations(int32_t minTiming)=0
Set the number of minimization iterations used when timing layers.
nvinfer1::UnaryOperation::kATANH
Inverse hyperbolic tangent.
nvinfer1::ILayer::getPrecision
virtual DataType getPrecision() const =0
get the computational precision of this layer
nvinfer1::UnaryOperation::kEXP
Exponentiation.
nvinfer1::IShuffleLayer::setSecondTranspose
virtual void setSecondTranspose(Permutation permutation)=0
Set the permutation applied by the second transpose operation.
nvinfer1::INetworkDefinition::getLayer
virtual ILayer * getLayer(int32_t index) const =0
Get the layer specified by the given index.
nvinfer1::IBuilderConfig::setMaxWorkspaceSize
virtual void setMaxWorkspaceSize(std::size_t workspaceSize)=0
Set the maximum workspace size.
nvinfer1::UnaryOperation::kATAN
Inverse tangent.
nvinfer1::ILoop
Definition: NvInfer.h:4665
nvinfer1::IPluginV2Layer
Layer type for pluginV2.
Definition: NvInfer.h:3477
nvinfer1::DimsHW::h
int32_t h() const
Get the height.
Definition: NvInfer.h:154
nvinfer1::INetworkDefinition::addActivation
virtual IActivationLayer * addActivation(ITensor &input, ActivationType type)=0
Add an activation layer to the network.
nvinfer1::LayerType::kIDENTITY
Identity layer.
nvinfer1::BuilderFlag::kSTRICT_TYPES
Enables strict type constraints.
nvinfer1::RNNGateType::kOUTPUT
Output gate (o).
nvinfer1::IBuilder::getErrorRecorder
virtual IErrorRecorder * getErrorRecorder() const =0
get the ErrorRecorder assigned to this interface.
nvinfer1::LayerType::kDECONVOLUTION
Deconvolution layer.
nvinfer1::Dims3::Dims3
Dims3(int32_t d0, int32_t d1, int32_t d2)
Construct a Dims3 from 3 elements.
Definition: NvInfer.h:203
nvinfer1::IPoolingLayer::setPoolingType
virtual void setPoolingType(PoolingType type)=0
Set the type of activation to be performed.
nvinfer1::IShuffleLayer::getSecondTranspose
virtual Permutation getSecondTranspose() const =0
Get the permutation applied by the second transpose operation.
nvinfer1::IFullyConnectedLayer::setKernelWeights
virtual void setKernelWeights(Weights weights)=0
Set the kernel weights, given as a KxC matrix in row-major order.
nvinfer1::IElementWiseLayer
A elementwise layer in a network definition.
Definition: NvInfer.h:2664
nvinfer1::RNNDirection::kUNIDIRECTION
Network iterations from first input to last input.
nvinfer1::IScaleLayer::getMode
virtual ScaleMode getMode() const =0
Get the scale mode.
nvinfer1::DimsNCHW::w
int32_t & w()
Get the width.
Definition: NvInfer.h:441
nvinfer1::ILRNLayer::getBeta
virtual float getBeta() const =0
Get the LRN beta value.
nvinfer1::INetworkDefinition::addRNN
virtual TRT_DEPRECATED IRNNLayer * addRNN(ITensor &inputs, int32_t layerCount, std::size_t hiddenSize, int32_t maxSeqLen, RNNOperation op, RNNInputMode mode, RNNDirection dir, Weights weights, Weights bias)=0
Add an layerCount deep RNN layer to the network with a sequence length of maxSeqLen and hiddenSize in...
nvinfer1::UnaryOperation::kACOSH
Inverse hyperbolic cosine.
nvinfer1::ITopKLayer::setK
virtual void setK(int32_t k)=0
Set the k value for the layer.
nvinfer1::TripLimit::kWHILE
Tensor is a scalar of type kBOOL. Loop terminates when value is false.
nvinfer1::RNNGateType
RNNGateType
Identifies an individual gate within an RNN cell.
Definition: NvInfer.h:3221
nvinfer1::LayerType::kSELECT
Select layer.
nvinfer1::IBuilder::setDLACore
virtual TRT_DEPRECATED void setDLACore(int32_t dlaCore)=0
Set the DLA core that the engine must execute on.
nvinfer1::ElementWiseOperation::kEQUAL
Check if two elements are equal.
nvinfer1::IFullyConnectedLayer::getBiasWeights
virtual Weights getBiasWeights() const =0
Get the bias weights.
nvinfer1::IPoolingLayer::setPadding
virtual TRT_DEPRECATED void setPadding(DimsHW padding)=0
Set the padding for pooling.
nvinfer1::IDeconvolutionLayer::getKernelSize
virtual TRT_DEPRECATED DimsHW getKernelSize() const =0
Get the HW kernel size of the deconvolution.
cudaStream_t
struct CUstream_st * cudaStream_t
Forward declaration of cudaStream_t.
Definition: NvInferRuntimeCommon.h:115
nvinfer1::INetworkDefinition::addSoftMax
virtual ISoftMaxLayer * addSoftMax(ITensor &input)=0
Add a SoftMax layer to the network.
nvinfer1::ITensor::setDynamicRange
virtual bool setDynamicRange(float min, float max)=0
Set dynamic range for the tensor.
nvinfer1::IRecurrenceLayer::setInput
void setInput(int32_t index, ITensor &tensor) _TENSORRT_OVERRIDE=0
Append or replace an input of this layer with a specific tensor.
nvinfer1::NetworkDefinitionCreationFlag::kEXPLICIT_PRECISION
Mark the network to be an explicit precision network.
nvinfer1::ILayer::setName
virtual void setName(const char *name)=0
Set the name of a layer.
nvinfer1::IDeconvolutionLayer::getBiasWeights
virtual Weights getBiasWeights() const =0
Get the bias weights for the deconvolution.
nvinfer1::IBuilder::getNbDLACores
virtual int32_t getNbDLACores() const =0
Return the number of DLA engines available to this builder.
nvinfer1::ILayer::getType
virtual LayerType getType() const =0
Return the type of a layer.
nvinfer1::ILayer::getOutputType
virtual DataType getOutputType(int32_t index) const =0
get the output type of this layer
nvinfer1::UnaryOperation
UnaryOperation
Enumerates the unary operations that may be performed by a Unary layer.
Definition: NvInfer.h:3498
nvinfer1::ITensor::getDimensions
virtual Dims getDimensions() const =0
Get the dimensions of a tensor.
nvinfer1::BuilderFlag::kDISABLE_TIMING_CACHE
Disable reuse of timing information across identical layers.
nvinfer1::IBuilderConfig::setCalibrationProfile
virtual bool setCalibrationProfile(const IOptimizationProfile *profile) noexcept=0
Add a calibration profile.
nvinfer1::LoopOutput::kLAST_VALUE
Output value is value of tensor for last iteration.
nvinfer1::MatrixOperation::kNONE
nvinfer1::MatrixOperation::kVECTOR
nvinfer1::IDeconvolutionLayer::setDilationNd
virtual void setDilationNd(Dims dilation)=0
Set the multi-dimension dilation of the deconvolution.
nvinfer1::ILayer::setInput
virtual void setInput(int32_t index, ITensor &tensor)=0
Replace an input of this layer with a specific tensor.
nvinfer1::EnumMax< LayerType >
constexpr int32_t EnumMax< LayerType >()
Maximum number of elements in LayerType enum.
Definition: NvInfer.h:504
nvinfer1::IPoolingLayer::setPostPadding
virtual void setPostPadding(Dims padding)=0
Set the multi-dimension post-padding for pooling.
nvinfer1::IShapeLayer
Layer type for getting shape of a tensor.
Definition: NvInfer.h:4064
nvinfer1::IResizeLayer::setOutputDimensions
virtual void setOutputDimensions(Dims dimensions)=0
Set the output dimensions.
nvinfer1::SliceMode::kWRAP
Coordinates wrap around periodically.
nvinfer1::INetworkDefinition::addParametricReLU
virtual IParametricReLULayer * addParametricReLU(ITensor &input, ITensor &slope) noexcept=0
Add a parametric ReLU layer to the network.
nvinfer1::IConvolutionLayer::setKernelWeights
virtual void setKernelWeights(Weights weights)=0
Set the kernel weights for the convolution.
nvinfer1::IConvolutionLayer::setStrideNd
virtual void setStrideNd(Dims stride)=0
Set the multi-dimension stride of the convolution.
nvinfer1::ILayer::setOutputType
virtual void setOutputType(int32_t index, DataType dataType)=0
Set the output type of this layer.
nvinfer1::IBuilderConfig::getInt8Calibrator
virtual IInt8Calibrator * getInt8Calibrator() const =0
Get Int8 Calibration interface.
_TENSORRT_OVERRIDE
#define _TENSORRT_OVERRIDE
Items that are marked as deprecated will be removed in a future release.
Definition: NvInferRuntimeCommon.h:62
nvinfer1::NetworkDefinitionCreationFlag
NetworkDefinitionCreationFlag
List of immutable network properties expressed at network creation time. NetworkDefinitionCreationFla...
Definition: NvInfer.h:6933
nvinfer1::IDeconvolutionLayer::setKernelSize
virtual TRT_DEPRECATED void setKernelSize(DimsHW kernelSize)=0
Set the HW kernel size of the convolution.
nvinfer1::RNNGateType::kINPUT
Input gate (i).
nvinfer1::IBuilderConfig::setDefaultDeviceType
virtual void setDefaultDeviceType(DeviceType deviceType)=0
Sets the default DeviceType to be used by the builder. It ensures that all the layers that can run on...
nvinfer1::IFillLayer::setDimensions
virtual void setDimensions(Dims dimensions) noexcept=0
Set the output tensor's dimensions.
nvinfer1::IInt8EntropyCalibrator::getAlgorithm
CalibrationAlgoType getAlgorithm() override
Definition: NvInfer.h:6111
nvinfer1::ResizeMode::kNEAREST
ND (0 < N <= 8) nearest neighbor resizing.
nvinfer1::IPaddingLayer::getPrePadding
virtual TRT_DEPRECATED DimsHW getPrePadding() const =0
Get the padding that is applied at the start of the tensor.
nvinfer1::ITensor::getName
virtual const char * getName() const =0
Get the tensor name.
nvinfer1::FillOperation::kLINSPACE
Generate evenly spaced numbers over a specified interval.
nvinfer1::UnaryOperation::kCOSH
Hyperbolic cosine.
nvinfer1::IInt8LegacyCalibrator::getAlgorithm
CalibrationAlgoType getAlgorithm() override
Definition: NvInfer.h:6156
nvinfer1::Dims4::Dims4
Dims4(int32_t d0, int32_t d1, int32_t d2, int32_t d3)
Construct a Dims4 from 4 elements.
Definition: NvInfer.h:330
nvinfer1::PaddingMode
PaddingMode
Enumerates the modes of padding to perform in convolution, deconvolution and pooling layer,...
Definition: NvInfer.h:1190
nvinfer1::IShuffleLayer::getFirstTranspose
virtual Permutation getFirstTranspose() const =0
Get the permutation applied by the first transpose operation.
nvinfer1::ILayer::outputTypeIsSet
virtual bool outputTypeIsSet(int32_t index) const =0
whether the output type has been set for this layer
nvinfer1::IBuilder::setRefittable
virtual TRT_DEPRECATED void setRefittable(bool canRefit)=0
nvinfer1::EnumMax< TopKOperation >
constexpr int32_t EnumMax< TopKOperation >()
Maximum number of elements in TopKOperation enum.
Definition: NvInfer.h:4083
nvinfer1::INetworkDefinition::addMatrixMultiply
virtual IMatrixMultiplyLayer * addMatrixMultiply(ITensor &input0, MatrixOperation op0, ITensor &input1, MatrixOperation op1)=0
Add a MatrixMultiply layer to the network.
nvinfer1::IBuilderConfig::destroy
virtual void destroy()=0
De-allocates any internally allocated memory.
nvinfer1::INetworkDefinition::addReduce
virtual IReduceLayer * addReduce(ITensor &input, ReduceOperation operation, uint32_t reduceAxes, bool keepDimensions)=0
Add a reduce layer to the network.
nvinfer1::IConvolutionLayer::setNbGroups
virtual void setNbGroups(int32_t nbGroups)=0
Set the number of groups for a convolution.
nvinfer1::IShuffleLayer::setReshapeDimensions
virtual void setReshapeDimensions(Dims dimensions)=0
Set the reshaped dimensions.
nvinfer1::RNNInputMode::kLINEAR
Perform the normal matrix multiplication in the first recurrent layer.
nvinfer1::IActivationLayer::setBeta
virtual void setBeta(float beta)=0
Set the beta parameter (must be finite).
nvinfer1::IBuilder::getMaxWorkspaceSize
virtual TRT_DEPRECATED std::size_t getMaxWorkspaceSize() const =0
Get the maximum workspace size.
nvinfer1::IConstantLayer::setDimensions
virtual void setDimensions(Dims dimensions)=0
Set the dimensions for the layer.
nvinfer1::IReduceLayer::setKeepDimensions
virtual void setKeepDimensions(bool keepDimensions)=0
Set the boolean that specifies whether or not to keep the reduced dimensions for the layer.
nvinfer1::IDeconvolutionLayer::getPaddingMode
virtual PaddingMode getPaddingMode() const =0
Get the padding mode.
nvinfer1::DimsCHW::c
int32_t c() const
Get the channel count.
Definition: NvInfer.h:260
nvinfer1::IDeconvolutionLayer::getDilationNd
virtual Dims getDilationNd() const =0
Get the multi-dimension dilation of the deconvolution.
nvinfer1::INetworkDefinition::addPluginV2
virtual IPluginV2Layer * addPluginV2(ITensor *const *inputs, int32_t nbInputs, IPluginV2 &plugin)=0
Add a plugin layer to the network using the IPluginV2 interface.
nvinfer1::IPluginExt
Plugin class for user-implemented layers.
Definition: NvInferRuntime.h:256
nvinfer1::MatrixOperation
MatrixOperation
Enumerates the operations that may be performed on a tensor by IMatrixMultiplyLayer before multiplica...
Definition: NvInfer.h:4152
nvinfer1::IBuilder::getHalf2Mode
virtual TRT_DEPRECATED bool getHalf2Mode() const =0
Query whether half2 mode is used.
nvinfer1::EnumMax< NetworkDefinitionCreationFlag >
constexpr int32_t EnumMax< NetworkDefinitionCreationFlag >()
Maximum number of elements in NetworkDefinitionCreationFlag enum.
Definition: NvInfer.h:6958
nvinfer1::IPoolingLayer::getPrePadding
virtual Dims getPrePadding() const =0
Get the pre-padding.
nvinfer1::IOptimizationProfile
Optimization profile for dynamic input dimensions and shape tensors.
Definition: NvInferRuntime.h:1067
nvinfer1::INetworkDefinition::getConvolutionOutputDimensionsFormula
virtual TRT_DEPRECATED IOutputDimensionsFormula & getConvolutionOutputDimensionsFormula() const =0
Get the convolution output dimensions formula.
nvinfer1::PoolingType
PoolingType
The type of pooling to perform in a pooling layer.
Definition: NvInfer.h:1726
nvinfer1::IPoolingLayer::setPaddingNd
virtual void setPaddingNd(Dims padding)=0
Set the multi-dimension padding for pooling.
nvinfer1::IFullyConnectedLayer::getNbOutputChannels
virtual int32_t getNbOutputChannels() const =0
Get the number of output channels K from the fully connected layer.
nvinfer1::IFullyConnectedLayer::getKernelWeights
virtual Weights getKernelWeights() const =0
Get the kernel weights.
nvinfer1::ILayer::getNbOutputs
virtual int32_t getNbOutputs() const =0
Get the number of outputs of a layer.
nvinfer1::LayerType::kSLICE
Slice layer.
nvinfer1::IBuilder::createOptimizationProfile
virtual nvinfer1::IOptimizationProfile * createOptimizationProfile() noexcept=0
Create a new optimization profile.
nvinfer1::ElementWiseOperation::kSUM
Sum of the two elements.
nvinfer1::LoopOutput::kCONCATENATE
Output value is concatenation of values of tensor for each iteration, in forward order.
nvinfer1::IBuilder::getDebugSync
virtual TRT_DEPRECATED bool getDebugSync() const =0
Query whether the builder will use debug synchronization.
nvinfer1::TacticSources
uint32_t TacticSources
Represents a collection of one or more TacticSource values combine using bitwise-OR operations.
Definition: NvInfer.h:6499
nvinfer1::DimsNCHW::w
int32_t w() const
Get the width.
Definition: NvInfer.h:451
nvinfer1::DataType
DataType
The type of weights and tensors.
Definition: NvInferRuntimeCommon.h:169
nvinfer1::IScaleLayer::getShift
virtual Weights getShift() const =0
Get the shift value.
nvinfer1::DimsNCHW
Descriptor for data with one index dimension, one channel dimension and two spatial dimensions.
Definition: NvInfer.h:346
nvinfer1::IBuilderConfig::getMaxWorkspaceSize
virtual std::size_t getMaxWorkspaceSize() const =0
Get the maximum workspace size.
nvinfer1::IConcatenationLayer
A concatenation layer in a network definition.
Definition: NvInfer.h:2268
nvinfer1::LayerType::kSOFTMAX
SoftMax layer.
nvinfer1::IShuffleLayer
Layer type for shuffling data.
Definition: NvInfer.h:3769
nvinfer1::ISliceLayer::getStart
virtual Dims getStart() const =0
Get the start offset for the slice layer.
nvinfer1::IPoolingLayer::setStrideNd
virtual void setStrideNd(Dims stride)=0
Set the multi-dimension stride for pooling.
nvinfer1::IBuilder::destroy
virtual void destroy()=0
Destroy this object.
nvinfer1::Dims2::Dims2
Dims2(int32_t d0, int32_t d1)
Construct a Dims2 from 2 elements.
Definition: NvInfer.h:103
nvinfer1::RNNOperation
RNNOperation
Enumerates the RNN operations that may be performed by an RNN layer.
Definition: NvInfer.h:2811
nvinfer1::ITensor
A tensor in a network definition.
Definition: NvInfer.h:522
nvinfer1::IBuilder::setAverageFindIterations
virtual TRT_DEPRECATED void setAverageFindIterations(int32_t avgFind)=0
Set the number of averaging iterations used when timing layers.
nvinfer1::IPoolingLayer::setPaddingMode
virtual void setPaddingMode(PaddingMode paddingMode)=0
Set the padding mode.
nvinfer1::IFillLayer::setInput
void setInput(int32_t index, ITensor &tensor) _TENSORRT_OVERRIDE=0
replace an input of this layer with a specific tensor.
nvinfer1::IBuilder::createNetworkV2
virtual nvinfer1::INetworkDefinition * createNetworkV2(NetworkDefinitionCreationFlags flags)=0
Create a network definition object.
nvinfer1::IRecurrenceLayer
Definition: NvInfer.h:4550
nvinfer1::IBuilder::isDeviceTypeSet
virtual TRT_DEPRECATED bool isDeviceTypeSet(const ILayer *layer) const =0
whether the DeviceType has been explicitly set for this layer
nvinfer1::IPoolingLayer::setBlendFactor
virtual void setBlendFactor(float blendFactor)=0
Set the blending factor for the max_average_blend mode: max_average_blendPool = (1-blendFactor)*maxPo...
nvinfer1::ILoop::setName
virtual void setName(const char *name) noexcept=0
Set the name of the loop.
nvinfer1::LayerType::kTRIP_LIMIT
Loop Trip limit layer.
nvinfer1::IBuilderConfig::reset
virtual void reset()=0
Resets the builder configuration to defaults.
nvinfer1::ElementWiseOperation::kFLOOR_DIV
Floor division of the first element by the second.
nvinfer1::IConvolutionLayer::getKernelSizeNd
virtual Dims getKernelSizeNd() const =0
Get the multi-dimension kernel size of the convolution.
nvinfer1::LayerType
LayerType
The type values of layer classes.
Definition: NvInfer.h:464
nvinfer1::IAlgorithmIOInfo::getTensorFormat
virtual TensorFormat getTensorFormat() const =0
Return TensorFormat of the input/output of algorithm.
nvinfer1::IIteratorLayer::setReverse
virtual void setReverse(bool reverse) noexcept=0
nvinfer1::UnaryOperation::kTAN
Tangent.
nvinfer1::BuilderFlag::kTF32
nvinfer1::EnumMax< RNNGateType >
constexpr int32_t EnumMax< RNNGateType >()
Maximum number of elements in RNNGateType enum.
Definition: NvInfer.h:3234
nvinfer1::IDeconvolutionLayer::setBiasWeights
virtual void setBiasWeights(Weights weights)=0
Set the bias weights for the deconvolution.
nvinfer1::ILoopBoundaryLayer::getLoop
virtual ILoop * getLoop() const noexcept=0
Return pointer to ILoop associated with this boundary layer.
nvinfer1::ITopKLayer::setOperation
virtual void setOperation(TopKOperation op)=0
Set the operation for the layer.
nvinfer1::Dims::MAX_DIMS
static const int32_t MAX_DIMS
The maximum number of dimensions supported for a tensor.
Definition: NvInferRuntimeCommon.h:230
nvinfer1::ScaleMode::kUNIFORM
Identical coefficients across all elements of the tensor.
nvinfer1::ILRNLayer
A LRN layer in a network definition.
Definition: NvInfer.h:2013
nvinfer1::RNNDirection
RNNDirection
Enumerates the RNN direction that may be performed by an RNN layer.
Definition: NvInfer.h:2833
nvinfer1::DimsHW::h
int32_t & h()
Get the height.
Definition: NvInfer.h:144
nvinfer1::ITensor::getType
virtual DataType getType() const =0
Get the data type of a tensor.
nvinfer1::RNNOperation::kLSTM
Four-gate LSTM network w/o peephole connections.
nvinfer1::ElementWiseOperation::kGREATER
Check if element in first tensor is greater than corresponding element in second tensor.
nvinfer1::IShuffleLayer::getZeroIsPlaceholder
virtual bool getZeroIsPlaceholder() const =0
Get meaning of 0 in reshape dimensions.
nvinfer1::TripLimit
TripLimit
Enum that describes kinds of trip limits.
Definition: NvInfer.h:4527
nvinfer1::IReduceLayer
Layer that represents a reduction operator across Shape, Int32, Float, and Half tensors.
Definition: NvInfer.h:3599
nvinfer1::DimsNCHW::DimsNCHW
DimsNCHW(int32_t batchSize, int32_t channels, int32_t height, int32_t width)
Construct a DimsNCHW given batch size, channel count, height and width.
Definition: NvInfer.h:368
nvinfer1::IMatrixMultiplyLayer
Layer that represents a Matrix Multiplication.
Definition: NvInfer.h:4206
nvinfer1::IBuilderConfig::setDeviceType
virtual void setDeviceType(const ILayer *layer, DeviceType deviceType)=0
Set the device that this layer must execute on.
nvinfer1::IBuilderConfig::getDLACore
virtual int32_t getDLACore() const =0
Get the DLA core that the engine executes on.
nvinfer1::INetworkDefinition::getName
virtual const char * getName() const =0
Returns the name associated with the network.
nvinfer1::ElementWiseOperation::kXOR
Logical XOR of two elements.
nvinfer1::ElementWiseOperation::kSUB
Substract the second element from the first.
nvinfer1::EnumMax< BuilderFlag >
constexpr int32_t EnumMax< BuilderFlag >()
Maximum number of builder flags in BuilderFlag enum.
Definition: NvInfer.h:6444
nvinfer1::DimsHW::w
int32_t & w()
Get the width.
Definition: NvInfer.h:164
nvinfer1::FillOperation
FillOperation
Enumerates the tensor fill operations that may performed by a fill layer.
Definition: NvInfer.h:4751
nvinfer1::IBuilderConfig::setDLACore
virtual void setDLACore(int32_t dlaCore)=0
Sets the DLA core used by the network.
nvinfer1::IBuilder::createBuilderConfig
virtual nvinfer1::IBuilderConfig * createBuilderConfig()=0
Create a builder configuration object.
nvinfer1::INetworkDefinition::addIdentity
virtual IIdentityLayer * addIdentity(ITensor &input)=0
Add an identity layer.
nvinfer1::INetworkDefinition::addRaggedSoftMax
virtual IRaggedSoftMaxLayer * addRaggedSoftMax(ITensor &input, ITensor &bounds)=0
Add a RaggedSoftMax layer to the network.
nvinfer1::IInt8EntropyCalibrator2
Definition: NvInfer.h:6120
nvinfer1::LayerType::kITERATOR
Loop Iterator layer.
nvinfer1::IDeconvolutionLayer::setKernelSizeNd
virtual void setKernelSizeNd(Dims kernelSize)=0
Set the multi-dimension kernel size of the deconvolution.
nvinfer1::IFillLayer
Generate an output tensor with specified mode.
Definition: NvInfer.h:4782
nvinfer1::IConvolutionLayer::setPostPadding
virtual void setPostPadding(Dims padding)=0
Set the multi-dimension post-padding of the convolution.
nvinfer1::EnumMax< ResizeMode >
constexpr int32_t EnumMax< ResizeMode >()
Maximum number of elements in ResizeMode enum.
Definition: NvInfer.h:4359
nvinfer1::INetworkDefinition::addLRN
virtual ILRNLayer * addLRN(ITensor &input, int32_t window, float alpha, float beta, float k)=0
Add a LRN layer to the network.
nvinfer1::Dims3
Descriptor for three-dimensional data.
Definition: NvInfer.h:184
nvinfer1::LayerType::kCONSTANT
Constant layer.
nvinfer1::IInt8Calibrator::readCalibrationCache
virtual const void * readCalibrationCache(std::size_t &length)=0
Load a calibration cache.
nvinfer1::QuantizationFlag
QuantizationFlag
List of valid flags for quantizing the network to int8.
Definition: NvInfer.h:6396
nvinfer1::IDeconvolutionLayer::setPostPadding
virtual void setPostPadding(Dims padding)=0
Set the multi-dimension post-padding of the deconvolution.
nvinfer1::ITensor::getBroadcastAcrossBatch
virtual bool getBroadcastAcrossBatch() const =0
Check if tensor is broadcast across the batch.
nvinfer1::IInt8EntropyCalibrator2::getAlgorithm
CalibrationAlgoType getAlgorithm() override
Definition: NvInfer.h:6126
nvinfer1::IInt8Calibrator
Application-implemented interface for calibration.
Definition: NvInfer.h:6040
nvinfer1::IErrorRecorder
Reference counted application-implemented error reporting interface for TensorRT objects.
Definition: NvInferRuntimeCommon.h:1266
nvinfer1::IConvolutionLayer::setStride
virtual TRT_DEPRECATED void setStride(DimsHW stride)=0
Get the stride of the convolution.
nvinfer1::IActivationLayer::setAlpha
virtual void setAlpha(float alpha)=0
Set the alpha parameter (must be finite).
nvinfer1::ISliceLayer::setInput
void setInput(int32_t index, ITensor &tensor) _TENSORRT_OVERRIDE=0
Append or replace an input of this layer with a specific tensor.
nvinfer1::LayerType::kRECURRENCE
Loop Recurrence layer.
nvinfer1::INetworkDefinition::getNbLayers
virtual int32_t getNbLayers() const =0
Get the number of layers in the network.
nvinfer1::ITopKLayer
Layer that represents a TopK reduction.
Definition: NvInfer.h:4095
nvinfer1::ITensor::setAllowedFormats
virtual void setAllowedFormats(TensorFormats formats)=0
Set allowed formats for this tensor. By default all formats are allowed. Shape tensors (for which isS...
nvinfer1::IBuilderConfig::getDefaultDeviceType
virtual DeviceType getDefaultDeviceType() const =0
Get the default DeviceType which was set by setDefaultDeviceType.
nvinfer1::IBuilder::getDefaultDeviceType
virtual TRT_DEPRECATED DeviceType getDefaultDeviceType() const =0
Get the default DeviceType which was set by setDefaultDeviceType.
nvinfer1::OptProfileSelector
OptProfileSelector
When setting or querying optimization profile parameters (such as shape tensor inputs or dynamic dime...
Definition: NvInferRuntime.h:1031
nvinfer1::INetworkDefinition::addFullyConnected
virtual IFullyConnectedLayer * addFullyConnected(ITensor &input, int32_t nbOutputs, Weights kernelWeights, Weights biasWeights)=0
Add a fully connected layer to the network.
nvinfer1::IBuilderConfig::setQuantizationFlags
virtual void setQuantizationFlags(QuantizationFlags flags)=0
Set the quantization flags.
nvinfer1::IConvolutionLayer::getStride
virtual TRT_DEPRECATED DimsHW getStride() const =0
Get the stride of the convolution.
nvinfer1::PaddingMode::kCAFFE_ROUND_UP
Use CAFFE padding, rounding output size up, uses prePadding value.
nvinfer1::ISelectLayer
Definition: NvInfer.h:4738
nvinfer1::EnumMax< RNNDirection >
constexpr int32_t EnumMax< RNNDirection >()
Maximum number of elements in RNNDirection enum.
Definition: NvInfer.h:2841
nvinfer1::IConstantLayer::setWeights
virtual void setWeights(Weights weights)=0
Set the weights for the layer.
nvinfer1::IInt8Calibrator::getAlgorithm
virtual CalibrationAlgoType getAlgorithm()=0
Get the algorithm used by this calibrator.
nvinfer1::IMatrixMultiplyLayer::setTranspose
virtual TRT_DEPRECATED void setTranspose(int32_t index, bool val)=0
Set the transpose flag for an input tensor.
nvinfer1::INetworkDefinition::destroy
virtual void destroy()=0
Destroy this INetworkDefinition object.
nvinfer1::LayerType::kREDUCE
Reduce layer.
nvinfer1::IInt8EntropyCalibrator
Definition: NvInfer.h:6105
nvinfer1::ILRNLayer::getK
virtual float getK() const =0
Get the LRN K value.
nvinfer1::ITopKLayer::setReduceAxes
virtual void setReduceAxes(uint32_t reduceAxes)=0
Set which axes to reduce for the layer.
nvinfer1::IElementWiseLayer::setOperation
virtual void setOperation(ElementWiseOperation op)=0
Set the binary operation for the layer.
nvinfer1::IGatherLayer
Definition: NvInfer.h:2694
nvinfer1::IConvolutionLayer::getNbGroups
virtual int32_t getNbGroups() const =0
Get the number of groups of the convolution.
nvinfer1::UnaryOperation::kSIN
Sine.
nvinfer1::IPoolingLayer::getPoolingType
virtual PoolingType getPoolingType() const =0
Get the type of activation to be performed.
nvinfer1::EnumMax< TripLimit >
constexpr int32_t EnumMax< TripLimit >()
Maximum number of elements in TripLimit enum.
Definition: NvInfer.h:4536
nvinfer1::IActivationLayer::getActivationType
virtual ActivationType getActivationType() const =0
Get the type of activation to be performed.
nvinfer1::Dims2
Descriptor for two-dimensional data.
Definition: NvInfer.h:85
nvinfer1::IInt8LegacyCalibrator::getRegressionCutoff
virtual double getRegressionCutoff() const =0
The fraction (between 0 and 1) of the maximum used to define the regression cutoff when using regress...
nvinfer1::IBuilder::getDLACore
virtual TRT_DEPRECATED int32_t getDLACore() const =0
Get the DLA core that the engine executes on.
nvinfer1::IScaleLayer::setMode
virtual void setMode(ScaleMode mode)=0
Set the scale mode.
nvinfer1::IConvolutionLayer::getKernelSize
virtual TRT_DEPRECATED DimsHW getKernelSize() const =0
Get the HW kernel size of the convolution.
nvinfer1::IAlgorithmContext::getNbOutputs
virtual int32_t getNbOutputs() const =0
Return number of outputs of the algorithm.
nvinfer1::TacticSource::kCUBLAS_LT
cuBLAS LT tactics
nvinfer1::INetworkDefinition::addPooling
virtual TRT_DEPRECATED IPoolingLayer * addPooling(ITensor &input, PoolingType type, DimsHW windowSize)=0
Add a pooling layer to the network.
nvinfer1::IDeconvolutionLayer::getKernelSizeNd
virtual Dims getKernelSizeNd() const =0
Get the multi-dimension kernel size of the deconvolution.
nvinfer1::IBuilderConfig::canRunOnDLA
virtual bool canRunOnDLA(const ILayer *layer) const =0
Checks if a layer can run on DLA.
nvinfer1::IAlgorithmIOInfo::getStrides
virtual Dims getStrides() const =0
Return strides of the input/output tensor of algorithm.
nvinfer1::IGatherLayer::setNbElementWiseDims
virtual void setNbElementWiseDims(int32_t k)=0
Set the number of leading dimensions of indices tensor to be handled elementwise. k must be 0 if ther...
nvinfer1::LayerType::kCONVOLUTION
Convolution layer.
nvinfer1::BuilderFlags
uint32_t BuilderFlags
Represents a collection of one or more QuantizationFlag values using binary OR operations,...
Definition: NvInfer.h:6417
nvinfer1::IResizeLayer::getOutputDimensions
virtual Dims getOutputDimensions() const =0
Get the output dimensions.
nvinfer1::IPaddingLayer::setPostPaddingNd
virtual void setPostPaddingNd(Dims padding)=0
Set the padding that is applied at the end of the tensor.
nvinfer1::ElementWiseOperation::kPROD
Product of the two elements.
nvinfer1::IReduceLayer::getOperation
virtual ReduceOperation getOperation() const =0
Get the reduce operation for the layer.
nvinfer1::EnumMax< LoopOutput >
constexpr int32_t EnumMax< LoopOutput >()
Maximum number of elements in LoopOutput enum.
Definition: NvInfer.h:4521
nvinfer1::IBuilderConfig::getCalibrationProfile
virtual const IOptimizationProfile * getCalibrationProfile() noexcept=0
Get the current calibration profile.
nvinfer1::INetworkDefinition::getInput
virtual ITensor * getInput(int32_t index) const =0
Get the input tensor specified by the given index.
nvinfer1::ILoopBoundaryLayer
Definition: NvInfer.h:4543
nvinfer1::UnaryOperation::kERF
Gauss error function.
nvinfer1::EngineCapability
EngineCapability
Forward declaration of IPluginFactory for use by other interfaces.
Definition: NvInferRuntime.h:82
nvinfer1::IAlgorithm
Describes a variation of execution of a layer. An algorithm is represented by IAlgorithmVariant and t...
Definition: NvInfer.h:6309
nvinfer1::IAlgorithmVariant::getTactic
virtual int64_t getTactic() const =0
Return tactic of the algorithm.
nvinfer1::UnaryOperation::kLOG
Log (base e).
nvinfer1::IPoolingLayer::getBlendFactor
virtual float getBlendFactor() const =0
Get the blending factor for the max_average_blend mode: max_average_blendPool = (1-blendFactor)*maxPo...
nvinfer1::LayerType::kLRN
LRN layer.
nvinfer1::IConvolutionLayer::setPaddingNd
virtual void setPaddingNd(Dims padding)=0
Set the multi-dimension padding of the convolution.
nvinfer1::EnumMax< UnaryOperation >
constexpr int32_t EnumMax< UnaryOperation >()
Maximum number of elements in UnaryOperation enum.
Definition: NvInfer.h:3525
nvinfer1::IPaddingLayer::setPrePaddingNd
virtual void setPrePaddingNd(Dims padding)=0
Set the padding that is applied at the start of the tensor.
nvinfer1::ILoopOutputLayer::setInput
void setInput(int32_t index, ITensor &tensor) _TENSORRT_OVERRIDE=0
Append or replace an input of this layer with a specific tensor.
nvinfer1::EnumMax< RNNInputMode >
constexpr int32_t EnumMax< RNNInputMode >()
Maximum number of elements in RNNInputMode enum.
Definition: NvInfer.h:2869
nvinfer1::IAlgorithmContext::getName
virtual const char * getName() const =0
Return name of the algorithm node. This is a unique identifier for the IAlgorithmContext.
nvinfer1::IGatherLayer::getGatherAxis
virtual int32_t getGatherAxis() const =0
Get the axis to gather on.
nvinfer1::INetworkDefinition::getDeconvolutionOutputDimensionsFormula
virtual TRT_DEPRECATED IOutputDimensionsFormula & getDeconvolutionOutputDimensionsFormula() const =0
Get the deconvolution output dimensions formula.
nvinfer1::IConvolutionLayer::getKernelWeights
virtual Weights getKernelWeights() const =0
Get the kernel weights of the convolution.
nvinfer1::IDeconvolutionLayer::setNbOutputMaps
virtual void setNbOutputMaps(int32_t nbOutputMaps)=0
Set the number of output feature maps for the deconvolution.
nvinfer1::RNNGateType::kHIDDEN
Hidden gate (h).
nvinfer1::IBuilder::getMaxDLABatchSize
virtual int32_t getMaxDLABatchSize() const =0
Get the maximum batch size DLA can support. For any tensor the total volume of index dimensions combi...
nvinfer1::INetworkDefinition::getNbOutputs
virtual int32_t getNbOutputs() const =0
Get the number of outputs in the network.
nvinfer1::IAlgorithmIOInfo::getDataType
virtual DataType getDataType() const =0
Return DataType of the input/output of algorithm.
nvinfer1::IResizeLayer::setResizeMode
virtual void setResizeMode(ResizeMode resizeMode)=0
Set resize mode for an input tensor.
nvinfer1::LayerType::kUNARY
UnaryOp operation Layer.
nvinfer1::IInt8LegacyCalibrator
Definition: NvInfer.h:6150
nvinfer1::UnaryOperation::kNEG
Negation.
nvinfer1::EnumMax< TacticSource >
constexpr int32_t EnumMax< TacticSource >()
Maximum number of tactic sources in TacticSource enum.
Definition: NvInfer.h:6488
nvinfer1::ElementWiseOperation::kLESS
Check if element in first tensor is less than corresponding element in second tensor.
nvinfer1::ISoftMaxLayer::setAxes
virtual void setAxes(uint32_t axes)=0
Set the axis along which softmax is computed. Currently, only one axis can be set.
nvinfer1::DimsCHW::w
int32_t & w()
Get the width.
Definition: NvInfer.h:290
nvinfer1::INetworkDefinition::addGather
virtual IGatherLayer * addGather(ITensor &data, ITensor &indices, int32_t axis)=0
Add a gather layer to the network.
nvinfer1::DimsCHW::DimsCHW
DimsCHW(int32_t channels, int32_t height, int32_t width)
Construct a DimsCHW given channel count, height and width.
Definition: NvInfer.h:238
nvinfer1::UnaryOperation::kACOS
Inverse cosine.
nvinfer1::UnaryOperation::kCOS
Cosine.
nvinfer1::ILRNLayer::getAlpha
virtual float getAlpha() const =0
Get the LRN alpha value.
nvinfer1::IDeconvolutionLayer::getStrideNd
virtual Dims getStrideNd() const =0
Get the multi-dimension stride of the deconvolution.
nvinfer1::IScaleLayer
A Scale layer in a network definition.
Definition: NvInfer.h:2124
nvinfer1::IBuilder::allowGPUFallback
virtual TRT_DEPRECATED void allowGPUFallback(bool setFallBackMode)=0
Sets the builder to use GPU if a layer that was supposed to run on DLA can not run on DLA.
nvinfer1::ISoftMaxLayer::getAxes
virtual uint32_t getAxes() const =0
Get the axis along which softmax occurs.
nvinfer1::RNNOperation::kGRU
Three-gate network consisting of Gated Recurrent Units.
nvinfer1::UnaryOperation::kNOT
Logical NOT.
nvinfer1::ISoftMaxLayer
A Softmax layer in a network definition.
Definition: NvInfer.h:2213
nvinfer1::IBuilderConfig::setFlags
virtual void setFlags(BuilderFlags builderFlags)=0
Set the build mode flags to turn on builder options for this network.
nvinfer1::TripLimit::kCOUNT
Tensor is scalar of type kINT32 that contains the trip count.
nvinfer1::IDeconvolutionLayer::setPaddingNd
virtual void setPaddingNd(Dims padding)=0
Set the multi-dimension padding of the deconvolution.
nvinfer1::INetworkDefinition::unmarkOutput
virtual void unmarkOutput(ITensor &tensor)=0
unmark a tensor as a network output.
nvinfer1::IBuilderConfig
Holds properties for configuring a builder to produce an engine.
Definition: NvInfer.h:6506
nvinfer1::ILayer::resetPrecision
virtual void resetPrecision()=0
reset the computational precision for this layer
nvinfer1::EnumMax< SliceMode >
constexpr int32_t EnumMax< SliceMode >()
Maximum number of elements in SliceMode enum.
Definition: NvInfer.h:3909
nvinfer1::IConvolutionLayer::getNbOutputMaps
virtual int32_t getNbOutputMaps() const =0
Get the number of output maps for the convolution.
nvinfer1::IBuilder::setMaxBatchSize
virtual void setMaxBatchSize(int32_t batchSize)=0
Set the maximum batch size.
nvinfer1::IMatrixMultiplyLayer::getOperation
virtual MatrixOperation getOperation(int32_t index) const =0
Get the operation for an input tensor.
nvinfer1::IDeconvolutionLayer::setStrideNd
virtual void setStrideNd(Dims stride)=0
Set the multi-dimension stride of the deconvolution.
nvinfer1::IBuilderConfig::getAlgorithmSelector
virtual IAlgorithmSelector * getAlgorithmSelector() const =0
Get Algorithm Selector.
nvinfer1::IBuilder::setDebugSync
virtual TRT_DEPRECATED void setDebugSync(bool sync)=0
Set whether the builder should use debug synchronization.
nvinfer1::IFillLayer::getAlpha
virtual double getAlpha() const noexcept=0
Get the value of alpha parameter.
nvinfer1::IScaleLayer::setShift
virtual void setShift(Weights shift)=0
Set the shift value.
nvinfer1::DimsNCHW::h
int32_t h() const
Get the height.
Definition: NvInfer.h:431
nvinfer1::IAlgorithmContext::getNbInputs
virtual int32_t getNbInputs() const =0
Return number of inputs of the algorithm.
nvinfer1::RNNOperation::kTANH
Single gate RNN w/ TANH activation function.
nvinfer1::IResizeLayer
A resize layer in a network definition.
Definition: NvInfer.h:4384
nvinfer1::DimsHW::DimsHW
DimsHW()
Construct an empty DimsHW object.
Definition: NvInfer.h:121
nvinfer1::IPlugin
Plugin class for user-implemented layers.
Definition: NvInferRuntime.h:146
nvinfer1::ISliceLayer::setStart
virtual void setStart(Dims start)=0
Set the start offset that the slice layer uses to create the output slice.
nvinfer1::LayerType::kELEMENTWISE
Elementwise layer.
nvinfer1::INetworkDefinition::setDeconvolutionOutputDimensionsFormula
virtual TRT_DEPRECATED void setDeconvolutionOutputDimensionsFormula(IOutputDimensionsFormula *formula)=0
Set the deconvolution output dimensions formula.
nvinfer1::ILayer::resetOutputType
virtual void resetOutputType(int32_t index)=0
reset the output type for this layer
nvinfer1::IUnaryLayer::getOperation
virtual UnaryOperation getOperation() const =0
Get the unary operation for the layer.
nvinfer1::IBuilderConfig::getFlags
virtual BuilderFlags getFlags() const =0
Get the build mode flags for this builder config. Defaults to 0.
nvinfer1::LayerType::kSHUFFLE
Shuffle layer.
nvinfer1::BuilderFlag::kDEBUG
Enable debugging of layers via synchronizing after every layer.
nvinfer1::IPoolingLayer::getStrideNd
virtual Dims getStrideNd() const =0
Get the multi-dimension stride for pooling.
nvinfer1::IPoolingLayer::getPaddingNd
virtual Dims getPaddingNd() const =0
Get the multi-dimension padding for pooling.
nvinfer1::Dims4
Descriptor for four-dimensional data.
Definition: NvInfer.h:310
nvinfer1::IPoolingLayer
A Pooling layer in a network definition.
Definition: NvInfer.h:1751
nvinfer1::IBuilderConfig::setAlgorithmSelector
virtual void setAlgorithmSelector(IAlgorithmSelector *selector)=0
Set Algorithm Selector.
nvinfer1::IShuffleLayer::getReshapeDimensions
virtual Dims getReshapeDimensions() const =0
Get the reshaped dimensions.
nvinfer1::IAlgorithm::getWorkspaceSize
virtual std::size_t getWorkspaceSize() const =0
The size of the GPU temporary memory in bytes which the algorithm uses at execution time.
nvinfer1::ILRNLayer::setWindowSize
virtual void setWindowSize(int32_t windowSize)=0
Set the LRN window size.
nvinfer1::IGpuAllocator
Application-implemented class for controlling allocation on the GPU.
Definition: NvInferRuntimeCommon.h:1066
nvinfer1::IUnaryLayer
Layer that represents an unary operation.
Definition: NvInfer.h:3537
nvinfer1::DimsCHW::w
int32_t w() const
Get the width.
Definition: NvInfer.h:300
nvinfer1::ITopKLayer::getK
virtual int32_t getK() const =0
Get the k value for the layer.
nvinfer1::IFillLayer::setAlpha
virtual void setAlpha(double alpha) noexcept=0
Set the alpha parameter.
nvinfer1::IResizeLayer::getResizeMode
virtual ResizeMode getResizeMode() const =0
Get resize mode for an input tensor.
nvinfer1::IBuilder::setFp16Mode
virtual TRT_DEPRECATED void setFp16Mode(bool mode)=0
Set whether or not 16-bit kernels are permitted.
nvinfer1::IBuilder
Builds an engine from a network definition.
Definition: NvInfer.h:6970
nvinfer1::ITensor::isExecutionTensor
virtual bool isExecutionTensor() const =0
Whether the tensor is an execution tensor.
nvinfer1::DimsHW::w
int32_t w() const
Get the width.
Definition: NvInfer.h:174
nvinfer1::DimsCHW::DimsCHW
DimsCHW()
Construct an empty DimsCHW object.
Definition: NvInfer.h:224
nvinfer1::IPoolingLayer::getPadding
virtual TRT_DEPRECATED DimsHW getPadding() const =0
Get the padding for pooling.
nvinfer1::Dims2::Dims2
Dims2()
Construct an empty Dims2 object.
Definition: NvInfer.h:91
nvinfer1::ILoopOutputLayer::setAxis
virtual void setAxis(int32_t axis) noexcept=0
Set where to insert the contenation axis. Ignored if getLoopOutput() is kLAST_VALUE.
nvinfer1::DimensionType::kSPATIAL
Elements correspond to different spatial data.
nvinfer1::IResizeLayer::setInput
void setInput(int32_t index, ITensor &tensor) _TENSORRT_OVERRIDE=0
Append or replace an input of this layer with a specific tensor.
nvinfer1::LayerType::kCONCATENATION
Concatenation layer.
nvinfer1::INetworkDefinition::addElementWise
virtual IElementWiseLayer * addElementWise(ITensor &input1, ITensor &input2, ElementWiseOperation op)=0
Add an elementwise layer to the network.
nvinfer1::IBuilderConfig::setProfilingVerbosity
virtual void setProfilingVerbosity(ProfilingVerbosity verbosity)=0
Set verbosity level of layer information exposed in NVTX annotations.
nvinfer1::IPoolingLayer::getAverageCountExcludesPadding
virtual bool getAverageCountExcludesPadding() const =0
Get whether exclusive pooling uses as a denominator the overlap area betwen the window and the unpadd...
nvinfer1::INetworkDefinition::addConvolution
virtual TRT_DEPRECATED IConvolutionLayer * addConvolution(ITensor &input, int32_t nbOutputMaps, DimsHW kernelSize, Weights kernelWeights, Weights biasWeights)=0
Add a convolution layer to the network.
nvinfer1::INetworkDefinition::addConvolutionNd
virtual IConvolutionLayer * addConvolutionNd(ITensor &input, int32_t nbOutputMaps, Dims kernelSize, Weights kernelWeights, Weights biasWeights)=0
Add a multi-dimension convolution layer to the network.
nvinfer1::ILayer::getName
virtual const char * getName() const =0
Return the name of a layer.
nvinfer1::LayerType::kACTIVATION
Activation layer.
nvinfer1::IPoolingLayer::getWindowSize
virtual TRT_DEPRECATED DimsHW getWindowSize() const =0
Get the window size for pooling.
nvinfer1::IConvolutionLayer::getStrideNd
virtual Dims getStrideNd() const =0
Get the multi-dimension stride of the convolution.
nvinfer1::IConvolutionLayer::getBiasWeights
virtual Weights getBiasWeights() const =0
Get the bias weights for the convolution.
nvinfer1::ITensor::isNetworkInput
virtual bool isNetworkInput() const =0
Whether the tensor is a network input.
nvinfer1::IOutputDimensionsFormula
Application-implemented interface to compute layer output sizes.
Definition: NvInfer.h:3420
nvinfer1::EnumMax< PoolingType >
constexpr int32_t EnumMax< PoolingType >()
Maximum number of elements in PoolingType enum.
Definition: NvInfer.h:1735
nvinfer1::NetworkDefinitionCreationFlag::kEXPLICIT_BATCH
Mark the network to be an explicit batch network.
nvinfer1::IPaddingLayer::getPrePaddingNd
virtual Dims getPrePaddingNd() const =0
Get the padding that is applied at the start of the tensor.
nvinfer1::IReduceLayer::setOperation
virtual void setOperation(ReduceOperation op)=0
Set the reduce operation for the layer.
nvinfer1::IConvolutionLayer::getPaddingMode
virtual PaddingMode getPaddingMode() const =0
Get the padding mode.
nvinfer1::INetworkDefinition::addPluginExt
virtual TRT_DEPRECATED IPluginLayer * addPluginExt(ITensor *const *inputs, int32_t nbInputs, IPluginExt &plugin)=0
Add a plugin layer to the network using an IPluginExt interface.
nvinfer1::IBuilder::platformHasTf32
virtual bool platformHasTf32() const =0
Determine whether the platform has TF32 support.
nvinfer1::DimensionType::kINDEX
Elements correspond to different batch index.
nvinfer1::IBuilder::setGpuAllocator
virtual void setGpuAllocator(IGpuAllocator *allocator)=0
Set the GPU allocator.
nvinfer1::LayerType::kPARAMETRIC_RELU
Parametric ReLU layer.
nvinfer1::IBuilder::getMaxBatchSize
virtual int32_t getMaxBatchSize() const =0
Get the maximum batch size.
nvinfer1::TopKOperation
TopKOperation
Enumerates the operations that may be performed by a TopK layer.
Definition: NvInfer.h:4075
nvinfer1::ITensor::isNetworkOutput
virtual bool isNetworkOutput() const =0
Whether the tensor is a network output.
nvinfer1::TensorLocation
TensorLocation
The location for tensor data storage, device or host.
Definition: NvInferRuntimeCommon.h:1048
nvinfer1::ILoop::addTripLimit
virtual ITripLimitLayer * addTripLimit(ITensor &tensor, TripLimit limit) noexcept=0
Add a trip-count limiter, based on the given tensor.
nvinfer1::LayerType::kFULLY_CONNECTED
Fully connected layer.
nvinfer1::RNNGateType::kFORGET
Forget gate (f).
nvinfer1::IDeconvolutionLayer::getNbGroups
virtual int32_t getNbGroups() const =0
Get the number of groups for a deconvolution.
nvinfer1::IPoolingLayer::setAverageCountExcludesPadding
virtual void setAverageCountExcludesPadding(bool exclusive)=0
Set whether average pooling uses as a denominator the overlap area between the window and the unpadde...
nvinfer1::ILayer::getInput
virtual ITensor * getInput(int32_t index) const =0
Get the layer input corresponding to the given index.
nvinfer1::IConvolutionLayer::getDilation
virtual TRT_DEPRECATED DimsHW getDilation() const =0
Get the dilation for a convolution.
nvinfer1::IBuilderConfig::addOptimizationProfile
virtual int32_t addOptimizationProfile(const IOptimizationProfile *profile) noexcept=0
Add an optimization profile.
nvinfer1::IConvolutionLayer::getPadding
virtual TRT_DEPRECATED DimsHW getPadding() const =0
Get the padding of the convolution. If the padding is asymmetric, the pre-padding is returned.
nvinfer1::IBuilderConfig::getEngineCapability
virtual EngineCapability getEngineCapability() const =0
Query EngineCapability flow configured for the builder.
nvinfer1::INetworkDefinition::addConcatenation
virtual IConcatenationLayer * addConcatenation(ITensor *const *inputs, int32_t nbInputs)=0
Add a concatenation layer to the network.
nvinfer1::IPoolingLayer::setPrePadding
virtual void setPrePadding(Dims padding)=0
Set the multi-dimension pre-padding for pooling.
nvinfer1::LayerType::kMATRIX_MULTIPLY
Matrix multiply layer.
nvinfer1::INetworkDefinition::addShape
virtual IShapeLayer * addShape(ITensor &input)=0
Add a shape layer to the network.
nvinfer1::DimsNCHW::c
int32_t c() const
Get the channel count.
Definition: NvInfer.h:411
nvinfer1::EnumMax< ReduceOperation >
constexpr int32_t EnumMax< ReduceOperation >()
Maximum number of elements in ReduceOperation enum.
Definition: NvInfer.h:3587
nvinfer1::IDeconvolutionLayer::setStride
virtual TRT_DEPRECATED void setStride(DimsHW stride)=0
Get the stride of the deconvolution.
nvinfer1::IInt8LegacyCalibrator::readHistogramCache
virtual const void * readHistogramCache(std::size_t &length)=0
Load a histogram.
nvinfer1::IDeconvolutionLayer::getPostPadding
virtual Dims getPostPadding() const =0
Get the padding.
nvinfer1::IActivationLayer
An Activation layer in a network definition.
Definition: NvInfer.h:1663
nvinfer1::CalibrationAlgoType
CalibrationAlgoType
Version of calibration algorithm to use.
Definition: NvInfer.h:6014
nvinfer1::INetworkDefinition::addScale
virtual IScaleLayer * addScale(ITensor &input, ScaleMode mode, Weights shift, Weights scale, Weights power)=0
Add a Scale layer to the network.
nvinfer1::IFillLayer::setBeta
virtual void setBeta(double beta) noexcept=0
Set the beta parameter.
nvinfer1::LayerType::kPOOLING
Pooling layer.
nvinfer1::ILRNLayer::getWindowSize
virtual int32_t getWindowSize() const =0
Get the LRN window size.
nvinfer1::IConvolutionLayer::setNbOutputMaps
virtual void setNbOutputMaps(int32_t nbOutputMaps)=0
Set the number of output maps for the convolution.
nvinfer1::IPaddingLayer::getPostPadding
virtual TRT_DEPRECATED DimsHW getPostPadding() const =0
Get the padding that is applied at the end of the tensor.
nvinfer1::IBuilder::getStrictTypeConstraints
virtual TRT_DEPRECATED bool getStrictTypeConstraints() const =0
Query whether or not type constraints are strict.
nvinfer1::IDeconvolutionLayer
A deconvolution layer in a network definition.
Definition: NvInfer.h:2303