@@ -62,13 +62,13 @@ class TensorRTCalibrator : public nvinfer1::IInt8EntropyCalibrator2 {
62
62
data_sizes_.push_back (binding_sizes);
63
63
}
64
64
65
- int getBatchSize () const override
8000
{ return batch_size_; }
65
+ int getBatchSize () const noexcept override { return batch_size_; }
66
66
67
67
/* !
68
68
* \brief TensorRT will call this method to get next batch of data to
69
69
* calibrate with.
70
70
*/
71
- bool getBatch (void * bindings[], const char * names[], int nbBindings) override {
71
+ bool getBatch (void * bindings[], const char * names[], int nbBindings) noexcept override {
72
72
AllocateBuffersIfNotAllocated ();
73
73
CHECK_EQ (input_names_.size (), nbBindings);
74
74
for (size_t i = 0 ; i < input_names_.size (); ++i) {
@@ -83,13 +83,13 @@ class TensorRTCalibrator : public nvinfer1::IInt8EntropyCalibrator2 {
83
83
return (num_batches_calibrated_ < data_.size ());
84
84
}
85
85
86
- const void * readCalibrationCache (size_t & length) override {
86
+ const void * readCalibrationCache (size_t & length) noexcept override {
87
87
if (calibration_cache_.empty ()) return nullptr ;
88
88
length = calibration_cache_.size ();
89
89
return calibration_cache_.data ();
90
90
}
91
91
92
- void writeCalibrationCache (const void * cache, size_t length) override {
92
+ void writeCalibrationCache (const void * cache, size_t length) noexcept override {
93
93
calibration_cache_.assign (static_cast <const char *>(cache), length);
94
94
}
95
95
0 commit comments