!24018 [lite]do not open flatbuffer and protobuf

Merge pull request !24018 from 徐安越/master3
This commit is contained in:
i-robot 2021-09-26 07:07:59 +00:00 committed by Gitee
commit 1e9b5c2227
4 changed files with 4 additions and 14 deletions

View File

@ -437,10 +437,8 @@ else()
COMPONENT ${RUNTIME_COMPONENT_NAME})
install(FILES ${TOP_DIR}/mindspore/lite/tools/converter/ops/ops_def.h
DESTINATION ${CONVERTER_ROOT_DIR}/include COMPONENT ${RUNTIME_COMPONENT_NAME})
install(DIRECTORY ${TOP_DIR}/mindspore/lite/build/proto/ DESTINATION ${CONVERTER_ROOT_DIR}/include/proto
COMPONENT ${RUNTIME_COMPONENT_NAME} FILES_MATCHING PATTERN "*.h")
install(DIRECTORY ${TOP_DIR}/mindspore/lite/build/schema/ DESTINATION ${CONVERTER_ROOT_DIR}/include/schema
COMPONENT ${RUNTIME_COMPONENT_NAME} FILES_MATCHING PATTERN "*.h")
COMPONENT ${RUNTIME_COMPONENT_NAME} FILES_MATCHING PATTERN "*.h" PATTERN "schema_generated.h" EXCLUDE)
install(DIRECTORY ${flatbuffers_INC}/ DESTINATION ${CONVERTER_ROOT_DIR}/include/third_party
COMPONENT ${RUNTIME_COMPONENT_NAME})
install(DIRECTORY ${glog_LIBPATH}/../include/glog/ DESTINATION ${CONVERTER_ROOT_DIR}/include/third_party/glog
@ -448,12 +446,6 @@ else()
install(DIRECTORY ${TOP_DIR}/third_party/securec/include/
DESTINATION ${CONVERTER_ROOT_DIR}/include/third_party/securec
COMPONENT ${RUNTIME_COMPONENT_NAME} FILES_MATCHING PATTERN "*.h")
install(DIRECTORY ${protobuf_INC}/google DESTINATION ${CONVERTER_ROOT_DIR}/include/third_party
COMPONENT ${RUNTIME_COMPONENT_NAME})
install(FILES ${protobuf_LIBPATH}/libprotobuf.a DESTINATION ${CONVERTER_ROOT_DIR}/lib
COMPONENT ${RUNTIME_COMPONENT_NAME})
install(FILES ${flatbuffers_LIBPATH}/libflatbuffers.a DESTINATION ${CONVERTER_ROOT_DIR}/lib
COMPONENT ${RUNTIME_COMPONENT_NAME})
install(TARGETS converter_lite RUNTIME DESTINATION ${CONVERTER_ROOT_DIR}/converter
COMPONENT ${RUNTIME_COMPONENT_NAME})
install(FILES ${TOP_DIR}/mindspore/lite/build/tools/converter/registry/libmslite_converter_plugin.so

View File

@ -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 -j $THREAD_NUM
sh ${compile_nnie_script} -I x86_64 -b nnie_3516_master_dev -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 -j $THREAD_NUM
sh ${compile_nnie_script} -I arm32 -b nnie_3516_master_dev -j $THREAD_NUM
if [[ $? -ne 0 ]]; then
echo "compile arm32 for nnie failed."
exit 1

View File

@ -201,7 +201,7 @@ STATUS ExportModel(const FuncGraphPtr &graph, const converter::Flags *flags) {
return RET_ERROR;
}
(void)Manage(mirror_graph, true);
if (!RunOptimizerPass(mirror_graph, {"ToNHWCFormat", "InferShapePass", "DecreaseTransposeAlgo"})) {
if (!RunOptimizerPass(mirror_graph, {"ToNHWCFormat", "InferShapePass"})) {
MS_LOG(ERROR) << "Run transpose opt pass failed.";
return RET_ERROR;
}

View File

@ -39,8 +39,6 @@ function Run_Build_x86() {
cd ${open_source_ms_path}/output/ || exit 1
# remove unused static library
rm ./mindspore-lite-${version}-linux-x64/tools/converter/lib/libprotobuf.a
rm ./mindspore-lite-${version}-linux-x64/tools/converter/lib/libflatbuffers.a
echo "cp new nnie so to release pkg success"
rm ${open_source_ms_path}/output/mindspore-lite-${version}-linux-x64.tar.gz
tar -zcf ./mindspore-lite-${version}-linux-x64.tar.gz ./mindspore-lite-${version}-linux-x64/