diff --git a/mindspore/lite/build_lite.sh b/mindspore/lite/build_lite.sh index 1032dfe7e5..daf73b0692 100755 --- a/mindspore/lite/build_lite.sh +++ b/mindspore/lite/build_lite.sh @@ -237,13 +237,13 @@ build_lite() { compile_nnie_script=${BASEPATH}/mindspore/lite/tools/providers/NNIE/Hi3516D/compile_nnie.sh cd ${BASEPATH}/../ if [[ "${local_lite_platform}" == "x86_64" ]]; then - sh ${compile_nnie_script} -I x86_64 -b nnie_3516_master_dev_2 -j $THREAD_NUM + sh ${compile_nnie_script} -I x86_64 -b nnie_3516_master -j $THREAD_NUM if [[ $? -ne 0 ]]; then echo "compile x86_64 for nnie failed." exit 1 fi elif [[ "${local_lite_platform}" == "arm32" ]]; then - sh ${compile_nnie_script} -I arm32 -b nnie_3516_master_dev -j $THREAD_NUM + sh ${compile_nnie_script} -I arm32 -b nnie_3516_master -j $THREAD_NUM if [[ $? -ne 0 ]]; then echo "compile arm32 for nnie failed." exit 1 diff --git a/mindspore/lite/examples/converter_extend/CMakeLists.txt b/mindspore/lite/examples/converter_extend/CMakeLists.txt index 7071cb58ca..f73849129a 100644 --- a/mindspore/lite/examples/converter_extend/CMakeLists.txt +++ b/mindspore/lite/examples/converter_extend/CMakeLists.txt @@ -16,19 +16,5 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include/third_party) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include/third_party/eigen3) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include/third_party/securec) -# Add directory to linker search path -link_directories(${CMAKE_CURRENT_SOURCE_DIR}/lib) - file(GLOB_RECURSE CONVERTER_REGISTRY_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cc) add_library(converter_extend_tutorial SHARED ${CONVERTER_REGISTRY_SRC}) - -target_link_libraries(converter_extend_tutorial - mslite_converter_plugin - -Wl,--whole-archive mindspore_core -Wl,--no-whole-archive - mindspore_gvar - crypto - securec - glog - protobuf - dl -) diff --git a/mindspore/lite/test/CMakeLists.txt b/mindspore/lite/test/CMakeLists.txt index f602972552..0714f92bf7 100644 --- a/mindspore/lite/test/CMakeLists.txt +++ b/mindspore/lite/test/CMakeLists.txt @@ -100,6 +100,7 @@ if(MSLITE_ENABLE_CONVERTER) ${TEST_DIR}/common/import_from_meta_graphT.cc ${LITE_DIR}/src/ops/ops_utils.cc ${LITE_DIR}/src/ops/ops_def.cc + ${LITE_DIR}/src/tensor.cc ) endif() diff --git a/mindspore/lite/tools/converter/CMakeLists.txt b/mindspore/lite/tools/converter/CMakeLists.txt index 5667ce4309..ad62ffb367 100644 --- a/mindspore/lite/tools/converter/CMakeLists.txt +++ b/mindspore/lite/tools/converter/CMakeLists.txt @@ -14,7 +14,8 @@ set(CCSRC_SRC include_directories(${TOP_DIR}/mindspore/ccsrc/backend/kernel_compiler/cpu) if(NOT WIN32) - set(CMAKE_EXE_LINKER_FLAGS "-rdynamic") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -rdynamic -fvisibility=hidden") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -rdynamic -fvisibility=hidden") endif() file(GLOB_RECURSE CONVERTER_SRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} diff --git a/mindspore/lite/tools/converter/parser/onnx/onnx_expand_parser.cc b/mindspore/lite/tools/converter/parser/onnx/onnx_expand_parser.cc index 49845e0f5e..3b6e5840e6 100644 --- a/mindspore/lite/tools/converter/parser/onnx/onnx_expand_parser.cc +++ b/mindspore/lite/tools/converter/parser/onnx/onnx_expand_parser.cc @@ -40,16 +40,14 @@ ops::PrimitiveC *OnnxExpandParser::Parse(const onnx::GraphProto &onnx_graph, con auto node_iter = std::find_if(onnx_graph.node().begin(), onnx_graph.node().end(), [onnx_expand_power](const onnx::NodeProto &proto) { return proto.output(0) == onnx_expand_power; }); - if (node_iter == onnx_graph.node().end()) { - MS_LOG(ERROR) << "can not find node: " << onnx_expand_power; - return nullptr; - } - for (const auto &attr_power : node_iter->attribute()) { - if (attr_power.name() == "value") { - const auto &t = attr_power.t(); - auto *data_ptr = reinterpret_cast(t.raw_data().data()); - for (int i = 0; i < t.dims(0); ++i) { - dst_shape.emplace_back(data_ptr[i]); + if (node_iter != onnx_graph.node().end()) { + for (const auto &attr_power : node_iter->attribute()) { + if (attr_power.name() == "value") { + const auto &t = attr_power.t(); + auto *data_ptr = reinterpret_cast(t.raw_data().data()); + for (int i = 0; i < t.dims(0); ++i) { + dst_shape.emplace_back(data_ptr[i]); + } } } }