@@ -77,7 +77,7 @@ class Int8Calibrator : Algorithm {
77
77
*
78
78
* @return int
79
79
*/
80
- int getBatchSize () const override {
80
+ int getBatchSize () const noexcept override {
81
81
// HACK: TRTorch only uses explict batch sizing, INT8 Calibrator does not
82
82
// work when reporting the batch size here and having explicity batching.
83
83
// So we just report batch size 1 (warnings will still be printed out).
@@ -96,7 +96,7 @@ class Int8Calibrator : Algorithm {
96
96
* @return true - There is a new batch for the calibrator to consume
97
97
* @return false - There is not a new batch for the calibrator to consume
98
98
*/
99
- bool getBatch (void * bindings[], const char * names[], int nbBindings) override {
99
+ bool getBatch (void * bindings[], const char * names[], int nbBindings) noexcept override {
100
100
if (it_ != batched_data_.end ()) {
101
101
auto status = get_batch_impl (bindings, names, nbBindings, *it_);
102
102
it_ = ++it_;
@@ -116,7 +116,7 @@ class Int8Calibrator : Algorithm {
116
116
* @param length
117
117
* @return const void* - Pointer to cache data
118
118
*/
119
- const void * readCalibrationCache (size_t & length) override {
119
+ const void * readCalibrationCache (size_t & length) noexcept override {
120
120
if (use_cache_) {
121
121
std::stringstream ss;
122
122
ss << " Reading Calibration Cache from " << cache_file_path_;
@@ -143,7 +143,7 @@ class Int8Calibrator : Algorithm {
143
143
* @param cache: const void* - cache data
144
144
* @param length: size_t - length of cache
145
145
*/
146
- void writeCalibrationCache (const void * cache, size_t length) override {
146
+ void writeCalibrationCache (const void * cache, size_t length) noexcept override {
147
147
std::ofstream cache_file (cache_file_path_, std::ios::binary);
148
148
cache_file.write (reinterpret_cast <const char *>(cache), length);
149
149
std::stringstream ss;
@@ -203,7 +203,7 @@ class Int8CacheCalibrator : Algorithm {
203
203
*
204
204
* @return int
205
205
*/
206
- int getBatchSize () const override {
206
+ int getBatchSize () const noexcept override {
207
207
// HACK: TRTorch only uses explict batch sizing, INT8 Calibrator does not
208
208
// work when reporting the batch size here and having explicity batching.
209
209
// So we just report batch size 1 (warnings will still be printed out).
@@ -222,7 +222,7 @@ class Int8CacheCalibrator : Algorithm {
222
222
* @param nbBindings: int - Number of bindings
223
223
* @return false
224
224
*/
225
- bool getBatch (void * bindings[], const char * names[], int nbBindings) override {
225
+ bool getBatch (void * bindings[], const char * names[], int nbBindings) noexcept override {
226
226
return false ;
227
227
}
228
228
@@ -234,7 +234,7 @@ class Int8CacheCalibrator : Algorithm {
234
234
* @param length
235
235
* @return const void* - Pointer to cache data
236
236
*/
237
- const void * readCalibrationCache (size_t & length) override {
237
+ const void * readCalibrationCache (size_t & length) noexcept override {
238
238
std::stringstream ss;
239
239
ss << " Reading Calibration Cache from " << cache_file_path_;
240
240
logging::log (logging::Level::kINFO , ss.str ());
@@ -258,7 +258,7 @@ class Int8CacheCalibrator : Algorithm {
258
258
* @param cache: const void* - cache data
259
259
* @param length: size_t - length of cache
260
260
*/
261
- void writeCalibrationCache (const void * cache, size_t length) override {
261
+ void writeCalibrationCache (const void * cache, size_t length) noexcept override {
262
262
std::ofstream cache_file (cache_file_path_, std::ios::binary);
263
263
cache_file.write (reinterpret_cast <const char *>(cache), length);
264
264
std::stringstream ss;
0 commit comments