TensorRT 10.3.0
NvInfer.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: Copyright (c) 1993-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3 * SPDX-License-Identifier: Apache-2.0
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18#ifndef NV_INFER_H
19#define NV_INFER_H
20
21#include "NvInferLegacyDims.h"
22#include "NvInferRuntime.h"
23
32//
35
41
47namespace nvinfer1
48{
49
57enum class LayerType : int32_t
58{
59 kCONVOLUTION = 0,
60 kCAST = 1,
61 kACTIVATION = 2,
62 kPOOLING = 3,
63 kLRN = 4,
64 kSCALE = 5,
65 kSOFTMAX = 6,
66 kDECONVOLUTION = 7,
67 kCONCATENATION = 8,
68 kELEMENTWISE = 9,
69 kPLUGIN = 10,
70 kUNARY = 11,
71 kPADDING = 12,
72 kSHUFFLE = 13,
73 kREDUCE = 14,
74 kTOPK = 15,
75 kGATHER = 16,
76 kMATRIX_MULTIPLY = 17,
77 kRAGGED_SOFTMAX = 18,
78 kCONSTANT = 19,
79 kIDENTITY = 20,
80 kPLUGIN_V2 = 21,
81 kSLICE = 22,
82 kSHAPE = 23,
83 kPARAMETRIC_RELU = 24,
84 kRESIZE = 25,
85 kTRIP_LIMIT = 26,
86 kRECURRENCE = 27,
87 kITERATOR = 28,
88 kLOOP_OUTPUT = 29,
89 kSELECT = 30,
90 kFILL = 31,
91 kQUANTIZE = 32,
92 kDEQUANTIZE = 33,
93 kCONDITION = 34,
96 kSCATTER = 37,
97 kEINSUM = 38,
98 kASSERTION = 39,
99 kONE_HOT = 40,
100 kNON_ZERO = 41,
101 kGRID_SAMPLE = 42,
102 kNMS = 43,
103 kREVERSE_SEQUENCE = 44,
104 kNORMALIZATION = 45,
105 kPLUGIN_V3 = 46,
106};
107
113template <>
114constexpr inline int32_t EnumMax<LayerType>() noexcept
115{
116 return 47;
117}
118
125using TensorFormats = uint32_t;
126
132enum class ActivationType : int32_t
133{
134 kRELU = 0,
135 kSIGMOID = 1,
136 kTANH = 2,
137 kLEAKY_RELU = 3,
138 kELU = 4,
139 kSELU = 5,
140 kSOFTSIGN = 6,
141 kSOFTPLUS = 7,
142 kCLIP = 8,
143 kHARD_SIGMOID = 9,
144 kSCALED_TANH = 10,
145 kTHRESHOLDED_RELU = 11,
146 kGELU_ERF = 12,
147 kGELU_TANH = 13
148};
149
150namespace impl
151{
157template <>
159{
160 static constexpr int32_t kVALUE = 14;
161};
162} // namespace impl
163
180class ITensor : public INoCopy
181{
182public:
197 void setName(char const* name) noexcept
198 {
199 mImpl->setName(name);
200 }
201
209 char const* getName() const noexcept
210 {
211 return mImpl->getName();
212 }
213
228 void setDimensions(Dims const& dimensions) noexcept
229 {
230 mImpl->setDimensions(dimensions);
231 }
232
242 Dims getDimensions() const noexcept
243 {
244 return mImpl->getDimensions();
245 }
246
257 void setType(DataType type) noexcept
258 {
259 mImpl->setType(type);
260 }
261
269 DataType getType() const noexcept
270 {
271 return mImpl->getType();
272 }
273
286 TRT_DEPRECATED bool setDynamicRange(float min, float max) noexcept
287 {
288 return mImpl->setDynamicRange(min, max);
289 }
290
294 bool isNetworkInput() const noexcept
295 {
296 return mImpl->isNetworkInput();
297 }
298
302 bool isNetworkOutput() const noexcept
303 {
304 return mImpl->isNetworkOutput();
305 }
306
319 TRT_DEPRECATED void setBroadcastAcrossBatch(bool broadcastAcrossBatch) noexcept
320 {
321 mImpl->setBroadcastAcrossBatch(broadcastAcrossBatch);
322 }
323
334 {
335 return mImpl->getBroadcastAcrossBatch();
336 }
337
346 {
347 return mImpl->getLocation();
348 }
349
365 {
366 mImpl->setLocation(location);
367 }
368
376 bool dynamicRangeIsSet() const noexcept
377 {
378 return mImpl->dynamicRangeIsSet();
379 }
380
384 void resetDynamicRange() noexcept
385 {
386 mImpl->resetDynamicRange();
387 }
388
394 float getDynamicRangeMin() const noexcept
395 {
396 return mImpl->getDynamicRangeMin();
397 }
398
404 float getDynamicRangeMax() const noexcept
405 {
406 return mImpl->getDynamicRangeMax();
407 }
408
426 void setAllowedFormats(TensorFormats formats) noexcept
427 {
428 mImpl->setAllowedFormats(formats);
429 }
430
440 {
441 return mImpl->getAllowedFormats();
442 }
443
470 bool isShapeTensor() const noexcept
471 {
472 return mImpl->isShapeTensor();
473 }
474
491 bool isExecutionTensor() const noexcept
492 {
493 return mImpl->isExecutionTensor();
494 }
495
517 void setDimensionName(int32_t index, char const* name) noexcept
518 {
519 mImpl->setDimensionName(index, name);
520 }
521
532 char const* getDimensionName(int32_t index) const noexcept
533 {
534 return mImpl->getDimensionName(index);
535 }
536
537protected:
538 apiv::VTensor* mImpl;
539 virtual ~ITensor() noexcept = default;
540};
541
549class ILayer : public INoCopy
550{
551public:
557 LayerType getType() const noexcept
558 {
559 return mLayer->getType();
560 }
561
571 void setName(char const* name) noexcept
572 {
573 mLayer->setName(name);
574 }
575
581 char const* getName() const noexcept
582 {
583 return mLayer->getName();
584 }
585
589 int32_t getNbInputs() const noexcept
590 {
591 return mLayer->getNbInputs();
592 }
593
602 ITensor* getInput(int32_t index) const noexcept
603 {
604 return mLayer->getInput(index);
605 }
606
610 int32_t getNbOutputs() const noexcept
611 {
612 return mLayer->getNbOutputs();
613 }
614
620 ITensor* getOutput(int32_t index) const noexcept
621 {
622 return mLayer->getOutput(index);
623 }
624
637 void setInput(int32_t index, ITensor& tensor) noexcept
638 {
639 return mLayer->setInput(index, tensor);
640 }
641
668 void setPrecision(DataType dataType) noexcept
669 {
670 mLayer->setPrecision(dataType);
671 }
672
680 DataType getPrecision() const noexcept
681 {
682 return mLayer->getPrecision();
683 }
684
692 bool precisionIsSet() const noexcept
693 {
694 return mLayer->precisionIsSet();
695 }
696
702 void resetPrecision() noexcept
703 {
704 mLayer->resetPrecision();
705 }
706
749 void setOutputType(int32_t index, DataType dataType) noexcept
750 {
751 mLayer->setOutputType(index, dataType);
752 }
753
764 DataType getOutputType(int32_t index) const noexcept
765 {
766 return mLayer->getOutputType(index);
767 }
768
778 bool outputTypeIsSet(int32_t index) const noexcept
779 {
780 return mLayer->outputTypeIsSet(index);
781 }
782
790 void resetOutputType(int32_t index) noexcept
791 {
792 return mLayer->resetOutputType(index);
793 }
794
808 void setMetadata(char const* metadata) noexcept
809 {
810 mLayer->setMetadata(metadata);
811 }
812
821 char const* getMetadata() const noexcept
822 {
823 return mLayer->getMetadata();
824 }
825
826protected:
827 virtual ~ILayer() noexcept = default;
828 apiv::VLayer* mLayer;
829};
830
987enum class PaddingMode : int32_t
988{
991 kSAME_UPPER = 2,
992 kSAME_LOWER = 3,
993};
994
995namespace impl
996{
1002template <>
1004{
1005 static constexpr int32_t kVALUE = 4;
1006};
1007} // namespace impl
1008
1022{
1023public:
1031 void setNbOutputMaps(int64_t nbOutputMaps) noexcept
1032 {
1033 mImpl->setNbOutputMaps(nbOutputMaps);
1034 }
1035
1041 int64_t getNbOutputMaps() const noexcept
1042 {
1043 return mImpl->getNbOutputMaps();
1044 }
1045
1061 void setNbGroups(int64_t nbGroups) noexcept
1062 {
1063 mImpl->setNbGroups(nbGroups);
1064 }
1065
1071 int64_t getNbGroups() const noexcept
1072 {
1073 return mImpl->getNbGroups();
1074 }
1075
1085 void setKernelWeights(Weights weights) noexcept
1086 {
1087 mImpl->setKernelWeights(weights);
1088 }
1089
1095 Weights getKernelWeights() const noexcept
1096 {
1097 return mImpl->getKernelWeights();
1098 }
1099
1110 void setBiasWeights(Weights weights) noexcept
1111 {
1112 mImpl->setBiasWeights(weights);
1113 }
1114
1120 Weights getBiasWeights() const noexcept
1121 {
1122 return mImpl->getBiasWeights();
1123 }
1124
1137 void setPrePadding(Dims const& padding) noexcept
1138 {
1139 mImpl->setPrePadding(padding);
1140 }
1141
1147 Dims getPrePadding() const noexcept
1148 {
1149 return mImpl->getPrePadding();
1150 }
1151
1164 void setPostPadding(Dims const& padding) noexcept
1165 {
1166 mImpl->setPostPadding(padding);
1167 }
1168
1174 Dims getPostPadding() const noexcept
1175 {
1176 return mImpl->getPostPadding();
1177 }
1178
1188 void setPaddingMode(PaddingMode paddingMode) noexcept
1189 {
1190 mImpl->setPaddingMode(paddingMode);
1191 }
1192
1201 {
1202 return mImpl->getPaddingMode();
1203 }
1204
1213 void setKernelSizeNd(Dims const& kernelSize) noexcept
1214 {
1215 mImpl->setKernelSizeNd(kernelSize);
1216 }
1217
1223 Dims getKernelSizeNd() const noexcept
1224 {
1225 return mImpl->getKernelSizeNd();
1226 }
1227
1238 void setStrideNd(Dims const& stride) noexcept
1239 {
1240 mImpl->setStrideNd(stride);
1241 }
1242
1248 Dims getStrideNd() const noexcept
1249 {
1250 return mImpl->getStrideNd();
1251 }
1252
1266 void setPaddingNd(Dims const& padding) noexcept
1267 {
1268 mImpl->setPaddingNd(padding);
1269 }
1270
1278 Dims getPaddingNd() const noexcept
1279 {
1280 return mImpl->getPaddingNd();
1281 }
1282
1292 void setDilationNd(Dims const& dilation) noexcept
1293 {
1294 mImpl->setDilationNd(dilation);
1295 }
1296
1302 Dims getDilationNd() const noexcept
1303 {
1304 return mImpl->getDilationNd();
1305 }
1306
1321 using ILayer::setInput;
1322
1323protected:
1324 virtual ~IConvolutionLayer() noexcept = default;
1325 apiv::VConvolutionLayer* mImpl;
1326};
1327
1342{
1343public:
1352 {
1353 mImpl->setActivationType(type);
1354 }
1355
1362 {
1363 return mImpl->getActivationType();
1364 }
1365
1376 void setAlpha(float alpha) noexcept
1377 {
1378 mImpl->setAlpha(alpha);
1379 }
1380
1390 void setBeta(float beta) noexcept
1391 {
1392 mImpl->setBeta(beta);
1393 }
1394
1399 float getAlpha() const noexcept
1400 {
1401 return mImpl->getAlpha();
1402 }
1403
1408 float getBeta() const noexcept
1409 {
1410 return mImpl->getBeta();
1411 }
1412
1413protected:
1414 virtual ~IActivationLayer() noexcept = default;
1415 apiv::VActivationLayer* mImpl;
1416};
1417
1423enum class PoolingType : int32_t
1424{
1425 kMAX = 0,
1426 kAVERAGE = 1,
1428};
1429
1430namespace impl
1431{
1437template <>
1439{
1440 static constexpr int32_t kVALUE = 3;
1441};
1442} // namespace impl
1443
1455class IPoolingLayer : public ILayer
1456{
1457public:
1465 void setPoolingType(PoolingType type) noexcept
1466 {
1467 mImpl->setPoolingType(type);
1468 }
1469
1476 {
1477 return mImpl->getPoolingType();
1478 }
1479
1490 void setBlendFactor(float blendFactor) noexcept
1491 {
1492 mImpl->setBlendFactor(blendFactor);
1493 }
1494
1503 float getBlendFactor() const noexcept
1504 {
1505 return mImpl->getBlendFactor();
1506 }
1507
1517 void setAverageCountExcludesPadding(bool exclusive) noexcept
1518 {
1519 mImpl->setAverageCountExcludesPadding(exclusive);
1520 }
1521
1529 {
1530 return mImpl->getAverageCountExcludesPadding();
1531 }
1532
1546 void setPrePadding(Dims const& padding) noexcept
1547 {
1548 mImpl->setPrePadding(padding);
1549 }
1550
1556 Dims getPrePadding() const noexcept
1557 {
1558 return mImpl->getPrePadding();
1559 }
1560
1574 void setPostPadding(Dims const& padding) noexcept
1575 {
1576 mImpl->setPostPadding(padding);
1577 }
1578
1584 Dims getPostPadding() const noexcept
1585 {
1586 return mImpl->getPostPadding();
1587 }
1588
1597 void setPaddingMode(PaddingMode paddingMode) noexcept
1598 {
1599 mImpl->setPaddingMode(paddingMode);
1600 }
1601
1609 {
1610 return mImpl->getPaddingMode();
1611 }
1612
1621 void setWindowSizeNd(Dims const& windowSize) noexcept
1622 {
1623 mImpl->setWindowSizeNd(windowSize);
1624 }
1625
1631 Dims getWindowSizeNd() const noexcept
1632 {
1633 return mImpl->getWindowSizeNd();
1634 }
1635
1646 void setStrideNd(Dims const& stride) noexcept
1647 {
1648 mImpl->setStrideNd(stride);
1649 }
1650
1656 Dims getStrideNd() const noexcept
1657 {
1658 return mImpl->getStrideNd();
1659 }
1660
1675 void setPaddingNd(Dims const& padding) noexcept
1676 {
1677 mImpl->setPaddingNd(padding);
1678 }
1679
1687 Dims getPaddingNd() const noexcept
1688 {
1689 return mImpl->getPaddingNd();
1690 }
1691
1692protected:
1693 virtual ~IPoolingLayer() noexcept = default;
1694 apiv::VPoolingLayer* mImpl;
1695};
1696
1706class ILRNLayer : public ILayer
1707{
1708public:
1718 void setWindowSize(int64_t windowSize) noexcept
1719 {
1720 mImpl->setWindowSize(windowSize);
1721 }
1722
1728 int64_t getWindowSize() const noexcept
1729 {
1730 return mImpl->getWindowSize();
1731 }
1732
1740 void setAlpha(float alpha) noexcept
1741 {
1742 mImpl->setAlpha(alpha);
1743 }
1744
1750 float getAlpha() const noexcept
1751 {
1752 return mImpl->getAlpha();
1753 }
1754
1762 void setBeta(float beta) noexcept
1763 {
1764 mImpl->setBeta(beta);
1765 }
1766
1772 float getBeta() const noexcept
1773 {
1774 return mImpl->getBeta();
1775 }
1776
1784 void setK(float k) noexcept
1785 {
1786 mImpl->setK(k);
1787 }
1788
1794 float getK() const noexcept
1795 {
1796 return mImpl->getK();
1797 }
1798
1799protected:
1800 virtual ~ILRNLayer() noexcept = default;
1801 apiv::VLRNLayer* mImpl;
1802};
1803
1809enum class ScaleMode : int32_t
1810{
1811 kUNIFORM = 0,
1812 kCHANNEL = 1,
1813 kELEMENTWISE = 2
1814};
1815
1821template <>
1822constexpr inline int32_t EnumMax<ScaleMode>() noexcept
1823{
1824 return 3;
1825}
1826
1852class IScaleLayer : public ILayer
1853{
1854public:
1860 void setMode(ScaleMode mode) noexcept
1861 {
1862 mImpl->setMode(mode);
1863 }
1864
1870 ScaleMode getMode() const noexcept
1871 {
1872 return mImpl->getMode();
1873 }
1874
1880 void setShift(Weights shift) noexcept
1881 {
1882 mImpl->setShift(shift);
1883 }
1884
1890 Weights getShift() const noexcept
1891 {
1892 return mImpl->getShift();
1893 }
1894
1900 void setScale(Weights scale) noexcept
1901 {
1902 mImpl->setScale(scale);
1903 }
1904
1910 Weights getScale() const noexcept
1911 {
1912 return mImpl->getScale();
1913 }
1914
1920 void setPower(Weights power) noexcept
1921 {
1922 mImpl->setPower(power);
1923 }
1924
1930 Weights getPower() const noexcept
1931 {
1932 return mImpl->getPower();
1933 }
1934
1945 int32_t getChannelAxis() const noexcept
1946 {
1947 return mImpl->getChannelAxis();
1948 }
1949
1966 void setChannelAxis(int32_t channelAxis) noexcept
1967 {
1968 mImpl->setChannelAxis(channelAxis);
1969 }
1970
1971protected:
1972 virtual ~IScaleLayer() noexcept = default;
1973 apiv::VScaleLayer* mImpl;
1974};
1975
1996class ISoftMaxLayer : public ILayer
1997{
1998public:
2019 void setAxes(uint32_t axes) noexcept
2020 {
2021 mImpl->setAxes(axes);
2022 }
2023
2029 uint32_t getAxes() const noexcept
2030 {
2031 return mImpl->getAxes();
2032 }
2033
2034protected:
2035 virtual ~ISoftMaxLayer() noexcept = default;
2036 apiv::VSoftMaxLayer* mImpl;
2037};
2038
2052{
2053public:
2065 void setAxis(int32_t axis) noexcept
2066 {
2067 mImpl->setAxis(axis);
2068 }
2069
2075 int32_t getAxis() const noexcept
2076 {
2077 return mImpl->getAxis();
2078 }
2079
2080protected:
2081 virtual ~IConcatenationLayer() noexcept = default;
2082 apiv::VConcatenationLayer* mImpl;
2083};
2084
2093{
2094public:
2102 void setNbOutputMaps(int64_t nbOutputMaps) noexcept
2103 {
2104 mImpl->setNbOutputMaps(nbOutputMaps);
2105 }
2106
2112 int64_t getNbOutputMaps() const noexcept
2113 {
2114 return mImpl->getNbOutputMaps();
2115 }
2116
2132 void setNbGroups(int64_t nbGroups) noexcept
2133 {
2134 mImpl->setNbGroups(nbGroups);
2135 }
2136
2142 int64_t getNbGroups() const noexcept
2143 {
2144 return mImpl->getNbGroups();
2145 }
2146
2156 void setKernelWeights(Weights weights) noexcept
2157 {
2158 mImpl->setKernelWeights(weights);
2159 }
2160
2166 Weights getKernelWeights() const noexcept
2167 {
2168 return mImpl->getKernelWeights();
2169 }
2170
2181 void setBiasWeights(Weights weights) noexcept
2182 {
2183 mImpl->setBiasWeights(weights);
2184 }
2185
2191 Weights getBiasWeights() const noexcept
2192 {
2193 return mImpl->getBiasWeights();
2194 }
2195
2208 void setPrePadding(Dims const& padding) noexcept
2209 {
2210 mImpl->setPrePadding(padding);
2211 }
2212
2218 Dims getPrePadding() const noexcept
2219 {
2220 return mImpl->getPrePadding();
2221 }
2222
2235 void setPostPadding(Dims const& padding) noexcept
2236 {
2237 mImpl->setPostPadding(padding);
2238 }
2239
2245 Dims getPostPadding() const noexcept
2246 {
2247 return mImpl->getPostPadding();
2248 }
2249
2259 void setPaddingMode(PaddingMode paddingMode) noexcept
2260 {
2261 mImpl->setPaddingMode(paddingMode);
2262 }
2263
2272 {
2273 return mImpl->getPaddingMode();
2274 }
2275
2286 void setKernelSizeNd(Dims const& kernelSize) noexcept
2287 {
2288 mImpl->setKernelSizeNd(kernelSize);
2289 }
2290
2296 Dims getKernelSizeNd() const noexcept
2297 {
2298 return mImpl->getKernelSizeNd();
2299 }
2300
2313 void setStrideNd(Dims const& stride) noexcept
2314 {
2315 mImpl->setStrideNd(stride);
2316 }
2317
2323 Dims getStrideNd() const noexcept
2324 {
2325 return mImpl->getStrideNd();
2326 }
2327
2341 void setPaddingNd(Dims const& padding) noexcept
2342 {
2343 mImpl->setPaddingNd(padding);
2344 }
2345
2353 Dims getPaddingNd() const noexcept
2354 {
2355 return mImpl->getPaddingNd();
2356 }
2357
2370 using ILayer::setInput;
2371
2379 void setDilationNd(Dims const& dilation) noexcept
2380 {
2381 mImpl->setDilationNd(dilation);
2382 }
2383
2389 Dims getDilationNd() const noexcept
2390 {
2391 return mImpl->getDilationNd();
2392 }
2393
2394protected:
2395 virtual ~IDeconvolutionLayer() noexcept = default;
2396 apiv::VDeconvolutionLayer* mImpl;
2397};
2398
2413enum class ElementWiseOperation : int32_t
2414{
2415 kSUM = 0,
2416 kPROD = 1,
2417 kMAX = 2,
2418 kMIN = 3,
2419 kSUB = 4,
2420 kDIV = 5,
2421 kPOW = 6,
2422 kFLOOR_DIV = 7,
2423 kAND = 8,
2424 kOR = 9,
2425 kXOR = 10,
2426 kEQUAL = 11,
2427 kGREATER = 12,
2428 kLESS = 13
2429};
2430
2431namespace impl
2432{
2438template <>
2440{
2441 static constexpr int32_t kVALUE = 14;
2442};
2443} // namespace impl
2444
2465{
2466public:
2477 {
2478 return mImpl->setOperation(op);
2479 }
2480
2489 {
2490 return mImpl->getOperation();
2491 }
2492
2493protected:
2494 apiv::VElementWiseLayer* mImpl;
2495 virtual ~IElementWiseLayer() noexcept = default;
2496};
2497
2503enum class GatherMode : int32_t
2504{
2505 kDEFAULT = 0,
2506 kELEMENT = 1,
2507 kND = 2
2508};
2509
2515template <>
2516constexpr inline int32_t EnumMax<GatherMode>() noexcept
2517{
2518 return 3;
2519}
2520
2598class IGatherLayer : public ILayer
2599{
2600public:
2610 void setGatherAxis(int32_t axis) noexcept
2611 {
2612 mImpl->setGatherAxis(axis);
2613 }
2614
2622 int32_t getGatherAxis() const noexcept
2623 {
2624 return mImpl->getGatherAxis();
2625 }
2626
2645 void setNbElementWiseDims(int32_t elementWiseDims) noexcept
2646 {
2647 mImpl->setNbElementWiseDims(elementWiseDims);
2648 }
2649
2655 int32_t getNbElementWiseDims() const noexcept
2656 {
2657 return mImpl->getNbElementWiseDims();
2658 }
2659
2665 void setMode(GatherMode mode) noexcept
2666 {
2667 mImpl->setMode(mode);
2668 }
2669
2675 GatherMode getMode() const noexcept
2676 {
2677 return mImpl->getMode();
2678 }
2679
2680protected:
2681 apiv::VGatherLayer* mImpl;
2682 virtual ~IGatherLayer() noexcept = default;
2683};
2684
2695{
2696public:
2703 {
2704 return mImpl->getPlugin();
2705 }
2706
2707protected:
2708 apiv::VPluginV2Layer* mImpl;
2709 virtual ~IPluginV2Layer() noexcept = default;
2710};
2711
2722{
2723public:
2730 {
2731 return mImpl->getPlugin();
2732 }
2733
2734protected:
2735 apiv::VPluginV3Layer* mImpl;
2736 virtual ~IPluginV3Layer() noexcept = default;
2737};
2738
2755enum class UnaryOperation : int32_t
2756{
2757 kEXP = 0,
2758 kLOG = 1,
2759 kSQRT = 2,
2760 kRECIP = 3,
2761 kABS = 4,
2762 kNEG = 5,
2763 kSIN = 6,
2764 kCOS = 7,
2765 kTAN = 8,
2766 kSINH = 9,
2767 kCOSH = 10,
2768 kASIN = 11,
2769 kACOS = 12,
2770 kATAN = 13,
2771 kASINH = 14,
2772 kACOSH = 15,
2773 kATANH = 16,
2774 kCEIL = 17,
2775 kFLOOR = 18,
2776 kERF = 19,
2777 kNOT = 20,
2778 kSIGN = 21,
2779 kROUND = 22,
2780 kISINF = 23,
2781 kISNAN = 24,
2782};
2783
2789template <>
2790constexpr inline int32_t EnumMax<UnaryOperation>() noexcept
2791{
2792 return 25;
2793}
2794
2802class IUnaryLayer : public ILayer
2803{
2804public:
2813 {
2814 mImpl->setOperation(op);
2815 }
2816
2823 {
2824 return mImpl->getOperation();
2825 }
2826
2827protected:
2828 apiv::VUnaryLayer* mImpl;
2829 virtual ~IUnaryLayer() noexcept = default;
2830};
2831
2850enum class ReduceOperation : int32_t
2851{
2852 kSUM = 0,
2853 kPROD = 1,
2854 kMAX = 2,
2855 kMIN = 3,
2856 kAVG = 4
2857};
2858
2864template <>
2865constexpr inline int32_t EnumMax<ReduceOperation>() noexcept
2866{
2867 return 5;
2868}
2869
2877class IReduceLayer : public ILayer
2878{
2879public:
2886 {
2887 mImpl->setOperation(op);
2888 }
2889
2896 {
2897 return mImpl->getOperation();
2898 }
2899
2905 void setReduceAxes(uint32_t reduceAxes) noexcept
2906 {
2907 mImpl->setReduceAxes(reduceAxes);
2908 }
2909
2915 uint32_t getReduceAxes() const noexcept
2916 {
2917 return mImpl->getReduceAxes();
2918 }
2919
2925 void setKeepDimensions(bool keepDimensions) noexcept
2926 {
2927 mImpl->setKeepDimensions(keepDimensions);
2928 }
2929
2935 bool getKeepDimensions() const noexcept
2936 {
2937 return mImpl->getKeepDimensions();
2938 }
2939
2940protected:
2941 apiv::VReduceLayer* mImpl;
2942 virtual ~IReduceLayer() noexcept = default;
2943};
2944
2957class IPaddingLayer : public ILayer
2958{
2959public:
2969 void setPrePaddingNd(Dims const& padding) noexcept
2970 {
2971 mImpl->setPrePaddingNd(padding);
2972 }
2973
2981 Dims getPrePaddingNd() const noexcept
2982 {
2983 return mImpl->getPrePaddingNd();
2984 }
2985
2995 void setPostPaddingNd(Dims const& padding) noexcept
2996 {
2997 mImpl->setPostPaddingNd(padding);
2998 }
2999
3007 Dims getPostPaddingNd() const noexcept
3008 {
3009 return mImpl->getPostPaddingNd();
3010 }
3011
3012protected:
3013 apiv::VPaddingLayer* mImpl;
3014 virtual ~IPaddingLayer() noexcept = default;
3015};
3016
3023{
3030 int32_t order[Dims::MAX_DIMS];
3031};
3032
3045class IShuffleLayer : public ILayer
3046{
3047public:
3057 void setFirstTranspose(Permutation permutation) noexcept
3058 {
3059 mImpl->setFirstTranspose(permutation);
3060 }
3061
3070 {
3071 return mImpl->getFirstTranspose();
3072 }
3073
3097 void setReshapeDimensions(Dims const& dimensions) noexcept
3098 {
3099 mImpl->setReshapeDimensions(dimensions);
3100 }
3101
3111 {
3112 return mImpl->getReshapeDimensions();
3113 }
3114
3120 //
3143 using ILayer::setInput;
3144
3157 void setSecondTranspose(Permutation permutation) noexcept
3158 {
3159 mImpl->setSecondTranspose(permutation);
3160 }
3161
3170 {
3171 return mImpl->getSecondTranspose();
3172 }
3173
3185 void setZeroIsPlaceholder(bool zeroIsPlaceholder) noexcept
3186 {
3187 return mImpl->setZeroIsPlaceholder(zeroIsPlaceholder);
3188 }
3189
3198 bool getZeroIsPlaceholder() const noexcept
3199 {
3200 return mImpl->getZeroIsPlaceholder();
3201 }
3202
3203protected:
3204 apiv::VShuffleLayer* mImpl;
3205 virtual ~IShuffleLayer() noexcept = default;
3206};
3207
3213enum class SampleMode : int32_t
3214{
3215 kSTRICT_BOUNDS = 0,
3216 kWRAP = 1,
3217 kCLAMP = 2,
3218 kFILL = 3,
3219 kREFLECT = 4,
3222};
3223
3229template <>
3230constexpr inline int32_t EnumMax<SampleMode>() noexcept
3231{
3232 return 5;
3233}
3234
3295class ISliceLayer : public ILayer
3296{
3297public:
3307 void setStart(Dims const& start) noexcept
3308 {
3309 mImpl->setStart(start);
3310 }
3311
3322 Dims getStart() const noexcept
3323 {
3324 return mImpl->getStart();
3325 }
3326
3336 void setSize(Dims const& size) noexcept
3337 {
3338 return mImpl->setSize(size);
3339 }
3340
3351 Dims getSize() const noexcept
3352 {
3353 return mImpl->getSize();
3354 }
3355
3365 void setStride(Dims const& stride) noexcept
3366 {
3367 mImpl->setStride(stride);
3368 }
3369
3380 Dims getStride() const noexcept
3381 {
3382 return mImpl->getStride();
3383 }
3384
3390 void setMode(SampleMode mode) noexcept
3391 {
3392 mImpl->setMode(mode);
3393 }
3394
3400 SampleMode getMode() const noexcept
3401 {
3402 return mImpl->getMode();
3403 }
3404
3432 using ILayer::setInput;
3433
3443 void setAxes(Dims const& axes) noexcept
3444 {
3445 mImpl->setAxes(axes);
3446 }
3447
3458 Dims getAxes() const noexcept
3459 {
3460 return mImpl->getAxes();
3461 }
3462
3463protected:
3464 apiv::VSliceLayer* mImpl;
3465 virtual ~ISliceLayer() noexcept = default;
3466};
3467
3480class IShapeLayer : public ILayer
3481{
3482protected:
3483 apiv::VShapeLayer* mImpl;
3484 virtual ~IShapeLayer() noexcept = default;
3485};
3486
3492enum class TopKOperation : int32_t
3493{
3494 kMAX = 0,
3495 kMIN = 1,
3496};
3497
3503template <>
3504constexpr inline int32_t EnumMax<TopKOperation>() noexcept
3505{
3506 return 2;
3507}
3508
3520class ITopKLayer : public ILayer
3521{
3522public:
3528 void setOperation(TopKOperation op) noexcept
3529 {
3530 mImpl->setOperation(op);
3531 }
3532
3539 {
3540 return mImpl->getOperation();
3541 }
3542
3552 void setK(int32_t k) noexcept
3553 {
3554 mImpl->setK(k);
3555 }
3556
3566 int32_t getK() const noexcept
3567 {
3568 return mImpl->getK();
3569 }
3570
3576 void setReduceAxes(uint32_t reduceAxes) noexcept
3577 {
3578 mImpl->setReduceAxes(reduceAxes);
3579 }
3580
3586 uint32_t getReduceAxes() const noexcept
3587 {
3588 return mImpl->getReduceAxes();
3589 }
3590
3605 using ILayer::setInput;
3606
3607protected:
3608 apiv::VTopKLayer* mImpl;
3609 virtual ~ITopKLayer() noexcept = default;
3610};
3611
3618enum class MatrixOperation : int32_t
3619{
3623 kNONE = 0,
3624
3626 kTRANSPOSE = 1,
3627
3638 kVECTOR = 2,
3639};
3640
3646template <>
3647constexpr inline int32_t EnumMax<MatrixOperation>() noexcept
3648{
3649 return 3;
3650}
3651
3678{
3679public:
3688 void setOperation(int32_t index, MatrixOperation op) noexcept
3689 {
3690 mImpl->setOperation(index, op);
3691 }
3692
3700 MatrixOperation getOperation(int32_t index) const noexcept
3701 {
3702 return mImpl->getOperation(index);
3703 }
3704
3705protected:
3706 apiv::VMatrixMultiplyLayer* mImpl;
3707 virtual ~IMatrixMultiplyLayer() noexcept = default;
3708};
3709
3731class INonZeroLayer : public ILayer
3732{
3733protected:
3734 virtual ~INonZeroLayer() noexcept = default;
3735 apiv::VNonZeroLayer* mImpl;
3736};
3737
3753{
3754protected:
3755 apiv::VRaggedSoftMaxLayer* mImpl;
3756 virtual ~IRaggedSoftMaxLayer() noexcept = default;
3757};
3758
3786{
3787protected:
3788 apiv::VIdentityLayer* mImpl;
3789 virtual ~IIdentityLayer() noexcept = default;
3790};
3791
3798class ICastLayer : public ILayer
3799{
3800public:
3808 void setToType(DataType toType) noexcept
3809 {
3810 mImpl->setToType(toType);
3811 }
3812
3819 DataType getToType() const noexcept
3820 {
3821 return mImpl->getToType();
3822 }
3823
3824protected:
3825 apiv::VCastLayer* mImpl;
3826 virtual ~ICastLayer() noexcept = default;
3827};
3828
3838{
3839public:
3848 void setWeights(Weights weights) noexcept
3849 {
3850 mImpl->setWeights(weights);
3851 }
3852
3858 Weights getWeights() const noexcept
3859 {
3860 return mImpl->getWeights();
3861 }
3862
3870 void setDimensions(Dims const& dimensions) noexcept
3871 {
3872 mImpl->setDimensions(dimensions);
3873 }
3874
3882 Dims getDimensions() const noexcept
3883 {
3884 return mImpl->getDimensions();
3885 }
3886
3887protected:
3888 apiv::VConstantLayer* mImpl;
3889 virtual ~IConstantLayer() noexcept = default;
3890};
3891
3902{
3903protected:
3904 apiv::VParametricReLULayer* mImpl;
3905 virtual ~IParametricReLULayer() noexcept = default;
3906};
3907
3913enum class InterpolationMode : int32_t
3914{
3915 kNEAREST = 0,
3916 kLINEAR = 1,
3917 kCUBIC = 2
3918};
3919
3920namespace impl
3921{
3927template <>
3929{
3930 static constexpr int32_t kVALUE = 3;
3931};
3932} // namespace impl
3933
3942{
3955 kALIGN_CORNERS = 0,
3956
3963 kASYMMETRIC = 1,
3964
3971 kHALF_PIXEL = 2,
3972};
3973
3974namespace impl
3975{
3981template <>
3983{
3984 static constexpr int32_t kVALUE = 3;
3985};
3986} // namespace impl
3987
3995enum class ResizeSelector : int32_t
3996{
3998 kFORMULA = 0,
3999
4001 kUPPER = 1,
4002};
4003
4004namespace impl
4005{
4011template <>
4013{
4014 static constexpr int32_t kVALUE = 2;
4015};
4016} // namespace impl
4017
4025enum class ResizeRoundMode : int32_t
4026{
4028 kHALF_UP = 0,
4029
4031 kHALF_DOWN = 1,
4032
4034 kFLOOR = 2,
4035
4037 kCEIL = 3,
4038};
4039
4040namespace impl
4041{
4047template <>
4049{
4050 static constexpr int32_t kVALUE = 4;
4051};
4052} // namespace impl
4053
4090class IResizeLayer : public ILayer
4091{
4092public:
4111 void setOutputDimensions(Dims const& dimensions) noexcept
4112 {
4113 return mImpl->setOutputDimensions(dimensions);
4114 }
4115
4121 Dims getOutputDimensions() const noexcept
4122 {
4123 return mImpl->getOutputDimensions();
4124 }
4125
4151 void setScales(float const* scales, int32_t nbScales) noexcept
4152 {
4153 mImpl->setScales(scales, nbScales);
4154 }
4155
4170 int32_t getScales(int32_t size, float* scales) const noexcept
4171 {
4172 return mImpl->getScales(size, scales);
4173 }
4174
4182 void setResizeMode(InterpolationMode interpolationMode) noexcept
4183 {
4184 mImpl->setResizeMode(interpolationMode);
4185 }
4186
4193 {
4194 return mImpl->getResizeMode();
4195 }
4196
4216 using ILayer::setInput;
4217
4228 {
4229 mImpl->setCoordinateTransformation(coordTransform);
4230 }
4231
4238 {
4239 return mImpl->getCoordinateTransformation();
4240 }
4241
4253 {
4254 mImpl->setSelectorForSinglePixel(selector);
4255 }
4256
4263 {
4264 return mImpl->getSelectorForSinglePixel();
4265 }
4266
4277 {
4278 mImpl->setNearestRounding(value);
4279 }
4280
4287 {
4288 return mImpl->getNearestRounding();
4289 }
4290
4308 void setCubicCoeff(float A) noexcept
4309 {
4310 mImpl->setCubicCoeff(A);
4311 }
4312
4318 float getCubicCoeff() const noexcept
4319 {
4320 return mImpl->getCubicCoeff();
4321 }
4322
4331 void setExcludeOutside(bool excludeFlag) noexcept
4332 {
4333 mImpl->setExcludeOutside(excludeFlag);
4334 }
4335
4341 bool getExcludeOutside() const noexcept
4342 {
4343 return mImpl->getExcludeOutside();
4344 }
4345
4346protected:
4347 virtual ~IResizeLayer() noexcept = default;
4348 apiv::VResizeLayer* mImpl;
4349};
4350
4354enum class LoopOutput : int32_t
4355{
4357 kLAST_VALUE = 0,
4358
4360 kCONCATENATE = 1,
4361
4363 kREVERSE = 2
4364};
4365
4371template <>
4372constexpr inline int32_t EnumMax<LoopOutput>() noexcept
4373{
4374 return 3;
4375}
4376
4380enum class TripLimit : int32_t
4381{
4382
4383 kCOUNT = 0,
4384 kWHILE = 1
4385};
4386
4392template <>
4393constexpr inline int32_t EnumMax<TripLimit>() noexcept
4394{
4395 return 2;
4396}
4397
4398class ILoop;
4399
4414{
4415public:
4419 ILoop* getLoop() const noexcept
4420 {
4421 return mBoundary->getLoop();
4422 }
4423
4424protected:
4425 virtual ~ILoopBoundaryLayer() noexcept = default;
4426 apiv::VLoopBoundaryLayer* mBoundary;
4427};
4428
4437{
4438public:
4443 {
4444 return mBoundary->getConditional();
4445 }
4446
4447protected:
4448 virtual ~IIfConditionalBoundaryLayer() noexcept = default;
4449 apiv::VConditionalBoundaryLayer* mBoundary;
4450};
4451
4458{
4459public:
4460protected:
4461 virtual ~IConditionLayer() noexcept = default;
4462 apiv::VConditionLayer* mImpl;
4463};
4464
4473{
4474public:
4475protected:
4476 virtual ~IIfConditionalOutputLayer() noexcept = default;
4477 apiv::VConditionalOutputLayer* mImpl;
4478};
4479
4486{
4487public:
4488protected:
4489 virtual ~IIfConditionalInputLayer() noexcept = default;
4490 apiv::VConditionalInputLayer* mImpl;
4491};
4492
4517{
4518public:
4529 {
4530 return mImpl->setCondition(condition);
4531 }
4532
4544 IIfConditionalOutputLayer* addOutput(ITensor& trueSubgraphOutput, ITensor& falseSubgraphOutput) noexcept
4545 {
4546 return mImpl->addOutput(trueSubgraphOutput, falseSubgraphOutput);
4547 }
4548
4557 {
4558 return mImpl->addInput(input);
4559 }
4560
4571 void setName(char const* name) noexcept
4572 {
4573 mImpl->setName(name);
4574 }
4575
4581 char const* getName() const noexcept
4582 {
4583 return mImpl->getName();
4584 }
4585
4586protected:
4587 virtual ~IIfConditional() noexcept = default;
4588 apiv::VIfConditional* mImpl;
4589};
4590
4599{
4600public:
4606 //
4619 using ILayer::setInput;
4620
4621protected:
4622 virtual ~IRecurrenceLayer() noexcept = default;
4623 apiv::VRecurrenceLayer* mImpl;
4624};
4625
4646{
4647public:
4651 LoopOutput getLoopOutput() const noexcept
4652 {
4653 return mImpl->getLoopOutput();
4654 }
4655
4668 void setAxis(int32_t axis) noexcept
4669 {
4670 mImpl->setAxis(axis);
4671 }
4672
4676 int32_t getAxis() const noexcept
4677 {
4678 return mImpl->getAxis();
4679 }
4680
4686 //
4701 using ILayer::setInput;
4702
4703protected:
4704 virtual ~ILoopOutputLayer() noexcept = default;
4705 apiv::VLoopOutputLayer* mImpl;
4706};
4707
4720{
4721public:
4725 TripLimit getTripLimit() const noexcept
4726 {
4727 return mImpl->getTripLimit();
4728 }
4729
4730protected:
4731 virtual ~ITripLimitLayer() noexcept = default;
4732 apiv::VTripLimitLayer* mImpl;
4733};
4734
4746{
4747public:
4751 void setAxis(int32_t axis) noexcept
4752 {
4753 mImpl->setAxis(axis);
4754 }
4755
4759 int32_t getAxis() const noexcept
4760 {
4761 return mImpl->getAxis();
4762 }
4763
4773 void setReverse(bool reverse) noexcept
4774 {
4775 mImpl->setReverse(reverse);
4776 }
4777
4783 bool getReverse() const noexcept
4784 {
4785 return mImpl->getReverse();
4786 }
4787
4788protected:
4789 virtual ~IIteratorLayer() noexcept = default;
4790 apiv::VIteratorLayer* mImpl;
4791};
4792
4802class ILoop : public INoCopy
4803{
4804public:
4811 IRecurrenceLayer* addRecurrence(ITensor& initialValue) noexcept
4812 {
4813 return mImpl->addRecurrence(initialValue);
4814 }
4815
4833 {
4834 return mImpl->addTripLimit(tensor, limit);
4835 }
4836
4845 IIteratorLayer* addIterator(ITensor& tensor, int32_t axis = 0, bool reverse = false) noexcept
4846 {
4847 return mImpl->addIterator(tensor, axis, reverse);
4848 }
4849
4858 ILoopOutputLayer* addLoopOutput(ITensor& tensor, LoopOutput outputKind, int32_t axis = 0) noexcept
4859 {
4860 return mImpl->addLoopOutput(tensor, outputKind, axis);
4861 }
4862
4873 void setName(char const* name) noexcept
4874 {
4875 mImpl->setName(name);
4876 }
4877
4883 char const* getName() const noexcept
4884 {
4885 return mImpl->getName();
4886 }
4887
4888protected:
4889 virtual ~ILoop() noexcept = default;
4890 apiv::VLoop* mImpl;
4891};
4892
4905class ISelectLayer : public ILayer
4906{
4907protected:
4908 virtual ~ISelectLayer() noexcept = default;
4909 apiv::VSelectLayer* mImpl;
4910};
4911
4928{
4929public:
4938 void setMessage(char const* message) noexcept
4939 {
4940 mImpl->setMessage(message);
4941 }
4942
4948 char const* getMessage() const noexcept
4949 {
4950 return mImpl->getMessage();
4951 }
4952
4953protected:
4954 virtual ~IAssertionLayer() noexcept = default;
4955
4956 apiv::VAssertionLayer* mImpl;
4957};
4958
4966enum class FillOperation : int32_t
4967{
4983 kLINSPACE = 0,
4984
4986 kRANDOM_UNIFORM = 1,
4987
4989 kRANDOM_NORMAL = 2
4990};
4991
4997template <>
4998constexpr inline int32_t EnumMax<FillOperation>() noexcept
4999{
5000 return 3;
5001}
5002
5038class IFillLayer : public ILayer
5039{
5040public:
5049 //
5050 void setDimensions(Dims const& dimensions) noexcept
5051 {
5052 mImpl->setDimensions(dimensions);
5053 }
5054
5065 Dims getDimensions() const noexcept
5066 {
5067 return mImpl->getDimensions();
5068 }
5069
5075 void setOperation(FillOperation op) noexcept
5076 {
5077 mImpl->setOperation(op);
5078 }
5079
5086 {
5087 return mImpl->getOperation();
5088 }
5089
5103 //
5104 void setAlpha(double alpha) noexcept
5105 {
5106 mImpl->setAlpha(alpha);
5107 }
5108
5119 double getAlpha() const noexcept
5120 {
5121 return mImpl->getAlpha();
5122 }
5123
5138 void setBeta(double beta) noexcept
5139 {
5140 mImpl->setBeta(beta);
5141 }
5142
5153 double getBeta() const noexcept
5154 {
5155 return mImpl->getBeta();
5156 }
5157
5198 using ILayer::setInput;
5199
5213 //
5214 void setAlphaInt64(int64_t alpha) noexcept
5215 {
5216 mImpl->setAlphaInt64(alpha);
5217 }
5218
5229 int64_t getAlphaInt64() const noexcept
5230 {
5231 return mImpl->getAlphaInt64();
5232 }
5233
5248 void setBetaInt64(int64_t beta) noexcept
5249 {
5250 mImpl->setBetaInt64(beta);
5251 }
5252
5263 int64_t getBetaInt64() const noexcept
5264 {
5265 return mImpl->getBetaInt64();
5266 }
5267
5271 bool isAlphaBetaInt64() const noexcept
5272 {
5273 return mImpl->isAlphaBetaInt64();
5274 }
5275
5288 void setToType(DataType toType) noexcept
5289 {
5290 mImpl->setToType(toType);
5291 }
5292
5300 DataType getToType() const noexcept
5301 {
5302 return mImpl->getToType();
5303 }
5304
5305protected:
5306 virtual ~IFillLayer() noexcept = default;
5307 apiv::VFillLayer* mImpl;
5308};
5309
5384{
5385public:
5394 int32_t getAxis() const noexcept
5395 {
5396 return mImpl->getAxis();
5397 }
5405 void setAxis(int32_t axis) noexcept
5406 {
5407 mImpl->setAxis(axis);
5408 }
5409
5421 void setToType(DataType toType) noexcept
5422 {
5423 mImpl->setToType(toType);
5424 }
5425
5433 DataType getToType() const noexcept
5434 {
5435 return mImpl->getToType();
5436 }
5437
5438protected:
5439 virtual ~IQuantizeLayer() noexcept = default;
5440 apiv::VQuantizeLayer* mImpl;
5441};
5442
5514{
5515public:
5524 int32_t getAxis() const noexcept
5525 {
5526 return mImpl->getAxis();
5527 }
5535 void setAxis(int32_t axis) noexcept
5536 {
5537 mImpl->setAxis(axis);
5538 }
5539
5551 void setToType(DataType toType) noexcept
5552 {
5553 mImpl->setToType(toType);
5554 }
5555
5563 DataType getToType() const noexcept
5564 {
5565 return mImpl->getToType();
5566 }
5567
5568protected:
5569 virtual ~IDequantizeLayer() noexcept = default;
5570 apiv::VDequantizeLayer* mImpl;
5571};
5572
5573
5610class IEinsumLayer : public ILayer
5611{
5612public:
5622 bool setEquation(char const* equation) noexcept
5623 {
5624 return mImpl->setEquation(equation);
5625 }
5626
5632 char const* getEquation() const noexcept
5633 {
5634 return mImpl->getEquation();
5635 }
5636
5637protected:
5638 virtual ~IEinsumLayer() noexcept = default;
5639 apiv::VEinsumLayer* mImpl;
5640};
5641
5649enum class ScatterMode : int32_t
5650{
5651 kELEMENT = 0,
5652 kND = 1,
5653};
5654
5660template <>
5661constexpr inline int32_t EnumMax<ScatterMode>() noexcept
5662{
5663 return 2;
5664}
5665
5723class IScatterLayer : public ILayer
5724{
5725public:
5731 void setMode(ScatterMode mode) noexcept
5732 {
5733 mImpl->setMode(mode);
5734 }
5735
5741 ScatterMode getMode() const noexcept
5742 {
5743 return mImpl->getMode();
5744 }
5745
5751 void setAxis(int32_t axis) noexcept
5752 {
5753 mImpl->setAxis(axis);
5754 }
5755
5759 int32_t getAxis() const noexcept
5760 {
5761 return mImpl->getAxis();
5762 }
5763
5764protected:
5765 apiv::VScatterLayer* mImpl;
5766 virtual ~IScatterLayer() noexcept = default;
5767}; // class IScatterLayer
5768
5795class IOneHotLayer : public ILayer
5796{
5797public:
5803 void setAxis(int32_t axis) noexcept
5804 {
5805 mImpl->setAxis(axis);
5806 }
5807
5811 int32_t getAxis() const noexcept
5812 {
5813 return mImpl->getAxis();
5814 }
5815
5816protected:
5817 apiv::VOneHotLayer* mImpl;
5818};
5819
5832{
5833public:
5840 {
5841 mImpl->setInterpolationMode(mode);
5842 }
5843
5852 {
5853 return mImpl->getInterpolationMode();
5854 }
5855
5861 void setAlignCorners(bool alignCorners) noexcept
5862 {
5863 mImpl->setAlignCorners(alignCorners);
5864 }
5865
5873 bool getAlignCorners() const noexcept
5874 {
5875 return mImpl->getAlignCorners();
5876 }
5877
5885 bool setSampleMode(SampleMode mode) noexcept
5886 {
5887 return mImpl->setSampleMode(mode);
5888 }
5889
5897 SampleMode getSampleMode() const noexcept
5898 {
5899 return mImpl->getSampleMode();
5900 }
5901
5902protected:
5903 apiv::VGridSampleLayer* mImpl;
5904 virtual ~IGridSampleLayer() noexcept = default;
5905}; // class IGridSampleLayer
5906
5914enum class BoundingBoxFormat : int32_t
5915{
5917 kCORNER_PAIRS = 0,
5919 kCENTER_SIZES = 1
5920};
5921
5927template <>
5928constexpr inline int32_t EnumMax<BoundingBoxFormat>() noexcept
5929{
5930 return 2;
5931}
5932
5979class INMSLayer : public ILayer
5980{
5981public:
5992 {
5993 mImpl->setBoundingBoxFormat(fmt);
5994 }
5995
6004 {
6005 return mImpl->getBoundingBoxFormat();
6006 }
6007
6017 void setTopKBoxLimit(int32_t limit) noexcept
6018 {
6019 mImpl->setTopKBoxLimit(limit);
6020 }
6021
6027 int32_t getTopKBoxLimit() const noexcept
6028 {
6029 return mImpl->getTopKBoxLimit();
6030 }
6031
6050 using ILayer::setInput;
6051
6052protected:
6053 apiv::VNMSLayer* mImpl;
6054 virtual ~INMSLayer() noexcept = default;
6055}; // class INMSLayer
6056
6070{
6071public:
6080 void setBatchAxis(int32_t batchAxis) noexcept
6081 {
6082 mImpl->setBatchAxis(batchAxis);
6083 }
6084
6090 int32_t getBatchAxis() const noexcept
6091 {
6092 return mImpl->getBatchAxis();
6093 }
6094
6103 void setSequenceAxis(int32_t sequenceAxis) noexcept
6104 {
6105 mImpl->setSequenceAxis(sequenceAxis);
6106 }
6107
6113 int32_t getSequenceAxis() const noexcept
6114 {
6115 return mImpl->getSequenceAxis();
6116 }
6117
6118protected:
6119 apiv::VReverseSequenceLayer* mImpl;
6120 virtual ~IReverseSequenceLayer() noexcept = default;
6121}; // class IReverseSequenceLayer
6122
6142{
6143public:
6151 void setEpsilon(float eps) noexcept
6152 {
6153 return mImpl->setEpsilon(eps);
6154 }
6155
6161 float getEpsilon() const noexcept
6162 {
6163 return mImpl->getEpsilon();
6164 }
6165
6171 void setAxes(uint32_t axesMask) noexcept
6172 {
6173 return mImpl->setAxes(axesMask);
6174 }
6175
6181 uint32_t getAxes() const noexcept
6182 {
6183 return mImpl->getAxes();
6184 }
6185
6202 void setNbGroups(int64_t nbGroups) noexcept
6203 {
6204 return mImpl->setNbGroups(nbGroups);
6205 }
6206
6212 int64_t getNbGroups() const noexcept
6213 {
6214 return mImpl->getNbGroups();
6215 }
6216
6238 void setComputePrecision(DataType type) noexcept
6239 {
6240 return mImpl->setComputePrecision(type);
6241 }
6242
6249 {
6250 return mImpl->getComputePrecision();
6251 }
6252
6253protected:
6254 apiv::VNormalizationLayer* mImpl;
6255 virtual ~INormalizationLayer() noexcept = default;
6256};
6257
6276{
6277public:
6278 virtual ~INetworkDefinition() noexcept = default;
6279
6316 ITensor* addInput(char const* name, DataType type, Dims const& dimensions) noexcept
6317 {
6318 return mImpl->addInput(name, type, dimensions);
6319 }
6320
6330 void markOutput(ITensor& tensor) noexcept
6331 {
6332 mImpl->markOutput(tensor);
6333 }
6334
6348 bool markDebug(ITensor& tensor) noexcept
6349 {
6350 return mImpl->markDebug(tensor);
6351 }
6352
6364 bool unmarkDebug(ITensor& tensor) noexcept
6365 {
6366 return mImpl->unmarkDebug(tensor);
6367 }
6368
6374 bool isDebugTensor(nvinfer1::ITensor const& tensor) const noexcept
6375 {
6376 return mImpl->isDebugTensor(tensor);
6377 }
6378
6395 {
6396 return mImpl->addActivation(input, type);
6397 }
6398
6413 ILRNLayer* addLRN(ITensor& input, int64_t window, float alpha, float beta, float k) noexcept
6414 {
6415 return mImpl->addLRN(input, window, alpha, beta, k);
6416 }
6417
6439 IScaleLayer* addScale(ITensor& input, ScaleMode mode, Weights shift, Weights scale, Weights power) noexcept
6440 {
6441 return mImpl->addScale(input, mode, shift, scale, power);
6442 }
6443
6453 {
6454 return mImpl->addSoftMax(input);
6455 }
6456
6469 IConcatenationLayer* addConcatenation(ITensor* const* inputs, int32_t nbInputs) noexcept
6470 {
6471 return mImpl->addConcatenation(inputs, nbInputs);
6472 }
6473
6497 {
6498 return mImpl->addElementWise(input1, input2, op);
6499 }
6500
6518 IUnaryLayer* addUnary(ITensor& input, UnaryOperation operation) noexcept
6519 {
6520 return mImpl->addUnary(input, operation);
6521 }
6522
6533 {
6534 return mImpl->addShuffle(input);
6535 }
6536
6549 IOneHotLayer* addOneHot(ITensor& indices, ITensor& values, ITensor& depth, int32_t axis) noexcept
6550 {
6551 return mImpl->addOneHot(indices, values, depth, axis);
6552 }
6553
6561 int32_t getNbLayers() const noexcept
6562 {
6563 return mImpl->getNbLayers();
6564 }
6565
6575 ILayer* getLayer(int32_t index) const noexcept
6576 {
6577 return mImpl->getLayer(index);
6578 }
6579
6587 int32_t getNbInputs() const noexcept
6588 {
6589 return mImpl->getNbInputs();
6590 }
6591
6603 ITensor* getInput(int32_t index) const noexcept
6604 {
6605 return mImpl->getInput(index);
6606 }
6607
6617 int32_t getNbOutputs() const noexcept
6618 {
6619 return mImpl->getNbOutputs();
6620 }
6621
6633 ITensor* getOutput(int32_t index) const noexcept
6634 {
6635 return mImpl->getOutput(index);
6636 }
6637
6660 ITensor& input, ReduceOperation operation, uint32_t reduceAxes, bool keepDimensions) noexcept
6661 {
6662 return mImpl->addReduce(input, operation, reduceAxes, keepDimensions);
6663 }
6664
6692 ITopKLayer* addTopK(ITensor& input, TopKOperation op, int32_t k, uint32_t reduceAxes) noexcept
6693 {
6694 return mImpl->addTopK(input, op, k, reduceAxes);
6695 }
6696
6708 IGatherLayer* addGather(ITensor& data, ITensor& indices, int32_t axis) noexcept
6709 {
6710 return mImpl->addGather(data, indices, axis);
6711 }
6712
6724 IGatherLayer* addGatherV2(ITensor& data, ITensor& indices, GatherMode mode) noexcept
6725 {
6726 return mImpl->addGatherV2(data, indices, mode);
6727 }
6728
6744 {
6745 return mImpl->addRaggedSoftMax(input, bounds);
6746 }
6747
6765 ITensor& input0, MatrixOperation op0, ITensor& input1, MatrixOperation op1) noexcept
6766 {
6767 return mImpl->addMatrixMultiply(input0, op0, input1, op1);
6768 }
6769
6780 {
6781 return mImpl->addNonZero(input);
6782 }
6783
6803 IConstantLayer* addConstant(Dims const& dimensions, Weights weights) noexcept
6804 {
6805 return mImpl->addConstant(dimensions, weights);
6806 }
6807
6818 {
6819 return mImpl->addIdentity(input);
6820 }
6821
6832 ICastLayer* addCast(ITensor& input, DataType toType) noexcept
6833 {
6834 return mImpl->addCast(input, toType);
6835 }
6836
6847 void removeTensor(ITensor& tensor) noexcept
6848 {
6849 mImpl->removeTensor(tensor);
6850 }
6851
6859 void unmarkOutput(ITensor& tensor) noexcept
6860 {
6861 mImpl->unmarkOutput(tensor);
6862 }
6863
6878 IPluginV2Layer* addPluginV2(ITensor* const* inputs, int32_t nbInputs, IPluginV2& plugin) noexcept
6879 {
6880 return mImpl->addPluginV2(inputs, nbInputs, plugin);
6881 }
6882
6896 IPluginV3Layer* addPluginV3(ITensor* const* inputs, int32_t nbInputs, ITensor* const* shapeInputs,
6897 int32_t nbShapeInputs, IPluginV3& plugin) noexcept
6898 {
6899 return mImpl->addPluginV3(inputs, nbInputs, shapeInputs, nbShapeInputs, plugin);
6900 }
6901
6916 ISliceLayer* addSlice(ITensor& input, Dims const& start, Dims const& size, Dims const& stride) noexcept
6917 {
6918 return mImpl->addSlice(input, start, size, stride);
6919 }
6920
6940 void setName(char const* name) noexcept
6941 {
6942 mImpl->setName(name);
6943 }
6944
6954 char const* getName() const noexcept
6955 {
6956 return mImpl->getName();
6957 }
6958
6970 IShapeLayer* addShape(ITensor& input) noexcept
6971 {
6972 return mImpl->addShape(input);
6973 }
6974
6985 {
6986 return mImpl->hasImplicitBatchDimension();
6987 }
6988
6995 {
6996 return mImpl->getFlags();
6997 }
6998
7006 bool getFlag(NetworkDefinitionCreationFlag networkDefinitionCreationFlag) const noexcept
7007 {
7008 return mImpl->getFlag(networkDefinitionCreationFlag);
7009 }
7010
7023 bool markOutputForShapes(ITensor& tensor) noexcept
7024 {
7025 return mImpl->markOutputForShapes(tensor);
7026 }
7027
7035 bool unmarkOutputForShapes(ITensor& tensor) noexcept
7036 {
7037 return mImpl->unmarkOutputForShapes(tensor);
7038 }
7039
7054 {
7055 return mImpl->addParametricReLU(input, slope);
7056 }
7057
7076 ITensor& input, int64_t nbOutputMaps, Dims const& kernelSize, Weights kernelWeights, Weights biasWeights) noexcept
7077 {
7078 return mImpl->addConvolutionNd(input, nbOutputMaps, kernelSize, kernelWeights, biasWeights);
7079 }
7080
7095 IPoolingLayer* addPoolingNd(ITensor& input, PoolingType type, Dims const& windowSize) noexcept
7096 {
7097 return mImpl->addPoolingNd(input, type, windowSize);
7098 }
7099
7114 //
7118 ITensor& input, int64_t nbOutputMaps, Dims kernelSize, Weights kernelWeights, Weights biasWeights) noexcept
7119 {
7120 return mImpl->addDeconvolutionNd(input, nbOutputMaps, kernelSize, kernelWeights, biasWeights);
7121 }
7122
7155 ITensor& input, ScaleMode mode, Weights shift, Weights scale, Weights power, int32_t channelAxis) noexcept
7156 {
7157 return mImpl->addScaleNd(input, mode, shift, scale, power, channelAxis);
7158 }
7159
7172 {
7173 return mImpl->addResize(input);
7174 }
7175
7185 ILoop* addLoop() noexcept
7186 {
7187 return mImpl->addLoop();
7188 }
7189
7201 {
7202 return mImpl->addIfConditional();
7203 }
7204
7239 ISelectLayer* addSelect(ITensor& condition, ITensor& thenInput, ITensor& elseInput) noexcept
7240 {
7241 return mImpl->addSelect(condition, thenInput, elseInput);
7242 }
7243
7256 IAssertionLayer* addAssertion(ITensor& condition, char const* message) noexcept
7257 {
7258 return mImpl->addAssertion(condition, message);
7259 }
7260
7281 TRT_DEPRECATED IFillLayer* addFill(Dims const& dimensions, FillOperation op) noexcept
7282 {
7283 return mImpl->addFill(dimensions, op);
7284 }
7285
7307 IFillLayer* addFill(Dims const& dimensions, FillOperation op, DataType outputType) noexcept
7308 {
7309 return mImpl->addFillV2(dimensions, op, outputType);
7310 }
7311
7323 IPaddingLayer* addPaddingNd(ITensor& input, Dims const& prePadding, Dims const& postPadding) noexcept
7324 {
7325 return mImpl->addPaddingNd(input, prePadding, postPadding);
7326 }
7327
7347 bool setWeightsName(Weights weights, char const* name) noexcept
7348 {
7349 return mImpl->setWeightsName(weights, name);
7350 }
7351
7363 //
7366 void setErrorRecorder(IErrorRecorder* recorder) noexcept
7367 {
7368 mImpl->setErrorRecorder(recorder);
7369 }
7370
7382 {
7383 return mImpl->getErrorRecorder();
7384 }
7385
7403 {
7404 return mImpl->addDequantize(input, scale);
7405 }
7406
7423 IDequantizeLayer* addDequantize(ITensor& input, ITensor& scale, DataType outputType) noexcept
7424 {
7425 return mImpl->addDequantizeV2(input, scale, outputType);
7426 }
7427
7443 IScatterLayer* addScatter(ITensor& data, ITensor& indices, ITensor& updates, ScatterMode mode) noexcept
7444 {
7445 return mImpl->addScatter(data, indices, updates, mode);
7446 }
7447
7465 {
7466 return mImpl->addQuantize(input, scale);
7467 }
7468
7485 IQuantizeLayer* addQuantize(ITensor& input, ITensor& scale, DataType outputType) noexcept
7486 {
7487 return mImpl->addQuantizeV2(input, scale, outputType);
7488 }
7489
7490
7501 IEinsumLayer* addEinsum(ITensor* const* inputs, int32_t nbInputs, char const* equation) noexcept
7502 {
7503 return mImpl->addEinsum(inputs, nbInputs, equation);
7504 }
7505
7520 {
7521 return mImpl->addGridSample(input, grid);
7522 }
7523
7537 INMSLayer* addNMS(ITensor& boxes, ITensor& scores, ITensor& maxOutputBoxesPerClass) noexcept
7538 {
7539 return mImpl->addNMS(boxes, scores, maxOutputBoxesPerClass);
7540 }
7541
7555 {
7556 return mImpl->addReverseSequence(input, sequenceLens);
7557 }
7558
7580 INormalizationLayer* addNormalization(ITensor& input, ITensor& scale, ITensor& bias, uint32_t axesMask) noexcept
7581 {
7582 return mImpl->addNormalization(input, scale, bias, axesMask);
7583 }
7584
7591 virtual IBuilder& getBuilder() const noexcept
7592 {
7593 return mImpl->getBuilder();
7594 }
7595
7604 bool markWeightsRefittable(char const* name) noexcept
7605 {
7606 return mImpl->markWeightsRefittable(name);
7607 }
7608
7616 bool unmarkWeightsRefittable(char const* name) noexcept
7617 {
7618 return mImpl->unmarkWeightsRefittable(name);
7619 }
7620
7629 bool areWeightsMarkedRefittable(char const* name) const noexcept
7630 {
7631 return mImpl->areWeightsMarkedRefittable(name);
7632 }
7633
7634protected:
7635 apiv::VNetworkDefinition* mImpl;
7636};
7637
7645enum class CalibrationAlgoType : int32_t
7646{
7651};
7652
7658template <>
7659constexpr inline int32_t EnumMax<CalibrationAlgoType>() noexcept
7660{
7661 return 4;
7662}
7663
7678{
7679public:
7687 TRT_DEPRECATED virtual int32_t getBatchSize() const noexcept = 0;
7688
7703 virtual bool getBatch(void* bindings[], char const* names[], int32_t nbBindings) noexcept = 0;
7704
7719 virtual void const* readCalibrationCache(std::size_t& length) noexcept = 0;
7720
7729 virtual void writeCalibrationCache(void const* ptr, std::size_t length) noexcept = 0;
7730
7736 virtual CalibrationAlgoType getAlgorithm() noexcept = 0;
7737
7738 ~IInt8Calibrator() noexcept override = default;
7739};
7740
7741namespace v_1_0
7742{
7744{
7745public:
7749 InterfaceInfo getInterfaceInfo() const noexcept override
7750 {
7751 return InterfaceInfo{"IInt8EntropyCalibrator", 1, 0};
7752 }
7753
7758 {
7760 }
7761
7762 ~IInt8EntropyCalibrator() noexcept override = default;
7763};
7764} // namespace v_1_0
7765
7780
7781namespace v_1_0
7782{
7784{
7785public:
7789 InterfaceInfo getInterfaceInfo() const noexcept override
7790 {
7791 return InterfaceInfo{"IInt8EntropyCalibrator2", 1, 0};
7792 }
7793
7798 {
7800 }
7801
7802 ~IInt8EntropyCalibrator2() noexcept override = default;
7803};
7804} // namespace v_1_0
7805
7820
7821namespace v_1_0
7822{
7824{
7825public:
7829 InterfaceInfo getInterfaceInfo() const noexcept override
7830 {
7831 return InterfaceInfo{"IInt8MinMaxCalibrator", 1, 0};
7832 }
7833
7838 {
7840 }
7841
7842 ~IInt8MinMaxCalibrator() noexcept override = default;
7843};
7844} // namespace v_1_0
7845
7859
7860namespace v_1_0
7861{
7863{
7864public:
7868 InterfaceInfo getInterfaceInfo() const noexcept override
7869 {
7870 return InterfaceInfo{"IInt8Calibrator", 1, 0};
7871 }
7872
7877 {
7879 }
7880
7887 virtual double getQuantile() const noexcept = 0;
7888
7895 virtual double getRegressionCutoff() const noexcept = 0;
7896
7909 virtual void const* readHistogramCache(std::size_t& length) noexcept = 0;
7910
7919 virtual void writeHistogramCache(void const* ptr, std::size_t length) noexcept = 0;
7920
7921 ~IInt8LegacyCalibrator() noexcept override = default;
7922};
7923} // namespace v_1_0
7924
7939
7951{
7952public:
7958 DataType getDataType() const noexcept
7959 {
7960 return mImpl->getDataType();
7961 }
7962
7969 Dims getStrides() const noexcept
7970 {
7971 return mImpl->getStrides();
7972 }
7973
7979 int64_t getVectorizedDim() const noexcept
7980 {
7981 return mImpl->getVectorizedDim();
7982 }
7983
7990 int64_t getComponentsPerElement() const noexcept
7991 {
7992 return mImpl->getComponentsPerElement();
7993 }
7994
7995protected:
7996 virtual ~IAlgorithmIOInfo() noexcept = default;
7997 apiv::VAlgorithmIOInfo* mImpl;
7998};
7999
8012{
8013public:
8017 int64_t getImplementation() const noexcept
8018 {
8019 return mImpl->getImplementation();
8020 }
8021
8025 int64_t getTactic() const noexcept
8026 {
8027 return mImpl->getTactic();
8028 }
8029
8030protected:
8031 virtual ~IAlgorithmVariant() noexcept = default;
8032 apiv::VAlgorithmVariant* mImpl;
8033};
8034
8044{
8045public:
8051 char const* getName() const noexcept
8052 {
8053 return mImpl->getName();
8054 }
8055
8063 Dims getDimensions(int32_t index, OptProfileSelector select) const noexcept
8064 {
8065 return mImpl->getDimensions(index, select);
8066 }
8067
8071 int32_t getNbInputs() const noexcept
8072 {
8073 return mImpl->getNbInputs();
8074 }
8075
8079 int32_t getNbOutputs() const noexcept
8080 {
8081 return mImpl->getNbOutputs();
8082 }
8083
8084protected:
8085 virtual ~IAlgorithmContext() noexcept = default;
8086 apiv::VAlgorithmContext* mImpl;
8087};
8088
8100class IAlgorithm : public INoCopy
8101{
8102public:
8107 {
8108 return mImpl->getAlgorithmVariant();
8109 }
8110
8114 float getTimingMSec() const noexcept
8115 {
8116 return mImpl->getTimingMSec();
8117 }
8118
8122 std::size_t getWorkspaceSize() const noexcept
8123 {
8124 return mImpl->getWorkspaceSize();
8125 }
8126
8136 IAlgorithmIOInfo const* getAlgorithmIOInfoByIndex(int32_t index) const noexcept
8137 {
8138 return mImpl->getAlgorithmIOInfoByIndex(index);
8139 }
8140
8141protected:
8142 virtual ~IAlgorithm() noexcept = default;
8143 apiv::VAlgorithm* mImpl;
8144}; // IAlgorithm
8145
8146namespace v_1_0
8147{
8149{
8150public:
8154 InterfaceInfo getInterfaceInfo() const noexcept override
8155 {
8156 return InterfaceInfo{"IAlgorithmSelector", 1, 0};
8157 }
8172 virtual int32_t selectAlgorithms(IAlgorithmContext const& context, IAlgorithm const* const* choices,
8173 int32_t nbChoices, int32_t* selection) noexcept = 0;
8174
8185 virtual void reportAlgorithms(IAlgorithmContext const* const* algoContexts, IAlgorithm const* const* algoChoices,
8186 int32_t nbAlgorithms) noexcept = 0;
8187
8188 virtual ~IAlgorithmSelector() noexcept = default;
8189};
8190} // namespace v_1_0
8191
8203
8210using QuantizationFlags = uint32_t;
8211
8221enum class QuantizationFlag : int32_t
8222{
8227};
8228
8234template <>
8235constexpr inline int32_t EnumMax<QuantizationFlag>() noexcept
8236{
8237 return 1;
8238}
8239
8257enum class RuntimePlatform : int32_t
8258{
8261 kSAME_AS_BUILD = 0,
8262
8265 kWINDOWS_AMD64 = 1,
8266};
8267
8268namespace impl
8269{
8275template <>
8277{
8278 static constexpr int32_t kVALUE = 2;
8279};
8280} // namespace impl
8281
8288using BuilderFlags = uint32_t;
8289
8297enum class BuilderFlag : int32_t
8298{
8300 kFP16 = 0,
8301
8303 kINT8 = 1,
8304
8306 kDEBUG = 2,
8307
8309 kGPU_FALLBACK = 3,
8310
8312 kREFIT = 4,
8313
8316
8320 kTF32 = 6,
8321
8323 kSPARSE_WEIGHTS = 7,
8324
8331 kSAFETY_SCOPE = 8,
8332
8335
8339
8343 kDIRECT_IO = 11,
8344
8347
8354
8360
8366 kFP8 = 15,
8367
8371
8374 kBF16 = 17,
8375
8381
8383 kSTRIP_PLAN = 19,
8384
8387
8394 kREFIT_IDENTICAL = 20,
8395
8421 kWEIGHT_STREAMING = 21,
8422
8424 kINT4 = 22,
8425
8430 kREFIT_INDIVIDUAL = 23,
8431
8432};
8433
8439template <>
8440constexpr inline int32_t EnumMax<BuilderFlag>() noexcept
8441{
8442 return 24;
8443}
8444
8458class ITimingCache : public INoCopy
8459{
8460public:
8461 virtual ~ITimingCache() noexcept = default;
8462
8472 nvinfer1::IHostMemory* serialize() const noexcept
8473 {
8474 return mImpl->serialize();
8475 }
8476
8496 bool combine(ITimingCache const& inputCache, bool ignoreMismatch) noexcept
8497 {
8498 return mImpl->combine(inputCache, ignoreMismatch);
8499 }
8500
8506 bool reset() noexcept
8507 {
8508 return mImpl->reset();
8509 }
8510
8511protected:
8512 apiv::VTimingCache* mImpl;
8513};
8514
8522enum class MemoryPoolType : int32_t
8523{
8530 kWORKSPACE = 0,
8531
8539
8545 kDLA_LOCAL_DRAM = 2,
8546
8552 kDLA_GLOBAL_DRAM = 3,
8553
8561 kTACTIC_DRAM = 4,
8562
8576};
8577
8583template <>
8584constexpr inline int32_t EnumMax<MemoryPoolType>() noexcept
8585{
8586 return 6;
8587}
8588
8597enum class PreviewFeature : int32_t
8598{
8605
8610};
8611
8612namespace impl
8613{
8619template <>
8621{
8622 static constexpr int32_t kVALUE = 2;
8623};
8624} // namespace impl
8625
8636enum class HardwareCompatibilityLevel : int32_t
8637{
8640 kNONE = 0,
8641
8651 kAMPERE_PLUS = 1,
8652};
8653
8654namespace impl
8655{
8661template <>
8663{
8664 static constexpr int32_t kVALUE = 2;
8665};
8666} // namespace impl
8667
8668namespace v_1_0
8669{
8671{
8672public:
8673 IProgressMonitor() = default;
8674 virtual ~IProgressMonitor() noexcept = default;
8675
8679 InterfaceInfo getInterfaceInfo() const noexcept override
8680 {
8681 return InterfaceInfo{"IProgressMonitor", 1, 0};
8682 }
8683
8703 virtual void phaseStart(char const* phaseName, char const* parentPhase, int32_t nbSteps) noexcept = 0;
8704
8717 virtual bool stepComplete(char const* phaseName, int32_t step) noexcept = 0;
8718
8730 virtual void phaseFinish(char const* phaseName) noexcept = 0;
8731
8732}; // class IProgressMonitor
8733} // namespace v_1_0
8734
8755
8764{
8765public:
8766 virtual ~IBuilderConfig() noexcept = default;
8767
8776 virtual void setAvgTimingIterations(int32_t avgTiming) noexcept
8777 {
8778 mImpl->setAvgTimingIterations(avgTiming);
8779 }
8780
8788 int32_t getAvgTimingIterations() const noexcept
8789 {
8790 return mImpl->getAvgTimingIterations();
8791 }
8792
8801 void setEngineCapability(EngineCapability capability) noexcept
8802 {
8803 mImpl->setEngineCapability(capability);
8804 }
8805
8814 {
8815 return mImpl->getEngineCapability();
8816 }
8817
8826 {
8827 mImpl->setInt8Calibrator(calibrator);
8828 }
8829
8836 {
8837 return mImpl->getInt8Calibrator();
8838 }
8839
8852 void setFlags(BuilderFlags builderFlags) noexcept
8853 {
8854 mImpl->setFlags(builderFlags);
8855 }
8856
8864 BuilderFlags getFlags() const noexcept
8865 {
8866 return mImpl->getFlags();
8867 }
8868
8876 void clearFlag(BuilderFlag builderFlag) noexcept
8877 {
8878 mImpl->clearFlag(builderFlag);
8879 }
8880
8888 void setFlag(BuilderFlag builderFlag) noexcept
8889 {
8890 mImpl->setFlag(builderFlag);
8891 }
8892
8900 bool getFlag(BuilderFlag builderFlag) const noexcept
8901 {
8902 return mImpl->getFlag(builderFlag);
8903 }
8904
8917 void setDeviceType(ILayer const* layer, DeviceType deviceType) noexcept
8918 {
8919 mImpl->setDeviceType(layer, deviceType);
8920 }
8921
8927 DeviceType getDeviceType(ILayer const* layer) const noexcept
8928 {
8929 return mImpl->getDeviceType(layer);
8930 }
8931
8939 bool isDeviceTypeSet(ILayer const* layer) const noexcept
8940 {
8941 return mImpl->isDeviceTypeSet(layer);
8942 }
8943
8949 void resetDeviceType(ILayer const* layer) noexcept
8950 {
8951 mImpl->resetDeviceType(layer);
8952 }
8953
8959 bool canRunOnDLA(ILayer const* layer) const noexcept
8960 {
8961 return mImpl->canRunOnDLA(layer);
8962 }
8963
8975 void setDLACore(int32_t dlaCore) noexcept
8976 {
8977 mImpl->setDLACore(dlaCore);
8978 }
8979
8985 int32_t getDLACore() const noexcept
8986 {
8987 return mImpl->getDLACore();
8988 }
8989
8996 void setDefaultDeviceType(DeviceType deviceType) noexcept
8997 {
8998 mImpl->setDefaultDeviceType(deviceType);
8999 }
9000
9007 {
9008 return mImpl->getDefaultDeviceType();
9009 }
9010
9016 void reset() noexcept
9017 {
9018 mImpl->reset();
9019 }
9020
9028 void setProfileStream(const cudaStream_t stream) noexcept
9029 {
9030 return mImpl->setProfileStream(stream);
9031 }
9032
9040 cudaStream_t getProfileStream() const noexcept
9041 {
9042 return mImpl->getProfileStream();
9043 }
9044
9057 int32_t addOptimizationProfile(IOptimizationProfile const* profile) noexcept
9058 {
9059 return mImpl->addOptimizationProfile(profile);
9060 }
9061
9070 int32_t getNbOptimizationProfiles() const noexcept
9071 {
9072 return mImpl->getNbOptimizationProfiles();
9073 }
9074
9083 {
9084 mImpl->setProfilingVerbosity(verbosity);
9085 }
9086
9096 {
9097 return mImpl->getProfilingVerbosity();
9098 }
9099
9105 {
9106 mImpl->setAlgorithmSelector(selector);
9107 }
9108
9113 {
9114 return mImpl->getAlgorithmSelector();
9115 }
9116
9131 {
9132 return mImpl->setCalibrationProfile(profile);
9133 }
9134
9143 {
9144 return mImpl->getCalibrationProfile();
9145 }
9146
9160 {
9161 mImpl->setQuantizationFlags(flags);
9162 }
9163
9172 {
9173 return mImpl->getQuantizationFlags();
9174 }
9175
9184 {
9185 mImpl->clearQuantizationFlag(flag);
9186 }
9187
9196 {
9197 mImpl->setQuantizationFlag(flag);
9198 }
9199
9207 bool getQuantizationFlag(QuantizationFlag flag) const noexcept
9208 {
9209 return mImpl->getQuantizationFlag(flag);
9210 }
9211
9229 bool setTacticSources(TacticSources tacticSources) noexcept
9230 {
9231 return mImpl->setTacticSources(tacticSources);
9232 }
9233
9245 {
9246 return mImpl->getTacticSources();
9247 }
9248
9263 nvinfer1::ITimingCache* createTimingCache(void const* blob, std::size_t size) const noexcept
9264 {
9265 return mImpl->createTimingCache(blob, size);
9266 }
9267
9286 bool setTimingCache(ITimingCache const& cache, bool ignoreMismatch) noexcept
9287 {
9288 return mImpl->setTimingCache(cache, ignoreMismatch);
9289 }
9290
9297 {
9298 return mImpl->getTimingCache();
9299 }
9300
9328 void setMemoryPoolLimit(MemoryPoolType pool, std::size_t poolSize) noexcept
9329 {
9330 mImpl->setMemoryPoolLimit(pool, poolSize);
9331 }
9332
9347 std::size_t getMemoryPoolLimit(MemoryPoolType pool) const noexcept
9348 {
9349 return mImpl->getMemoryPoolLimit(pool);
9350 }
9351
9365 void setPreviewFeature(PreviewFeature feature, bool enable) noexcept
9366 {
9367 mImpl->setPreviewFeature(feature, enable);
9368 }
9369
9379 bool getPreviewFeature(PreviewFeature feature) const noexcept
9380 {
9381 return mImpl->getPreviewFeature(feature);
9382 }
9383
9412 void setBuilderOptimizationLevel(int32_t level) noexcept
9413 {
9414 mImpl->setBuilderOptimizationLevel(level);
9415 }
9416
9425 {
9426 return mImpl->getBuilderOptimizationLevel();
9427 }
9428
9441 void setHardwareCompatibilityLevel(HardwareCompatibilityLevel hardwareCompatibilityLevel) noexcept
9442 {
9443 mImpl->setHardwareCompatibilityLevel(hardwareCompatibilityLevel);
9444 }
9445
9455 {
9456 return mImpl->getHardwareCompatibilityLevel();
9457 }
9458
9467 void setPluginsToSerialize(char const* const* paths, int32_t nbPaths) noexcept
9468 {
9469 mImpl->setPluginsToSerialize(paths, nbPaths);
9470 }
9471
9480 char const* getPluginToSerialize(int32_t index) const noexcept
9481 {
9482 return mImpl->getPluginToSerialize(index);
9483 }
9484
9490 int32_t getNbPluginsToSerialize() const noexcept
9491 {
9492 return mImpl->getNbPluginsToSerialize();
9493 }
9494
9519 void setMaxAuxStreams(int32_t nbStreams) noexcept
9520 {
9521 mImpl->setMaxAuxStreams(nbStreams);
9522 }
9523
9529 int32_t getMaxAuxStreams() const noexcept
9530 {
9531 return mImpl->getMaxAuxStreams();
9532 }
9533
9545 void setProgressMonitor(IProgressMonitor* monitor) noexcept
9546 {
9547 return mImpl->setProgressMonitor(monitor);
9548 }
9549
9556 {
9557 return mImpl->getProgressMonitor();
9558 }
9559
9571 void setRuntimePlatform(RuntimePlatform runtimePlatform) noexcept
9572 {
9573 mImpl->setRuntimePlatform(runtimePlatform);
9574 }
9575
9584 {
9585 return mImpl->getRuntimePlatform();
9586 }
9587
9588protected:
9589 apiv::VBuilderConfig* mImpl;
9590};
9591
9600
9610{
9615
9620 kSTRONGLY_TYPED = 1,
9621};
9622
9628template <>
9629constexpr inline int32_t EnumMax<NetworkDefinitionCreationFlag>() noexcept
9630{
9631 return 2;
9632}
9633
9641class IBuilder : public INoCopy
9642{
9643public:
9644 virtual ~IBuilder() noexcept = default;
9645
9649 bool platformHasFastFp16() const noexcept
9650 {
9651 return mImpl->platformHasFastFp16();
9652 }
9653
9657 bool platformHasFastInt8() const noexcept
9658 {
9659 return mImpl->platformHasFastInt8();
9660 }
9661
9669 int32_t getMaxDLABatchSize() const noexcept
9670 {
9671 return mImpl->getMaxDLABatchSize();
9672 }
9673
9677 int32_t getNbDLACores() const noexcept
9678 {
9679 return mImpl->getNbDLACores();
9680 }
9681
9694 void setGpuAllocator(IGpuAllocator* allocator) noexcept
9695 {
9696 mImpl->setGpuAllocator(allocator);
9697 }
9698
9705 {
9706 return mImpl->createBuilderConfig();
9707 }
9708
9727 {
9728 return mImpl->createNetworkV2(flags);
9729 }
9730
9742 {
9743 return mImpl->createOptimizationProfile();
9744 }
9745
9760 void setErrorRecorder(IErrorRecorder* recorder) noexcept
9761 {
9762 mImpl->setErrorRecorder(recorder);
9763 }
9764
9776 {
9777 return mImpl->getErrorRecorder();
9778 }
9779
9783 void reset() noexcept
9784 {
9785 mImpl->reset();
9786 }
9787
9791 bool platformHasTf32() const noexcept
9792 {
9793 return mImpl->platformHasTf32();
9794 }
9795
9811 {
9812 return mImpl->buildSerializedNetwork(network, config);
9813 }
9814
9832 bool isNetworkSupported(INetworkDefinition const& network, IBuilderConfig const& config) const noexcept
9833 {
9834 return mImpl->isNetworkSupported(network, config);
9835 }
9836
9842 ILogger* getLogger() const noexcept
9843 {
9844 return mImpl->getLogger();
9845 }
9846
9858 bool setMaxThreads(int32_t maxThreads) noexcept
9859 {
9860 return mImpl->setMaxThreads(maxThreads);
9861 }
9862
9872 int32_t getMaxThreads() const noexcept
9873 {
9874 return mImpl->getMaxThreads();
9875 }
9876
9883 {
9884 return mImpl->getPluginRegistry();
9885 }
9886
9887protected:
9888 apiv::VBuilder* mImpl;
9889};
9890
9891} // namespace nvinfer1
9892
9897extern "C" TENSORRTAPI void* createInferBuilder_INTERNAL(void* logger, int32_t version) noexcept;
9898
9899namespace nvinfer1
9900{
9901namespace
9902{
9903
9911inline IBuilder* createInferBuilder(ILogger& logger) noexcept
9912{
9913 return static_cast<IBuilder*>(createInferBuilder_INTERNAL(&logger, NV_TENSORRT_VERSION));
9914}
9915
9916} // namespace
9917
9931 nvinfer1::EngineCapability capability) noexcept;
9932
9933namespace safe
9934{
9936class IPluginRegistry;
9937} // namespace safe
9938
9947 nvinfer1::EngineCapability capability) noexcept;
9948
9949} // namespace nvinfer1
9950
9951#endif // NV_INFER_H
#define TENSORRTAPI
Definition: NvInferRuntimeBase.h:59
#define NV_TENSORRT_VERSION
Definition: NvInferRuntimeBase.h:93
#define TRT_DEPRECATED
Definition: NvInferRuntimeBase.h:45
#define TRT_DEPRECATED_ENUM
Definition: NvInferRuntimeBase.h:46
Definition: NvInferRuntimeBase.h:202
static constexpr int32_t MAX_DIMS
The maximum rank (number of dimensions) supported for a tensor.
Definition: NvInferRuntimeBase.h:205
An Activation layer in a network definition.
Definition: NvInfer.h:1342
void setBeta(float beta) noexcept
Set the beta parameter (must be finite).
Definition: NvInfer.h:1390
void setActivationType(ActivationType type) noexcept
Set the type of activation to be performed.
Definition: NvInfer.h:1351
ActivationType getActivationType() const noexcept
Get the type of activation to be performed.
Definition: NvInfer.h:1361
float getAlpha() const noexcept
Get the alpha parameter.
Definition: NvInfer.h:1399
virtual ~IActivationLayer() noexcept=default
float getBeta() const noexcept
Get the beta parameter.
Definition: NvInfer.h:1408
void setAlpha(float alpha) noexcept
Set the alpha parameter (must be finite).
Definition: NvInfer.h:1376
Describes the context and requirements, that could be fulfilled by one or more instances of IAlgorith...
Definition: NvInfer.h:8044
int32_t getNbOutputs() const noexcept
Return number of outputs of the algorithm.
Definition: NvInfer.h:8079
int32_t getNbInputs() const noexcept
Return number of inputs of the algorithm.
Definition: NvInfer.h:8071
char const * getName() const noexcept
Return name of the algorithm node.
Definition: NvInfer.h:8051
virtual ~IAlgorithmContext() noexcept=default
Dims getDimensions(int32_t index, OptProfileSelector select) const noexcept
Get the minimum / optimum / maximum dimensions for input or output tensor.
Definition: NvInfer.h:8063
Describes a variation of execution of a layer. An algorithm is represented by IAlgorithmVariant and t...
Definition: NvInfer.h:8101
std::size_t getWorkspaceSize() const noexcept
The size of the GPU temporary memory in bytes which the algorithm uses at execution time.
Definition: NvInfer.h:8122
float getTimingMSec() const noexcept
The time in milliseconds to execute the algorithm.
Definition: NvInfer.h:8114
IAlgorithmIOInfo const * getAlgorithmIOInfoByIndex(int32_t index) const noexcept
Returns the format of an Algorithm input or output. Algorithm inputs are incrementally numbered first...
Definition: NvInfer.h:8136
virtual ~IAlgorithm() noexcept=default
IAlgorithmVariant const & getAlgorithmVariant() const noexcept
Returns the algorithm variant.
Definition: NvInfer.h:8106
Carries information about input or output of the algorithm. IAlgorithmIOInfo for all the input and ou...
Definition: NvInfer.h:7951
virtual ~IAlgorithmIOInfo() noexcept=default
int64_t getVectorizedDim() const noexcept
Return the index of the vectorized dimension or -1 for non-vectorized formats.
Definition: NvInfer.h:7979
Dims getStrides() const noexcept
Return strides of the input/output tensor of algorithm. For vectorized formats, strides are given in ...
Definition: NvInfer.h:7969
DataType getDataType() const noexcept
Return DataType of the input/output of algorithm.
Definition: NvInfer.h:7958
int64_t getComponentsPerElement() const noexcept
Return the number of components per element. This is always 1 for non-vectorized formats.
Definition: NvInfer.h:7990
provides a unique 128-bit identifier, which along with the input and output information denotes the v...
Definition: NvInfer.h:8012
virtual ~IAlgorithmVariant() noexcept=default
int64_t getTactic() const noexcept
Return tactic of the algorithm.
Definition: NvInfer.h:8025
int64_t getImplementation() const noexcept
Return implementation of the algorithm.
Definition: NvInfer.h:8017
An assertion layer in a network.
Definition: NvInfer.h:4928
void setMessage(char const *message) noexcept
Set the message to print if the assertion fails.
Definition: NvInfer.h:4938
char const * getMessage() const noexcept
Return the assertion message.
Definition: NvInfer.h:4948
virtual ~IAssertionLayer() noexcept=default
Holds properties for configuring a builder to produce an engine.
Definition: NvInfer.h:8764
void setMemoryPoolLimit(MemoryPoolType pool, std::size_t poolSize) noexcept
Set the memory size for the memory pool.
Definition: NvInfer.h:9328
void setQuantizationFlag(QuantizationFlag flag) noexcept
Set a single quantization flag.
Definition: NvInfer.h:9195
nvinfer1::ITimingCache * createTimingCache(void const *blob, std::size_t size) const noexcept
Create timing cache.
Definition: NvInfer.h:9263
void setPreviewFeature(PreviewFeature feature, bool enable) noexcept
Enable or disable a specific preview feature.
Definition: NvInfer.h:9365
TRT_DEPRECATED void setInt8Calibrator(IInt8Calibrator *calibrator) noexcept
Set Int8 Calibration interface.
Definition: NvInfer.h:8825
bool getPreviewFeature(PreviewFeature feature) const noexcept
Get status of preview feature.
Definition: NvInfer.h:9379
void clearQuantizationFlag(QuantizationFlag flag) noexcept
clear a quantization flag.
Definition: NvInfer.h:9183
int32_t getBuilderOptimizationLevel() noexcept
Get builder optimization level.
Definition: NvInfer.h:9424
bool setTacticSources(TacticSources tacticSources) noexcept
Set tactic sources.
Definition: NvInfer.h:9229
void setPluginsToSerialize(char const *const *paths, int32_t nbPaths) noexcept
Set the plugin libraries to be serialized with version-compatible engines.
Definition: NvInfer.h:9467
bool getQuantizationFlag(QuantizationFlag flag) const noexcept
Returns true if the quantization flag is set.
Definition: NvInfer.h:9207
TRT_DEPRECATED IInt8Calibrator * getInt8Calibrator() const noexcept
Get Int8 Calibration interface.
Definition: NvInfer.h:8835
std::size_t getMemoryPoolLimit(MemoryPoolType pool) const noexcept
Get the memory size limit of the memory pool.
Definition: NvInfer.h:9347
int32_t getDLACore() const noexcept
Get the DLA core that the engine executes on.
Definition: NvInfer.h:8985
int32_t getNbPluginsToSerialize() const noexcept
Get the number of plugin library paths to be serialized with version-compatible engines.
Definition: NvInfer.h:9490
void setDeviceType(ILayer const *layer, DeviceType deviceType) noexcept
Set the device that this layer must execute on.
Definition: NvInfer.h:8917
void setEngineCapability(EngineCapability capability) noexcept
Configure the builder to target specified EngineCapability flow.
Definition: NvInfer.h:8801
int32_t getMaxAuxStreams() const noexcept
Get the maximum number of auxiliary streams that TRT is allowed to use.
Definition: NvInfer.h:9529
bool getFlag(BuilderFlag builderFlag) const noexcept
Returns true if the build mode flag is set.
Definition: NvInfer.h:8900
void setQuantizationFlags(QuantizationFlags flags) noexcept
Set the quantization flags.
Definition: NvInfer.h:9159
void setProgressMonitor(IProgressMonitor *monitor) noexcept
Sets the progress monitor for building a network.
Definition: NvInfer.h:9545
void setProfilingVerbosity(ProfilingVerbosity verbosity) noexcept
Set verbosity level of layer information exposed in NVTX annotations and IEngineInspector.
Definition: NvInfer.h:9082
IAlgorithmSelector * getAlgorithmSelector() const noexcept
Get Algorithm Selector.
Definition: NvInfer.h:9112
int32_t getNbOptimizationProfiles() const noexcept
Get number of optimization profiles.
Definition: NvInfer.h:9070
QuantizationFlags getQuantizationFlags() const noexcept
Get the quantization flags.
Definition: NvInfer.h:9171
nvinfer1::ITimingCache const * getTimingCache() const noexcept
Get the pointer to the timing cache from current IBuilderConfig.
Definition: NvInfer.h:9296
void reset() noexcept
Resets the builder configuration to defaults.
Definition: NvInfer.h:9016
bool setTimingCache(ITimingCache const &cache, bool ignoreMismatch) noexcept
Attach a timing cache to IBuilderConfig.
Definition: NvInfer.h:9286
char const * getPluginToSerialize(int32_t index) const noexcept
Get the plugin library path to be serialized with version-compatible engines.
Definition: NvInfer.h:9480
EngineCapability getEngineCapability() const noexcept
Query EngineCapability flow configured for the builder.
Definition: NvInfer.h:8813
void setAlgorithmSelector(IAlgorithmSelector *selector) noexcept
Set Algorithm Selector.
Definition: NvInfer.h:9104
RuntimePlatform getRuntimePlatform() const noexcept
Get the target platform for runtime execution.
Definition: NvInfer.h:9583
DeviceType getDefaultDeviceType() const noexcept
Get the default DeviceType which was set by setDefaultDeviceType.
Definition: NvInfer.h:9006
void setRuntimePlatform(RuntimePlatform runtimePlatform) noexcept
Set the target platform for runtime execution.
Definition: NvInfer.h:9571
BuilderFlags getFlags() const noexcept
Get the build mode flags for this builder config. Defaults to 0.
Definition: NvInfer.h:8864
void setFlags(BuilderFlags builderFlags) noexcept
Set the build mode flags to turn on builder options for this network.
Definition: NvInfer.h:8852
TacticSources getTacticSources() const noexcept
Get tactic sources.
Definition: NvInfer.h:9244
void resetDeviceType(ILayer const *layer) noexcept
reset the DeviceType for this layer
Definition: NvInfer.h:8949
void setDLACore(int32_t dlaCore) noexcept
Sets the DLA core used by the network. Defaults to -1.
Definition: NvInfer.h:8975
HardwareCompatibilityLevel getHardwareCompatibilityLevel() const noexcept
Get the hardware compatibility level.
Definition: NvInfer.h:9454
void clearFlag(BuilderFlag builderFlag) noexcept
clear a single build mode flag.
Definition: NvInfer.h:8876
int32_t addOptimizationProfile(IOptimizationProfile const *profile) noexcept
Add an optimization profile.
Definition: NvInfer.h:9057
IProgressMonitor * getProgressMonitor() const noexcept
Definition: NvInfer.h:9555
apiv::VBuilderConfig * mImpl
Definition: NvInfer.h:9589
TRT_DEPRECATED IOptimizationProfile const * getCalibrationProfile() noexcept
Get the current calibration profile.
Definition: NvInfer.h:9142
int32_t getAvgTimingIterations() const noexcept
Query the number of averaging iterations.
Definition: NvInfer.h:8788
void setDefaultDeviceType(DeviceType deviceType) noexcept
Sets the default DeviceType to be used by the builder. It ensures that all the layers that can run on...
Definition: NvInfer.h:8996
void setFlag(BuilderFlag builderFlag) noexcept
Set a single build mode flag.
Definition: NvInfer.h:8888
TRT_DEPRECATED bool setCalibrationProfile(IOptimizationProfile const *profile) noexcept
Add a calibration profile.
Definition: NvInfer.h:9130
virtual ~IBuilderConfig() noexcept=default
DeviceType getDeviceType(ILayer const *layer) const noexcept
Get the device that this layer executes on.
Definition: NvInfer.h:8927
bool canRunOnDLA(ILayer const *layer) const noexcept
Checks if a layer can run on DLA.
Definition: NvInfer.h:8959
cudaStream_t getProfileStream() const noexcept
Get the cuda stream that is used to profile this network.
Definition: NvInfer.h:9040
void setHardwareCompatibilityLevel(HardwareCompatibilityLevel hardwareCompatibilityLevel) noexcept
Set the hardware compatibility level.
Definition: NvInfer.h:9441
void setMaxAuxStreams(int32_t nbStreams) noexcept
Set the maximum number of auxiliary streams that TRT is allowed to use.
Definition: NvInfer.h:9519
ProfilingVerbosity getProfilingVerbosity() const noexcept
Get verbosity level of layer information exposed in NVTX annotations and IEngineInspector.
Definition: NvInfer.h:9095
bool isDeviceTypeSet(ILayer const *layer) const noexcept
whether the DeviceType has been explicitly set for this layer
Definition: NvInfer.h:8939
void setBuilderOptimizationLevel(int32_t level) noexcept
Set builder optimization level.
Definition: NvInfer.h:9412
void setProfileStream(const cudaStream_t stream) noexcept
Set the cuda stream that is used to profile this network.
Definition: NvInfer.h:9028
Builds an engine from a network definition.
Definition: NvInfer.h:9642
int32_t getMaxDLABatchSize() const noexcept
Get the maximum batch size DLA can support. For any tensor the total volume of index dimensions combi...
Definition: NvInfer.h:9669
int32_t getNbDLACores() const noexcept
Return the number of DLA engines available to this builder.
Definition: NvInfer.h:9677
IErrorRecorder * getErrorRecorder() const noexcept
get the ErrorRecorder assigned to this interface.
Definition: NvInfer.h:9775
apiv::VBuilder * mImpl
Definition: NvInfer.h:9888
ILogger * getLogger() const noexcept
get the logger with which the builder was created
Definition: NvInfer.h:9842
bool isNetworkSupported(INetworkDefinition const &network, IBuilderConfig const &config) const noexcept
Checks that a network is within the scope of the IBuilderConfig settings.
Definition: NvInfer.h:9832
bool platformHasTf32() const noexcept
Determine whether the platform has TF32 support.
Definition: NvInfer.h:9791
int32_t getMaxThreads() const noexcept
get the maximum number of threads that can be used by the builder.
Definition: NvInfer.h:9872
IPluginRegistry & getPluginRegistry() noexcept
get the local plugin registry that can be used by the builder.
Definition: NvInfer.h:9882
nvinfer1::IOptimizationProfile * createOptimizationProfile() noexcept
Create a new optimization profile.
Definition: NvInfer.h:9741
void setGpuAllocator(IGpuAllocator *allocator) noexcept
Set the GPU allocator.
Definition: NvInfer.h:9694
nvinfer1::INetworkDefinition * createNetworkV2(NetworkDefinitionCreationFlags flags) noexcept
Create a network definition object.
Definition: NvInfer.h:9726
nvinfer1::IBuilderConfig * createBuilderConfig() noexcept
Create a builder configuration object.
Definition: NvInfer.h:9704
void reset() noexcept
Resets the builder state to default values.
Definition: NvInfer.h:9783
bool setMaxThreads(int32_t maxThreads) noexcept
Set the maximum number of threads.
Definition: NvInfer.h:9858
void setErrorRecorder(IErrorRecorder *recorder) noexcept
Set the ErrorRecorder for this interface.
Definition: NvInfer.h:9760
bool platformHasFastInt8() const noexcept
Determine whether the platform has fast native int8.
Definition: NvInfer.h:9657
nvinfer1::IHostMemory * buildSerializedNetwork(INetworkDefinition &network, IBuilderConfig &config) noexcept
Builds and serializes a network for the given INetworkDefinition and IBuilderConfig.
Definition: NvInfer.h:9810
virtual ~IBuilder() noexcept=default
A cast layer in a network.
Definition: NvInfer.h:3799
virtual ~ICastLayer() noexcept=default
apiv::VCastLayer * mImpl
Definition: NvInfer.h:3825
DataType getToType() const noexcept
Return cast layer output type.
Definition: NvInfer.h:3819
void setToType(DataType toType) noexcept
Set cast layer output type.
Definition: NvInfer.h:3808
A concatenation layer in a network definition.
Definition: NvInfer.h:2052
void setAxis(int32_t axis) noexcept
Set the axis along which concatenation occurs.
Definition: NvInfer.h:2065
int32_t getAxis() const noexcept
Get the axis along which concatenation occurs.
Definition: NvInfer.h:2075
virtual ~IConcatenationLayer() noexcept=default
This layer represents a condition input to an IIfConditional.
Definition: NvInfer.h:4458
virtual ~IConditionLayer() noexcept=default
Layer that represents a constant value.
Definition: NvInfer.h:3838
void setWeights(Weights weights) noexcept
Set the weights for the layer.
Definition: NvInfer.h:3848
Weights getWeights() const noexcept
Get the weights for the layer.
Definition: NvInfer.h:3858
void setDimensions(Dims const &dimensions) noexcept
Set the dimensions for the layer.
Definition: NvInfer.h:3870
apiv::VConstantLayer * mImpl
Definition: NvInfer.h:3888
virtual ~IConstantLayer() noexcept=default
Dims getDimensions() const noexcept
Get the dimensions for the layer.
Definition: NvInfer.h:3882
A convolution layer in a network definition.
Definition: NvInfer.h:1022
Dims getPrePadding() const noexcept
Get the pre-padding.
Definition: NvInfer.h:1147
Weights getBiasWeights() const noexcept
Get the bias weights for the convolution.
Definition: NvInfer.h:1120
void setPaddingMode(PaddingMode paddingMode) noexcept
Set the padding mode.
Definition: NvInfer.h:1188
void setDilationNd(Dims const &dilation) noexcept
Set the multi-dimension dilation of the convolution.
Definition: NvInfer.h:1292
Dims getPaddingNd() const noexcept
Get the multi-dimension padding of the convolution.
Definition: NvInfer.h:1278
Dims getStrideNd() const noexcept
Get the multi-dimension stride of the convolution.
Definition: NvInfer.h:1248
Weights getKernelWeights() const noexcept
Get the kernel weights of the convolution.
Definition: NvInfer.h:1095
void setStrideNd(Dims const &stride) noexcept
Set the multi-dimension stride of the convolution.
Definition: NvInfer.h:1238
Dims getDilationNd() const noexcept
Get the multi-dimension dilation of the convolution.
Definition: NvInfer.h:1302
int64_t getNbOutputMaps() const noexcept
Get the number of output maps for the convolution.
Definition: NvInfer.h:1041
void setKernelWeights(Weights weights) noexcept
Set the kernel weights for the convolution.
Definition: NvInfer.h:1085
Dims getPostPadding() const noexcept
Get the post-padding.
Definition: NvInfer.h:1174
int64_t getNbGroups() const noexcept
Get the number of groups of the convolution.
Definition: NvInfer.h:1071
PaddingMode getPaddingMode() const noexcept
Get the padding mode.
Definition: NvInfer.h:1200
virtual ~IConvolutionLayer() noexcept=default
void setNbGroups(int64_t nbGroups) noexcept
Set the number of groups for a convolution.
Definition: NvInfer.h:1061
void setNbOutputMaps(int64_t nbOutputMaps) noexcept
Set the number of output maps for the convolution.
Definition: NvInfer.h:1031
void setBiasWeights(Weights weights) noexcept
Set the bias weights for the convolution.
Definition: NvInfer.h:1110
Dims getKernelSizeNd() const noexcept
Get the multi-dimension kernel size of the convolution.
Definition: NvInfer.h:1223
void setPaddingNd(Dims const &padding) noexcept
Set the multi-dimension padding of the convolution.
Definition: NvInfer.h:1266
void setPrePadding(Dims const &padding) noexcept
Set the multi-dimension pre-padding of the convolution.
Definition: NvInfer.h:1137
void setPostPadding(Dims const &padding) noexcept
Set the multi-dimension post-padding of the convolution.
Definition: NvInfer.h:1164
void setKernelSizeNd(Dims const &kernelSize) noexcept
Set the multi-dimension kernel size of the convolution.
Definition: NvInfer.h:1213
A deconvolution layer in a network definition.
Definition: NvInfer.h:2093
void setBiasWeights(Weights weights) noexcept
Set the bias weights for the deconvolution.
Definition: NvInfer.h:2181
int64_t getNbGroups() const noexcept
Get the number of groups for a deconvolution.
Definition: NvInfer.h:2142
Weights getKernelWeights() const noexcept
Get the kernel weights for the deconvolution.
Definition: NvInfer.h:2166
void setPrePadding(Dims const &padding) noexcept
Set the multi-dimension pre-padding of the deconvolution.
Definition: NvInfer.h:2208
Dims getStrideNd() const noexcept
Get the multi-dimension stride of the deconvolution.
Definition: NvInfer.h:2323
Dims getDilationNd() const noexcept
Get the multi-dimension dilation of the deconvolution.
Definition: NvInfer.h:2389
Weights getBiasWeights() const noexcept
Get the bias weights for the deconvolution.
Definition: NvInfer.h:2191
void setKernelWeights(Weights weights) noexcept
Set the kernel weights for the deconvolution.
Definition: NvInfer.h:2156
int64_t getNbOutputMaps() const noexcept
Get the number of output feature maps for the deconvolution.
Definition: NvInfer.h:2112
void setStrideNd(Dims const &stride) noexcept
Set the multi-dimension stride of the deconvolution.
Definition: NvInfer.h:2313
Dims getPostPadding() const noexcept
Get the padding.
Definition: NvInfer.h:2245
Dims getKernelSizeNd() const noexcept
Get the multi-dimension kernel size of the deconvolution.
Definition: NvInfer.h:2296
void setPostPadding(Dims const &padding) noexcept
Set the multi-dimension post-padding of the deconvolution.
Definition: NvInfer.h:2235
void setKernelSizeNd(Dims const &kernelSize) noexcept
Set the multi-dimension kernel size of the deconvolution.
Definition: NvInfer.h:2286
virtual ~IDeconvolutionLayer() noexcept=default
void setPaddingNd(Dims const &padding) noexcept
Set the multi-dimension padding of the deconvolution.
Definition: NvInfer.h:2341
void setNbOutputMaps(int64_t nbOutputMaps) noexcept
Set the number of output feature maps for the deconvolution.
Definition: NvInfer.h:2102
Dims getPaddingNd() const noexcept
Get the multi-dimension padding of the deconvolution.
Definition: NvInfer.h:2353
void setDilationNd(Dims const &dilation) noexcept
Set the multi-dimension dilation of the deconvolution.
Definition: NvInfer.h:2379
void setPaddingMode(PaddingMode paddingMode) noexcept
Set the padding mode.
Definition: NvInfer.h:2259
void setNbGroups(int64_t nbGroups) noexcept
Set the number of groups for a deconvolution.
Definition: NvInfer.h:2132
Dims getPrePadding() const noexcept
Get the pre-padding.
Definition: NvInfer.h:2218
PaddingMode getPaddingMode() const noexcept
Get the padding mode.
Definition: NvInfer.h:2271
A Dequantize layer in a network definition.
Definition: NvInfer.h:5514
void setToType(DataType toType) noexcept
Set the Dequantize layer output type.
Definition: NvInfer.h:5551
virtual ~IDequantizeLayer() noexcept=default
int32_t getAxis() const noexcept
Get the quantization axis.
Definition: NvInfer.h:5524
DataType getToType() const noexcept
Return the Dequantize layer output type.
Definition: NvInfer.h:5563
void setAxis(int32_t axis) noexcept
Set the quantization axis.
Definition: NvInfer.h:5535
An Einsum layer in a network.
Definition: NvInfer.h:5611
bool setEquation(char const *equation) noexcept
Set the equation. The equation is a comma-separated list of subscript labels, where each label refers...
Definition: NvInfer.h:5622
virtual ~IEinsumLayer() noexcept=default
char const * getEquation() const noexcept
Return the equation.
Definition: NvInfer.h:5632
A elementwise layer in a network definition.
Definition: NvInfer.h:2465
virtual ~IElementWiseLayer() noexcept=default
apiv::VElementWiseLayer * mImpl
Definition: NvInfer.h:2494
ElementWiseOperation getOperation() const noexcept
Get the binary operation for the layer.
Definition: NvInfer.h:2488
void setOperation(ElementWiseOperation op) noexcept
Set the binary operation for the layer.
Definition: NvInfer.h:2476
Generate a tensor according to a specified mode.
Definition: NvInfer.h:5039
bool isAlphaBetaInt64() const noexcept
Return true if alpha/beta have type int64, false if they have type double.
Definition: NvInfer.h:5271
FillOperation getOperation() const noexcept
Get the fill operation for the layer.
Definition: NvInfer.h:5085
void setOperation(FillOperation op) noexcept
Set the fill operation for the layer.
Definition: NvInfer.h:5075
DataType getToType() const noexcept
Get the fill layer output type.
Definition: NvInfer.h:5300
void setAlphaInt64(int64_t alpha) noexcept
Set the alpha parameter with int64 datatype.
Definition: NvInfer.h:5214
void setBetaInt64(int64_t beta) noexcept
Set the beta parameter with int64 datatype.
Definition: NvInfer.h:5248
void setBeta(double beta) noexcept
Set the beta parameter.
Definition: NvInfer.h:5138
int64_t getAlphaInt64() const noexcept
Get the value of alpha parameter with int64 datatype.
Definition: NvInfer.h:5229
int64_t getBetaInt64() const noexcept
Get the value of beta parameter with int64 datatype.
Definition: NvInfer.h:5263
double getAlpha() const noexcept
Get the value of alpha parameter.
Definition: NvInfer.h:5119
void setDimensions(Dims const &dimensions) noexcept
Set the output tensor's dimensions.
Definition: NvInfer.h:5050
void setAlpha(double alpha) noexcept
Set the alpha parameter.
Definition: NvInfer.h:5104
void setToType(DataType toType) noexcept
Set the fill layer output type.
Definition: NvInfer.h:5288
Dims getDimensions() const noexcept
Get the output tensor's dimensions.
Definition: NvInfer.h:5065
double getBeta() const noexcept
Get the value of beta parameter.
Definition: NvInfer.h:5153
virtual ~IFillLayer() noexcept=default
A Gather layer in a network definition. Supports several kinds of gathering.
Definition: NvInfer.h:2599
void setGatherAxis(int32_t axis) noexcept
Set the axis used by GatherMode::kELEMENTS and GatherMode::kDEFAULT The axis must be less than the nu...
Definition: NvInfer.h:2610
void setNbElementWiseDims(int32_t elementWiseDims) noexcept
Set the number of leading dimensions of indices tensor to be handled elementwise.
Definition: NvInfer.h:2645
apiv::VGatherLayer * mImpl
Definition: NvInfer.h:2681
int32_t getNbElementWiseDims() const noexcept
Get the number of leading dimensions of indices tensor to be handled elementwise.
Definition: NvInfer.h:2655
void setMode(GatherMode mode) noexcept
Set the gather mode.
Definition: NvInfer.h:2665
int32_t getGatherAxis() const noexcept
Get the axis to gather on.
Definition: NvInfer.h:2622
GatherMode getMode() const noexcept
Get the gather mode.
Definition: NvInfer.h:2675
virtual ~IGatherLayer() noexcept=default
A GridSample layer in a network definition.
Definition: NvInfer.h:5832
void setInterpolationMode(InterpolationMode mode) noexcept
Set the grid sample interpolation mode.
Definition: NvInfer.h:5839
bool setSampleMode(SampleMode mode) noexcept
Set the sample mode.
Definition: NvInfer.h:5885
void setAlignCorners(bool alignCorners) noexcept
Set the align corners mode.
Definition: NvInfer.h:5861
apiv::VGridSampleLayer * mImpl
Definition: NvInfer.h:5903
SampleMode getSampleMode() const noexcept
Get the sample mode.
Definition: NvInfer.h:5897
InterpolationMode getInterpolationMode() const noexcept
Get the grid sample interpolation mode.
Definition: NvInfer.h:5851
bool getAlignCorners() const noexcept
Get the align corners mode.
Definition: NvInfer.h:5873
virtual ~IGridSampleLayer() noexcept=default
Class to handle library allocated memory that is accessible to the user.
Definition: NvInferRuntime.h:139
A layer that represents the identity function.
Definition: NvInfer.h:3786
apiv::VIdentityLayer * mImpl
Definition: NvInfer.h:3788
virtual ~IIdentityLayer() noexcept=default
This is a base class for Conditional boundary layers.
Definition: NvInfer.h:4437
IIfConditional * getConditional() const noexcept
Get a pointer to the IIfConditional associated with this boundary layer.
Definition: NvInfer.h:4442
virtual ~IIfConditionalBoundaryLayer() noexcept=default
Helper for constructing conditionally-executed subgraphs.
Definition: NvInfer.h:4517
IIfConditionalInputLayer * addInput(ITensor &input) noexcept
Add an If-conditional input.
Definition: NvInfer.h:4556
char const * getName() const noexcept
Return the name of the conditional.
Definition: NvInfer.h:4581
virtual ~IIfConditional() noexcept=default
IConditionLayer * setCondition(ITensor &condition) noexcept
Set the condition tensor for this If-Conditional construct.
Definition: NvInfer.h:4528
IIfConditionalOutputLayer * addOutput(ITensor &trueSubgraphOutput, ITensor &falseSubgraphOutput) noexcept
Add an If-conditional output.
Definition: NvInfer.h:4544
void setName(char const *name) noexcept
Set the name of the conditional.
Definition: NvInfer.h:4571
This layer represents an input to an IIfConditional.
Definition: NvInfer.h:4486
virtual ~IIfConditionalInputLayer() noexcept=default
This layer represents an output of an IIfConditional.
Definition: NvInfer.h:4473
virtual ~IIfConditionalOutputLayer() noexcept=default
Application-implemented interface for calibration.
Definition: NvInfer.h:7678
virtual TRT_DEPRECATED int32_t getBatchSize() const noexcept=0
Get the batch size used for calibration batches.
A layer to do iterations.
Definition: NvInfer.h:4746
virtual ~IIteratorLayer() noexcept=default
void setReverse(bool reverse) noexcept
Set iteration order to be reverse.
Definition: NvInfer.h:4773
bool getReverse() const noexcept
Check if the iteration order is reverse.
Definition: NvInfer.h:4783
int32_t getAxis() const noexcept
Get axis being iterated over.
Definition: NvInfer.h:4759
void setAxis(int32_t axis) noexcept
Set axis to iterate over.
Definition: NvInfer.h:4751
A LRN layer in a network definition.
Definition: NvInfer.h:1707
int64_t getWindowSize() const noexcept
Get the LRN window size.
Definition: NvInfer.h:1728
float getAlpha() const noexcept
Get the LRN alpha value.
Definition: NvInfer.h:1750
void setWindowSize(int64_t windowSize) noexcept
Set the LRN window size.
Definition: NvInfer.h:1718
void setK(float k) noexcept
Set the LRN K value.
Definition: NvInfer.h:1784
void setAlpha(float alpha) noexcept
Set the LRN alpha value.
Definition: NvInfer.h:1740
void setBeta(float beta) noexcept
Set the LRN beta value.
Definition: NvInfer.h:1762
virtual ~ILRNLayer() noexcept=default
float getBeta() const noexcept
Get the LRN beta value.
Definition: NvInfer.h:1772
float getK() const noexcept
Get the LRN K value.
Definition: NvInfer.h:1794
Base class for all layer classes in a network definition.
Definition: NvInfer.h:550
bool precisionIsSet() const noexcept
whether the computational precision has been set for this layer
Definition: NvInfer.h:692
void setMetadata(char const *metadata) noexcept
Set the metadata for this layer.
Definition: NvInfer.h:808
void setPrecision(DataType dataType) noexcept
Set the preferred or required computational precision of this layer in a weakly-typed network.
Definition: NvInfer.h:668
void setName(char const *name) noexcept
Set the name of a layer.
Definition: NvInfer.h:571
void resetPrecision() noexcept
reset the computational precision for this layer
Definition: NvInfer.h:702
int32_t getNbInputs() const noexcept
Get the number of inputs of a layer.
Definition: NvInfer.h:589
char const * getMetadata() const noexcept
Get the metadata of the layer.
Definition: NvInfer.h:821
DataType getOutputType(int32_t index) const noexcept
get the output type of this layer
Definition: NvInfer.h:764
DataType getPrecision() const noexcept
get the computational precision of this layer
Definition: NvInfer.h:680
char const * getName() const noexcept
Return the name of a layer.
Definition: NvInfer.h:581
int32_t getNbOutputs() const noexcept
Get the number of outputs of a layer.
Definition: NvInfer.h:610
bool outputTypeIsSet(int32_t index) const noexcept
whether the output type has been set for this layer
Definition: NvInfer.h:778
ITensor * getOutput(int32_t index) const noexcept
Get the layer output corresponding to the given index.
Definition: NvInfer.h:620
void setInput(int32_t index, ITensor &tensor) noexcept
Replace an input of this layer with a specific tensor.
Definition: NvInfer.h:637
void resetOutputType(int32_t index) noexcept
reset the output type for this layer
Definition: NvInfer.h:790
ITensor * getInput(int32_t index) const noexcept
Get the layer input corresponding to the given index.
Definition: NvInfer.h:602
void setOutputType(int32_t index, DataType dataType) noexcept
Set the output type of this layer in a weakly-typed network.
Definition: NvInfer.h:749
LayerType getType() const noexcept
Return the type of a layer.
Definition: NvInfer.h:557
virtual ~ILayer() noexcept=default
Application-implemented logging interface for the builder, refitter and runtime.
Definition: NvInferRuntimeBase.h:683
This is a base class for Loop boundary layers.
Definition: NvInfer.h:4414
virtual ~ILoopBoundaryLayer() noexcept=default
ILoop * getLoop() const noexcept
Get a pointer to ILoop associated with this boundary layer.
Definition: NvInfer.h:4419
Helper for creating a recurrent subgraph.
Definition: NvInfer.h:4803
void setName(char const *name) noexcept
Set the name of the loop.
Definition: NvInfer.h:4873
ITripLimitLayer * addTripLimit(ITensor &tensor, TripLimit limit) noexcept
Add a trip-count limiter, based on the given tensor.
Definition: NvInfer.h:4832
IIteratorLayer * addIterator(ITensor &tensor, int32_t axis=0, bool reverse=false) noexcept
Return layer that subscripts tensor by loop iteration.
Definition: NvInfer.h:4845
ILoopOutputLayer * addLoopOutput(ITensor &tensor, LoopOutput outputKind, int32_t axis=0) noexcept
Make an output for this loop, based on the given tensor.
Definition: NvInfer.h:4858
virtual ~ILoop() noexcept=default
char const * getName() const noexcept
Return the name of the loop.
Definition: NvInfer.h:4883
IRecurrenceLayer * addRecurrence(ITensor &initialValue) noexcept
Create a recurrence layer for this loop with initialValue as its first input.
Definition: NvInfer.h:4811
An ILoopOutputLayer is the sole way to get output from a loop.
Definition: NvInfer.h:4646
virtual ~ILoopOutputLayer() noexcept=default
int32_t getAxis() const noexcept
Get axis being concatenated over.
Definition: NvInfer.h:4676
LoopOutput getLoopOutput() const noexcept
Get which kind a loop output has.
Definition: NvInfer.h:4651
void setAxis(int32_t axis) noexcept
Set where to insert the contenation axis. Ignored if getLoopOutput() is kLAST_VALUE.
Definition: NvInfer.h:4668
Layer that represents a Matrix Multiplication.
Definition: NvInfer.h:3678
apiv::VMatrixMultiplyLayer * mImpl
Definition: NvInfer.h:3706
virtual ~IMatrixMultiplyLayer() noexcept=default
MatrixOperation getOperation(int32_t index) const noexcept
Get the operation for an input tensor.
Definition: NvInfer.h:3700
void setOperation(int32_t index, MatrixOperation op) noexcept
Set the operation for an input tensor.
Definition: NvInfer.h:3688
A non-maximum suppression layer in a network definition.
Definition: NvInfer.h:5980
virtual ~INMSLayer() noexcept=default
void setTopKBoxLimit(int32_t limit) noexcept
Set the TopK box limit parameter for the layer.
Definition: NvInfer.h:6017
void setBoundingBoxFormat(BoundingBoxFormat fmt) noexcept
Set the bounding box format parameter for the layer.
Definition: NvInfer.h:5991
BoundingBoxFormat getBoundingBoxFormat() const noexcept
Get the bounding box format parameter for the layer.
Definition: NvInfer.h:6003
apiv::VNMSLayer * mImpl
Definition: NvInfer.h:6053
int32_t getTopKBoxLimit() const noexcept
Get the TopK box limit parameter for the layer.
Definition: NvInfer.h:6027
A network definition for input to the builder.
Definition: NvInfer.h:6276
IPluginV2Layer * addPluginV2(ITensor *const *inputs, int32_t nbInputs, IPluginV2 &plugin) noexcept
Add a plugin layer to the network using the IPluginV2 interface.
Definition: NvInfer.h:6878
IConcatenationLayer * addConcatenation(ITensor *const *inputs, int32_t nbInputs) noexcept
Add a concatenation layer to the network.
Definition: NvInfer.h:6469
IShuffleLayer * addShuffle(ITensor &input) noexcept
Add a shuffle layer to the network.
Definition: NvInfer.h:6532
INormalizationLayer * addNormalization(ITensor &input, ITensor &scale, ITensor &bias, uint32_t axesMask) noexcept
Add a normalization layer to the network.
Definition: NvInfer.h:7580
void setName(char const *name) noexcept
Sets the name of the network.
Definition: NvInfer.h:6940
bool markDebug(ITensor &tensor) noexcept
Mark a tensor as a debug tensor.
Definition: NvInfer.h:6348
ILRNLayer * addLRN(ITensor &input, int64_t window, float alpha, float beta, float k) noexcept
Add a LRN layer to the network.
Definition: NvInfer.h:6413
ITopKLayer * addTopK(ITensor &input, TopKOperation op, int32_t k, uint32_t reduceAxes) noexcept
Add a TopK layer to the network.
Definition: NvInfer.h:6692
IAssertionLayer * addAssertion(ITensor &condition, char const *message) noexcept
Add an assertion layer to the network.
Definition: NvInfer.h:7256
IConvolutionLayer * addConvolutionNd(ITensor &input, int64_t nbOutputMaps, Dims const &kernelSize, Weights kernelWeights, Weights biasWeights) noexcept
Add a multi-dimension convolution layer to the network.
Definition: NvInfer.h:7075
ICastLayer * addCast(ITensor &input, DataType toType) noexcept
Add a cast layer.
Definition: NvInfer.h:6832
IScaleLayer * addScaleNd(ITensor &input, ScaleMode mode, Weights shift, Weights scale, Weights power, int32_t channelAxis) noexcept
Add a multi-dimension scale layer to the network.
Definition: NvInfer.h:7154
char const * getName() const noexcept
Returns the name associated with the network.
Definition: NvInfer.h:6954
IParametricReLULayer * addParametricReLU(ITensor &input, ITensor &slope) noexcept
Add a parametric ReLU layer to the network.
Definition: NvInfer.h:7053
ITensor * getOutput(int32_t index) const noexcept
Get the output tensor specified by the given index.
Definition: NvInfer.h:6633
ITensor * getInput(int32_t index) const noexcept
Get the input tensor specified by the given index.
Definition: NvInfer.h:6603
IDequantizeLayer * addDequantize(ITensor &input, ITensor &scale, DataType outputType) noexcept
Add a dequantization layer to the network.
Definition: NvInfer.h:7423
bool unmarkOutputForShapes(ITensor &tensor) noexcept
Undo markOutputForShapes.
Definition: NvInfer.h:7035
IFillLayer * addFill(Dims const &dimensions, FillOperation op, DataType outputType) noexcept
Add a fill layer to the network.
Definition: NvInfer.h:7307
ILoop * addLoop() noexcept
Add a loop to the network.
Definition: NvInfer.h:7185
IActivationLayer * addActivation(ITensor &input, ActivationType type) noexcept
Add an activation layer to the network.
Definition: NvInfer.h:6394
TRT_DEPRECATED IFillLayer * addFill(Dims const &dimensions, FillOperation op) noexcept
Add a fill layer to the network.
Definition: NvInfer.h:7281
ISliceLayer * addSlice(ITensor &input, Dims const &start, Dims const &size, Dims const &stride) noexcept
Add a slice layer to the network.
Definition: NvInfer.h:6916
virtual ~INetworkDefinition() noexcept=default
TRT_DEPRECATED IQuantizeLayer * addQuantize(ITensor &input, ITensor &scale) noexcept
Add a quantization layer to the network.
Definition: NvInfer.h:7464
virtual IBuilder & getBuilder() const noexcept
Return the builder from which this INetworkDefinition was created.
Definition: NvInfer.h:7591
INMSLayer * addNMS(ITensor &boxes, ITensor &scores, ITensor &maxOutputBoxesPerClass) noexcept
Add a non-maximum suppression layer to the network.
Definition: NvInfer.h:7537
ILayer * getLayer(int32_t index) const noexcept
Get the layer specified by the given index.
Definition: NvInfer.h:6575
bool getFlag(NetworkDefinitionCreationFlag networkDefinitionCreationFlag) const noexcept
Returns true if the network definition creation flag is set.
Definition: NvInfer.h:7006
IIfConditional * addIfConditional() noexcept
Add an if-then-else to the network.
Definition: NvInfer.h:7200
IErrorRecorder * getErrorRecorder() const noexcept
get the ErrorRecorder assigned to this interface.
Definition: NvInfer.h:7381
IReverseSequenceLayer * addReverseSequence(ITensor &input, ITensor &sequenceLens) noexcept
Add a ReverseSequence layer to the network.
Definition: NvInfer.h:7554
int32_t getNbInputs() const noexcept
Get the number of inputs in the network.
Definition: NvInfer.h:6587
NetworkDefinitionCreationFlags getFlags() const noexcept
Get the network definition creation flags for this network definition object. Defaults to 0.
Definition: NvInfer.h:6994
IQuantizeLayer * addQuantize(ITensor &input, ITensor &scale, DataType outputType) noexcept
Add a quantization layer to the network.
Definition: NvInfer.h:7485
IReduceLayer * addReduce(ITensor &input, ReduceOperation operation, uint32_t reduceAxes, bool keepDimensions) noexcept
Add a reduce layer to the network.
Definition: NvInfer.h:6659
IUnaryLayer * addUnary(ITensor &input, UnaryOperation operation) noexcept
Add a unary layer to the network.
Definition: NvInfer.h:6518
IGridSampleLayer * addGridSample(ITensor &input, ITensor &grid) noexcept
Add a GridSample layer to the network.
Definition: NvInfer.h:7519
void removeTensor(ITensor &tensor) noexcept
remove a tensor from the network definition.
Definition: NvInfer.h:6847
bool areWeightsMarkedRefittable(char const *name) const noexcept
Whether the weight has been marked as refittable.
Definition: NvInfer.h:7629
ISelectLayer * addSelect(ITensor &condition, ITensor &thenInput, ITensor &elseInput) noexcept
Add a select layer to the network.
Definition: NvInfer.h:7239
IScatterLayer * addScatter(ITensor &data, ITensor &indices, ITensor &updates, ScatterMode mode) noexcept
Add a Scatter layer to the network with specified mode and axis=0.
Definition: NvInfer.h:7443
int32_t getNbLayers() const noexcept
Get the number of layers in the network.
Definition: NvInfer.h:6561
TRT_DEPRECATED bool hasImplicitBatchDimension() const noexcept
Query whether the network was created with an implicit batch dimension.
Definition: NvInfer.h:6984
apiv::VNetworkDefinition * mImpl
Definition: NvInfer.h:7635
bool markOutputForShapes(ITensor &tensor) noexcept
Enable tensor's value to be computed by IExecutionContext::getShapeBinding.
Definition: NvInfer.h:7023
IOneHotLayer * addOneHot(ITensor &indices, ITensor &values, ITensor &depth, int32_t axis) noexcept
Add a OneHot layer to the network.
Definition: NvInfer.h:6549
IScaleLayer * addScale(ITensor &input, ScaleMode mode, Weights shift, Weights scale, Weights power) noexcept
Add a Scale layer to the network.
Definition: NvInfer.h:6439
IPluginV3Layer * addPluginV3(ITensor *const *inputs, int32_t nbInputs, ITensor *const *shapeInputs, int32_t nbShapeInputs, IPluginV3 &plugin) noexcept
Add a plugin layer implementing the IPluginV3 interface to the network.
Definition: NvInfer.h:6896
void unmarkOutput(ITensor &tensor) noexcept
unmark a tensor as a network output.
Definition: NvInfer.h:6859
IIdentityLayer * addIdentity(ITensor &input) noexcept
Add an identity layer.
Definition: NvInfer.h:6817
IGatherLayer * addGatherV2(ITensor &data, ITensor &indices, GatherMode mode) noexcept
Add gather with specified mode, axis=0 and nbElementWiseDims=0.
Definition: NvInfer.h:6724
IElementWiseLayer * addElementWise(ITensor &input1, ITensor &input2, ElementWiseOperation op) noexcept
Add an elementwise layer to the network.
Definition: NvInfer.h:6496
IConstantLayer * addConstant(Dims const &dimensions, Weights weights) noexcept
Add a constant layer to the network.
Definition: NvInfer.h:6803
void setErrorRecorder(IErrorRecorder *recorder) noexcept
Set the ErrorRecorder for this interface.
Definition: NvInfer.h:7366
IPoolingLayer * addPoolingNd(ITensor &input, PoolingType type, Dims const &windowSize) noexcept
Add a multi-dimension pooling layer to the network.
Definition: NvInfer.h:7095
IRaggedSoftMaxLayer * addRaggedSoftMax(ITensor &input, ITensor &bounds) noexcept
Add a RaggedSoftMax layer to the network.
Definition: NvInfer.h:6743
IShapeLayer * addShape(ITensor &input) noexcept
Add a shape layer to the network.
Definition: NvInfer.h:6970
IGatherLayer * addGather(ITensor &data, ITensor &indices, int32_t axis) noexcept
Add gather with mode GatherMode::kDEFAULT and specified axis and nbElementWiseDims=0.
Definition: NvInfer.h:6708
bool unmarkWeightsRefittable(char const *name) noexcept
Unmark weights as refittable when the builder flag kREFIT_INDIVIDUAL is set.
Definition: NvInfer.h:7616
bool markWeightsRefittable(char const *name) noexcept
Mark weights as refittable when the builder flag kREFIT_INDIVIDUAL is set.
Definition: NvInfer.h:7604
IDeconvolutionLayer * addDeconvolutionNd(ITensor &input, int64_t nbOutputMaps, Dims kernelSize, Weights kernelWeights, Weights biasWeights) noexcept
Add a multi-dimension deconvolution layer to the network.
Definition: NvInfer.h:7117
IResizeLayer * addResize(ITensor &input) noexcept
Add a resize layer to the network.
Definition: NvInfer.h:7171
IMatrixMultiplyLayer * addMatrixMultiply(ITensor &input0, MatrixOperation op0, ITensor &input1, MatrixOperation op1) noexcept
Add a MatrixMultiply layer to the network.
Definition: NvInfer.h:6764
ISoftMaxLayer * addSoftMax(ITensor &input) noexcept
Add a SoftMax layer to the network.
Definition: NvInfer.h:6452
bool isDebugTensor(nvinfer1::ITensor const &tensor) const noexcept
Check if a tensor is marked as debug tensor.
Definition: NvInfer.h:6374
bool unmarkDebug(ITensor &tensor) noexcept
Unmark a tensor as a debug tensor.
Definition: NvInfer.h:6364
IEinsumLayer * addEinsum(ITensor *const *inputs, int32_t nbInputs, char const *equation) noexcept
Add an Einsum layer to the network.
Definition: NvInfer.h:7501
void markOutput(ITensor &tensor) noexcept
Mark a tensor as a network output.
Definition: NvInfer.h:6330
IPaddingLayer * addPaddingNd(ITensor &input, Dims const &prePadding, Dims const &postPadding) noexcept
Add a padding layer to the network. Only 2D padding is currently supported.
Definition: NvInfer.h:7323
INonZeroLayer * addNonZero(ITensor &input) noexcept
Add a nonzero layer to the network.
Definition: NvInfer.h:6779
TRT_DEPRECATED IDequantizeLayer * addDequantize(ITensor &input, ITensor &scale) noexcept
Add a dequantization layer to the network.
Definition: NvInfer.h:7402
int32_t getNbOutputs() const noexcept
Get the number of outputs in the network.
Definition: NvInfer.h:6617
bool setWeightsName(Weights weights, char const *name) noexcept
Associate a name with all current uses of the given weights.
Definition: NvInfer.h:7347
Forward declaration of IEngineInspector for use by other interfaces.
Definition: NvInferRuntime.h:48
Definition: NvInfer.h:3732
virtual ~INonZeroLayer() noexcept=default
A normalization layer in a network definition.
Definition: NvInfer.h:6142
float getEpsilon() const noexcept
Get the epsilon value used for the normalization calculation.
Definition: NvInfer.h:6161
uint32_t getAxes() const noexcept
Get the axes value used for the normalization calculation.
Definition: NvInfer.h:6181
virtual ~INormalizationLayer() noexcept=default
void setEpsilon(float eps) noexcept
Set the epsilon value used for the normalization calculation.
Definition: NvInfer.h:6151
DataType getComputePrecision() const noexcept
Get the compute precision of this layer.
Definition: NvInfer.h:6248
apiv::VNormalizationLayer * mImpl
Definition: NvInfer.h:6254
int64_t getNbGroups() const noexcept
Get the number of groups used to split the channels for the normalization calculation.
Definition: NvInfer.h:6212
void setAxes(uint32_t axesMask) noexcept
Set the reduction axes for the normalization calculation.
Definition: NvInfer.h:6171
void setComputePrecision(DataType type) noexcept
Set the compute precision of this layer.
Definition: NvInfer.h:6238
void setNbGroups(int64_t nbGroups) noexcept
Set the number of groups used to split the channels in the normalization calculation.
Definition: NvInfer.h:6202
A OneHot layer in a network definition.
Definition: NvInfer.h:5796
apiv::VOneHotLayer * mImpl
Definition: NvInfer.h:5817
void setAxis(int32_t axis) noexcept
Set the axis parameter.
Definition: NvInfer.h:5803
int32_t getAxis() const noexcept
Get the value of the axis parameter.
Definition: NvInfer.h:5811
Optimization profile for dynamic input dimensions and shape tensors.
Definition: NvInferRuntime.h:2161
Layer that represents a padding operation.
Definition: NvInfer.h:2958
Dims getPostPaddingNd() const noexcept
Get the padding that is applied at the end of the tensor.
Definition: NvInfer.h:3007
void setPrePaddingNd(Dims const &padding) noexcept
Set the padding that is applied at the start of the tensor.
Definition: NvInfer.h:2969
virtual ~IPaddingLayer() noexcept=default
void setPostPaddingNd(Dims const &padding) noexcept
Set the padding that is applied at the end of the tensor.
Definition: NvInfer.h:2995
Dims getPrePaddingNd() const noexcept
Get the padding that is applied at the start of the tensor.
Definition: NvInfer.h:2981
apiv::VPaddingLayer * mImpl
Definition: NvInfer.h:3013
Layer that represents a parametric ReLU operation.
Definition: NvInfer.h:3902
apiv::VParametricReLULayer * mImpl
Definition: NvInfer.h:3904
virtual ~IParametricReLULayer() noexcept=default
Single registration point for all plugins in an application. It is used to find plugin implementation...
Definition: NvInferRuntimeCommon.h:56
Plugin class for user-implemented layers.
Definition: NvInferRuntimePlugin.h:128
Layer type for pluginV2.
Definition: NvInfer.h:2695
virtual ~IPluginV2Layer() noexcept=default
apiv::VPluginV2Layer * mImpl
Definition: NvInfer.h:2708
IPluginV2 & getPlugin() noexcept
Get the plugin for the layer.
Definition: NvInfer.h:2702
Layer type for V3 plugins.
Definition: NvInfer.h:2722
virtual ~IPluginV3Layer() noexcept=default
IPluginV3 & getPlugin() noexcept
Get the plugin for the layer.
Definition: NvInfer.h:2729
apiv::VPluginV3Layer * mImpl
Definition: NvInfer.h:2735
A Pooling layer in a network definition.
Definition: NvInfer.h:1456
PoolingType getPoolingType() const noexcept
Get the type of activation to be performed.
Definition: NvInfer.h:1475
PaddingMode getPaddingMode() const noexcept
Get the padding mode.
Definition: NvInfer.h:1608
Dims getPostPadding() const noexcept
Get the padding.
Definition: NvInfer.h:1584
bool getAverageCountExcludesPadding() const noexcept
Get whether average pooling uses as a denominator the overlap area between the window and the unpadde...
Definition: NvInfer.h:1528
Dims getPrePadding() const noexcept
Get the pre-padding.
Definition: NvInfer.h:1556
void setPoolingType(PoolingType type) noexcept
Set the type of activation to be performed.
Definition: NvInfer.h:1465
void setWindowSizeNd(Dims const &windowSize) noexcept
Set the multi-dimension window size for pooling.
Definition: NvInfer.h:1621
void setPaddingMode(PaddingMode paddingMode) noexcept
Set the padding mode.
Definition: NvInfer.h:1597
Dims getWindowSizeNd() const noexcept
Get the multi-dimension window size for pooling.
Definition: NvInfer.h:1631
void setAverageCountExcludesPadding(bool exclusive) noexcept
Set whether average pooling uses as a denominator the overlap area between the window and the unpadde...
Definition: NvInfer.h:1517
void setPaddingNd(Dims const &padding) noexcept
Set the multi-dimension padding for pooling.
Definition: NvInfer.h:1675
float getBlendFactor() const noexcept
Get the blending factor for the max_average_blend mode: max_average_blendPool = (1-blendFactor)*maxPo...
Definition: NvInfer.h:1503
void setStrideNd(Dims const &stride) noexcept
Set the multi-dimension stride for pooling.
Definition: NvInfer.h:1646
Dims getStrideNd() const noexcept
Get the multi-dimension stride for pooling.
Definition: NvInfer.h:1656
virtual ~IPoolingLayer() noexcept=default
Dims getPaddingNd() const noexcept
Get the multi-dimension padding for pooling.
Definition: NvInfer.h:1687
void setPostPadding(Dims const &padding) noexcept
Set the multi-dimension post-padding for pooling.
Definition: NvInfer.h:1574
void setPrePadding(Dims const &padding) noexcept
Set the multi-dimension pre-padding for pooling.
Definition: NvInfer.h:1546
void setBlendFactor(float blendFactor) noexcept
Set the blending factor for the max_average_blend mode: max_average_blendPool = (1-blendFactor)*maxPo...
Definition: NvInfer.h:1490
A Quantize layer in a network definition.
Definition: NvInfer.h:5384
void setToType(DataType toType) noexcept
Set the Quantize layer output type.
Definition: NvInfer.h:5421
void setAxis(int32_t axis) noexcept
Set the quantization axis.
Definition: NvInfer.h:5405
int32_t getAxis() const noexcept
Get the quantization axis.
Definition: NvInfer.h:5394
virtual ~IQuantizeLayer() noexcept=default
DataType getToType() const noexcept
Return the Quantize layer output type.
Definition: NvInfer.h:5433
A RaggedSoftmax layer in a network definition.
Definition: NvInfer.h:3753
apiv::VRaggedSoftMaxLayer * mImpl
Definition: NvInfer.h:3755
virtual ~IRaggedSoftMaxLayer() noexcept=default
A recurrence layer in a network definition.
Definition: NvInfer.h:4599
virtual ~IRecurrenceLayer() noexcept=default
Layer that represents a reduction across a non-bool tensor.
Definition: NvInfer.h:2878
void setKeepDimensions(bool keepDimensions) noexcept
Set the boolean that specifies whether or not to keep the reduced dimensions for the layer.
Definition: NvInfer.h:2925
void setOperation(ReduceOperation op) noexcept
Set the reduce operation for the layer.
Definition: NvInfer.h:2885
ReduceOperation getOperation() const noexcept
Get the reduce operation for the layer.
Definition: NvInfer.h:2895
virtual ~IReduceLayer() noexcept=default
uint32_t getReduceAxes() const noexcept
Get the axes over which to reduce for the layer.
Definition: NvInfer.h:2915
void setReduceAxes(uint32_t reduceAxes) noexcept
Set the axes over which to reduce.
Definition: NvInfer.h:2905
apiv::VReduceLayer * mImpl
Definition: NvInfer.h:2941
bool getKeepDimensions() const noexcept
Get the boolean that specifies whether or not to keep the reduced dimensions for the layer.
Definition: NvInfer.h:2935
A resize layer in a network definition.
Definition: NvInfer.h:4091
void setSelectorForSinglePixel(ResizeSelector selector) noexcept
Set coordinate selector function when resized to single pixel.
Definition: NvInfer.h:4252
void setNearestRounding(ResizeRoundMode value) noexcept
Set rounding mode for nearest neighbor resize.
Definition: NvInfer.h:4276
virtual ~IResizeLayer() noexcept=default
int32_t getScales(int32_t size, float *scales) const noexcept
Copies resize scales to scales[0, ..., nbScales-1], where nbScales is the number of scales that were ...
Definition: NvInfer.h:4170
void setOutputDimensions(Dims const &dimensions) noexcept
Set the output dimensions.
Definition: NvInfer.h:4111
void setCubicCoeff(float A) noexcept
Set the coefficient 'A' used in cubic interpolation.
Definition: NvInfer.h:4308
void setScales(float const *scales, int32_t nbScales) noexcept
Set the resize scales.
Definition: NvInfer.h:4151
float getCubicCoeff() const noexcept
Get the coefficient 'A' used in cubic interpolation.
Definition: NvInfer.h:4318
ResizeSelector getSelectorForSinglePixel() const noexcept
Get the coordinate selector function when resized to single pixel.
Definition: NvInfer.h:4262
InterpolationMode getResizeMode() const noexcept
Get resize mode for an input tensor.
Definition: NvInfer.h:4192
void setCoordinateTransformation(ResizeCoordinateTransformation coordTransform) noexcept
Set coordinate transformation function.
Definition: NvInfer.h:4227
void setExcludeOutside(bool excludeFlag) noexcept
Set the state for excluding outside pixels.
Definition: NvInfer.h:4331
void setResizeMode(InterpolationMode interpolationMode) noexcept
Set resize mode for an input tensor.
Definition: NvInfer.h:4182
Dims getOutputDimensions() const noexcept
Get the output dimensions.
Definition: NvInfer.h:4121
ResizeRoundMode getNearestRounding() const noexcept
Get rounding mode for nearest neighbor resize.
Definition: NvInfer.h:4286
bool getExcludeOutside() const noexcept
Get the state for excluding outside pixels.
Definition: NvInfer.h:4341
ResizeCoordinateTransformation getCoordinateTransformation() const noexcept
Get coordinate transformation function.
Definition: NvInfer.h:4237
A ReverseSequence layer in a network definition.
Definition: NvInfer.h:6070
void setSequenceAxis(int32_t sequenceAxis) noexcept
Set the sequence axis. Default is 0.
Definition: NvInfer.h:6103
int32_t getBatchAxis() const noexcept
Return the batch axis. Return 1 if no batch axis was set.
Definition: NvInfer.h:6090
apiv::VReverseSequenceLayer * mImpl
Definition: NvInfer.h:6119
int32_t getSequenceAxis() const noexcept
Return the sequence axis. Return 0 if no sequence axis was set.
Definition: NvInfer.h:6113
void setBatchAxis(int32_t batchAxis) noexcept
Set the batch axis. Default is 1.
Definition: NvInfer.h:6080
virtual ~IReverseSequenceLayer() noexcept=default
A Scale layer in a network definition.
Definition: NvInfer.h:1853
Weights getScale() const noexcept
Get the scale value.
Definition: NvInfer.h:1910
Weights getPower() const noexcept
Get the power value.
Definition: NvInfer.h:1930
void setScale(Weights scale) noexcept
Set the scale value.
Definition: NvInfer.h:1900
void setPower(Weights power) noexcept
Set the power value.
Definition: NvInfer.h:1920
ScaleMode getMode() const noexcept
Get the scale mode.
Definition: NvInfer.h:1870
void setShift(Weights shift) noexcept
Set the shift value.
Definition: NvInfer.h:1880
void setChannelAxis(int32_t channelAxis) noexcept
Set the channel axis.
Definition: NvInfer.h:1966
Weights getShift() const noexcept
Get the shift value.
Definition: NvInfer.h:1890
virtual ~IScaleLayer() noexcept=default
void setMode(ScaleMode mode) noexcept
Set the scale mode.
Definition: NvInfer.h:1860
int32_t getChannelAxis() const noexcept
Get the channel axis.
Definition: NvInfer.h:1945
A scatter layer in a network definition. Supports several kinds of scattering.
Definition: NvInfer.h:5724
void setMode(ScatterMode mode) noexcept
Set the scatter mode.
Definition: NvInfer.h:5731
apiv::VScatterLayer * mImpl
Definition: NvInfer.h:5765
void setAxis(int32_t axis) noexcept
Set the axis used by ScatterMode::kELEMENTS.
Definition: NvInfer.h:5751
int32_t getAxis() const noexcept
Get the axis.
Definition: NvInfer.h:5759
ScatterMode getMode() const noexcept
Get the scatter mode.
Definition: NvInfer.h:5741
virtual ~IScatterLayer() noexcept=default
Select elements from two data tensors based on a condition tensor.
Definition: NvInfer.h:4906
virtual ~ISelectLayer() noexcept=default
Layer type for getting shape of a tensor.
Definition: NvInfer.h:3481
virtual ~IShapeLayer() noexcept=default
apiv::VShapeLayer * mImpl
Definition: NvInfer.h:3483
Layer type for shuffling data.
Definition: NvInfer.h:3046
apiv::VShuffleLayer * mImpl
Definition: NvInfer.h:3204
void setFirstTranspose(Permutation permutation) noexcept
Set the permutation applied by the first transpose operation.
Definition: NvInfer.h:3057
void setSecondTranspose(Permutation permutation) noexcept
Set the permutation applied by the second transpose operation.
Definition: NvInfer.h:3157
Dims getReshapeDimensions() const noexcept
Get the reshaped dimensions.
Definition: NvInfer.h:3110
void setReshapeDimensions(Dims const &dimensions) noexcept
Set the reshaped dimensions.
Definition: NvInfer.h:3097
Permutation getFirstTranspose() const noexcept
Get the permutation applied by the first transpose operation.
Definition: NvInfer.h:3069
virtual ~IShuffleLayer() noexcept=default
Permutation getSecondTranspose() const noexcept
Get the permutation applied by the second transpose operation.
Definition: NvInfer.h:3169
bool getZeroIsPlaceholder() const noexcept
Get meaning of 0 in reshape dimensions.
Definition: NvInfer.h:3198
void setZeroIsPlaceholder(bool zeroIsPlaceholder) noexcept
Set meaning of 0 in reshape dimensions.
Definition: NvInfer.h:3185
Slices an input tensor into an output tensor based on the offset and strides.
Definition: NvInfer.h:3296
void setStride(Dims const &stride) noexcept
Set the stride for computing the output slice data.
Definition: NvInfer.h:3365
apiv::VSliceLayer * mImpl
Definition: NvInfer.h:3464
virtual ~ISliceLayer() noexcept=default
void setSize(Dims const &size) noexcept
Set the dimensions of the output slice.
Definition: NvInfer.h:3336
void setAxes(Dims const &axes) noexcept
Set the axes for this ISliceLayer.
Definition: NvInfer.h:3443
void setStart(Dims const &start) noexcept
Set the start offset that the slice layer uses to create the output slice.
Definition: NvInfer.h:3307
Dims getStart() const noexcept
Get the start offset for the slice layer.
Definition: NvInfer.h:3322
void setMode(SampleMode mode) noexcept
Set the slice mode.
Definition: NvInfer.h:3390
Dims getSize() const noexcept
Get dimensions of the output slice.
Definition: NvInfer.h:3351
SampleMode getMode() const noexcept
Get the slice mode.
Definition: NvInfer.h:3400
Dims getStride() const noexcept
Get the stride for the output slice.
Definition: NvInfer.h:3380
Dims getAxes() const noexcept
Get the axes for this ISliceLayer.
Definition: NvInfer.h:3458
A Softmax layer in a network definition.
Definition: NvInfer.h:1997
void setAxes(uint32_t axes) noexcept
Set the axis along which softmax is computed. Currently, only one axis can be set.
Definition: NvInfer.h:2019
uint32_t getAxes() const noexcept
Get the axis along which softmax occurs.
Definition: NvInfer.h:2029
virtual ~ISoftMaxLayer() noexcept=default
A tensor in a network definition.
Definition: NvInfer.h:181
void setAllowedFormats(TensorFormats formats) noexcept
Set allowed formats for an input or output tensor. By default all formats are allowed....
Definition: NvInfer.h:426
TensorLocation getLocation() const noexcept
Get the storage location of a tensor.
Definition: NvInfer.h:345
void setDimensions(Dims const &dimensions) noexcept
Set the dimensions of a tensor.
Definition: NvInfer.h:228
void resetDynamicRange() noexcept
Undo effect of setDynamicRange.
Definition: NvInfer.h:384
void setName(char const *name) noexcept
Set the tensor name.
Definition: NvInfer.h:197
bool isExecutionTensor() const noexcept
Whether the tensor is an execution tensor.
Definition: NvInfer.h:491
void setType(DataType type) noexcept
Set the data type of a tensor.
Definition: NvInfer.h:257
bool dynamicRangeIsSet() const noexcept
Query whether dynamic range is set.
Definition: NvInfer.h:376
char const * getName() const noexcept
Get the tensor name.
Definition: NvInfer.h:209
bool isShapeTensor() const noexcept
Whether the tensor is a shape tensor.
Definition: NvInfer.h:470
float getDynamicRangeMax() const noexcept
Get maximum of dynamic range.
Definition: NvInfer.h:404
bool isNetworkInput() const noexcept
Whether the tensor is a network input.
Definition: NvInfer.h:294
TRT_DEPRECATED void setBroadcastAcrossBatch(bool broadcastAcrossBatch) noexcept
Set whether to enable broadcast of tensor across the implicit batch dimension.
Definition: NvInfer.h:319
TRT_DEPRECATED bool setDynamicRange(float min, float max) noexcept
Set dynamic range for the tensor.
Definition: NvInfer.h:286
TRT_DEPRECATED bool getBroadcastAcrossBatch() const noexcept
Check if tensor is broadcast across the implicit batch dimension.
Definition: NvInfer.h:333
bool isNetworkOutput() const noexcept
Whether the tensor is a network output.
Definition: NvInfer.h:302
DataType getType() const noexcept
Get the data type of a tensor.
Definition: NvInfer.h:269
apiv::VTensor * mImpl
Definition: NvInfer.h:538
float getDynamicRangeMin() const noexcept
Get minimum of dynamic range.
Definition: NvInfer.h:394
virtual ~ITensor() noexcept=default
void setDimensionName(int32_t index, char const *name) noexcept
Name a dimension of an input tensor.
Definition: NvInfer.h:517
char const * getDimensionName(int32_t index) const noexcept
Get the name of an input dimension.
Definition: NvInfer.h:532
TRT_DEPRECATED void setLocation(TensorLocation location) noexcept
Set the storage location of a tensor.
Definition: NvInfer.h:364
Dims getDimensions() const noexcept
Get the dimensions of a tensor.
Definition: NvInfer.h:242
TensorFormats getAllowedFormats() const noexcept
Get a bitmask of TensorFormat values that the tensor supports. For a shape tensor,...
Definition: NvInfer.h:439
Class to handle tactic timing info collected from builder.
Definition: NvInfer.h:8459
bool combine(ITimingCache const &inputCache, bool ignoreMismatch) noexcept
Combine input timing cache into local instance.
Definition: NvInfer.h:8496
virtual ~ITimingCache() noexcept=default
apiv::VTimingCache * mImpl
Definition: NvInfer.h:8512
bool reset() noexcept
Empty the timing cache.
Definition: NvInfer.h:8506
Layer that represents a TopK reduction.
Definition: NvInfer.h:3521
void setK(int32_t k) noexcept
Set the static k value for the layer.
Definition: NvInfer.h:3552
void setReduceAxes(uint32_t reduceAxes) noexcept
Set which axes to reduce for the layer.
Definition: NvInfer.h:3576
TopKOperation getOperation() const noexcept
Get the operation for the layer.
Definition: NvInfer.h:3538
apiv::VTopKLayer * mImpl
Definition: NvInfer.h:3608
void setOperation(TopKOperation op) noexcept
Set the operation for the layer.
Definition: NvInfer.h:3528
int32_t getK() const noexcept
Get the k value for the layer.
Definition: NvInfer.h:3566
uint32_t getReduceAxes() const noexcept
Get the axes to reduce for the layer.
Definition: NvInfer.h:3586
virtual ~ITopKLayer() noexcept=default
A layer that represents a trip-count limiter.
Definition: NvInfer.h:4720
TripLimit getTripLimit() const noexcept
Get a trip limiter type.
Definition: NvInfer.h:4725
virtual ~ITripLimitLayer() noexcept=default
Layer that represents an unary operation.
Definition: NvInfer.h:2803
void setOperation(UnaryOperation op) noexcept
Set the unary operation for the layer.
Definition: NvInfer.h:2812
apiv::VUnaryLayer * mImpl
Definition: NvInfer.h:2828
UnaryOperation getOperation() const noexcept
Get the unary operation for the layer.
Definition: NvInfer.h:2822
virtual ~IUnaryLayer() noexcept=default
An Interface class for version control.
Definition: NvInferRuntimeBase.h:400
Version information associated with a TRT interface.
Definition: NvInferRuntimeBase.h:365
An array of weights used as a layer parameter.
Definition: NvInferRuntime.h:121
Single registration point for all plugins in an application. It is used to find plugin implementation...
Definition: NvInferSafeRuntime.h:830
Definition: NvInfer.h:8149
virtual int32_t selectAlgorithms(IAlgorithmContext const &context, IAlgorithm const *const *choices, int32_t nbChoices, int32_t *selection) noexcept=0
Select Algorithms for a layer from the given list of algorithm choices.
virtual void reportAlgorithms(IAlgorithmContext const *const *algoContexts, IAlgorithm const *const *algoChoices, int32_t nbAlgorithms) noexcept=0
Called by TensorRT to report choices it made.
InterfaceInfo getInterfaceInfo() const noexcept override
Return version information associated with this interface. Applications must not override this method...
Definition: NvInfer.h:8154
virtual ~IAlgorithmSelector() noexcept=default
Definition: NvInferRuntimeBase.h:857
Definition: NvInferRuntimeBase.h:469
~IInt8EntropyCalibrator2() noexcept override=default
CalibrationAlgoType getAlgorithm() noexcept override
Definition: NvInfer.h:7797
InterfaceInfo getInterfaceInfo() const noexcept override
Return version information associated with this interface. Applications must not override this method...
Definition: NvInfer.h:7789
Definition: NvInfer.h:7744
CalibrationAlgoType getAlgorithm() noexcept override
Definition: NvInfer.h:7757
InterfaceInfo getInterfaceInfo() const noexcept override
Return version information associated with this interface. Applications must not override this method...
Definition: NvInfer.h:7749
~IInt8EntropyCalibrator() noexcept override=default
Definition: NvInfer.h:7863
CalibrationAlgoType getAlgorithm() noexcept override
Definition: NvInfer.h:7876
InterfaceInfo getInterfaceInfo() const noexcept override
Return version information associated with this interface. Applications must not override this method...
Definition: NvInfer.h:7868
virtual double getQuantile() const noexcept=0
The quantile (between 0 and 1) that will be used to select the region maximum when the quantile metho...
Definition: NvInfer.h:7824
~IInt8MinMaxCalibrator() noexcept override=default
CalibrationAlgoType getAlgorithm() noexcept override
Definition: NvInfer.h:7837
InterfaceInfo getInterfaceInfo() const noexcept override
Return version information associated with this interface. Applications must not override this method...
Definition: NvInfer.h:7829
Definition: NvInferRuntime.h:687
Definition: NvInfer.h:8671
virtual bool stepComplete(char const *phaseName, int32_t step) noexcept=0
Signal that a step of an optimizer phase has finished.
virtual ~IProgressMonitor() noexcept=default
virtual void phaseFinish(char const *phaseName) noexcept=0
Signal that a phase of the optimizer has finished.
virtual void phaseStart(char const *phaseName, char const *parentPhase, int32_t nbSteps) noexcept=0
Signal that a phase of the optimizer has started.
IBuilder * createInferBuilder(ILogger &logger) noexcept
Create an instance of an IBuilder class.
Definition: NvInfer.h:9911
The TensorRT API version 1 namespace.
uint32_t TacticSources
Represents a collection of one or more TacticSource values combine using bitwise-OR operations.
Definition: NvInferRuntime.h:2377
ResizeSelector
The coordinate selector when resize to single pixel output.
Definition: NvInfer.h:3996
@ kFORMULA
Use formula to map the original index.
@ kUPPER
Select the upper left pixel.
EngineCapability
List of supported engine capability flows.
Definition: NvInferRuntime.h:73
nvinfer1::IPluginRegistry * getBuilderPluginRegistry(nvinfer1::EngineCapability capability) noexcept
Return the plugin registry for building a Standard engine, or nullptr if no registry exists.
MemoryPoolType
The type for memory pools used by TensorRT.
Definition: NvInfer.h:8523
ScaleMode
Controls how shift, scale and power are applied in a Scale layer.
Definition: NvInfer.h:1810
@ kUNIFORM
Identical coefficients across all elements of the tensor.
@ kCHANNEL
Per-channel coefficients.
RuntimePlatform
Describes the intended runtime platform (operating system and CPU architecture) for the execution of ...
Definition: NvInfer.h:8258
uint32_t QuantizationFlags
Represents one or more QuantizationFlag values using binary OR operations.
Definition: NvInfer.h:8210
HardwareCompatibilityLevel
Describes requirements of compatibility with GPU architectures other than that of the GPU on which th...
Definition: NvInfer.h:8637
BoundingBoxFormat
Representation of bounding box data used for the Boxes input tensor in INMSLayer.
Definition: NvInfer.h:5915
@ kCENTER_SIZES
(x_center, y_center, width, height) where (x_center, y_center) is the center point of the box
@ kCORNER_PAIRS
(x1, y1, x2, y2) where (x1, y1) and (x2, y2) are any pair of diagonal corners
constexpr int32_t EnumMax< BuilderFlag >() noexcept
Definition: NvInfer.h:8440
constexpr int32_t EnumMax< LayerType >() noexcept
Definition: NvInfer.h:114
constexpr int32_t EnumMax< CalibrationAlgoType >() noexcept
Definition: NvInfer.h:7659
UnaryOperation
Enumerates the unary operations that may be performed by a Unary layer.
Definition: NvInfer.h:2756
@ kISINF
Return true if input value equals +/- infinity for floating-point data type.
@ kCOSH
Hyperbolic cosine.
@ kACOSH
Inverse hyperbolic cosine.
@ kERF
Gauss error function.
@ kISNAN
Return true if input value is a NaN for floating-point data type.
@ kACOS
Inverse cosine.
@ kABS
Absolute value.
@ kSINH
Hyperbolic sine.
@ kROUND
Round to nearest even for floating-point data type.
@ kATANH
Inverse hyperbolic tangent.
@ kASINH
Inverse hyperbolic sine.
@ kSIGN
Sign, If input > 0, output 1; if input < 0, output -1; if input == 0, output 0.
@ kEXP
Exponentiation.
@ kATAN
Inverse tangent.
constexpr int32_t EnumMax< ReduceOperation >() noexcept
Definition: NvInfer.h:2865
constexpr int32_t EnumMax< TripLimit >() noexcept
Definition: NvInfer.h:4393
ActivationType
Enumerates the types of activation to perform in an activation layer.
Definition: NvInfer.h:133
@ kSELU
Selu activation: x>0 ? beta * x : beta * (alpha*exp(x) - alpha)
@ kTANH
TanH activation.
@ kSCALED_TANH
Scaled tanh activation: alpha*tanh(beta*x)
@ kRELU
Rectified linear activation.
@ kELU
Elu activation: x>=0 ? x : alpha * (exp(x) - 1).
@ kLEAKY_RELU
LeakyRelu activation: x>=0 ? x : alpha * x.
@ kSOFTSIGN
Softsign activation: x / (1+|x|)
@ kHARD_SIGMOID
Hard sigmoid activation: max(0, min(1, alpha*x+beta))
@ kTHRESHOLDED_RELU
Thresholded ReLU activation: x>alpha ? x : 0.
@ kSIGMOID
Sigmoid activation.
@ kCLIP
Clip activation: max(alpha, min(beta, x))
@ kGELU_TANH
GELU tanh activation: 0.5 * x * (1 + tanh(sqrt(2/pi) * (0.044715F * pow(x, 3) + x)))
@ kGELU_ERF
GELU erf activation: 0.5 * x * (1 + erf(sqrt(0.5) * x))
@ kSOFTPLUS
Parametric softplus activation: alpha*log(exp(beta*x)+1)
FillOperation
Enumerates the tensor fill operations that may performed by a fill layer.
Definition: NvInfer.h:4967
@ kRANDOM_UNIFORM
Randomly draw values from a uniform distribution.
@ kRANDOM_NORMAL
Randomly draw values from a normal distribution.
ResizeRoundMode
The rounding mode for nearest neighbor resize.
Definition: NvInfer.h:4026
@ kHALF_UP
Round half up.
@ kHALF_DOWN
Round half down.
nvinfer1::safe::IPluginRegistry * getBuilderSafePluginRegistry(nvinfer1::EngineCapability capability) noexcept
Return the plugin registry for building a Safety engine, or nullptr if no registry exists.
PaddingMode
Enumerates the modes of padding to perform in convolution, deconvolution and pooling layer,...
Definition: NvInfer.h:988
@ kSAME_LOWER
Use SAME padding, with prePadding >= postPadding.
@ kEXPLICIT_ROUND_DOWN
Use explicit padding, rounding output size down.
@ kEXPLICIT_ROUND_UP
Use explicit padding, rounding output size up.
@ kSAME_UPPER
Use SAME padding, with prePadding <= postPadding.
TripLimit
Definition: NvInfer.h:4381
@ kWHILE
Tensor is a scalar of type kBOOL. Loop terminates when value is false.
@ kCOUNT
Tensor is a scalar of type kINT32 or kINT64 that contains the trip count.
uint32_t NetworkDefinitionCreationFlags
Represents one or more NetworkDefinitionCreationFlag flags using binary OR operations....
Definition: NvInfer.h:9599
PreviewFeature
Define preview features.
Definition: NvInfer.h:8598
constexpr int32_t EnumMax< GatherMode >() noexcept
Definition: NvInfer.h:2516
DataType
The type of weights and tensors.
Definition: NvInferRuntimeBase.h:135
uint32_t BuilderFlags
Represents one or more BuilderFlag values using binary OR operations, e.g., 1U << BuilderFlag::kFP16 ...
Definition: NvInfer.h:8288
DeviceType
The device that this layer/network will execute on.
Definition: NvInferRuntime.h:1330
constexpr int32_t EnumMax< ScaleMode >() noexcept
Definition: NvInfer.h:1822
CalibrationAlgoType
Version of calibration algorithm to use.
Definition: NvInfer.h:7646
@ kENTROPY_CALIBRATION_2
Entropy calibration.
@ kLEGACY_CALIBRATION
Legacy calibration.
@ kENTROPY_CALIBRATION
Legacy entropy calibration.
@ kMINMAX_CALIBRATION
Minmax calibration.
LayerType
The type values of layer classes.
Definition: NvInfer.h:58
@ kGRID_SAMPLE
Grid sample layer.
@ kRAGGED_SOFTMAX
Ragged softmax layer.
@ kDECONVOLUTION
Deconvolution layer.
@ kREDUCE
Reduce layer.
@ kASSERTION
Assertion layer.
@ kTOPK
TopK layer.
@ kRESIZE
Resize Layer.
@ kCAST
Cast layer.
@ kPADDING
Padding layer.
@ kMATRIX_MULTIPLY
Matrix multiply layer.
@ kCONDITION
Condition layer.
@ kCONDITIONAL_INPUT
Conditional Input layer.
@ kIDENTITY
Identity layer.
@ kNORMALIZATION
Normalization layer.
@ kQUANTIZE
Quantize layer.
@ kSCATTER
Scatter layer.
@ kCONVOLUTION
Convolution layer.
@ kPARAMETRIC_RELU
Parametric ReLU layer.
@ kCONCATENATION
Concatenation layer.
@ kONE_HOT
OneHot layer.
@ kREVERSE_SEQUENCE
Reverse sequence layer.
@ kSLICE
Slice layer.
@ kEINSUM
Einsum layer.
@ kSOFTMAX
SoftMax layer.
@ kSHAPE
Shape layer.
@ kRECURRENCE
Loop Recurrence layer.
@ kDEQUANTIZE
Dequantize layer.
@ kSHUFFLE
Shuffle layer.
@ kPLUGIN_V3
PluginV3 layer.
@ kITERATOR
Loop Iterator layer.
@ kPOOLING
Pooling layer.
@ kTRIP_LIMIT
Loop Trip limit layer.
@ kSCALE
Scale layer.
@ kGATHER
Gather layer.
@ kUNARY
UnaryOp operation Layer.
@ kACTIVATION
Activation layer.
@ kELEMENTWISE
Elementwise layer.
@ kSELECT
Select layer.
@ kPLUGIN_V2
PluginV2 layer.
@ kLOOP_OUTPUT
Loop output layer.
@ kCONDITIONAL_OUTPUT
Conditional Output layer.
@ kCONSTANT
Constant layer.
@ kNON_ZERO
NonZero layer.
@ kFILL
Fill layer.
@ kPLUGIN
Plugin layer.
constexpr int32_t EnumMax< QuantizationFlag >() noexcept
Definition: NvInfer.h:8235
SampleMode
Controls how ISliceLayer and IGridSample handle out-of-bounds coordinates.
Definition: NvInfer.h:3214
@ kCLAMP
Out of bounds indices are clamped to bounds.
@ kSTRICT_BOUNDS
Fail with error when the coordinates are out of bounds.
@ kWRAP
Coordinates wrap around periodically.
GatherMode
Control form of IGatherLayer.
Definition: NvInfer.h:2504
@ kDEFAULT
Similar to ONNX Gather.
@ kELEMENT
Similar to ONNX GatherElements.
@ kND
Similar to ONNX GatherND.
uint32_t TensorFormats
It is capable of representing one or more TensorFormat by binary OR operations, e....
Definition: NvInfer.h:125
ProfilingVerbosity
List of verbosity levels of layer information exposed in NVTX annotations and in IEngineInspector.
Definition: NvInferRuntime.h:2389
NetworkDefinitionCreationFlag
List of immutable network properties expressed at network creation time. NetworkDefinitionCreationFla...
Definition: NvInfer.h:9610
ElementWiseOperation
Enumerates the binary operations that may be performed by an ElementWise layer.
Definition: NvInfer.h:2414
@ kSUB
Subtract the second element from the first.
@ kSUM
Sum of the two elements.
@ kPROD
Product of the two elements.
@ kFLOOR_DIV
Floor division of the first element by the second.
@ kEQUAL
Check if two elements are equal.
@ kAND
Logical AND of two elements.
@ kOR
Logical OR of two elements.
@ kMIN
Minimum of the two elements.
@ kPOW
The first element to the power of the second element.
@ kLESS
Check if element in first tensor is less than corresponding element in second tensor.
@ kGREATER
Check if element in first tensor is greater than corresponding element in second tensor.
@ kXOR
Logical XOR of two elements.
@ kDIV
Divide the first element by the second.
QuantizationFlag
List of valid flags for quantizing the network to int8.
Definition: NvInfer.h:8222
constexpr int32_t EnumMax< SampleMode >() noexcept
Definition: NvInfer.h:3230
InterpolationMode
Enumerates various modes of interpolation.
Definition: NvInfer.h:3914
@ kNEAREST
ND (0 < N <= 8) nearest neighbor resizing.
@ kCUBIC
Supports bicubic (2D) interpolation.
@ kLINEAR
Supports linear (1D), bilinear (2D), and trilinear (3D) interpolation.
BuilderFlag
List of valid modes that the builder can enable when creating an engine from a network definition.
Definition: NvInfer.h:8298
@ kWEIGHT_STREAMING
Enable weight streaming for the current engine.
@ kDEBUG
Enable debugging of layers via synchronizing after every layer.
@ kGPU_FALLBACK
Enable layers marked to execute on GPU if layer cannot execute on DLA.
@ kSPARSE_WEIGHTS
Allow the builder to examine weights and use optimized functions when weights have suitable sparsity.
@ kFP16
Enable FP16 layer selection, with FP32 fallback.
@ kINT8
Enable Int8 layer selection, with FP32 fallback with FP16 fallback if kFP16 also specified.
@ kINT4
Enable plugins with INT4 input/output.
@ kSTRIP_PLAN
Strip the refittable weights from the engine plan file.
@ kDISABLE_TIMING_CACHE
Disable reuse of timing information across identical layers.
@ kREFIT
Enable building a refittable engine.
@ kOBEY_PRECISION_CONSTRAINTS
Require that layers execute in specified precisions. Build fails otherwise.
@ kREJECT_EMPTY_ALGORITHMS
Fail if IAlgorithmSelector::selectAlgorithms returns an empty set of algorithms.
constexpr int32_t EnumMax< TopKOperation >() noexcept
Definition: NvInfer.h:3504
constexpr int32_t EnumMax< MemoryPoolType >() noexcept
Definition: NvInfer.h:8584
TopKOperation
Enumerates the operations that may be performed by a TopK layer.
Definition: NvInfer.h:3493
ReduceOperation
Enumerates the reduce operations that may be performed by a Reduce layer.
Definition: NvInfer.h:2851
constexpr int32_t EnumMax< LoopOutput >() noexcept
Definition: NvInfer.h:4372
constexpr int32_t EnumMax< NetworkDefinitionCreationFlag >() noexcept
Definition: NvInfer.h:9629
ScatterMode
Control form of IScatterLayer.
Definition: NvInfer.h:5650
MatrixOperation
Enumerates the operations that may be performed on a tensor by IMatrixMultiplyLayer before multiplica...
Definition: NvInfer.h:3619
@ kTRANSPOSE
Like kNONE, but transpose the matrix dimensions.
ResizeCoordinateTransformation
The resize coordinate transformation function.
Definition: NvInfer.h:3942
constexpr int32_t EnumMax< UnaryOperation >() noexcept
Definition: NvInfer.h:2790
LoopOutput
Definition: NvInfer.h:4355
@ kLAST_VALUE
Output value is value of tensor for last iteration.
@ kCONCATENATE
Output value is concatenation of values of tensor for each iteration, in forward order.
@ kREVERSE
Output value is concatenation of values of tensor for each iteration, in reverse order.
constexpr int32_t EnumMax< BoundingBoxFormat >() noexcept
Definition: NvInfer.h:5928
constexpr int32_t EnumMax< MatrixOperation >() noexcept
Definition: NvInfer.h:3647
PoolingType
The type of pooling to perform in a pooling layer.
Definition: NvInfer.h:1424
@ kAVERAGE
Average over elements. If the tensor is padded, the count includes the padding.
@ kMAX
Maximum over elements.
@ kMAX_AVERAGE_BLEND
Blending between max and average pooling: (1-blendFactor)*maxPool + blendFactor*avgPool.
v_1_0::IProgressMonitor IProgressMonitor
Definition: NvInfer.h:8754
constexpr int32_t EnumMax< FillOperation >() noexcept
Definition: NvInfer.h:4998
TensorLocation
The location for tensor data storage, device or host.
Definition: NvInferRuntime.h:201
OptProfileSelector
When setting or querying optimization profile parameters (such as shape tensor inputs or dynamic dime...
Definition: NvInferRuntime.h:2121
constexpr int32_t EnumMax< ScatterMode >() noexcept
Definition: NvInfer.h:5661
Represents a permutation of dimensions.
Definition: NvInfer.h:3023
Declaration of EnumMaxImpl struct to store maximum number of elements in an enumeration type.
Definition: NvInferRuntimeBase.h:120

  Copyright © 2024 NVIDIA Corporation
  Privacy Policy | Manage My Privacy | Do Not Sell or Share My Data | Terms of Service | Accessibility | Corporate Policies | Product Security | Contact