Home
last modified time | relevance | path

Searched refs:origin_bit (Results 1 – 2 of 2) sorted by relevance

/third_party/mindspore/mindspore/lite/src/
Dweight_decoder.cc294 int origin_bit = quant_param->numBits(); in UnPackToInt() local
295 if (origin_bit < kBitNum8 && origin_bit >= kBitNum1) { in UnPackToInt()
296 UnPackUtil<int8_t, uint8_t>(&src_tensor, origin_bit, dst_data); in UnPackToInt()
298 } else if (origin_bit < kBitNum16 && origin_bit > kBitNum8) { in UnPackToInt()
299 UnPackUtil<int16_t, uint16_t>(&src_tensor, origin_bit, dst_data); in UnPackToInt()
302 MS_LOG(ERROR) << "Unsupported bit number: " << origin_bit; in UnPackToInt()
Dweight_decoder.h233 …static void UnPackData(int origin_bit, const T2 &packed_data, std::queue<bool> *unpack_bit_data, v… in UnPackData() argument
238 while (static_cast<int>(unpack_bit_data->size()) >= origin_bit) { in UnPackData()
239 for (int k = 0; k < origin_bit; k++) { in UnPackData()
244 result = uint_result - static_cast<T2>(pow(2, origin_bit - 1)); in UnPackData()
256 result = static_cast<T1>(uint_result - static_cast<T2>(pow(2, origin_bit - 1))); in UnPackData()
262 …static void UnPackUtil(const schema::Tensor *input_tensor, int origin_bit, void *unpack_int_data) { in UnPackUtil() argument
275 UnPackData<T1, T2>(origin_bit, pack_data, &unpack_bit_data, unpack_int_data, &count, is_last); in UnPackUtil()