forked from mindspore-Ecosystem/mindspore
do not open flatbuffer and protobuf
This commit is contained in:
parent
89eb412644
commit
81aab2e5e0
|
@ -437,10 +437,8 @@ else()
|
||||||
COMPONENT ${RUNTIME_COMPONENT_NAME})
|
COMPONENT ${RUNTIME_COMPONENT_NAME})
|
||||||
install(FILES ${TOP_DIR}/mindspore/lite/tools/converter/ops/ops_def.h
|
install(FILES ${TOP_DIR}/mindspore/lite/tools/converter/ops/ops_def.h
|
||||||
DESTINATION ${CONVERTER_ROOT_DIR}/include COMPONENT ${RUNTIME_COMPONENT_NAME})
|
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
|
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
|
install(DIRECTORY ${flatbuffers_INC}/ DESTINATION ${CONVERTER_ROOT_DIR}/include/third_party
|
||||||
COMPONENT ${RUNTIME_COMPONENT_NAME})
|
COMPONENT ${RUNTIME_COMPONENT_NAME})
|
||||||
install(DIRECTORY ${glog_LIBPATH}/../include/glog/ DESTINATION ${CONVERTER_ROOT_DIR}/include/third_party/glog
|
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/
|
install(DIRECTORY ${TOP_DIR}/third_party/securec/include/
|
||||||
DESTINATION ${CONVERTER_ROOT_DIR}/include/third_party/securec
|
DESTINATION ${CONVERTER_ROOT_DIR}/include/third_party/securec
|
||||||
COMPONENT ${RUNTIME_COMPONENT_NAME} FILES_MATCHING PATTERN "*.h")
|
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
|
install(TARGETS converter_lite RUNTIME DESTINATION ${CONVERTER_ROOT_DIR}/converter
|
||||||
COMPONENT ${RUNTIME_COMPONENT_NAME})
|
COMPONENT ${RUNTIME_COMPONENT_NAME})
|
||||||
install(FILES ${TOP_DIR}/mindspore/lite/build/tools/converter/registry/libmslite_converter_plugin.so
|
install(FILES ${TOP_DIR}/mindspore/lite/build/tools/converter/registry/libmslite_converter_plugin.so
|
||||||
|
|
|
@ -237,13 +237,13 @@ build_lite() {
|
||||||
compile_nnie_script=${BASEPATH}/mindspore/lite/tools/providers/NNIE/Hi3516D/compile_nnie.sh
|
compile_nnie_script=${BASEPATH}/mindspore/lite/tools/providers/NNIE/Hi3516D/compile_nnie.sh
|
||||||
cd ${BASEPATH}/../
|
cd ${BASEPATH}/../
|
||||||
if [[ "${local_lite_platform}" == "x86_64" ]]; then
|
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
|
if [[ $? -ne 0 ]]; then
|
||||||
echo "compile x86_64 for nnie failed."
|
echo "compile x86_64 for nnie failed."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
elif [[ "${local_lite_platform}" == "arm32" ]]; then
|
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
|
if [[ $? -ne 0 ]]; then
|
||||||
echo "compile arm32 for nnie failed."
|
echo "compile arm32 for nnie failed."
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
@ -201,7 +201,7 @@ STATUS ExportModel(const FuncGraphPtr &graph, const converter::Flags *flags) {
|
||||||
return RET_ERROR;
|
return RET_ERROR;
|
||||||
}
|
}
|
||||||
(void)Manage(mirror_graph, true);
|
(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.";
|
MS_LOG(ERROR) << "Run transpose opt pass failed.";
|
||||||
return RET_ERROR;
|
return RET_ERROR;
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,8 +39,6 @@ function Run_Build_x86() {
|
||||||
|
|
||||||
cd ${open_source_ms_path}/output/ || exit 1
|
cd ${open_source_ms_path}/output/ || exit 1
|
||||||
# remove unused static library
|
# 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"
|
echo "cp new nnie so to release pkg success"
|
||||||
rm ${open_source_ms_path}/output/mindspore-lite-${version}-linux-x64.tar.gz
|
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/
|
tar -zcf ./mindspore-lite-${version}-linux-x64.tar.gz ./mindspore-lite-${version}-linux-x64/
|
||||||
|
|
Loading…
Reference in New Issue