Entropy calibrator 2. More...
Public Member Functions | |
CalibrationAlgoType | getAlgorithm () override |
Signal that this is the entropy calibrator 2. More... | |
virtual | ~IInt8EntropyCalibrator2 () |
virtual int32_t | getBatchSize () const =0 |
Get the batch size used for calibration batches. More... | |
virtual bool | getBatch (void *bindings[], const char *names[], int32_t nbBindings)=0 |
Get a batch of input for calibration. More... | |
virtual const void * | readCalibrationCache (std::size_t &length)=0 |
Load a calibration cache. More... | |
virtual void | writeCalibrationCache (const void *ptr, std::size_t length)=0 |
Save a calibration cache. More... | |
Entropy calibrator 2.
This is the preferred calibrator. This is the required calibrator for DLA, as it supports per activation tensor scaling.
|
inlinevirtual |
|
inlineoverridevirtual |
Signal that this is the entropy calibrator 2.
Implements nvinfer1::IInt8Calibrator.
|
pure virtualinherited |
Get the batch size used for calibration batches.
Implemented in sample::anonymous_namespace{sampleEngines.cpp}::RndInt8Calibrator.
|
pure virtualinherited |
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 virtualinherited |
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 virtualinherited |
Save a calibration cache.
ptr | A pointer to the data to cache. |
length | The length in bytes of the data to cache. |