diff --git a/mindspore/lite/micro/coder/generator/component/weight_component.cc b/mindspore/lite/micro/coder/generator/component/weight_component.cc index 8462f40452..aaeb6df248 100644 --- a/mindspore/lite/micro/coder/generator/component/weight_component.cc +++ b/mindspore/lite/micro/coder/generator/component/weight_component.cc @@ -36,7 +36,7 @@ void CodeWeightFileHeader(std::ofstream &ofs, const std::unique_ptr &weights) { diff --git a/mindspore/lite/micro/coder/generator/generator.cc b/mindspore/lite/micro/coder/generator/generator.cc index 0ee720cfd7..5edd015d5d 100644 --- a/mindspore/lite/micro/coder/generator/generator.cc +++ b/mindspore/lite/micro/coder/generator/generator.cc @@ -134,7 +134,8 @@ int Generator::CodeWeightFile() { MS_LOG(INFO) << "write " << cfile; cofs << g_hwLicense; cofs << "#include \"" << net_weight_hfile_ << "\"\n\n"; - cofs << "unsigned char * " << ctx_->buffer_name() << " = 0 ; \n"; + cofs << "int " << gThreadNum << " = 1;\n"; + cofs << "unsigned char * " << ctx_->buffer_name() << " = 0;\n"; if (config_->target() != kARM32M) { std::string net_file = net_src_file_path_ + "net.bin"; diff --git a/mindspore/lite/micro/coder/opcoders/base/reshape_base_coder.cc b/mindspore/lite/micro/coder/opcoders/base/reshape_base_coder.cc index 0c4ba6c21a..b3f41ab9ad 100644 --- a/mindspore/lite/micro/coder/opcoders/base/reshape_base_coder.cc +++ b/mindspore/lite/micro/coder/opcoders/base/reshape_base_coder.cc @@ -29,15 +29,7 @@ using mindspore::schema::PrimitiveType_Unsqueeze; namespace mindspore::lite::micro { -int ReshapeBaseCoder::Prepare(CoderContext *const context) { - bool is_next_conv = std::any_of(output_ops().begin(), output_ops().end(), [](OperatorCoder *next_op) { - return next_op->type() == schema::PrimitiveType_Conv2DFusion; - }); - if (is_next_conv && output_tensor_->shape().size() == 4 && output_tensor_->format() == schema::Format::Format_NCHW) { - output_tensor_->set_format(schema::Format::Format_NHWC); - } - return RET_OK; -} +int ReshapeBaseCoder::Prepare(CoderContext *const context) { return RET_OK; } int ReshapeBaseCoder::DoCode(CoderContext *const context) { Serializer coder; diff --git a/mindspore/lite/micro/coder/opcoders/nnacl/fp32/convolution_depthwise_fp32_coder.cc b/mindspore/lite/micro/coder/opcoders/nnacl/fp32/convolution_depthwise_fp32_coder.cc index 3dc8d85696..bfdd1b4ee3 100644 --- a/mindspore/lite/micro/coder/opcoders/nnacl/fp32/convolution_depthwise_fp32_coder.cc +++ b/mindspore/lite/micro/coder/opcoders/nnacl/fp32/convolution_depthwise_fp32_coder.cc @@ -62,7 +62,7 @@ int ConvolutionDepthwiseFP32Coder::DoCode(CoderContext *const context) { MS_CHECK_TRUE(conv_param_->input_channel_ == conv_param_->output_channel_, "Only support input channel equals output channel."); // generate code .h .c - Collect(context, {"nnacl/fp32/conv_depthwise_fp32.h"}, {"conv_depthwise_fp32.c"}); + Collect(context, {"nnacl/fp32/conv_depthwise_fp32.h"}, {"conv_depthwise_fp32.c"}, {"ConvDwFp32Row.S"}); nnacl::NNaclFp32Serializer code; // call the op function