Replicates the algorithm selection using a cache file. More...
Classes | |
struct | AlgorithmCacheItem |
Public Member Functions | |
int32_t | selectAlgorithms (const nvinfer1::IAlgorithmContext &algoContext, const nvinfer1::IAlgorithm *const *algoChoices, 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) override |
Called by TensorRT to report choices it made. More... | |
AlgorithmCacheReader (const std::string &cacheFileName) | |
Static Private Member Functions | |
static bool | areSame (const AlgorithmCacheItem &algoCacheItem, const IAlgorithm &algoChoice) |
The combination of implementation, tactic and input/output formats is unique to an algorithm, and can be used to check if two algorithms are same. More... | |
Private Attributes | |
std::unordered_map< std::string, AlgorithmCacheItem > | choiceMap |
Replicates the algorithm selection using a cache file.
|
inline |
Use the cache file to create a map of algorithm choices.
|
inlineoverridevirtual |
Return value in [0, nbChoices] for a valid algorithm.
Use the map created from cache to select algorithms.
There must be only one algorithm selected.
Implements nvinfer1::IAlgorithmSelector.
|
inlineoverridevirtual |
Called by TensorRT to report choices it made.
Verifies that the algorithm used by TensorRT conform to the cache.
Implements nvinfer1::IAlgorithmSelector.
|
inlinestaticprivate |
The combination of implementation, tactic and input/output formats is unique to an algorithm, and can be used to check if two algorithms are same.
|
private |