Go to the documentation of this file.
53 #include "NvInferLegacyDims.h"
170 static constexpr int32_t kVALUE = 12;
204 mImpl->setName(name);
216 return mImpl->getName();
235 mImpl->setDimensions(dimensions);
248 return mImpl->getDimensions();
263 mImpl->setType(type);
275 return mImpl->getType();
290 return mImpl->setDynamicRange(min, max);
298 return mImpl->isNetworkInput();
306 return mImpl->isNetworkOutput();
328 mImpl->setBroadcastAcrossBatch(broadcastAcrossBatch);
344 return mImpl->getBroadcastAcrossBatch();
354 return mImpl->getLocation();
369 mImpl->setLocation(location);
379 return mImpl->dynamicRangeIsSet();
387 mImpl->resetDynamicRange();
397 return mImpl->getDynamicRangeMin();
407 return mImpl->getDynamicRangeMax();
426 mImpl->setAllowedFormats(formats);
439 return mImpl->getAllowedFormats();
473 return mImpl->isShapeTensor();
496 return mImpl->isExecutionTensor();
501 virtual ~
ITensor() noexcept = default;
521 return mLayer->getType();
533 mLayer->setName(name);
544 return mLayer->getName();
552 return mLayer->getNbInputs();
565 return mLayer->getInput(index);
573 return mLayer->getNbOutputs();
584 return mLayer->getOutput(index);
601 return mLayer->setInput(index, tensor);
621 mLayer->setPrecision(dataType);
633 return mLayer->getPrecision();
645 return mLayer->precisionIsSet();
655 mLayer->resetPrecision();
686 mLayer->setOutputType(index, dataType);
700 return mLayer->getOutputType(index);
713 return mLayer->outputTypeIsSet(index);
725 return mLayer->resetOutputType(index);
729 virtual ~
ILayer() noexcept = default;
730 apiv::VLayer* mLayer;
971 static constexpr int32_t kVALUE = 6;
1001 mImpl->setKernelSize(kernelSize);
1013 return mImpl->getKernelSize();
1025 mImpl->setNbOutputMaps(nbOutputMaps);
1035 return mImpl->getNbOutputMaps();
1051 mImpl->setStride(stride);
1061 return mImpl->getStride();
1081 return mImpl->setPadding(padding);
1093 return mImpl->getPadding();
1113 mImpl->setNbGroups(nbGroups);
1123 return mImpl->getNbGroups();
1137 mImpl->setKernelWeights(weights);
1147 return mImpl->getKernelWeights();
1162 mImpl->setBiasWeights(weights);
1172 return mImpl->getBiasWeights();
1188 return mImpl->setDilation(dilation);
1200 return mImpl->getDilation();
1217 mImpl->setPrePadding(padding);
1227 return mImpl->getPrePadding();
1244 mImpl->setPostPadding(padding);
1254 return mImpl->getPostPadding();
1268 mImpl->setPaddingMode(paddingMode);
1280 return mImpl->getPaddingMode();
1293 mImpl->setKernelSizeNd(kernelSize);
1303 return mImpl->getKernelSizeNd();
1318 mImpl->setStrideNd(stride);
1328 return mImpl->getStrideNd();
1346 mImpl->setPaddingNd(padding);
1358 return mImpl->getPaddingNd();
1372 mImpl->setDilationNd(dilation);
1382 return mImpl->getDilationNd();
1407 apiv::VConvolutionLayer* mImpl;
1451 mImpl->setNbOutputChannels(nbOutputs);
1461 return mImpl->getNbOutputChannels();
1471 mImpl->setKernelWeights(weights);
1481 return mImpl->getKernelWeights();
1493 mImpl->setBiasWeights(weights);
1503 return mImpl->getBiasWeights();
1526 apiv::VFullyConnectedLayer* mImpl;
1552 mImpl->setActivationType(type);
1562 return mImpl->getActivationType();
1577 mImpl->setAlpha(alpha);
1591 mImpl->setBeta(beta);
1600 return mImpl->getAlpha();
1609 return mImpl->getBeta();
1614 apiv::VActivationLayer* mImpl;
1626 kMAX_AVERAGE_BLEND = 2
1635 static constexpr int32_t kVALUE = 3;
1662 mImpl->setPoolingType(type);
1672 return mImpl->getPoolingType();
1686 mImpl->setWindowSize(windowSize);
1698 return mImpl->getWindowSize();
1714 mImpl->setStride(stride);
1726 return mImpl->getStride();
1742 mImpl->setPadding(padding);
1756 return mImpl->getPadding();
1771 mImpl->setBlendFactor(blendFactor);
1784 return mImpl->getBlendFactor();
1801 mImpl->setAverageCountExcludesPadding(exclusive);
1812 return mImpl->getAverageCountExcludesPadding();
1830 mImpl->setPrePadding(padding);
1840 return mImpl->getPrePadding();
1858 mImpl->setPostPadding(padding);
1868 return mImpl->getPostPadding();
1881 mImpl->setPaddingMode(paddingMode);
1892 return mImpl->getPaddingMode();
1905 mImpl->setWindowSizeNd(windowSize);
1915 return mImpl->getWindowSizeNd();
1930 mImpl->setStrideNd(stride);
1940 return mImpl->getStrideNd();
1959 mImpl->setPaddingNd(padding);
1971 return mImpl->getPaddingNd();
1976 apiv::VPoolingLayer* mImpl;
2002 mImpl->setWindowSize(windowSize);
2012 return mImpl->getWindowSize();
2023 mImpl->setAlpha(alpha);
2033 return mImpl->getAlpha();
2044 mImpl->setBeta(beta);
2054 return mImpl->getBeta();
2075 return mImpl->getK();
2079 virtual ~
ILRNLayer() noexcept = default;
2080 apiv::VLRNLayer* mImpl;
2138 mImpl->setMode(mode);
2148 return mImpl->getMode();
2158 mImpl->setShift(shift);
2168 return mImpl->getShift();
2178 mImpl->setScale(scale);
2188 return mImpl->getScale();
2198 mImpl->setPower(power);
2208 return mImpl->getPower();
2223 return mImpl->getChannelAxis();
2244 mImpl->setChannelAxis(channelAxis);
2249 apiv::VScaleLayer* mImpl;
2298 mImpl->setAxes(axes);
2308 return mImpl->getAxes();
2313 apiv::VSoftMaxLayer* mImpl;
2342 mImpl->setAxis(axis);
2352 return mImpl->getAxis();
2357 apiv::VConcatenationLayer* mImpl;
2383 mImpl->setKernelSize(kernelSize);
2395 return mImpl->getKernelSize();
2407 mImpl->setNbOutputMaps(nbOutputMaps);
2417 return mImpl->getNbOutputMaps();
2433 mImpl->setStride(stride);
2445 return mImpl->getStride();
2465 mImpl->setPadding(padding);
2479 return mImpl->getPadding();
2499 mImpl->setNbGroups(nbGroups);
2509 return mImpl->getNbGroups();
2523 mImpl->setKernelWeights(weights);
2533 return mImpl->getKernelWeights();
2548 mImpl->setBiasWeights(weights);
2558 return mImpl->getBiasWeights();
2576 mImpl->setPrePadding(padding);
2586 return mImpl->getPrePadding();
2604 mImpl->setPostPadding(padding);
2614 return mImpl->getPostPadding();
2628 mImpl->setPaddingMode(paddingMode);
2640 return mImpl->getPaddingMode();
2653 mImpl->setKernelSizeNd(kernelSize);
2663 return mImpl->getKernelSizeNd();
2678 mImpl->setStrideNd(stride);
2688 return mImpl->getStrideNd();
2706 mImpl->setPaddingNd(padding);
2718 return mImpl->getPaddingNd();
2748 mImpl->setDilationNd(dilation);
2758 return mImpl->getDilationNd();
2763 apiv::VDeconvolutionLayer* mImpl;
2797 static constexpr int32_t kVALUE = 14;
2829 return mImpl->setOperation(op);
2841 return mImpl->getOperation();
2863 mImpl->setGatherAxis(axis);
2873 return mImpl->getGatherAxis();
2885 mImpl->setNbElementWiseDims(k);
2895 return mImpl->getNbElementWiseDims();
3085 return mImpl->getLayerCount();
3089 return mImpl->getHiddenSize();
3093 return mImpl->getMaxSeqLength();
3097 return mImpl->getDataLength();
3116 return mImpl->setSequenceLengths(seqLengths);
3128 return mImpl->getSequenceLengths();
3137 mImpl->setOperation(op);
3146 return mImpl->getOperation();
3155 mImpl->setInputMode(op);
3164 return mImpl->getInputMode();
3179 mImpl->setDirection(op);
3188 return mImpl->getDirection();
3247 mImpl->setWeightsForGate(layerIndex, gate, isW, weights);
3256 return mImpl->getWeightsForGate(layerIndex, gate, isW);
3281 mImpl->setBiasForGate(layerIndex, gate, isW, bias);
3290 return mImpl->getBiasForGate(layerIndex, gate, isW);
3307 mImpl->setHiddenState(hidden);
3316 return mImpl->getHiddenState();
3335 mImpl->setCellState(cell);
3344 return mImpl->getCellState();
3371 return mImpl->getPlugin();
3435 mImpl->setOperation(op);
3445 return mImpl->getOperation();
3504 mImpl->setOperation(op);
3514 return mImpl->getOperation();
3524 mImpl->setReduceAxes(reduceAxes);
3534 return mImpl->getReduceAxes();
3544 mImpl->setKeepDimensions(keepDimensions);
3554 return mImpl->getKeepDimensions();
3586 mImpl->setPrePadding(padding);
3598 return mImpl->getPrePadding();
3612 mImpl->setPostPadding(padding);
3624 return mImpl->getPostPadding();
3638 mImpl->setPrePaddingNd(padding);
3650 return mImpl->getPrePaddingNd();
3664 mImpl->setPostPaddingNd(padding);
3676 return mImpl->getPostPaddingNd();
3721 mImpl->setFirstTranspose(permutation);
3733 return mImpl->getFirstTranspose();
3758 mImpl->setReshapeDimensions(dimensions);
3771 return mImpl->getReshapeDimensions();
3809 mImpl->setSecondTranspose(permutation);
3821 return mImpl->getSecondTranspose();
3837 return mImpl->setZeroIsPlaceholder(zeroIsPlaceholder);
3850 return mImpl->getZeroIsPlaceholder();
3920 mImpl->setStart(start);
3935 return mImpl->getStart();
3949 return mImpl->setSize(size);
3964 return mImpl->getSize();
3978 mImpl->setStride(stride);
3993 return mImpl->getStride();
4003 mImpl->setMode(mode);
4013 return mImpl->getMode();
4095 mImpl->setOperation(op);
4105 return mImpl->getOperation();
4127 return mImpl->getK();
4137 mImpl->setReduceAxes(reduceAxes);
4147 return mImpl->getReduceAxes();
4226 mImpl->setOperation(index, op);
4236 return mImpl->getOperation(index);
4304 mImpl->setWeights(weights);
4314 return mImpl->getWeights();
4326 mImpl->setDimensions(dimensions);
4338 return mImpl->getDimensions();
4377 static constexpr int32_t kVALUE = 2;
4427 static constexpr int32_t kVALUE = 3;
4453 static constexpr int32_t kVALUE = 2;
4486 static constexpr int32_t kVALUE = 4;
4532 return mImpl->setOutputDimensions(dimensions);
4542 return mImpl->getOutputDimensions();
4563 void setScales(
const float* scales, int32_t nbScales) noexcept
4565 mImpl->setScales(scales, nbScales);
4582 int32_t
getScales(int32_t size,
float* scales)
const noexcept
4584 return mImpl->getScales(size, scales);
4596 mImpl->setResizeMode(resizeMode);
4606 return mImpl->getResizeMode();
4623 mImpl->setAlignCorners(alignCorners);
4636 return mImpl->getAlignCorners();
4671 mImpl->setCoordinateTransformation(coordTransform);
4681 return mImpl->getCoordinateTransformation();
4696 mImpl->setSelectorForSinglePixel(selector);
4706 return mImpl->getSelectorForSinglePixel();
4720 mImpl->setNearestRounding(value);
4730 return mImpl->getNearestRounding();
4735 apiv::VResizeLayer* mImpl;
4781 return mBoundary->getLoop();
4786 apiv::VLoopBoundaryLayer* mBoundary;
4839 return mImpl->getLoopOutput();
4856 mImpl->setAxis(axis);
4862 return mImpl->getAxis();
4889 apiv::VLoopOutputLayer* mImpl;
4897 return mImpl->getTripLimit();
4911 mImpl->setAxis(axis);
4917 return mImpl->getAxis();
4927 mImpl->setReverse(reverse);
4933 return mImpl->getReverse();
4938 apiv::VIteratorLayer* mImpl;
4957 return mImpl->addRecurrence(initialValue);
4978 return mImpl->addTripLimit(tensor, limit);
4991 return mImpl->addIterator(tensor, axis, reverse);
5003 return mImpl->addLoopOutput(tensor, outputKind, axis);
5016 mImpl->setName(name);
5026 return mImpl->getName();
5030 virtual ~
ILoop() noexcept = default;
5103 mImpl->setDimensions(dimensions);
5118 return mImpl->getDimensions();
5128 mImpl->setOperation(op);
5138 return mImpl->getOperation();
5156 mImpl->setAlpha(alpha);
5171 return mImpl->getAlpha();
5189 mImpl->setBeta(beta);
5204 return mImpl->getBeta();
5237 apiv::VFillLayer* mImpl;
5310 return mImpl->getAxis();
5321 mImpl->setAxis(axis);
5326 apiv::VQuantizeLayer* mImpl;
5397 return mImpl->getAxis();
5408 mImpl->setAxis(axis);
5413 apiv::VDequantizeLayer* mImpl;
5477 return mImpl->addInput(name, type, dimensions);
5489 mImpl->markOutput(tensor);
5513 return mImpl->addConvolution(input, nbOutputMaps, kernelSize, kernelWeights, biasWeights);
5534 return mImpl->addFullyConnected(input, nbOutputs, kernelWeights, biasWeights);
5553 return mImpl->addActivation(input, type);
5572 return mImpl->addPooling(input, type, windowSize);
5591 return mImpl->addLRN(input, window, alpha, beta, k);
5618 return mImpl->addScale(input, mode, shift, scale, power);
5631 return mImpl->addSoftMax(input);
5648 return mImpl->addConcatenation(inputs, nbInputs);
5672 return mImpl->addDeconvolution(input, nbOutputMaps, kernelSize, kernelWeights, biasWeights);
5697 return mImpl->addElementWise(input1, input2, op);
5716 return mImpl->addUnary(input, operation);
5733 return mImpl->addPadding(input, prePadding, postPadding);
5747 return mImpl->addShuffle(input);
5759 return mImpl->getNbLayers();
5773 return mImpl->getLayer(index);
5785 return mImpl->getNbInputs();
5801 return mImpl->getInput(index);
5815 return mImpl->getNbOutputs();
5831 return mImpl->getOutput(index);
5872 return mImpl->addReduce(input, operation, reduceAxes, keepDimensions);
5905 return mImpl->addTopK(input, op, k, reduceAxes);
5921 return mImpl->addGather(data, indices, axis);
5939 return mImpl->addRaggedSoftMax(input, bounds);
5959 return mImpl->addMatrixMultiply(input0, op0, input1, op1);
5984 return mImpl->addConstant(dimensions, weights);
6051 ITensor& input, int32_t layerCount, int32_t hiddenSize, int32_t maxSeqLen,
RNNOperation op) noexcept
6053 return mImpl->addRNNv2(input, layerCount, hiddenSize, maxSeqLen, op);
6069 return mImpl->addIdentity(input);
6084 mImpl->removeTensor(tensor);
6096 mImpl->unmarkOutput(tensor);
6115 return mImpl->addPluginV2(inputs, nbInputs, plugin);
6134 return mImpl->addSlice(input, start, size, stride);
6156 mImpl->setName(name);
6170 return mImpl->getName();
6188 return mImpl->addShape(input);
6207 return mImpl->hasImplicitBatchDimension();
6225 return mImpl->markOutputForShapes(tensor);
6237 return mImpl->unmarkOutputForShapes(tensor);
6255 return mImpl->addParametricReLU(input, slope);
6278 return mImpl->addConvolutionNd(input, nbOutputMaps, kernelSize, kernelWeights, biasWeights);
6297 return mImpl->addPoolingNd(input, type, windowSize);
6320 return mImpl->addDeconvolutionNd(input, nbOutputMaps, kernelSize, kernelWeights, biasWeights);
6356 return mImpl->addScaleNd(input, mode, shift, scale, power, channelAxis);
6371 return mImpl->addResize(input);
6388 return mImpl->hasExplicitPrecision();
6404 return mImpl->addLoop();
6442 return mImpl->addSelect(condition, thenInput, elseInput);
6460 return mImpl->addFill(dimensions, op);
6475 return mImpl->addPaddingNd(input, prePadding, postPadding);
6495 return mImpl->setWeightsName(weights, name);
6514 mImpl->setErrorRecorder(recorder);
6529 return mImpl->getErrorRecorder();
6548 return mImpl->addDequantize(input, scale);
6567 return mImpl->addQuantize(input, scale);
6581 kLEGACY_CALIBRATION = 0,
6582 kENTROPY_CALIBRATION = 1,
6583 kENTROPY_CALIBRATION_2 = 2,
6584 kMINMAX_CALIBRATION = 3,
6613 virtual int32_t getBatchSize()
const noexcept = 0;
6628 virtual bool getBatch(
void* bindings[],
const char* names[], int32_t nbBindings) noexcept = 0;
6644 virtual const void* readCalibrationCache(std::size_t& length) noexcept = 0;
6654 virtual void writeCalibrationCache(
const void* ptr, std::size_t length) noexcept = 0;
6678 return CalibrationAlgoType::kENTROPY_CALIBRATION;
6696 return CalibrationAlgoType::kENTROPY_CALIBRATION_2;
6713 return CalibrationAlgoType::kMINMAX_CALIBRATION;
6731 return CalibrationAlgoType::kLEGACY_CALIBRATION;
6740 virtual double getQuantile() const noexcept = 0;
6748 virtual
double getRegressionCutoff() const noexcept = 0;
6762 virtual const
void* readHistogramCache(std::
size_t& length) noexcept = 0;
6772 virtual
void writeHistogramCache(const
void* ptr, std::
size_t length) noexcept = 0;
6795 return mImpl->getTensorFormat();
6803 return mImpl->getDataType();
6811 return mImpl->getStrides();
6816 apiv::VAlgorithmIOInfo* mImpl;
6838 return mImpl->getImplementation();
6846 return mImpl->getTactic();
6851 apiv::VAlgorithmVariant* mImpl;
6871 return mImpl->getName();
6882 return mImpl->getDimensions(index, select);
6890 return mImpl->getNbInputs();
6898 return mImpl->getNbOutputs();
6903 apiv::VAlgorithmContext* mImpl;
6930 return mImpl->getAlgorithmIOInfo(index);
6938 return mImpl->getAlgorithmVariant();
6946 return mImpl->getTimingMSec();
6954 return mImpl->getWorkspaceSize();
6967 return mImpl->getAlgorithmIOInfoByIndex(index);
6972 apiv::VAlgorithm* mImpl;
7000 int32_t nbChoices, int32_t* selection) noexcept
7013 int32_t nbAlgorithms) noexcept
7158 return mImpl->serialize();
7182 return mImpl->combine(inputCache, ignoreMismatch);
7192 return mImpl->reset();
7221 mImpl->setMinTimingIterations(minTiming);
7233 return mImpl->getMinTimingIterations();
7246 mImpl->setAvgTimingIterations(avgTiming);
7258 return mImpl->getAvgTimingIterations();
7271 mImpl->setEngineCapability(capability);
7283 return mImpl->getEngineCapability();
7293 mImpl->setInt8Calibrator(calibrator);
7301 return mImpl->getInt8Calibrator();
7313 mImpl->setMaxWorkspaceSize(workspaceSize);
7327 return mImpl->getMaxWorkspaceSize();
7344 mImpl->setFlags(builderFlags);
7356 return mImpl->getFlags();
7368 mImpl->clearFlag(builderFlag);
7380 mImpl->setFlag(builderFlag);
7392 return mImpl->getFlag(builderFlag);
7407 mImpl->setDeviceType(layer, deviceType);
7416 return mImpl->getDeviceType(layer);
7426 return mImpl->isDeviceTypeSet(layer);
7436 mImpl->resetDeviceType(layer);
7445 return mImpl->canRunOnDLA(layer);
7460 mImpl->setDLACore(dlaCore);
7471 return mImpl->getDLACore();
7481 mImpl->setDefaultDeviceType(deviceType);
7491 return mImpl->getDefaultDeviceType();
7527 return mImpl->setProfileStream(stream);
7539 return mImpl->getProfileStream();
7555 return mImpl->addOptimizationProfile(profile);
7568 return mImpl->getNbOptimizationProfiles();
7580 mImpl->setProfilingVerbosity(verbosity);
7593 return mImpl->getProfilingVerbosity();
7602 mImpl->setAlgorithmSelector(selector);
7610 return mImpl->getAlgorithmSelector();
7625 return mImpl->setCalibrationProfile(profile);
7635 return mImpl->getCalibrationProfile();
7652 mImpl->setQuantizationFlags(flags);
7664 return mImpl->getQuantizationFlags();
7676 mImpl->clearQuantizationFlag(flag);
7688 mImpl->setQuantizationFlag(flag);
7700 return mImpl->getQuantizationFlag(flag);
7725 return mImpl->setTacticSources(tacticSources);
7740 return mImpl->getTacticSources();
7759 return mImpl->createTimingCache(blob, size);
7782 return mImpl->setTimingCache(cache, ignoreMismatch);
7792 return mImpl->getTimingCache();
7856 virtual ~
IBuilder() noexcept =
default;
7868 mImpl->setMaxBatchSize(batchSize);
7881 return mImpl->getMaxBatchSize();
7889 return mImpl->platformHasFastFp16();
7897 return mImpl->platformHasFastInt8();
7921 return mImpl->getMaxDLABatchSize();
7929 return mImpl->getNbDLACores();
7945 mImpl->setGpuAllocator(allocator);
7955 return mImpl->createBuilderConfig();
7971 return mImpl->buildEngineWithConfig(network, config);
7987 return mImpl->createNetworkV2(flags);
8001 return mImpl->createOptimizationProfile();
8020 mImpl->setErrorRecorder(recorder);
8035 return mImpl->getErrorRecorder();
8051 return mImpl->platformHasTf32();
8070 return mImpl->buildSerializedNetwork(network, config);
8083 extern "C" TENSORRTAPI
void* createInferBuilder_INTERNAL(
void* logger, int32_t version) noexcept;
8099 return static_cast<IBuilder*>(createInferBuilder_INTERNAL(&logger, NV_TENSORRT_VERSION));
8105 #endif // NV_INFER_H
Dims getStrideNd() const noexcept
Get the multi-dimension stride of the deconvolution.
Definition: NvInfer.h:2686
void removeTensor(ITensor &tensor) noexcept
remove a tensor from the network definition.
Definition: NvInfer.h:6082
TRT_DEPRECATED void setKernelSize(DimsHW kernelSize) noexcept
Set the HW kernel size of the convolution.
Definition: NvInfer.h:999
void setDimensions(Dims dimensions) noexcept
Set the output tensor's dimensions.
Definition: NvInfer.h:5101
LoopOutput
Enum that describes kinds of loop outputs.
Definition: NvInfer.h:4739
TRT_DEPRECATED DimsHW getPadding() const noexcept
Get the padding for pooling.
Definition: NvInfer.h:1754
float getAlpha() const noexcept
Get the alpha parameter.
Definition: NvInfer.h:1598
Dims getStrideNd() const noexcept
Get the multi-dimension stride of the convolution.
Definition: NvInfer.h:1326
IErrorRecorder * getErrorRecorder() const noexcept
get the ErrorRecorder assigned to this interface.
Definition: NvInfer.h:6527
TRT_DEPRECATED void destroy() noexcept
Destroy this INetworkDefinition object.
Definition: NvInfer.h:5841
void setStride(Dims stride) noexcept
Set the stride for computing the output slice data.
Definition: NvInfer.h:3976
ITensor * addInput(const char *name, DataType type, Dims dimensions) noexcept
Add an input tensor to the network.
Definition: NvInfer.h:5475
Dims getPostPadding() const noexcept
Get the padding.
Definition: NvInfer.h:2612
Hard sigmoid activation: max(0, min(1, alpha*x+beta))
void setDilationNd(Dims dilation) noexcept
Set the multi-dimension dilation of the convolution.
Definition: NvInfer.h:1370
Definition: NvInferImpl.h:613
void setReduceAxes(uint32_t reduceAxes) noexcept
Set which axes to reduce for the layer.
Definition: NvInfer.h:4135
TRT_DEPRECATED DimsHW getPadding() const noexcept
Get the padding of the deconvolution.
Definition: NvInfer.h:2477
void setWindowSize(int32_t windowSize) noexcept
Set the LRN window size.
Definition: NvInfer.h:2000
Use explicit padding, rounding output size up.
TRT_DEPRECATED void setAlignCorners(bool alignCorners) noexcept
Set whether to align corners while resizing.
Definition: NvInfer.h:4621
void setAlgorithmSelector(IAlgorithmSelector *selector) noexcept
Set Algorithm Selector.
Definition: NvInfer.h:7600
void setPrePaddingNd(Dims padding) noexcept
Set the padding that is applied at the start of the tensor.
Definition: NvInfer.h:3636
void setFirstTranspose(Permutation permutation) noexcept
Set the permutation applied by the first transpose operation.
Definition: NvInfer.h:3719
SliceMode
Controls how ISliceLayer handles out of bounds coordinates.
Definition: NvInfer.h:3863
Use SAME padding, with prePadding >= postPadding.
void reset() noexcept
Resets the builder configuration to defaults.
Definition: NvInfer.h:7499
TRT_DEPRECATED void setStride(DimsHW stride) noexcept
Get the stride of the convolution.
Definition: NvInfer.h:1049
Parametric softplus activation: alpha*log(exp(beta*x)+1)
UnaryOperation getOperation() const noexcept
Get the unary operation for the layer.
Definition: NvInfer.h:3443
void setFlag(BuilderFlag builderFlag) noexcept
Set a single build mode flag.
Definition: NvInfer.h:7378
void setPaddingNd(Dims padding) noexcept
Set the multi-dimension padding of the deconvolution.
Definition: NvInfer.h:2704
void setOperation(RNNOperation op) noexcept
Set the operation of the RNN layer.
Definition: NvInfer.h:3135
A fully connected layer in a network definition. This layer expects an input tensor of three or more ...
Definition: NvInfer.h:1439
Definition: NvInfer.h:3684
ISoftMaxLayer * addSoftMax(ITensor &input) noexcept
Add a SoftMax layer to the network.
Definition: NvInfer.h:5629
void setPostPaddingNd(Dims padding) noexcept
Set the padding that is applied at the end of the tensor.
Definition: NvInfer.h:3662
No operation is performed on the first recurrent layer.
TRT_DEPRECATED DimsHW getKernelSize() const noexcept
Get the HW kernel size of the convolution.
Definition: NvInfer.h:1011
Layer that represents a constant value.
Definition: NvInfer.h:4290
Use CAFFE padding, rounding output size down, uses prePadding value.
TRT_DEPRECATED IDeconvolutionLayer * addDeconvolution(ITensor &input, int32_t nbOutputMaps, DimsHW kernelSize, Weights kernelWeights, Weights biasWeights) noexcept
Add a deconvolution layer to the network.
Definition: NvInfer.h:5669
Layer that represents a parametric ReLU operation.
Definition: NvInfer.h:4353
IPluginV2Layer * addPluginV2(ITensor *const *inputs, int32_t nbInputs, IPluginV2 &plugin) noexcept
Add a plugin layer to the network using the IPluginV2 interface.
Definition: NvInfer.h:6113
const IOptimizationProfile * getCalibrationProfile() noexcept
Get the current calibration profile.
Definition: NvInfer.h:7633
constexpr int32_t EnumMax< RNNDirection >() noexcept
Maximum number of elements in RNNDirection enum.
Definition: NvInfer.h:3012
TRT_DEPRECATED IPaddingLayer * addPadding(ITensor &input, DimsHW prePadding, DimsHW postPadding) noexcept
Add a padding layer to the network.
Definition: NvInfer.h:5731
Minimum of the two elements.
IConvolutionLayer * addConvolutionNd(ITensor &input, int32_t nbOutputMaps, Dims kernelSize, Weights kernelWeights, Weights biasWeights) noexcept
Add a multi-dimension convolution layer to the network.
Definition: NvInfer.h:6275
IErrorRecorder * getErrorRecorder() const noexcept
get the ErrorRecorder assigned to this interface.
Definition: NvInfer.h:8033
uint32_t getAxes() const noexcept
Get the axis along which softmax occurs.
Definition: NvInfer.h:2306
A network definition for input to the builder.
Definition: NvInfer.h:5435
bool getQuantizationFlag(QuantizationFlag flag) const noexcept
Returns true if the quantization flag is set.
Definition: NvInfer.h:7698
bool getFlag(BuilderFlag builderFlag) const noexcept
Returns true if the build mode flag is set.
Definition: NvInfer.h:7390
void setAxis(int32_t axis) noexcept
Set the quantization axis.
Definition: NvInfer.h:5319
Per-channel coefficients.
void setPostPadding(Dims padding) noexcept
Set the multi-dimension post-padding for pooling.
Definition: NvInfer.h:1856
void setDimensions(Dims dimensions) noexcept
Set the dimensions of a tensor.
Definition: NvInfer.h:233
An array of weights used as a layer parameter.
Definition: NvInferRuntime.h:145
provides a unique 128-bit identifier, which along with the input and output information denotes the v...
Definition: NvInfer.h:6830
int32_t getGatherAxis() const noexcept
Get the axis to gather on.
Definition: NvInfer.h:2871
bool isShapeTensor() const noexcept
Whether the tensor is a shape tensor.
Definition: NvInfer.h:471
bool combine(const ITimingCache &inputCache, bool ignoreMismatch) noexcept
Combine input timing cache into local instance.
Definition: NvInfer.h:7180
int32_t getNbGroups() const noexcept
Get the number of groups of the convolution.
Definition: NvInfer.h:1121
Layer that represents a padding operation.
Definition: NvInfer.h:3572
bool canRunOnDLA(const ILayer *layer) const noexcept
Checks if a layer can run on DLA.
Definition: NvInfer.h:7443
IFullyConnectedLayer * addFullyConnected(ITensor &input, int32_t nbOutputs, Weights kernelWeights, Weights biasWeights) noexcept
Add a fully connected layer to the network.
Definition: NvInfer.h:5531
A convolution layer in a network definition.
Definition: NvInfer.h:987
bool setDynamicRange(float min, float max) noexcept
Set dynamic range for the tensor.
Definition: NvInfer.h:288
DataType getOutputType(int32_t index) const noexcept
get the output type of this layer
Definition: NvInfer.h:698
TRT_DEPRECATED void setStride(DimsHW stride) noexcept
Set the stride for pooling.
Definition: NvInfer.h:1712
void setActivationType(ActivationType type) noexcept
Set the type of activation to be performed.
Definition: NvInfer.h:1550
void setDirection(RNNDirection op) noexcept
Set the direction of the RNN layer.
Definition: NvInfer.h:3177
Class to handle library allocated memory that is accessible to the user.
Definition: NvInferRuntime.h:163
Dims getOutputDimensions() const noexcept
Get the output dimensions.
Definition: NvInfer.h:4540
A layer that represents the identity function.
Definition: NvInfer.h:4276
void setPostPadding(Dims padding) noexcept
Set the multi-dimension post-padding of the convolution.
Definition: NvInfer.h:1242
RNNOperation getOperation() const noexcept
Get the operation of the RNN layer.
Definition: NvInfer.h:3144
DeviceType
The device that this layer/network will execute on.
Definition: NvInferRuntime.h:621
int32_t getNbOutputs() const noexcept
Get the number of outputs in the network.
Definition: NvInfer.h:5813
Network iterates from first to last and vice versa and outputs concatenated.
ProfilingVerbosity
List of verbosity levels of layer information exposed in NVTX annotations.
Definition: NvInfer.h:7098
const IAlgorithmIOInfo * getAlgorithmIOInfoByIndex(int32_t index) const noexcept
Returns the format of an Algorithm input or output. Algorithm inputs are incrementally numbered first...
Definition: NvInfer.h:6965
void setAxes(uint32_t axes) noexcept
Set the axis along which softmax is computed. Currently, only one axis can be set.
Definition: NvInfer.h:2296
Selu activation: x>0 ? beta * x : beta * (alpha*exp(x) - alpha)
Register layer names in NVTX message field and register layer detail in NVTX JSON payload field.
CalibrationAlgoType getAlgorithm() noexcept override
Definition: NvInfer.h:6676
Interface implemented by application for selecting and reporting algorithms of a layer provided by th...
Definition: NvInfer.h:6983
RNNInputMode
Enumerates the RNN input modes that may occur with an RNN layer.
Definition: NvInfer.h:3032
void setBiasWeights(Weights weights) noexcept
Set the bias weights.
Definition: NvInfer.h:1491
int32_t getNbOptimizationProfiles() const noexcept
Get number of optimization profiles.
Definition: NvInfer.h:7566
void clearFlag(BuilderFlag builderFlag) noexcept
clear a single build mode flag.
Definition: NvInfer.h:7366
Declaration of EnumMaxImpl struct to store maximum number of elements in an enumeration type.
Definition: NvInferRuntimeCommon.h:136
int32_t getAvgTimingIterations() const noexcept
Query the number of averaging iterations.
Definition: NvInfer.h:7256
IDequantizeLayer * addDequantize(ITensor &input, ITensor &scale) noexcept
Add a dequantization layer to the network.
Definition: NvInfer.h:6546
void setDilationNd(Dims dilation) noexcept
Set the multi-dimension dilation of the deconvolution.
Definition: NvInfer.h:2746
Dims getPostPaddingNd() const noexcept
Get the padding that is applied at the end of the tensor.
Definition: NvInfer.h:3674
TopKOperation getOperation() const noexcept
Get the operation for the layer.
Definition: NvInfer.h:4103
int32_t getNbGroups() const noexcept
Get the number of groups for a deconvolution.
Definition: NvInfer.h:2507
bool hasImplicitBatchDimension() const noexcept
Query whether the network was created with an implicit batch dimension.
Definition: NvInfer.h:6205
int32_t getScales(int32_t size, float *scales) const noexcept
Copies resize scales to scales[0, ..., nbScales-1], where nbScales is the number of scales that were ...
Definition: NvInfer.h:4582
Definition: NvInfer.h:4892
Clip activation: max(alpha, min(beta, x))
Permutation getFirstTranspose() const noexcept
Get the permutation applied by the first transpose operation.
Definition: NvInfer.h:3731
int32_t addOptimizationProfile(const IOptimizationProfile *profile) noexcept
Add an optimization profile.
Definition: NvInfer.h:7553
IElementWiseLayer * addElementWise(ITensor &input1, ITensor &input2, ElementWiseOperation op) noexcept
Add an elementwise layer to the network.
Definition: NvInfer.h:5695
Plugin class for user-implemented layers.
Definition: NvInferRuntimeCommon.h:409
Carries information about input or output of the algorithm. IAlgorithmIOInfo for all the input and ou...
Definition: NvInfer.h:6787
float getTimingMSec() const noexcept
The time in milliseconds to execute the algorithm.
Definition: NvInfer.h:6944
void setK(float k) noexcept
Set the LRN K value.
Definition: NvInfer.h:2063
Definition: NvInferRuntimeCommon.h:189
Definition: NvInfer.h:6705
TensorFormat getTensorFormat() const noexcept
Return TensorFormat of the input/output of algorithm.
Definition: NvInfer.h:6793
void markOutput(ITensor &tensor) noexcept
Mark a tensor as a network output.
Definition: NvInfer.h:5487
Scaled tanh activation: alpha*tanh(beta*x)
constexpr int32_t EnumMax< FillOperation >() noexcept
Maximum number of elements in FillOperation enum.
Definition: NvInfer.h:5059
uint32_t TensorFormats
It is capable of representing one or more TensorFormat by binary OR operations, e....
Definition: NvInfer.h:141
Definition: NvInferImpl.h:536
int32_t getNbInputs() const noexcept
Return number of inputs of the algorithm.
Definition: NvInfer.h:6888
void setType(DataType type) noexcept
Set the data type of a tensor.
Definition: NvInfer.h:261
void setPoolingType(PoolingType type) noexcept
Set the type of activation to be performed.
Definition: NvInfer.h:1660
Softsign activation: x / (1+|x|)
Enable layers marked to execute on GPU if layer cannot execute on DLA.
Fail with error when the coordinates are out of bounds. This is the default.
void resetDynamicRange() noexcept
Undo effect of setDynamicRange.
Definition: NvInfer.h:385
TRT_DEPRECATED void destroy() noexcept
Destroy this object.
Definition: NvInfer.h:7907
IRaggedSoftMaxLayer * addRaggedSoftMax(ITensor &input, ITensor &bounds) noexcept
Add a RaggedSoftMax layer to the network.
Definition: NvInfer.h:5937
void setLocation(TensorLocation location) noexcept
Set the storage location of a tensor.
Definition: NvInfer.h:367
Like kNONE, but transpose the matrix dimensions.
Enable building a refittable engine.
nvinfer1::IHostMemory * buildSerializedNetwork(INetworkDefinition &network, IBuilderConfig &config) noexcept
Builds and serializes a network for the given INetworkDefinition and IBuilderConfig.
Definition: NvInfer.h:8068
ISelectLayer * addSelect(ITensor &condition, ITensor &thenInput, ITensor &elseInput) noexcept
Add a select layer to the network.
Definition: NvInfer.h:6440
void setPrePadding(Dims padding) noexcept
Set the multi-dimension pre-padding of the deconvolution.
Definition: NvInfer.h:2574
An RNN layer in a network definition, version 2.
Definition: NvInfer.h:3080
float getAlpha() const noexcept
Get the LRN alpha value.
Definition: NvInfer.h:2031
DataType getDataType() const noexcept
Return DataType of the input/output of algorithm.
Definition: NvInfer.h:6801
void setBroadcastAcrossBatch(bool broadcastAcrossBatch) noexcept
Set whether to enable broadcast of tensor across the batch.
Definition: NvInfer.h:326
void setPaddingMode(PaddingMode paddingMode) noexcept
Set the padding mode.
Definition: NvInfer.h:1879
Logical AND of two elements.
int32_t getNbOutputChannels() const noexcept
Get the number of output channels K from the fully connected layer.
Definition: NvInfer.h:1459
Enable Int8 layer selection, with FP32 fallback with FP16 fallback if kFP16 also specified.
Dims getPostPadding() const noexcept
Get the post-padding.
Definition: NvInfer.h:1252
TRT_DEPRECATED bool getAlignCorners() const noexcept
True if align corners has been set.
Definition: NvInfer.h:4634
TRT_DEPRECATED DimsHW getWindowSize() const noexcept
Get the window size for pooling.
Definition: NvInfer.h:1696
IRecurrenceLayer * addRecurrence(ITensor &initialValue) noexcept
Create a recurrence layer for this loop with initialValue as its first input.
Definition: NvInfer.h:4955
Dims getDimensions() const noexcept
Get the output tensor's dimensions.
Definition: NvInfer.h:5116
Descriptor for two-dimensional spatial data.
Definition: NvInferLegacyDims.h:98
cudaStream_t getProfileStream() const noexcept
Get the cuda stream that is used to profile this network.
Definition: NvInfer.h:7537
Dims getStrideNd() const noexcept
Get the multi-dimension stride for pooling.
Definition: NvInfer.h:1938
Definition: NvInferImpl.h:724
Dims getReshapeDimensions() const noexcept
Get the reshaped dimensions.
Definition: NvInfer.h:3769
bool platformHasFastInt8() const noexcept
Determine whether the platform has fast native int8.
Definition: NvInfer.h:7895
ResizeMode
Enumerates various modes of resize in the resize layer. Resize mode set using setResizeMode().
Definition: NvInfer.h:4365
TensorFormat
Format of the input/output tensors.
Definition: NvInferRuntimeCommon.h:220
void setWeightsForGate(int32_t layerIndex, RNNGateType gate, bool isW, Weights weights) noexcept
Set the weight parameters for an individual gate in the RNN.
Definition: NvInfer.h:3245
Definition: NvInfer.h:4834
constexpr int32_t EnumMax< MatrixOperation >() noexcept
Maximum number of elements in MatrixOperation enum.
Definition: NvInfer.h:4185
IUnaryLayer * addUnary(ITensor &input, UnaryOperation operation) noexcept
Add a unary layer to the network.
Definition: NvInfer.h:5714
void setBiasWeights(Weights weights) noexcept
Set the bias weights for the convolution.
Definition: NvInfer.h:1160
IDeconvolutionLayer * addDeconvolutionNd(ITensor &input, int32_t nbOutputMaps, Dims kernelSize, Weights kernelWeights, Weights biasWeights) noexcept
Add a multi-dimension deconvolution layer to the network.
Definition: NvInfer.h:6317
nvinfer1::INetworkDefinition * createNetworkV2(NetworkDefinitionCreationFlags flags) noexcept
Create a network definition object.
Definition: NvInfer.h:7985
Dims getStrides() const noexcept
Return strides of the input/output tensor of algorithm.
Definition: NvInfer.h:6809
void setPaddingNd(Dims padding) noexcept
Set the multi-dimension padding for pooling.
Definition: NvInfer.h:1957
int32_t getNbOutputs() const noexcept
Get the number of outputs of a layer.
Definition: NvInfer.h:571
PoolingType getPoolingType() const noexcept
Get the type of activation to be performed.
Definition: NvInfer.h:1670
void setNbOutputMaps(int32_t nbOutputMaps) noexcept
Set the number of output feature maps for the deconvolution.
Definition: NvInfer.h:2405
bool markOutputForShapes(ITensor &tensor) noexcept
Enable tensor's value to be computed by IExecutionContext::getShapeBinding.
Definition: NvInfer.h:6223
Output value is concatenation of values of tensor for each iteration, in reverse order.
bool getKeepDimensions() const noexcept
Get the boolean that specifies whether or not to keep the reduced dimensions for the layer.
Definition: NvInfer.h:3552
Application-implemented logging interface for the builder, engine and runtime.
Definition: NvInferRuntimeCommon.h:1175
Describes the context and requirements, that could be fulfilled by one or more instances of IAlgorith...
Definition: NvInfer.h:6862
Dims getStart() const noexcept
Get the start offset for the slice layer.
Definition: NvInfer.h:3933
bool outputTypeIsSet(int32_t index) const noexcept
whether the output type has been set for this layer
Definition: NvInfer.h:711
Dims getPrePadding() const noexcept
Get the pre-padding.
Definition: NvInfer.h:1225
TRT_DEPRECATED DimsHW getPadding() const noexcept
Get the padding of the convolution. If the padding is asymmetric, the pre-padding is returned.
Definition: NvInfer.h:1091
constexpr int32_t EnumMax< QuantizationFlag >() noexcept
Maximum number of quantization flags in QuantizationFlag enum.
Definition: NvInfer.h:7044
void setChannelAxis(int32_t channelAxis) noexcept
Set the channel axis.
Definition: NvInfer.h:2242
void setReverse(bool reverse) noexcept
Definition: NvInfer.h:4925
IShuffleLayer * addShuffle(ITensor &input) noexcept
Add a shuffle layer to the network.
Definition: NvInfer.h:5745
void unmarkOutput(ITensor &tensor) noexcept
unmark a tensor as a network output.
Definition: NvInfer.h:6094
An engine for executing inference on a built network, with functionally unsafe features.
Definition: NvInferRuntime.h:1231
uint32_t QuantizationFlags
Represents one or more QuantizationFlag values using binary OR operations.
Definition: NvInfer.h:7025
Enable FP16 layer selection, with FP32 fallback.
ActivationType
Enumerates the types of activation to perform in an activation layer.
Definition: NvInfer.h:148
void setPrecision(DataType dataType) noexcept
Set the computational precision of this layer.
Definition: NvInfer.h:619
Dims getWindowSizeNd() const noexcept
Get the multi-dimension window size for pooling.
Definition: NvInfer.h:1913
Permutation getSecondTranspose() const noexcept
Get the permutation applied by the second transpose operation.
Definition: NvInfer.h:3819
A RaggedSoftmax layer in a network definition.
Definition: NvInfer.h:4258
void setKeepDimensions(bool keepDimensions) noexcept
Set the boolean that specifies whether or not to keep the reduced dimensions for the layer.
Definition: NvInfer.h:3542
void setScale(Weights scale) noexcept
Set the scale value.
Definition: NvInfer.h:2176
Dims getDilationNd() const noexcept
Get the multi-dimension dilation of the convolution.
Definition: NvInfer.h:1380
void setReshapeDimensions(Dims dimensions) noexcept
Set the reshaped dimensions.
Definition: NvInfer.h:3756
void clearQuantizationFlag(QuantizationFlag flag) noexcept
clear a quantization flag.
Definition: NvInfer.h:7674
float getK() const noexcept
Get the LRN K value.
Definition: NvInfer.h:2073
Use SAME padding, with prePadding <= postPadding.
int32_t getAxis() const noexcept
Get axis being concatenated over.
Definition: NvInfer.h:4860
constexpr int32_t EnumMax< RNNInputMode >() noexcept
Maximum number of elements in RNNInputMode enum.
Definition: NvInfer.h:3040
void setKernelWeights(Weights weights) noexcept
Set the kernel weights, given as a KxC matrix in row-major order.
Definition: NvInfer.h:1469
RNNDirection getDirection() const noexcept
Get the direction of the RNN layer.
Definition: NvInfer.h:3186
Dims getDimensions(int32_t index, OptProfileSelector select) const noexcept
Get the minimum / optimum / maximum dimensions for input or output tensor.
Definition: NvInfer.h:6880
void setKernelWeights(Weights weights) noexcept
Set the kernel weights for the deconvolution.
Definition: NvInfer.h:2521
Definition: NvInferImpl.h:667
float getDynamicRangeMin() const noexcept
Get minimum of dynamic range.
Definition: NvInfer.h:395
ElementWiseOperation
Enumerates the binary operations that may be performed by an ElementWise layer.
Definition: NvInfer.h:2773
Definition: NvInferImpl.h:589
Generate a tensor with random values drawn from a uniform distribution.
ScaleMode getMode() const noexcept
Get the scale mode.
Definition: NvInfer.h:2146
IQuantizeLayer * addQuantize(ITensor &input, ITensor &scale) noexcept
Add a quantization layer to the network.
Definition: NvInfer.h:6565
Divide the first element by the second.
int32_t getChannelAxis() const noexcept
Get the channel axis.
Definition: NvInfer.h:2221
IInt8Calibrator * getInt8Calibrator() const noexcept
Get Int8 Calibration interface.
Definition: NvInfer.h:7299
Weights getKernelWeights() const noexcept
Get the kernel weights for the deconvolution.
Definition: NvInfer.h:2531
Slices an input tensor into an output tensor based on the offset and strides.
Definition: NvInfer.h:3906
int32_t uint32_t TacticSources
Represents a collection of one or more TacticSource values combine using bitwise-OR operations.
Definition: NvInferImpl.h:158
TRT_DEPRECATED DimsHW getDilation() const noexcept
Get the dilation for a convolution.
Definition: NvInfer.h:1198
void setOperation(int32_t index, MatrixOperation op) noexcept
Set the operation for an input tensor.
Definition: NvInfer.h:4224
void setAllowedFormats(TensorFormats formats) noexcept
Set allowed formats for this tensor. By default all formats are allowed. Shape tensors (for which isS...
Definition: NvInfer.h:424
TRT_DEPRECATED void setWindowSize(DimsHW windowSize) noexcept
Set the window size for pooling.
Definition: NvInfer.h:1684
ScaleMode
Controls how shift, scale and power are applied in a Scale layer.
Definition: NvInfer.h:2088
TacticSources getTacticSources() const noexcept
Get tactic sources.
Definition: NvInfer.h:7738
Use explicit padding, rounding output size down.
Definition: NvInferImpl.h:626
std::size_t getWorkspaceSize() const noexcept
The size of the GPU temporary memory in bytes which the algorithm uses at execution time.
Definition: NvInfer.h:6952
Logical OR of two elements.
IConstantLayer * addConstant(Dims dimensions, Weights weights) noexcept
Add a constant layer to the network.
Definition: NvInfer.h:5982
ReduceOperation
Enumerates the reduce operations that may be performed by a Reduce layer.
Definition: NvInfer.h:3471
Rectified linear activation.
constexpr int32_t EnumMax< SliceMode >() noexcept
Maximum number of elements in SliceMode enum.
Definition: NvInfer.h:3871
Definition: NvInfer.h:4905
void setProfilingVerbosity(ProfilingVerbosity verbosity) noexcept
Set verbosity level of layer information exposed in NVTX annotations.
Definition: NvInfer.h:7578
void setZeroIsPlaceholder(bool zeroIsPlaceholder) noexcept
Set meaning of 0 in reshape dimensions.
Definition: NvInfer.h:3835
void setOutputDimensions(Dims dimensions) noexcept
Set the output dimensions.
Definition: NvInfer.h:4530
bool unmarkOutputForShapes(ITensor &tensor) noexcept
Undo markOutputForShapes.
Definition: NvInfer.h:6235
int32_t getNbLayers() const noexcept
Get the number of layers in the network.
Definition: NvInfer.h:5757
BuilderFlag
List of valid modes that the builder can enable when creating an engine from a network definition.
Definition: NvInfer.h:7064
void setAlpha(float alpha) noexcept
Set the alpha parameter (must be finite).
Definition: NvInfer.h:1575
void setBeta(float beta) noexcept
Set the beta parameter (must be finite).
Definition: NvInfer.h:1589
void setDefaultDeviceType(DeviceType deviceType) noexcept
Sets the default DeviceType to be used by the builder. It ensures that all the layers that can run on...
Definition: NvInfer.h:7479
constexpr int32_t EnumMax< TopKOperation >() noexcept
Maximum number of elements in TopKOperation enum.
Definition: NvInfer.h:4073
The first element to the power of the second element.
PaddingMode getPaddingMode() const noexcept
Get the padding mode.
Definition: NvInfer.h:2638
bool getReverse() const noexcept
True if and only if reversing input.
Definition: NvInfer.h:4931
void setAxis(int32_t axis) noexcept
Set where to insert the contenation axis. Ignored if getLoopOutput() is kLAST_VALUE.
Definition: NvInfer.h:4854
void setBlendFactor(float blendFactor) noexcept
Set the blending factor for the max_average_blend mode: max_average_blendPool = (1-blendFactor)*maxPo...
Definition: NvInfer.h:1769
Weights getBiasWeights() const noexcept
Get the bias weights for the deconvolution.
Definition: NvInfer.h:2556
constexpr int32_t EnumMax< ScaleMode >() noexcept
Maximum number of elements in ScaleMode enum.
Definition: NvInfer.h:2097
ElementWiseOperation getOperation() const noexcept
Get the binary operation for the layer.
Definition: NvInfer.h:2839
void setNbOutputMaps(int32_t nbOutputMaps) noexcept
Set the number of output maps for the convolution.
Definition: NvInfer.h:1023
bool precisionIsSet() const noexcept
whether the computational precision has been set for this layer
Definition: NvInfer.h:643
bool setWeightsName(Weights weights, const char *name) noexcept
Associate a name with all current uses of the given weights.
Definition: NvInfer.h:6493
The TensorRT API version 1 namespace.
IPaddingLayer * addPaddingNd(ITensor &input, Dims prePadding, Dims postPadding) noexcept
Add a padding layer to the network. Only 2D padding is currently supported.
Definition: NvInfer.h:6473
constexpr int32_t EnumMax< RNNGateType >() noexcept
Maximum number of elements in RNNGateType enum.
Definition: NvInfer.h:3064
TRT_DEPRECATED void setPadding(DimsHW padding) noexcept
Set the padding of the convolution.
Definition: NvInfer.h:1079
Base class for all layer classes in a network definition.
Definition: NvInfer.h:511
ITensor * getCellState() const noexcept
Get the initial cell state of the RNN.
Definition: NvInfer.h:3342
constexpr int32_t EnumMax< ReduceOperation >() noexcept
Maximum number of elements in ReduceOperation enum.
Definition: NvInfer.h:3482
TensorFormats getAllowedFormats() const noexcept
Get a bitmask of TensorFormat values that the tensor supports. For a shape tensor,...
Definition: NvInfer.h:437
void setStrideNd(Dims stride) noexcept
Set the multi-dimension stride of the convolution.
Definition: NvInfer.h:1316
void setWindowSizeNd(Dims windowSize) noexcept
Set the multi-dimension window size for pooling.
Definition: NvInfer.h:1903
void setStart(Dims start) noexcept
Set the start offset that the slice layer uses to create the output slice.
Definition: NvInfer.h:3918
constexpr int32_t EnumMax< ProfilingVerbosity >() noexcept
Maximum number of profile verbosity levels in ProfilingVerbosity enum.
Definition: NvInfer.h:7107
Inverse hyperbolic tangent.
void setCoordinateTransformation(ResizeCoordinateTransformation coordTransform) noexcept
Set coordinate transformation function.
Definition: NvInfer.h:4669
void setKernelSizeNd(Dims kernelSize) noexcept
Set the multi-dimension kernel size of the convolution.
Definition: NvInfer.h:1291
void setReduceAxes(uint32_t reduceAxes) noexcept
Set the axes over which to reduce.
Definition: NvInfer.h:3522
IReduceLayer * addReduce(ITensor &input, ReduceOperation operation, uint32_t reduceAxes, bool keepDimensions) noexcept
Add a reduce layer to the network.
Definition: NvInfer.h:5869
Definition: NvInfer.h:4946
Thresholded ReLU activation: x>alpha ? x : 0.
void setBiasWeights(Weights weights) noexcept
Set the bias weights for the deconvolution.
Definition: NvInfer.h:2546
Layer type for pluginV2.
Definition: NvInfer.h:3361
void setMode(SliceMode mode) noexcept
Set the slice mode.
Definition: NvInfer.h:4001
Definition: NvInferImpl.h:672
void setOperation(ReduceOperation op) noexcept
Set the reduce operation for the layer.
Definition: NvInfer.h:3502
Enables strict type constraints.
void setPrePadding(Dims padding) noexcept
Set the multi-dimension pre-padding for pooling.
Definition: NvInfer.h:1828
IConcatenationLayer * addConcatenation(ITensor *const *inputs, int32_t nbInputs) noexcept
Add a concatenation layer to the network.
Definition: NvInfer.h:5646
constexpr int32_t EnumMax< LoopOutput >() noexcept
Maximum number of elements in LoopOutput enum.
Definition: NvInfer.h:4753
bool platformHasFastFp16() const noexcept
Determine whether the platform has fast native fp16.
Definition: NvInfer.h:7887
int32_t getNbOutputMaps() const noexcept
Get the number of output feature maps for the deconvolution.
Definition: NvInfer.h:2415
nvinfer1::IHostMemory * serialize() const noexcept
Serialize a timing cache to IHostMemory object.
Definition: NvInfer.h:7156
int32_t getHiddenSize() const noexcept
Get the hidden size of the RNN.
Definition: NvInfer.h:3087
IResizeLayer * addResize(ITensor &input) noexcept
Add a resize layer to the network.
Definition: NvInfer.h:6369
Dims getPrePaddingNd() const noexcept
Get the padding that is applied at the start of the tensor.
Definition: NvInfer.h:3648
A elementwise layer in a network definition.
Definition: NvInfer.h:2815
bool setTacticSources(TacticSources tacticSources) noexcept
Set tactic sources.
Definition: NvInfer.h:7723
Network iterations from first input to last input.
MatrixOperation getOperation(int32_t index) const noexcept
Get the operation for an input tensor.
Definition: NvInfer.h:4234
Inverse hyperbolic cosine.
Weights getBiasWeights() const noexcept
Get the bias weights for the convolution.
Definition: NvInfer.h:1170
void setErrorRecorder(IErrorRecorder *recorder) noexcept
Set the ErrorRecorder for this interface.
Definition: NvInfer.h:6512
Definition: NvInferImpl.h:662
void setPostPadding(Dims padding) noexcept
Set the multi-dimension post-padding of the deconvolution.
Definition: NvInfer.h:2602
Tensor is a scalar of type kBOOL. Loop terminates when value is false.
const char * getName() const noexcept
Return the name of a layer.
Definition: NvInfer.h:542
RNNGateType
Identifies an individual gate within an RNN cell.
Definition: NvInfer.h:3052
void setOutputType(int32_t index, DataType dataType) noexcept
Set the output type of this layer.
Definition: NvInfer.h:684
ILoop * getLoop() const noexcept
Return pointer to ILoop associated with this boundary layer.
Definition: NvInfer.h:4779
void setKernelWeights(Weights weights) noexcept
Set the kernel weights for the convolution.
Definition: NvInfer.h:1135
Check if two elements are equal.
void setNbOutputChannels(int32_t nbOutputs) noexcept
Set the number of output channels K from the fully connected layer.
Definition: NvInfer.h:1449
struct CUstream_st * cudaStream_t
Forward declaration of cudaStream_t.
Definition: NvInferRuntimeCommon.h:107
Weights getKernelWeights() const noexcept
Get the kernel weights.
Definition: NvInfer.h:1479
Definition: NvInferImpl.h:322
constexpr int32_t EnumMax< CalibrationAlgoType >() noexcept
Maximum number of elements in CalibrationAlgoType enum.
Definition: NvInfer.h:6589
void setK(int32_t k) noexcept
Set the k value for the layer.
Definition: NvInfer.h:4115
Dims getDimensions() const noexcept
Get the dimensions of a tensor.
Definition: NvInfer.h:246
ISliceLayer * addSlice(ITensor &input, Dims start, Dims size, Dims stride) noexcept
Add a slice layer to the network.
Definition: NvInfer.h:6132
int32_t getDLACore() const noexcept
Get the DLA core that the engine executes on.
Definition: NvInfer.h:7469
ResizeCoordinateTransformation getCoordinateTransformation() const noexcept
Get coordinate transformation function.
Definition: NvInfer.h:4679
void setNearestRounding(ResizeRoundMode value) noexcept
Set rounding mode for nearest neighbor resize.
Definition: NvInfer.h:4718
EngineCapability getEngineCapability() const noexcept
Query EngineCapability flow configured for the builder.
Definition: NvInfer.h:7281
void setNbGroups(int32_t nbGroups) noexcept
Set the number of groups for a deconvolution.
Definition: NvInfer.h:2497
ITripLimitLayer * addTripLimit(ITensor &tensor, TripLimit limit) noexcept
Add a trip-count limiter, based on the given tensor.
Definition: NvInfer.h:4976
IFillLayer * addFill(Dims dimensions, FillOperation op) noexcept
Add a fill layer to the network.
Definition: NvInfer.h:6458
void setName(const char *name) noexcept
Set the name of a layer.
Definition: NvInfer.h:531
void setOperation(UnaryOperation op) noexcept
Set the unary operation for the layer.
Definition: NvInfer.h:3433
UnaryOperation
Enumerates the unary operations that may be performed by a Unary layer.
Definition: NvInfer.h:3386
Disable reuse of timing information across identical layers.
Class to handle tactic timing info collected from builder.
Definition: NvInfer.h:7142
Output value is value of tensor for last iteration.
int32_t getWindowSize() const noexcept
Get the LRN window size.
Definition: NvInfer.h:2010
Dims getPrePadding() const noexcept
Get the pre-padding.
Definition: NvInfer.h:1838
ITensor * getInput(int32_t index) const noexcept
Get the layer input corresponding to the given index.
Definition: NvInfer.h:563
ResizeRoundMode getNearestRounding() const noexcept
Get rounding mode for nearest neighbor resize.
Definition: NvInfer.h:4728
Dims getSize() const noexcept
Get dimensions of the output slice.
Definition: NvInfer.h:3962
constexpr int32_t EnumMax< RNNOperation >() noexcept
Maximum number of elements in RNNOperation enum.
Definition: NvInfer.h:2992
void setPower(Weights power) noexcept
Set the power value.
Definition: NvInfer.h:2196
Layer type for getting shape of a tensor.
Definition: NvInfer.h:4053
Coordinates wrap around periodically.
const char * getName() const noexcept
Get the tensor name.
Definition: NvInfer.h:214
ITopKLayer * addTopK(ITensor &input, TopKOperation op, int32_t k, uint32_t reduceAxes) noexcept
Add a TopK layer to the network.
Definition: NvInfer.h:5903
void setAxis(int32_t axis) noexcept
Set the quantization axis.
Definition: NvInfer.h:5406
float getBeta() const noexcept
Get the LRN beta value.
Definition: NvInfer.h:2052
Definition: NvInferImpl.h:644
void setInput(int32_t index, ITensor &tensor) noexcept
Replace an input of this layer with a specific tensor.
Definition: NvInfer.h:599
NetworkDefinitionCreationFlag
List of immutable network properties expressed at network creation time. NetworkDefinitionCreationFla...
Definition: NvInfer.h:7816
std::size_t getMaxWorkspaceSize() const noexcept
Get the maximum workspace size.
Definition: NvInfer.h:7325
ND (0 < N <= 8) nearest neighbor resizing.
const char * getName() const noexcept
Return the name of the loop.
Definition: NvInfer.h:5024
void setShift(Weights shift) noexcept
Set the shift value.
Definition: NvInfer.h:2156
Generate evenly spaced numbers over a specified interval.
PaddingMode
Enumerates the modes of padding to perform in convolution, deconvolution and pooling layer,...
Definition: NvInfer.h:955
void setAlpha(double alpha) noexcept
Set the alpha parameter.
Definition: NvInfer.h:5154
TRT_DEPRECATED DimsHW getPostPadding() const noexcept
Get the padding that is applied at the end of the tensor.
Definition: NvInfer.h:3622
void setEngineCapability(EngineCapability capability) noexcept
Configure the builder to target specified EngineCapability flow.
Definition: NvInfer.h:7269
DeviceType getDeviceType(const ILayer *layer) const noexcept
Get the device that this layer executes on.
Definition: NvInfer.h:7414
Perform the normal matrix multiplication in the first recurrent layer.
Dims getPostPadding() const noexcept
Get the padding.
Definition: NvInfer.h:1866
CalibrationAlgoType getAlgorithm() noexcept override
Definition: NvInfer.h:6729
void setMode(ScaleMode mode) noexcept
Set the scale mode.
Definition: NvInfer.h:2136
PaddingMode getPaddingMode() const noexcept
Get the padding mode.
Definition: NvInfer.h:1278
IActivationLayer * addActivation(ITensor &input, ActivationType type) noexcept
Add an activation layer to the network.
Definition: NvInfer.h:5551
bool reset() noexcept
Empty the timing cache.
Definition: NvInfer.h:7190
MatrixOperation
Enumerates the operations that may be performed on a tensor by IMatrixMultiplyLayer before multiplica...
Definition: NvInfer.h:4161
ITensor * getOutput(int32_t index) const noexcept
Get the layer output corresponding to the given index.
Definition: NvInfer.h:582
const char * getName() const noexcept
Return name of the algorithm node. This is a unique identifier for the IAlgorithmContext.
Definition: NvInfer.h:6869
Use formula to map the original index.
Optimization profile for dynamic input dimensions and shape tensors.
Definition: NvInferRuntime.h:1055
PoolingType
The type of pooling to perform in a pooling layer.
Definition: NvInfer.h:1622
float getDynamicRangeMax() const noexcept
Get maximum of dynamic range.
Definition: NvInfer.h:405
ILRNLayer * addLRN(ITensor &input, int32_t window, float alpha, float beta, float k) noexcept
Add a LRN layer to the network.
Definition: NvInfer.h:5589
void setBeta(float beta) noexcept
Set the LRN beta value.
Definition: NvInfer.h:2042
void resetOutputType(int32_t index) noexcept
reset the output type for this layer
Definition: NvInfer.h:723
DataType getType() const noexcept
Get the data type of a tensor.
Definition: NvInfer.h:273
ActivationType getActivationType() const noexcept
Get the type of activation to be performed.
Definition: NvInfer.h:1560
ResizeSelector
The coordinate selector when resize to single pixel output.
Definition: NvInfer.h:4438
Output value is concatenation of values of tensor for each iteration, in forward order.
void setHiddenState(ITensor &hidden) noexcept
Set the initial hidden state of the RNN with the provided hidden ITensor.
Definition: NvInfer.h:3305
DataType getPrecision() const noexcept
get the computational precision of this layer
Definition: NvInfer.h:631
ITensor * getSequenceLengths() const noexcept
Get the sequence lengths specified for the RNN.
Definition: NvInfer.h:3126
DataType
The type of weights and tensors.
Definition: NvInferRuntimeCommon.h:150
void setMaxBatchSize(int32_t batchSize) noexcept
Set the maximum batch size.
Definition: NvInfer.h:7866
Dims getKernelSizeNd() const noexcept
Get the multi-dimension kernel size of the deconvolution.
Definition: NvInfer.h:2661
void setQuantizationFlags(QuantizationFlags flags) noexcept
Set the quantization flags.
Definition: NvInfer.h:7650
Elu activation: x>=0 ? x : alpha * (exp(x) - 1).
int32_t getMaxBatchSize() const noexcept
Get the maximum batch size.
Definition: NvInfer.h:7879
void resetDeviceType(const ILayer *layer) noexcept
reset the DeviceType for this layer
Definition: NvInfer.h:7434
A concatenation layer in a network definition.
Definition: NvInfer.h:2327
Layer type for shuffling data.
Definition: NvInfer.h:3707
TRT_DEPRECATED DimsHW getPrePadding() const noexcept
Get the padding that is applied at the start of the tensor.
Definition: NvInfer.h:3596
bool getZeroIsPlaceholder() const noexcept
Get meaning of 0 in reshape dimensions.
Definition: NvInfer.h:3848
Weights getShift() const noexcept
Get the shift value.
Definition: NvInfer.h:2166
RNNOperation
Enumerates the RNN operations that may be performed by an RNN layer.
Definition: NvInfer.h:2982
A tensor in a network definition.
Definition: NvInfer.h:187
Dims getKernelSizeNd() const noexcept
Get the multi-dimension kernel size of the convolution.
Definition: NvInfer.h:1301
Definition: NvInfer.h:4789
BuilderFlags getFlags() const noexcept
Get the build mode flags for this builder config. Defaults to 0.
Definition: NvInfer.h:7354
ILoop * addLoop() noexcept
Add a loop to the network.
Definition: NvInfer.h:6402
Select the upper left pixel.
Definition: NvInferImpl.h:600
Definition: NvInferImpl.h:582
int32_t getDataLength() const noexcept
Get the maximum data length of the RNN.
Definition: NvInfer.h:3095
PaddingMode getPaddingMode() const noexcept
Get the padding mode.
Definition: NvInfer.h:1890
Floor division of the first element by the second.
void setGatherAxis(int32_t axis) noexcept
Set the axis to gather on. The axis must be less than the number of dimensions in the data input.
Definition: NvInfer.h:2861
LayerType
The type values of layer classes.
Definition: NvInfer.h:89
int32_t getNbElementWiseDims() const noexcept
Get the number of leading dimensions of indices tensor to be handled elementwise.
Definition: NvInfer.h:2893
void setProfileStream(const cudaStream_t stream) noexcept
Set the cuda stream that is used to profile this network.
Definition: NvInfer.h:7525
Definition: NvInferImpl.h:900
nvinfer1::IBuilderConfig * createBuilderConfig() noexcept
Create a builder configuration object.
Definition: NvInfer.h:7953
void resetPrecision() noexcept
reset the computational precision for this layer
Definition: NvInfer.h:653
Identical coefficients across all elements of the tensor.
A LRN layer in a network definition.
Definition: NvInfer.h:1988
RNNDirection
Enumerates the RNN direction that may be performed by an RNN layer.
Definition: NvInfer.h:3004
DeviceType getDefaultDeviceType() const noexcept
Get the default DeviceType which was set by setDefaultDeviceType.
Definition: NvInfer.h:7489
Four-gate LSTM network w/o peephole connections.
ILayer * getLayer(int32_t index) const noexcept
Get the layer specified by the given index.
Definition: NvInfer.h:5771
Check if element in first tensor is greater than corresponding element in second tensor.
FillOperation getOperation() const noexcept
Get the fill operation for the layer.
Definition: NvInfer.h:5136
void reset() noexcept
Resets the builder state to default values.
Definition: NvInfer.h:8041
TripLimit
Enum that describes kinds of trip limits.
Definition: NvInfer.h:4759
Layer that represents a reduction operator across Shape, Int32, Float, and Half tensors.
Definition: NvInfer.h:3494
ResizeMode getResizeMode() const noexcept
Get resize mode for an input tensor.
Definition: NvInfer.h:4604
Layer that represents a Matrix Multiplication.
Definition: NvInfer.h:4215
float getBlendFactor() const noexcept
Get the blending factor for the max_average_blend mode: max_average_blendPool = (1-blendFactor)*maxPo...
Definition: NvInfer.h:1782
Logical XOR of two elements.
int32_t getAxis() const noexcept
Get the quantization axis.
Definition: NvInfer.h:5395
Substract the second element from the first.
void setDimensions(Dims dimensions) noexcept
Set the dimensions for the layer.
Definition: NvInfer.h:4324
LeakyRelu activation: x>=0 ? x : alpha * x.
FillOperation
Enumerates the tensor fill operations that may performed by a fill layer.
Definition: NvInfer.h:5051
TRT_DEPRECATED IPoolingLayer * addPooling(ITensor &input, PoolingType type, DimsHW windowSize) noexcept
Add a pooling layer to the network.
Definition: NvInfer.h:5570
Forward declaration of IPluginFactory for use by other interfaces.
Definition: NvInferRuntime.h:78
void setSize(Dims size) noexcept
Set the dimensions of the output slice.
Definition: NvInfer.h:3947
void setBiasForGate(int32_t layerIndex, RNNGateType gate, bool isW, Weights bias) noexcept
Set the bias parameters for an individual gate in the RNN.
Definition: NvInfer.h:3279
Definition: NvInfer.h:6688
Definition: NvInferImpl.h:655
TRT_DEPRECATED bool hasExplicitPrecision() const noexcept
True if network is an explicit precision network.
Definition: NvInfer.h:6386
Generate an output tensor with specified mode.
Definition: NvInfer.h:5089
QuantizationFlag
List of valid flags for quantizing the network to int8.
Definition: NvInfer.h:7034
double getAlpha() const noexcept
Get the value of alpha parameter.
Definition: NvInfer.h:5169
ILoopOutputLayer * addLoopOutput(ITensor &tensor, LoopOutput outputKind, int32_t axis=0) noexcept
Make an output for this loop, based on the given tensor.
Definition: NvInfer.h:5001
void setQuantizationFlag(QuantizationFlag flag) noexcept
Set a single quantization flag.
Definition: NvInfer.h:7686
Application-implemented interface for calibration.
Definition: NvInfer.h:6605
Reference counted application-implemented error reporting interface for TensorRT objects.
Definition: NvInferRuntimeCommon.h:1353
void setGpuAllocator(IGpuAllocator *allocator) noexcept
Set the GPU allocator.
Definition: NvInfer.h:7943
Layer that represents a TopK reduction.
Definition: NvInfer.h:4085
void setResizeMode(ResizeMode resizeMode) noexcept
Set resize mode for an input tensor.
Definition: NvInfer.h:4594
TRT_DEPRECATED void setPrePadding(DimsHW padding) noexcept
Set the padding that is applied at the start of the tensor.
Definition: NvInfer.h:3584
ResizeRoundMode
The rounding mode for nearest neighbor resize.
Definition: NvInfer.h:4465
Dims getPaddingNd() const noexcept
Get the multi-dimension padding of the convolution.
Definition: NvInfer.h:1356
int32_t getAxis() const noexcept
Get axis being iterated over.
Definition: NvInfer.h:4915
OptProfileSelector
When setting or querying optimization profile parameters (such as shape tensor inputs or dynamic dime...
Definition: NvInferRuntime.h:1019
TensorLocation getLocation() const noexcept
Get the storage location of a tensor.
Definition: NvInfer.h:352
void setPrePadding(Dims padding) noexcept
Set the multi-dimension pre-padding of the convolution.
Definition: NvInfer.h:1215
Use CAFFE padding, rounding output size up, uses prePadding value.
Definition: NvInfer.h:5037
void setAxis(int32_t axis) noexcept
Set the axis along which concatenation occurs.
Definition: NvInfer.h:2340
int32_t getNbInputs() const noexcept
Get the number of inputs of a layer.
Definition: NvInfer.h:550
Weights getWeights() const noexcept
Get the weights for the layer.
Definition: NvInfer.h:4312
IGatherLayer * addGather(ITensor &data, ITensor &indices, int32_t axis) noexcept
Add a gather layer to the network.
Definition: NvInfer.h:5919
Dims getDilationNd() const noexcept
Get the multi-dimension dilation of the deconvolution.
Definition: NvInfer.h:2756
ITensor * getOutput(int32_t index) const noexcept
Get the output tensor specified by the given index.
Definition: NvInfer.h:5829
IIdentityLayer * addIdentity(ITensor &input) noexcept
Add an identity layer.
Definition: NvInfer.h:6067
TRT_DEPRECATED void setStride(DimsHW stride) noexcept
Get the stride of the deconvolution.
Definition: NvInfer.h:2431
Definition: NvInferImpl.h:748
bool dynamicRangeIsSet() const noexcept
Query whether dynamic range is set.
Definition: NvInfer.h:377
uint32_t NetworkDefinitionCreationFlags
Represents one or more NetworkDefinitionCreationFlag flags using binary OR operations....
Definition: NvInfer.h:7805
Definition: NvInfer.h:6670
constexpr int32_t EnumMax< UnaryOperation >() noexcept
Maximum number of elements in UnaryOperation enum.
Definition: NvInfer.h:3413
Definition: NvInfer.h:2852
Dims getPrePadding() const noexcept
Get the pre-padding.
Definition: NvInfer.h:2584
Definition: NvInferImpl.h:529
Dims getDimensions() const noexcept
Get the dimensions for the layer.
Definition: NvInfer.h:4336
void setOperation(FillOperation op) noexcept
Set the fill operation for the layer.
Definition: NvInfer.h:5126
virtual int32_t getMinTimingIterations() const noexcept
Query the number of minimization iterations.
Definition: NvInfer.h:7231
void setAxis(int32_t axis) noexcept
Set axis to iterate over.
Definition: NvInfer.h:4909
Dims getPaddingNd() const noexcept
Get the multi-dimension padding of the deconvolution.
Definition: NvInfer.h:2716
uint32_t getReduceAxes() const noexcept
Get the axes over which to reduce for the layer.
Definition: NvInfer.h:3532
static constexpr int32_t MAX_DIMS
The maximum number of dimensions supported for a tensor.
Definition: NvInferRuntimeCommon.h:193
void setOperation(ElementWiseOperation op) noexcept
Set the binary operation for the layer.
Definition: NvInfer.h:2827
virtual void setAvgTimingIterations(int32_t avgTiming) noexcept
Set the number of averaging iterations used when timing layers.
Definition: NvInfer.h:7244
void setName(const char *name) noexcept
Set the tensor name.
Definition: NvInfer.h:202
Dims getPaddingNd() const noexcept
Get the multi-dimension padding for pooling.
Definition: NvInfer.h:1969
Definition: NvInferImpl.h:545
virtual void setMinTimingIterations(int32_t minTiming) noexcept
Set the number of minimization iterations used when timing layers.
Definition: NvInfer.h:7219
constexpr int32_t EnumMax< LayerType >() noexcept
Maximum number of elements in LayerType enum.
Definition: NvInfer.h:130
uint32_t BuilderFlags
Represents one or more QuantizationFlag values using binary OR operations, e.g., 1U << BuilderFlag::k...
Definition: NvInfer.h:7055
CalibrationAlgoType getAlgorithm() noexcept override
Definition: NvInfer.h:6711
Product of the two elements.
double getBeta() const noexcept
Get the value of beta parameter.
Definition: NvInfer.h:5202
void setNbGroups(int32_t nbGroups) noexcept
Set the number of groups for a convolution.
Definition: NvInfer.h:1111
Definition: NvInfer.h:4775
void setPaddingNd(Dims padding) noexcept
Set the multi-dimension padding of the convolution.
Definition: NvInfer.h:1344
EngineCapability
List of supported engine capability flows.
Definition: NvInferRuntime.h:103
Describes a variation of execution of a layer. An algorithm is represented by IAlgorithmVariant and t...
Definition: NvInfer.h:6915
Weights getWeightsForGate(int32_t layerIndex, RNNGateType gate, bool isW) const noexcept
Get the weight parameters for an individual gate in the RNN.
Definition: NvInfer.h:3254
Definition: NvInferImpl.h:711
nvinfer1::IOptimizationProfile * createOptimizationProfile() noexcept
Create a new optimization profile.
Definition: NvInfer.h:7999
void setDLACore(int32_t dlaCore) noexcept
Sets the DLA core used by the network.
Definition: NvInfer.h:7458
void setSelectorForSinglePixel(ResizeSelector selector) noexcept
Set coordinate selector function when resized to single pixel.
Definition: NvInfer.h:4694
IAlgorithmSelector * getAlgorithmSelector() const noexcept
Get Algorithm Selector.
Definition: NvInfer.h:7608
int32_t getNbInputs() const noexcept
Get the number of inputs in the network.
Definition: NvInfer.h:5783
bool isExecutionTensor() const noexcept
Whether the tensor is an execution tensor.
Definition: NvInfer.h:494
void setName(const char *name) noexcept
Set the name of the loop.
Definition: NvInfer.h:5014
void setFlags(BuilderFlags builderFlags) noexcept
Set the build mode flags to turn on builder options for this network.
Definition: NvInfer.h:7342
ResizeCoordinateTransformation
The resize coordinate transformation function.
Definition: NvInfer.h:4388
TRT_DEPRECATED DimsHW getStride() const noexcept
Get the stride of the convolution.
Definition: NvInfer.h:1059
const nvinfer1::ITimingCache * getTimingCache() const noexcept
Get the pointer to the timing cache from current IBuilderConfig.
Definition: NvInfer.h:7790
void setSecondTranspose(Permutation permutation) noexcept
Set the permutation applied by the second transpose operation.
Definition: NvInfer.h:3807
IScaleLayer * addScaleNd(ITensor &input, ScaleMode mode, Weights shift, Weights scale, Weights power, int32_t channelAxis) noexcept
Add a multi-dimension scale layer to the network.
Definition: NvInfer.h:6353
void setDeviceType(const ILayer *layer, DeviceType deviceType) noexcept
Set the device that this layer must execute on.
Definition: NvInfer.h:7405
Definition: NvInferImpl.h:892
Definition: NvInfer.h:6723
IParametricReLULayer * addParametricReLU(ITensor &input, ITensor &slope) noexcept
Add a parametric ReLU layer to the network.
Definition: NvInfer.h:6253
bool getAverageCountExcludesPadding() const noexcept
Get whether average pooling uses as a denominator the overlap area between the window and the unpadde...
Definition: NvInfer.h:1810
Check if element in first tensor is less than corresponding element in second tensor.
TRT_DEPRECATED IConvolutionLayer * addConvolution(ITensor &input, int32_t nbOutputMaps, DimsHW kernelSize, Weights kernelWeights, Weights biasWeights) noexcept
Add a convolution layer to the network.
Definition: NvInfer.h:5510
Definition: NvInferImpl.h:576
TRT_DEPRECATED void setDilation(DimsHW dilation) noexcept
Set the dilation for a convolution.
Definition: NvInfer.h:1186
Weights getPower() const noexcept
Get the power value.
Definition: NvInfer.h:2206
int32_t getAxis() const noexcept
Get the quantization axis.
Definition: NvInfer.h:5308
IPluginV2 & getPlugin() noexcept
Get the plugin for the layer.
Definition: NvInfer.h:3369
Weights getKernelWeights() const noexcept
Get the kernel weights of the convolution.
Definition: NvInfer.h:1145
A Scale layer in a network definition.
Definition: NvInfer.h:2128
const char * getName() const noexcept
Returns the name associated with the network.
Definition: NvInfer.h:6168
TRT_DEPRECATED void setPadding(DimsHW padding) noexcept
Set the padding of the deconvolution.
Definition: NvInfer.h:2463
void setWeights(Weights weights) noexcept
Set the weights for the layer.
Definition: NvInfer.h:4302
Three-gate network consisting of Gated Recurrent Units.
Dims getStride() const noexcept
Get the stride for the output slice.
Definition: NvInfer.h:3991
void setAlpha(float alpha) noexcept
Set the LRN alpha value.
Definition: NvInfer.h:2021
TRT_DEPRECATED nvinfer1::ICudaEngine * buildEngineWithConfig(INetworkDefinition &network, IBuilderConfig &config) noexcept
Builds an engine for the given INetworkDefinition and given IBuilderConfig.
Definition: NvInfer.h:7968
A Softmax layer in a network definition.
Definition: NvInfer.h:2263
TRT_DEPRECATED DimsHW getStride() const noexcept
Get the stride for pooling.
Definition: NvInfer.h:1724
IPoolingLayer * addPoolingNd(ITensor &input, PoolingType type, Dims windowSize) noexcept
Add a multi-dimension pooling layer to the network.
Definition: NvInfer.h:6295
void setName(const char *name) noexcept
Sets the name of the network.
Definition: NvInfer.h:6154
Tensor is scalar of type kINT32 that contains the trip count.
bool platformHasTf32() const noexcept
Determine whether the platform has TF32 support.
Definition: NvInfer.h:8049
int32_t getMaxSeqLength() const noexcept
Get the maximum sequence length of the RNN.
Definition: NvInfer.h:3091
Weights getBiasWeights() const noexcept
Get the bias weights.
Definition: NvInfer.h:1501
Holds properties for configuring a builder to produce an engine.
Definition: NvInfer.h:7204
void setPaddingMode(PaddingMode paddingMode) noexcept
Set the padding mode.
Definition: NvInfer.h:2626
bool setCalibrationProfile(const IOptimizationProfile *profile) noexcept
Add a calibration profile.
Definition: NvInfer.h:7623
TRT_DEPRECATED void setKernelSize(DimsHW kernelSize) noexcept
Set the HW kernel size of the convolution.
Definition: NvInfer.h:2381
ITensor * getInput(int32_t index) const noexcept
Get the input tensor specified by the given index.
Definition: NvInfer.h:5799
TRT_DEPRECATED DimsHW getStride() const noexcept
Get the stride of the deconvolution.
Definition: NvInfer.h:2443
ITensor * getHiddenState() const noexcept
Get the initial hidden state of the RNN.
Definition: NvInfer.h:3314
void setAverageCountExcludesPadding(bool exclusive) noexcept
Set whether average pooling uses as a denominator the overlap area between the window and the unpadde...
Definition: NvInfer.h:1799
Definition: NvInferImpl.h:681
constexpr int32_t EnumMax< NetworkDefinitionCreationFlag >() noexcept
Maximum number of elements in NetworkDefinitionCreationFlag enum.
Definition: NvInfer.h:7841
constexpr int32_t EnumMax< TripLimit >() noexcept
Maximum number of elements in TripLimit enum.
Definition: NvInfer.h:4768
Weights getBiasForGate(int32_t layerIndex, RNNGateType gate, bool isW) const noexcept
Get the bias parameters for an individual gate in the RNN.
Definition: NvInfer.h:3288
A resize layer in a network definition.
Definition: NvInfer.h:4511
Definition: NvInferImpl.h:639
IMatrixMultiplyLayer * addMatrixMultiply(ITensor &input0, MatrixOperation op0, ITensor &input1, MatrixOperation op1) noexcept
Add a MatrixMultiply layer to the network.
Definition: NvInfer.h:5956
Enable debugging of layers via synchronizing after every layer.
const TRT_DEPRECATED IAlgorithmIOInfo & getAlgorithmIOInfo(int32_t index) const noexcept
Returns the format of an Algorithm input or output. Algorithm inputs are incrementally numbered first...
Definition: NvInfer.h:6928
ProfilingVerbosity getProfilingVerbosity() const noexcept
Get verbosity level of layer information exposed in NVTX annotations.
Definition: NvInfer.h:7591
void setKernelSizeNd(Dims kernelSize) noexcept
Set the multi-dimension kernel size of the deconvolution.
Definition: NvInfer.h:2651
bool isDeviceTypeSet(const ILayer *layer) const noexcept
whether the DeviceType has been explicitly set for this layer
Definition: NvInfer.h:7424
bool isNetworkInput() const noexcept
Whether the tensor is a network input.
Definition: NvInfer.h:296
void setNbElementWiseDims(int32_t k) noexcept
Set the number of leading dimensions of indices tensor to be handled elementwise. k must be 0 if ther...
Definition: NvInfer.h:2883
void setScales(const float *scales, int32_t nbScales) noexcept
Set the resize scales.
Definition: NvInfer.h:4563
LayerType getType() const noexcept
Return the type of a layer.
Definition: NvInfer.h:519
A Pooling layer in a network definition.
Definition: NvInfer.h:1650
Definition: NvInferImpl.h:779
void setPaddingMode(PaddingMode paddingMode) noexcept
Set the padding mode.
Definition: NvInfer.h:1266
CalibrationAlgoType getAlgorithm() noexcept override
Definition: NvInfer.h:6694
uint32_t getReduceAxes() const noexcept
Get the axes to reduce for the layer.
Definition: NvInfer.h:4145
nvinfer1::ITimingCache * createTimingCache(const void *blob, std::size_t size) const noexcept
Create timing cache.
Definition: NvInfer.h:7757
void setCellState(ITensor &cell) noexcept
Set the initial cell state of the LSTM with the provided cell ITensor.
Definition: NvInfer.h:3333
Application-implemented class for controlling allocation on the GPU.
Definition: NvInferRuntimeCommon.h:1093
void setStrideNd(Dims stride) noexcept
Set the multi-dimension stride for pooling.
Definition: NvInfer.h:1928
IBuilder * createInferBuilder(ILogger &logger) noexcept
Create an instance of an IBuilder class.
Definition: NvInfer.h:8097
Layer that represents an unary operation.
Definition: NvInfer.h:3425
int64_t getTactic() const noexcept
Return tactic of the algorithm.
Definition: NvInfer.h:6844
ReduceOperation getOperation() const noexcept
Get the reduce operation for the layer.
Definition: NvInfer.h:3512
TRT_DEPRECATED void setPadding(DimsHW padding) noexcept
Set the padding for pooling.
Definition: NvInfer.h:1740
SliceMode getMode() const noexcept
Get the slice mode.
Definition: NvInfer.h:4011
Builds an engine from a network definition.
Definition: NvInfer.h:7853
TRT_DEPRECATED void setPostPadding(DimsHW padding) noexcept
Set the padding that is applied at the end of the tensor.
Definition: NvInfer.h:3610
void setInt8Calibrator(IInt8Calibrator *calibrator) noexcept
Set Int8 Calibration interface.
Definition: NvInfer.h:7291
void setBeta(double beta) noexcept
Set the beta parameter.
Definition: NvInfer.h:5187
Definition: NvInferImpl.h:950
Allow the builder to examine weights and use optimized functions when weights have suitable sparsity.
void setOperation(TopKOperation op) noexcept
Set the operation for the layer.
Definition: NvInfer.h:4093
const IAlgorithmVariant & getAlgorithmVariant() const noexcept
Returns the algorithm variant.
Definition: NvInfer.h:6936
Mark the network to be an explicit batch network.
TRT_DEPRECATED DimsHW getKernelSize() const noexcept
Get the HW kernel size of the deconvolution.
Definition: NvInfer.h:2393
A Quantize layer in a network definition.
Definition: NvInfer.h:5297
IShapeLayer * addShape(ITensor &input) noexcept
Add a shape layer to the network.
Definition: NvInfer.h:6186
TopKOperation
Enumerates the operations that may be performed by a TopK layer.
Definition: NvInfer.h:4065
int64_t getImplementation() const noexcept
Return implementation of the algorithm.
Definition: NvInfer.h:6836
IIteratorLayer * addIterator(ITensor &tensor, int32_t axis=0, bool reverse=false) noexcept
Return layer that subscripts tensor by loop iteration.
Definition: NvInfer.h:4989
int32_t getLayerCount() const noexcept
Get the layer count of the RNN.
Definition: NvInfer.h:3083
TensorLocation
The location for tensor data storage, device or host.
Definition: NvInferRuntime.h:235
int32_t getK() const noexcept
Get the k value for the layer.
Definition: NvInfer.h:4125
float getBeta() const noexcept
Get the beta parameter.
Definition: NvInfer.h:1607
int32_t getNbDLACores() const noexcept
Return the number of DLA engines available to this builder.
Definition: NvInfer.h:7927
ResizeSelector getSelectorForSinglePixel() const noexcept
Get the coordinate selector function when resized to single pixel.
Definition: NvInfer.h:4704
void setMaxWorkspaceSize(std::size_t workspaceSize) noexcept
Set the maximum workspace size.
Definition: NvInfer.h:7311
int32_t getNbOutputMaps() const noexcept
Get the number of output maps for the convolution.
Definition: NvInfer.h:1033
int32_t getMaxDLABatchSize() const noexcept
Get the maximum batch size DLA can support. For any tensor the total volume of index dimensions combi...
Definition: NvInfer.h:7919
RNNInputMode getInputMode() const noexcept
Get the input mode of the RNN layer.
Definition: NvInfer.h:3162
int32_t getNbOutputs() const noexcept
Return number of outputs of the algorithm.
Definition: NvInfer.h:6896
QuantizationFlags getQuantizationFlags() const noexcept
Get the quantization flags.
Definition: NvInfer.h:7662
int32_t getAxis() const noexcept
Get the axis along which concatenation occurs.
Definition: NvInfer.h:2350
IScaleLayer * addScale(ITensor &input, ScaleMode mode, Weights shift, Weights scale, Weights power) noexcept
Add a Scale layer to the network.
Definition: NvInfer.h:5616
#define TRT_DEPRECATED
< Items that are marked as deprecated will be removed in a future release.
Definition: NvInferRuntimeCommon.h:76
void setStrideNd(Dims stride) noexcept
Set the multi-dimension stride of the deconvolution.
Definition: NvInfer.h:2676
bool getBroadcastAcrossBatch() const noexcept
Check if tensor is broadcast across the batch.
Definition: NvInfer.h:342
TRT_DEPRECATED IRNNv2Layer * addRNNv2(ITensor &input, int32_t layerCount, int32_t hiddenSize, int32_t maxSeqLen, RNNOperation op) noexcept
Add an layerCount deep RNN layer to the network with hiddenSize internal states that can take a batch...
Definition: NvInfer.h:6050
bool isNetworkOutput() const noexcept
Whether the tensor is a network output.
Definition: NvInfer.h:304
bool setTimingCache(const ITimingCache &cache, bool ignoreMismatch) noexcept
Attach a timing cache to IBuilderConfig.
Definition: NvInfer.h:7780
Weights getScale() const noexcept
Get the scale value.
Definition: NvInfer.h:2186
An Activation layer in a network definition.
Definition: NvInfer.h:1540
CalibrationAlgoType
Version of calibration algorithm to use.
Definition: NvInfer.h:6579
void setErrorRecorder(IErrorRecorder *recorder) noexcept
Set the ErrorRecorder for this interface.
Definition: NvInfer.h:8018
A Dequantize layer in a network definition.
Definition: NvInfer.h:5384
TRT_DEPRECATED void destroy() noexcept
De-allocates any internally allocated memory.
Definition: NvInfer.h:7513
constexpr int32_t EnumMax< BuilderFlag >() noexcept
Maximum number of builder flags in BuilderFlag enum.
Definition: NvInfer.h:7085
void setInputMode(RNNInputMode op) noexcept
Set the input mode of the RNN layer.
Definition: NvInfer.h:3153
A deconvolution layer in a network definition.
Definition: NvInfer.h:2367
void setSequenceLengths(ITensor &seqLengths) noexcept
Specify individual sequence lengths in the batch with the ITensor pointed to by seqLengths.
Definition: NvInfer.h:3114