TensorRT 10.7.0
nvinfer1::v_1_0::IAlgorithmSelector Class Referenceabstract

#include <NvInfer.h>

Inheritance diagram for nvinfer1::v_1_0::IAlgorithmSelector:
nvinfer1::IVersionedInterface

Public Member Functions

InterfaceInfo getInterfaceInfo () const noexcept override
 Return version information associated with this interface. Applications must not override this method. More...
 
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. More...
 
virtual void reportAlgorithms (IAlgorithmContext const *const *algoContexts, IAlgorithm const *const *algoChoices, int32_t nbAlgorithms) noexcept=0
 Called by TensorRT to report choices it made. More...
 
virtual ~IAlgorithmSelector () noexcept=default
 
- Public Member Functions inherited from nvinfer1::IVersionedInterface
virtual APILanguage getAPILanguage () const noexcept
 The language used to build the implementation of this Interface. More...
 
virtual ~IVersionedInterface () noexcept=default
 

Additional Inherited Members

- Protected Member Functions inherited from nvinfer1::IVersionedInterface
 IVersionedInterface ()=default
 
 IVersionedInterface (IVersionedInterface const &)=default
 
 IVersionedInterface (IVersionedInterface &&)=default
 
IVersionedInterfaceoperator= (IVersionedInterface const &) &=default
 
IVersionedInterfaceoperator= (IVersionedInterface &&) &=default
 

Constructor & Destructor Documentation

◆ ~IAlgorithmSelector()

virtual nvinfer1::v_1_0::IAlgorithmSelector::~IAlgorithmSelector ( )
virtualdefaultnoexcept

Member Function Documentation

◆ getInterfaceInfo()

InterfaceInfo nvinfer1::v_1_0::IAlgorithmSelector::getInterfaceInfo ( ) const
inlineoverridevirtualnoexcept

Return version information associated with this interface. Applications must not override this method.

Implements nvinfer1::IVersionedInterface.

◆ reportAlgorithms()

virtual void nvinfer1::v_1_0::IAlgorithmSelector::reportAlgorithms ( IAlgorithmContext const *const *  algoContexts,
IAlgorithm const *const *  algoChoices,
int32_t  nbAlgorithms 
)
pure virtualnoexcept

Called by TensorRT to report choices it made.

Note
For a given optimization profile, this call comes after all calls to selectAlgorithms. algoChoices[i] is the choice that TensorRT made for algoContexts[i], for i in [0, nbAlgorithms-1]
Parameters
algoContextsThe list of all algorithm contexts.
algoChoicesThe list of algorithm choices made by TensorRT
nbAlgorithmsThe size of algoContexts as well as algoChoices.

◆ selectAlgorithms()

virtual int32_t nvinfer1::v_1_0::IAlgorithmSelector::selectAlgorithms ( IAlgorithmContext const &  context,
IAlgorithm const *const *  choices,
int32_t  nbChoices,
int32_t *  selection 
)
pure virtualnoexcept

Select Algorithms for a layer from the given list of algorithm choices.

Returns
The number of choices selected from [0, nbChoices-1].
Parameters
contextThe context for which the algorithm choices are valid.
choicesThe list of algorithm choices to select for implementation of this layer.
nbChoicesNumber of algorithm choices.
selectionThe user writes indices of selected choices in to selection buffer which is of size nbChoices.
Note
TensorRT uses its default algorithm selection to choose from the list provided. If return value is 0, TensorRT's default algorithm selection is used unless BuilderFlag::kREJECT_EMPTY_ALGORITHMS is set. The list of choices is valid only for this specific algorithm context.

The documentation for this class was generated from the following file:

  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