forked from mindspore-Ecosystem/mindspore
add param check for bit_num
This commit is contained in:
parent
99fbcec2ce
commit
c2078b9177
|
@ -70,8 +70,8 @@ int QuantParamParser::ParseBitNum(const CommonQuantString &common_quant_string,
|
||||||
return RET_INPUT_PARAM_INVALID;
|
return RET_INPUT_PARAM_INVALID;
|
||||||
}
|
}
|
||||||
} else if (common_quant->quant_type == schema::QuantType_QUANT_ALL) {
|
} else if (common_quant->quant_type == schema::QuantType_QUANT_ALL) {
|
||||||
if (common_quant->bit_num <= 0 || common_quant->bit_num > kQuantBitNumInt8) {
|
if (common_quant->bit_num != kQuantBitNumInt8) {
|
||||||
MS_LOG(ERROR) << "INPUT ILLEGAL: bit_num should be [1,8].";
|
MS_LOG(ERROR) << "INPUT ILLEGAL: bit_num should be 8.";
|
||||||
return RET_INPUT_PARAM_INVALID;
|
return RET_INPUT_PARAM_INVALID;
|
||||||
}
|
}
|
||||||
} else if (common_quant->quant_type == schema::QuantType_QUANT_DYNAMIC) {
|
} else if (common_quant->quant_type == schema::QuantType_QUANT_DYNAMIC) {
|
||||||
|
|
Loading…
Reference in New Issue