Browse Source

fix bug that same input tensor will repeat some times in graphIndex

tags/v0.7.0-beta
hangq 5 years ago
parent
commit
f8d5eb0e93
2 changed files with 5 additions and 4 deletions
  1. +1
    -2
      build.sh
  2. +4
    -2
      mindspore/lite/src/common/anf_exporter/anf_exporter.cc

+ 1
- 2
build.sh View File

@@ -682,8 +682,7 @@ build_lite()
cp ${BASEPATH}/mindspore/lite/build/src/libmindspore-lite.so ${OUTPUT_DIR}/lib/
mkdir -p ${OUTPUT_DIR}/third_party/protobuf/lib
cp -r ${BASEPATH}/third_party/protobuf/build/include/ ${OUTPUT_DIR}/third_party/protobuf/
cp -r ${BASEPATH}/third_party/protobuf/build/lib/libprotobuf.so.19 ${OUTPUT_DIR}/third_party/protobuf/lib/
cp -r ${BASEPATH}/third_party/protobuf/build/lib/libprotobuf.so.19.0.0 ${OUTPUT_DIR}/third_party/protobuf/lib/
cp -r ${BASEPATH}/third_party/protobuf/build/lib/libprotobuf.so.19.0.0 ${OUTPUT_DIR}/third_party/protobuf/lib/libprotobuf.so.19
mkdir -p ${OUTPUT_DIR}/third_party/flatbuffers
cp -r ${BASEPATH}/third_party/flatbuffers/include/ ${OUTPUT_DIR}/third_party/flatbuffers/
cd ..


+ 4
- 2
mindspore/lite/src/common/anf_exporter/anf_exporter.cc View File

@@ -29,6 +29,7 @@
#include "src/ir/primitive_t_value.h"
#include "src/ir/tensor.h"
#include "src/param_value_lite.h"
#include "src/common/utils.h"

namespace mindspore::lite {
std::set<std::string> RemoveNodeInAnfExporter{"tuple_getitem", "make_tuple"};
@@ -249,8 +250,9 @@ schema::MetaGraphT *AnfExporter::Export(const FuncGraphPtr &funcGraph) {
if (tensor->data.empty()) {
tensor->nodeType = schema::NodeType_ValueNode;
tensor->format = schema::Format_NHWC;
// tensor->refCount = lite::MSCONST_WEIGHT_REFCOUNT;
metaGraphT->inputIndex.emplace_back(input);
if (!IsContain(metaGraphT->inputIndex, input)) {
metaGraphT->inputIndex.emplace_back(input);
}
}
}
}


Loading…
Cancel
Save