File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -173,10 +173,13 @@ mli_status mli_chk_lut(const mli_lut * lut, int buff_size) {
173173/* ***********************************************************
174174* mli_tensor quantization parameters correctness checking
175175*************************************************************/
176- constexpr unsigned kZeroPointBitsZero = 0 ;
177- constexpr unsigned kZeroPointBitsByteRange = (sizeof (int8_t ) * 8 ) - 1 ;
178- constexpr unsigned kZeroPointBitsMaxRange = (sizeof (int16_t ) * 8 ) - 1 ;
179-
176+ #if MLI_DBG_ENABLE_RETURNCODES
177+ // These constants are used in debug mode only.
178+ // To not rise a warning in release mode we exclude it by pre-processor.
179+ static constexpr unsigned kZeroPointBitsZero = 0 ;
180+ static constexpr unsigned kZeroPointBitsByteRange = (sizeof (int8_t ) * 8 ) - 1 ;
181+ #endif
182+ static constexpr unsigned kZeroPointBitsMaxRange = (sizeof (int16_t ) * 8 ) - 1 ;
180183mli_status mli_chk_tensor_quant_params (const mli_tensor* in, unsigned zp_used_bits = kZeroPointBitsMaxRange ) {
181184 MLI_ASSERT (zp_used_bits <= kZeroPointBitsMaxRange );
182185 MLI_ASSERT (in != nullptr );
You can’t perform that action at this time.
0 commit comments