From 66ec9da544a1128799f416283dc149e230f563f6 Mon Sep 17 00:00:00 2001 From: ling Date: Mon, 3 Aug 2020 19:27:28 +0800 Subject: [PATCH] conv1x1 bug --- .gitignore | 3 +++ mindspore/lite/src/runtime/kernel/arm/fp32/convolution_1x1.cc | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index babbc03dca3..f714acdefad 100644 --- a/.gitignore +++ b/.gitignore @@ -86,3 +86,6 @@ test_temp_summary_event_file/ mindspore/version.py mindspore/default_config.py mindspore/.commit_id + +# lite test file +mindspore/lite/test/do_test/ diff --git a/mindspore/lite/src/runtime/kernel/arm/fp32/convolution_1x1.cc b/mindspore/lite/src/runtime/kernel/arm/fp32/convolution_1x1.cc index a735dee884a..e2456bfdf45 100644 --- a/mindspore/lite/src/runtime/kernel/arm/fp32/convolution_1x1.cc +++ b/mindspore/lite/src/runtime/kernel/arm/fp32/convolution_1x1.cc @@ -80,12 +80,12 @@ int Convolution1x1CPUKernel::InitConv1x1BiasWeight() { bias_data_ = nullptr; } - weight_ptr_ = reinterpret_cast(malloc(matmul_param_->row_8_ * matmul_param_->col_8_ * sizeof(float))); + weight_ptr_ = reinterpret_cast(malloc(matmul_param_->deep_ * matmul_param_->col_8_ * sizeof(float))); if (weight_ptr_ == nullptr) { MS_LOG(ERROR) << "Conv1x1 Malloc weight_ptr_ error!"; return RET_ERROR; } - memset(weight_ptr_, 0, matmul_param_->row_8_ * matmul_param_->col_8_ * sizeof(float)); + memset(weight_ptr_, 0, matmul_param_->deep_ * matmul_param_->col_8_ * sizeof(float)); RowMajor2Col8Major(reinterpret_cast(inputs_[1]->Data()), weight_ptr_, matmul_param_->col_, matmul_param_->deep_); return RET_OK;