Browse Source

fix bug

tags/v1.0.0
xuanyue 5 years ago
parent
commit
a0ef03cc0e
8 changed files with 25 additions and 7 deletions
  1. +2
    -0
      build.sh
  2. +9
    -0
      mindspore/lite/include/version.h
  3. +1
    -1
      mindspore/lite/src/ops/unsqueeze.cc
  4. +1
    -1
      mindspore/lite/src/runtime/kernel/arm/fp32/convolution_depthwise.cc
  5. +8
    -2
      mindspore/lite/tools/anf_exporter/anf_exporter.cc
  6. +2
    -1
      mindspore/lite/tools/converter/parser/caffe/CMakeLists.txt
  7. +1
    -1
      mindspore/lite/tools/converter/parser/caffe/caffe_tanh_parser.cc
  8. +1
    -1
      mindspore/lite/tools/converter/parser/onnx/onnx_slice_parser.cc

+ 2
- 0
build.sh View File

@@ -618,10 +618,12 @@ build_lite()

if [[ "${COMPILE_RET}" -ne 0 ]]; then
echo "---------------- mindspore lite: build failed ----------------"
exit 1
else
mv ${BASEPATH}/output/tmp/*.tar.gz* ${BASEPATH}/output/
rm -rf ${BASEPATH}/output/tmp/
echo "---------------- mindspore lite: build success ----------------"
exit 0
fi
}



+ 9
- 0
mindspore/lite/include/version.h View File

@@ -24,6 +24,15 @@ namespace lite {
/// \brief Global method to get a version string.
///
/// \return The version string of MindSpore Lite.
#ifndef MS_VERSION_MAJOY
#define MS_VERSION_MAJOY 0
#endif
#ifndef MS_VERSION_MINOR
#define MS_VERSION_MINOR 7
#endif
#ifndef MS_VERSION_REVISION
#define MS_VERSION_REVISION 0
#endif
std::string Version() {
return "MindSpore Lite " + std::to_string(MS_VERSION_MAJOY) + "." + std::to_string(MS_VERSION_MINOR) + "." +
std::to_string(MS_VERSION_REVISION);


+ 1
- 1
mindspore/lite/src/ops/unsqueeze.cc View File

@@ -54,7 +54,7 @@ int Unsqueeze::InferShape(std::vector<tensor::Tensor *> inputs_, std::vector<ten
return RET_OK;
}

auto dims = GetAxis().data();
auto dims = GetAxis();
auto in_shape = input->shape();
auto in_rank = in_shape.size();
auto dim_rank = GetAxis().size();


+ 1
- 1
mindspore/lite/src/runtime/kernel/arm/fp32/convolution_depthwise.cc View File

@@ -30,7 +30,7 @@ using mindspore::schema::PrimitiveType_DepthwiseConv2D;
namespace mindspore::kernel {
ConvolutionDepthwiseCPUKernel::~ConvolutionDepthwiseCPUKernel() {
if (packed_weight_ != nullptr) {
delete packed_weight_;
free(packed_weight_);
packed_weight_ = nullptr;
}
}


+ 8
- 2
mindspore/lite/tools/anf_exporter/anf_exporter.cc View File

@@ -142,7 +142,10 @@ void AnfExporter::SetGraphoutputIndex(const CNodePtr &cnode, const std::unique_p
MS_ASSERT(nullptr != return_node);
for (size_t i = 1; i < cnode->inputs().size(); i++) {
auto input_node = cnode->input(i);
if (input_node->isa<CNode>()) {
if (input_node == nullptr) {
MS_LOG(ERROR) << "output node is nullptr";
return;
} else if (input_node->isa<CNode>()) {
auto ret = ConvertInputCNode(input_node, return_node);
if (ret != RET_OK) {
MS_LOG(ERROR) << "obtain outputs failed";
@@ -175,7 +178,10 @@ schema::MetaGraphT *AnfExporter::Export(const FuncGraphPtr &func_graph) {
RemoveIfMakeTuple(cnode);

auto node = std::make_unique<schema::CNodeT>();

if (node == nullptr) {
MS_LOG(ERROR) << "object failed to be constructed";
return nullptr;
}
if (primT->value.type == schema::PrimitiveType_Return) {
node->name = "return_node";
SetGraphoutputIndex(cnode, meta_graphT, node.get());


+ 2
- 1
mindspore/lite/tools/converter/parser/caffe/CMakeLists.txt View File

@@ -28,4 +28,5 @@ add_library(caffe_parser_mid OBJECT
${CMAKE_CURRENT_SOURCE_DIR}/caffe_inspector.cc
${CMAKE_CURRENT_SOURCE_DIR}/caffe_interp_parser.cc
${CMAKE_CURRENT_SOURCE_DIR}/caffe_permute_parser.cc
${CMAKE_CURRENT_SOURCE_DIR}/caffe_tile_parser.cc)
${CMAKE_CURRENT_SOURCE_DIR}/caffe_tile_parser.cc
${CMAKE_CURRENT_SOURCE_DIR}/caffe_tanh_parser.cc)

+ 1
- 1
mindspore/lite/tools/converter/parser/caffe/caffe_tanh_parser.cc View File

@@ -32,7 +32,7 @@ STATUS CaffeTanhParser::Parse(const caffe::LayerParameter &proto,
return RET_OK;
}

CaffeNodeRegistrar g_caffeTanhParser("Tanh", new CaffeTanhParser());
CaffeNodeRegistrar g_caffeTanhParser("TanH", new CaffeTanhParser());
} // namespace lite
} // namespace mindspore


+ 1
- 1
mindspore/lite/tools/converter/parser/onnx/onnx_slice_parser.cc View File

@@ -42,7 +42,7 @@ STATUS OnnxSliceParser::Parse(const onnx::GraphProto &onnx_graph, const onnx::No
const auto &attribute_name = onnx_node_attr.name();
if (attribute_name == "starts") {
const int size = onnx_node_attr.ints_size();
MS_LOG(ERROR) << "SLICE starts size " << size;
MS_LOG(INFO) << "SLICE starts size " << size;
for (int i = 0; i < size; ++i) {
attr->begin.emplace_back(static_cast<int32_t>(onnx_node_attr.ints(i)));
}


Loading…
Cancel
Save