/third_party/mindspore/mindspore/lite/micro/coder/wrapper/int8/ |
D | conv1x1_init_int8_wrapper.c | 31 int8_t *packed_weight_ = (int8_t *)(malloc(size)); in Conv1x1Init() local 32 if (packed_weight_ == NULL) { in Conv1x1Init() 35 memset(packed_weight_, 0, size); in Conv1x1Init() 36 RowMajor2Row2x16MajorInt8(src_weight, packed_weight_, output_channel, input_channel); in Conv1x1Init() 41 free(packed_weight_); in Conv1x1Init() 53 int8_t *packed_weight_ = (int8_t *)(malloc(size)); in Conv1x1Init() local 54 if (packed_weight_ == NULL) { in Conv1x1Init() 57 memset(packed_weight_, 0, size); in Conv1x1Init() 59 RowMajor2Row4x16MajorInt8(src_weight, packed_weight_, output_channel, input_channel); in Conv1x1Init() 61 RowMajor2Row16x4MajorInt8(src_weight, packed_weight_, output_channel, input_channel); in Conv1x1Init() [all …]
|
D | conv_init_int8_wrapper.c | 25 int8_t *packed_weight_ = NULL; in ConvInit() local 46 packed_weight_ = (int8_t *)(malloc(pack_weight_size)); in ConvInit() 47 if (packed_weight_ == NULL) { in ConvInit() 50 memset(packed_weight_, 0, pack_weight_size); in ConvInit() 52 …RowMajor2Row2x16MajorInt8(origin_weight, packed_weight_, output_channel, input_channel * kernel_pl… in ConvInit() 55 …RowMajor2Row8x4MajorInt8(origin_weight, packed_weight_, output_channel, input_channel * kernel_pla… in ConvInit() 57 …RowMajor2Row16x4MajorInt8(origin_weight, packed_weight_, output_channel, input_channel * kernel_pl… in ConvInit() 64 free(packed_weight_); in ConvInit() 84 *packed_weight = packed_weight_; in ConvInit()
|
/third_party/mindspore/mindspore/lite/src/runtime/kernel/arm/fp16/ |
D | convolution_fp16.cc | 37 RowMajor2Col8MajorFp16(weight_origin, reinterpret_cast<float16_t *>(packed_weight_), out_channel, in PackWeight() 53 if (packed_weight_ == nullptr) { in MallocWeightBiasData() 54 packed_weight_ = malloc(pack_weight_size * sizeof(float16_t)); in MallocWeightBiasData() 55 if (packed_weight_ == nullptr) { in MallocWeightBiasData() 56 … packed_weight_ = reinterpret_cast<float16_t *>(malloc(pack_weight_size * sizeof(float16_t))); in MallocWeightBiasData() 57 if (packed_weight_ == nullptr) { in MallocWeightBiasData() 63 memset(packed_weight_, 0, pack_weight_size * sizeof(float16_t)); in MallocWeightBiasData() 154 ConvOutNc8hw8Fp16(input_ptr, packed_input_, reinterpret_cast<float16_t *>(packed_weight_), in RunImpl() 157 ConvFp16(input_ptr, packed_input_, reinterpret_cast<float16_t *>(packed_weight_), in RunImpl()
|
D | convolution_1x1_fp16.cc | 90 if (packed_weight_ == nullptr) { in MallocWeightBiasData() 91 packed_weight_ = malloc(size); in MallocWeightBiasData() 92 if (packed_weight_ == nullptr) { in MallocWeightBiasData() 97 memset(packed_weight_, 0, size); in MallocWeightBiasData() 122 …ColMajor2Row8MajorFp16(weight_origin, reinterpret_cast<float16_t *>(packed_weight_), input_channel… in PackWeight() 126 … reinterpret_cast<float16_t *>(packed_weight_), output_channel, input_channel); in PackWeight() 129 …ColMajor2Row8MajorFp16(weight_origin, reinterpret_cast<float16_t *>(packed_weight_), input_channel… in PackWeight() 209 …8hw8MultiThreadByWeightFp16(input_ptr_, pack_input_, reinterpret_cast<float16_t *>(packed_weight_), in RunOc() 215 … reinterpret_cast<float16_t *>(packed_weight_) + task_id * thread_stride_ * matmul_param_->deep_, in RunOc() 220 … reinterpret_cast<float16_t *>(packed_weight_) + task_id * thread_stride_ * matmul_param_->deep_, in RunOc() [all …]
|
D | convolution_depthwise_3x3_fp16.cc | 34 …x3Fp16(reinterpret_cast<float16_t *>(origin_weight), reinterpret_cast<float16_t *>(packed_weight_), in PackWeight() 44 if (packed_weight_ == nullptr) { in MallocWeightBiasData() 45 packed_weight_ = malloc(pack_weight_size * sizeof(float16_t)); in MallocWeightBiasData() 46 if (packed_weight_ == nullptr) { in MallocWeightBiasData() 47 … packed_weight_ = reinterpret_cast<float16_t *>(malloc(pack_weight_size * sizeof(float16_t))); in MallocWeightBiasData() 48 if (packed_weight_ == nullptr) { in MallocWeightBiasData() 104 ConvDw3x3Fp16(output_ptr_, buffer, input_ptr_, reinterpret_cast<float16_t *>(packed_weight_), in DoExecute()
|
D | convolution_depthwise_slidewindow_fp16.cc | 61 …W8Fp16(reinterpret_cast<float16_t *>(origin_weight), reinterpret_cast<float16_t *>(packed_weight_), in PackWeight() 70 if (packed_weight_ == nullptr) { in MallocWeightBiasData() 71 packed_weight_ = malloc(pack_weight_size * sizeof(float16_t)); in MallocWeightBiasData() 72 if (packed_weight_ == nullptr) { in MallocWeightBiasData() 73 … packed_weight_ = reinterpret_cast<float16_t *>(malloc(pack_weight_size * sizeof(float16_t))); in MallocWeightBiasData() 74 if (packed_weight_ == nullptr) { in MallocWeightBiasData() 133 ConvDwC8Fp16(packed_output_, packed_input_, reinterpret_cast<float16_t *>(packed_weight_), in DoExecute()
|
D | convolution_depthwise_fp16.cc | 30 …p16(reinterpret_cast<float16_t *>(origin_weight), reinterpret_cast<float16_t *>(packed_weight_), 1, in PackWeight() 39 if (packed_weight_ == nullptr) { in MallocWeightBiasData() 40 packed_weight_ = reinterpret_cast<float16_t *>(malloc(pack_weight_size * sizeof(float16_t))); in MallocWeightBiasData() 41 if (packed_weight_ == nullptr) { in MallocWeightBiasData() 99 ConvDwFp16(output_ptr, input_ptr, reinterpret_cast<float16_t *>(packed_weight_), in DoExecute()
|
D | convolution_winograd_fp16.cc | 30 …return WinogradWeightTransformFp16(weight_data, reinterpret_cast<float16_t *>(packed_weight_), mat… in WinogradFilterTransformFp16() 45 if (packed_weight_ == nullptr) { in MallocWeightBiasData() 46 packed_weight_ = malloc(trans_matrix_data_size); in MallocWeightBiasData() 47 if (packed_weight_ == nullptr) { in MallocWeightBiasData() 52 memset(packed_weight_, 0, trans_matrix_data_size); in MallocWeightBiasData() 218 ConvWinogardFp16(input_ptr, reinterpret_cast<float16_t *>(packed_weight_), in RunImpl()
|
/third_party/mindspore/mindspore/lite/src/runtime/kernel/arm/int8/ |
D | convolution_depthwise_3x3_int8.cc | 34 if (packed_weight_ != nullptr) { in ~ConvolutionDepthwise3x3Int8CPUKernel() 35 free(packed_weight_); in ~ConvolutionDepthwise3x3Int8CPUKernel() 36 packed_weight_ = nullptr; in ~ConvolutionDepthwise3x3Int8CPUKernel() 66 …packed_weight_ = reinterpret_cast<int16_t *>(malloc(static_cast<size_t>(pack_weight_size) * sizeof… in InitWeightBias() 67 if (packed_weight_ == nullptr) { in InitWeightBias() 77 … packed_weight_[i * channel + c] = (int16_t)(tmp_weight[i * channel + c] - per_channel_weight_zp); in InitWeightBias() 88 packed_weight_[i] = (int16_t)(tmp_weight[i] - weight_zp); in InitWeightBias() 146 …ConvDw3x3Int8(output_ptr_, buffer, input_ptr_, packed_weight_, reinterpret_cast<int32_t *>(bias_da… in DoExecute() 191 …ConvDw3x3Int8Pad(output_ptr_, input_ptr_, packed_weight_, reinterpret_cast<int32_t *>(bias_data_),… in Run()
|
D | convolution_depthwise_int8.cc | 26 if (packed_weight_ != nullptr) { in ~ConvolutionDepthwiseInt8CPUKernel() 27 free(packed_weight_); in ~ConvolutionDepthwiseInt8CPUKernel() 28 packed_weight_ = nullptr; in ~ConvolutionDepthwiseInt8CPUKernel() 53 packed_weight_ = reinterpret_cast<int16_t *>(malloc(pack_weight_size * sizeof(int16_t))); in InitWeightBias() 54 if (packed_weight_ == nullptr) { in InitWeightBias() 65 … packed_weight_[i * channel + c] = (int16_t)(tmp_weight[i * channel + c] - per_channel_weight_zp); in InitWeightBias() 76 packed_weight_[i] = (int16_t)(tmp_weight[i] - weight_zp); in InitWeightBias() 122 …ConvDwInt8(output_ptr_, buffer, input_ptr_, packed_weight_, reinterpret_cast<int32_t *>(bias_data_… in DoExecute()
|
D | convolution_1x1_int8.cc | 31 if (packed_weight_ != nullptr) { in ~Convolution1x1Int8CPUKernel() 32 free(packed_weight_); in ~Convolution1x1Int8CPUKernel() 33 packed_weight_ = nullptr; in ~Convolution1x1Int8CPUKernel() 229 packed_weight_ = reinterpret_cast<int8_t *>(malloc(size)); in InitWeightBias() 230 if (packed_weight_ == nullptr) { in InitWeightBias() 234 memset(packed_weight_, 0, size); in InitWeightBias() 237 …6MajorInt8(reinterpret_cast<int8_t *>(filter_tensor->MutableData()), packed_weight_, output_channe… in InitWeightBias() 240 …4MajorInt8(reinterpret_cast<int8_t *>(filter_tensor->MutableData()), packed_weight_, output_channe… in InitWeightBias() 275 packed_weight_ = reinterpret_cast<int8_t *>(malloc(size)); in InitWeightBiasArm32() 276 if (packed_weight_ == nullptr) { in InitWeightBiasArm32() [all …]
|
D | convolution_int8.h | 34 if (packed_weight_ != nullptr) { in ~ConvolutionInt8CPUKernel() 35 free(packed_weight_); in ~ConvolutionInt8CPUKernel() 36 packed_weight_ = nullptr; in ~ConvolutionInt8CPUKernel() 76 int8_t *packed_weight_ = nullptr; variable
|
D | convolution_int8.cc | 78 packed_weight_ = reinterpret_cast<int8_t *>(malloc(pack_weight_size)); in InitWeightBias() 79 if (packed_weight_ == nullptr) { in InitWeightBias() 83 memset(packed_weight_, 0, pack_weight_size); in InitWeightBias() 85 …RowMajor2Row2x16MajorInt8(origin_weight, packed_weight_, output_channel, input_channel * kernel_pl… in InitWeightBias() 88 …RowMajor2Row8x4MajorInt8(origin_weight, packed_weight_, output_channel, input_channel * kernel_pla… in InitWeightBias() 90 …RowMajor2Row16x4MajorInt8(origin_weight, packed_weight_, output_channel, input_channel * kernel_pl… in InitWeightBias() 208 …ConvInt8(ori_input_data, packed_input_, matmul_packed_input_, packed_weight_, reinterpret_cast<int… in RunImpl()
|
D | deconvolution_depthwise_int8.cc | 30 if (packed_weight_ != nullptr) { in ~DeconvolutionDepthwiseInt8CPUKernel() 31 delete packed_weight_; in ~DeconvolutionDepthwiseInt8CPUKernel() 32 packed_weight_ = nullptr; in ~DeconvolutionDepthwiseInt8CPUKernel() 50 packed_weight_ = reinterpret_cast<int16_t *>(malloc(pack_weight_size * sizeof(int16_t))); in InitWeightBias() 51 if (packed_weight_ == nullptr) { in InitWeightBias() 55 …PackDeconvDepthwiseInt8Weight(origin_weight, packed_weight_, weight_tensor->Height() * weight_tens… in InitWeightBias() 170 …DeconvDwInt8(packed_output_, buffer, packed_input_, packed_weight_, reinterpret_cast<int32_t *>(bi… in DoExecute() 203 CHECK_NULL_RETURN(packed_weight_); in Run()
|
/third_party/mindspore/mindspore/lite/micro/coder/opcoders/nnacl/fp32/ |
D | convolution_fp32_coder.cc | 73 …packed_weight_ = reinterpret_cast<float *>(allocator_->Malloc(kNumberTypeFloat32, kOnlineSize, kOn… in InitWeightBias() 74 MS_CHECK_PTR(packed_weight_); in InitWeightBias() 85 init_code.CodeMallocExpression(packed_weight_, pack_weight_size_); in InitWeightBias() 86 init_code.CodeFunction("memset", packed_weight_, 0, pack_weight_size_); in InitWeightBias() 88 init_code.CodeFunction("RowMajor2Col4Major", init_weight_str, packed_weight_, out_channel_size, in InitWeightBias() 91 init_code.CodeFunction("RowMajor2Col8Major", init_weight_str, packed_weight_, out_channel_size, in InitWeightBias() 166 …code.CodeFunction("ConvFp32", input_tensor_, packed_input_, packed_weight_, bias_data_, col_major_… in DoCode()
|
D | convolution_depthwise_fp32_coder.cc | 38 packed_weight_ = in InitWeightBias() 40 MS_CHECK_PTR(packed_weight_); in InitWeightBias() 41 MS_CHECK_RET_CODE(memset_s(packed_weight_, packed_weight_data_size, 0, packed_weight_data_size), in InitWeightBias() 43 …PackNCHWToNHWCFp32(origin_weight, packed_weight_, 1, filter_tensor_->Height() * filter_tensor_->Wi… in InitWeightBias() 84 …code.CodeFunction("ConvDw", output_tensor_, input_tensor_, packed_weight_, bias_, "&conv_parameter… in DoCode()
|
D | deconv2d_fp32_coder.cc | 98 …packed_weight_ = reinterpret_cast<float *>(allocator_->Malloc(kNumberTypeFloat32, kOnlineSize, kOn… in InitWeightBias() 99 MS_CHECK_PTR(packed_weight_); in InitWeightBias() 108 init_code.CodeMallocExpression(packed_weight_, pack_weight_size_); in InitWeightBias() 109 init_code.CodeFunction("memset", packed_weight_, 0, pack_weight_size_); in InitWeightBias() 110 …init_code.CodeFunction("PackNHWCToC8HWN8Fp32", filter_tensor_, packed_weight_, in_channel, kernel_… in InitWeightBias() 184 …code.CodeBaseStruct("DeConvFp32Args", kRunArgs, packed_input_, packed_weight_, packed_bias_, packe… in DoCode()
|
/third_party/mindspore/mindspore/lite/src/runtime/kernel/arm/fp32/ |
D | convolution_fp32.cc | 115 ConvFp32(ori_input_data, packed_input_, reinterpret_cast<float *>(packed_weight_), in RunImpl() 119 ConvFp32OutNC4HW4(ori_input_data, packed_input_, reinterpret_cast<float *>(packed_weight_), in RunImpl() 190 …r(reinterpret_cast<float *>(origin_weight), reinterpret_cast<float *>(packed_weight_), out_channel, in PackWeight() 193 …r(reinterpret_cast<float *>(origin_weight), reinterpret_cast<float *>(packed_weight_), out_channel, in PackWeight() 196 …r(reinterpret_cast<float *>(origin_weight), reinterpret_cast<float *>(packed_weight_), out_channel, in PackWeight() 211 packed_weight_ = malloc(pack_weight_size * sizeof(float)); in MallocWeightBiasData() 212 if (packed_weight_ == nullptr) { in MallocWeightBiasData() 216 memset(packed_weight_, 0, pack_weight_size * sizeof(float)); in MallocWeightBiasData()
|
D | convolution_1x1_fp32.cc | 154 …MatMulOpt(pack_input_, reinterpret_cast<float *>(packed_weight_) + task_id * thread_stride_ * matm… in DoConv1x1() 158 …MatMulOpt(pack_input_, reinterpret_cast<float *>(packed_weight_) + task_id * thread_stride_ * matm… in DoConv1x1() 196 MatMulOpt(thread_pack_input, reinterpret_cast<float *>(packed_weight_), cur_output, in DoConv1x1Hw() 201 MatMulOpt(thread_pack_input, reinterpret_cast<float *>(packed_weight_), cur_output, in DoConv1x1Hw() 287 …jor2Col16Major(reinterpret_cast<float *>(origin_weight), reinterpret_cast<float *>(packed_weight_), in PackWeight() 290 …ajor2Col4Major(reinterpret_cast<float *>(origin_weight), reinterpret_cast<float *>(packed_weight_), in PackWeight() 293 …ajor2Col8Major(reinterpret_cast<float *>(origin_weight), reinterpret_cast<float *>(packed_weight_), in PackWeight() 304 packed_weight_ = malloc(size); in MallocWeightBiasData() 305 if (packed_weight_ == nullptr) { in MallocWeightBiasData()
|
D | adder_fp32.cc | 84 packed_weight_ = malloc(pack_weight_size * sizeof(float)); in InitWeightBias() 85 if (packed_weight_ == nullptr) { in InitWeightBias() 89 memset(packed_weight_, 0, pack_weight_size * sizeof(float)); in InitWeightBias() 90 …RowMajor2Col4Major(origin_weight, reinterpret_cast<float *>(packed_weight_), out_channel, in_chann… in InitWeightBias() 117 AdderFp32(ori_input_data, packed_input_, reinterpret_cast<float *>(packed_weight_), in RunImpl()
|
D | convolution_depthwise_3x3_fp32.cc | 70 ConvDw3x3(output_ptr_, buffer, input_ptr_, reinterpret_cast<float *>(packed_weight_), in DoExecute() 120 …Fp32(reinterpret_cast<float *>(origin_weight), reinterpret_cast<float *>(packed_weight_), channel); in PackWeight() 129 if (packed_weight_ == nullptr) { in MallocWeightBiasData() 130 packed_weight_ = malloc(pack_weight_size * sizeof(float)); in MallocWeightBiasData() 131 if (packed_weight_ == nullptr) { in MallocWeightBiasData()
|
D | convolution_winograd_fp32.cc | 35 …return WinogradWeightTransform(weight_data, reinterpret_cast<float *>(packed_weight_), matrix_g, m… in WinogradFilterTransform() 151 ConvWinogardFp32(ori_input_data, reinterpret_cast<float *>(packed_weight_), in RunImpl() 207 if (packed_weight_ == nullptr) { in MallocWeightBiasData() 208 packed_weight_ = malloc(trans_matrix_data_size); in MallocWeightBiasData() 209 if (packed_weight_ == nullptr) { in MallocWeightBiasData() 214 memset(packed_weight_, 0, trans_matrix_data_size); in MallocWeightBiasData()
|
D | convolution_slidewindow_fp32.cc | 95 …Conv1x1SWFp32(input_data_, reinterpret_cast<float *>(packed_weight_), reinterpret_cast<float *>(bi… in RunImpl() 98 …ConvSWFp32(input_data_, reinterpret_cast<float *>(packed_weight_), reinterpret_cast<float *>(bias_… in RunImpl() 198 … reinterpret_cast<float *>(packed_weight_), reinterpret_cast<float *>(origin_weight)); in PackWeight() 213 packed_weight_ = malloc(pack_weight_size * sizeof(float)); in MallocWeightBiasData() 214 if (packed_weight_ == nullptr) { in MallocWeightBiasData() 218 memset(packed_weight_, 0, pack_weight_size * sizeof(float)); in MallocWeightBiasData()
|
D | convolution_depthwise_fp32.cc | 64 auto ret = ConvDw(output_ptr_, input_ptr_, reinterpret_cast<float *>(packed_weight_), in DoExecute() 104 …htKHWToHWKFp32(reinterpret_cast<float *>(origin_weight), reinterpret_cast<float *>(packed_weight_), in PackWeight() 117 packed_weight_ = malloc(pack_weight_size * sizeof(float)); in MallocWeightBiasData() 118 if (packed_weight_ == nullptr) { in MallocWeightBiasData()
|
/third_party/mindspore/mindspore/lite/micro/coder/opcoders/nnacl/int8/ |
D | convolution_depthwise_int8_coder.cc | 59 …packed_weight_ = reinterpret_cast<int16_t *>(allocator_->Malloc(kNumberTypeInt16, kOnlineSize, kOn… in InitWeightBias() 60 MS_CHECK_PTR(packed_weight_); in InitWeightBias() 61 code.CodeMallocExpression(packed_weight_, packed_weight_data_size); in InitWeightBias() 63 code << " " << allocator_->GetRuntimeAddr(packed_weight_) << "[i] = (int16_t)(" in InitWeightBias() 122 …ruct("ConvDepthwiseInt8Args", kRunArgs, output_tensor_, row_buffer_, input_tensor_, packed_weight_, in DoCode()
|