TensorRT  7.2.1.6
NVIDIA TensorRT
Looking for a C++ dev who knows TensorRT?
I'm looking for work. Hire me!
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
AlgorithmCacheWriter Class Reference

Writes the default algorithm choices made by TensorRT into a file. More...

Inheritance diagram for AlgorithmCacheWriter:
Collaboration diagram for AlgorithmCacheWriter:

Public Member Functions

int32_t selectAlgorithms (const nvinfer1::IAlgorithmContext &context, const nvinfer1::IAlgorithm *const *choices, int32_t nbChoices, int32_t *selection) override
 Return value in [0, nbChoices] for a valid algorithm. More...
 
void reportAlgorithms (const nvinfer1::IAlgorithmContext *const *algoContexts, const nvinfer1::IAlgorithm *const *algoChoices, int32_t nbAlgorithms) noexcept override
 called by TensorRT to report choices it made. More...
 
 AlgorithmCacheWriter (const std::string &cacheFileName)
 

Private Attributes

std::string mCacheFileName
 

Detailed Description

Writes the default algorithm choices made by TensorRT into a file.

Constructor & Destructor Documentation

◆ AlgorithmCacheWriter()

AlgorithmCacheWriter::AlgorithmCacheWriter ( const std::string &  cacheFileName)
inline

Member Function Documentation

◆ selectAlgorithms()

int32_t AlgorithmCacheWriter::selectAlgorithms ( const nvinfer1::IAlgorithmContext context,
const nvinfer1::IAlgorithm *const *  choices,
int32_t  nbChoices,
int32_t *  selection 
)
inlineoverridevirtual

Return value in [0, nbChoices] for a valid algorithm.

Lets TRT use its default tactic selection method. Writes all the possible choices to the selection buffer and returns the length of it. If BuilderFlag::kSTRICT_TYPES is not set, just returning 0 forces default tactic selection.

Implements nvinfer1::IAlgorithmSelector.

◆ reportAlgorithms()

void AlgorithmCacheWriter::reportAlgorithms ( const nvinfer1::IAlgorithmContext *const *  algoContexts,
const nvinfer1::IAlgorithm *const *  algoChoices,
int32_t  nbAlgorithms 
)
inlineoverridevirtualnoexcept

called by TensorRT to report choices it made.

Writes the TensorRT algorithm choices into a file.

Implements nvinfer1::IAlgorithmSelector.

Member Data Documentation

◆ mCacheFileName

std::string AlgorithmCacheWriter::mCacheFileName
private

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