TensorRT 10.4.0
|
Application-implemented interface for calibration. More...
#include <NvInfer.h>
Public Member Functions | |
virtual TRT_DEPRECATED int32_t | getBatchSize () const noexcept=0 |
Get the batch size used for calibration batches. More... | |
virtual bool | getBatch (void *bindings[], char const *names[], int32_t nbBindings) noexcept=0 |
Get a batch of input for calibration. More... | |
virtual void const * | readCalibrationCache (std::size_t &length) noexcept=0 |
Load a calibration cache. More... | |
virtual void | writeCalibrationCache (void const *ptr, std::size_t length) noexcept=0 |
Save a calibration cache. More... | |
virtual CalibrationAlgoType | getAlgorithm () noexcept=0 |
Get the algorithm used by this calibrator. More... | |
~IInt8Calibrator () noexcept override=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 InterfaceInfo | getInterfaceInfo () const noexcept=0 |
Return version information associated with this interface. Applications must not override this method. More... | |
virtual | ~IVersionedInterface () noexcept=default |
Additional Inherited Members | |
Protected Member Functions inherited from nvinfer1::IVersionedInterface | |
IVersionedInterface ()=default | |
IVersionedInterface (IVersionedInterface const &)=default | |
IVersionedInterface (IVersionedInterface &&)=default | |
IVersionedInterface & | operator= (IVersionedInterface const &) &=default |
IVersionedInterface & | operator= (IVersionedInterface &&) &=default |
Application-implemented interface for calibration.
Calibration is a step performed by the builder when deciding suitable scale factors for 8-bit inference.
It must also provide a method for retrieving representative images which the calibration process can use to examine the distribution of activations. It may optionally implement a method for caching the calibration result for reuse on subsequent runs.
|
overridedefaultnoexcept |
|
pure virtualnoexcept |
Get the algorithm used by this calibrator.
Implemented in nvinfer1::v_1_0::IInt8EntropyCalibrator, nvinfer1::v_1_0::IInt8EntropyCalibrator2, nvinfer1::v_1_0::IInt8MinMaxCalibrator, and nvinfer1::v_1_0::IInt8LegacyCalibrator.
|
pure virtualnoexcept |
Get a batch of input for calibration.
The batch size of the input must match the batch size returned by getBatchSize().
bindings | An array of pointers to device memory that must be updated to point to device memory containing each network input data. |
names | The names of the network input for each pointer in the binding array. |
nbBindings | The number of pointers in the bindings array. |
|
pure virtualnoexcept |
Get the batch size used for calibration batches.
|
pure virtualnoexcept |
Load a calibration cache.
Calibration is potentially expensive, so it can be useful to generate the calibration data once, then use it on subsequent builds of the network. The cache includes the regression cutoff and quantile values used to generate it, and will not be used if these do not batch the settings of the current calibrator. However, the network should also be recalibrated if its structure changes, or the input data set changes, and it is the responsibility of the application to ensure this.
length | The length of the cached data, that should be set by the called function. If there is no data, this should be zero. |
|
pure virtualnoexcept |
Save a calibration cache.
ptr | A pointer to the data to cache. |
length | The length in bytes of the data to cache. |
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