From a621354f6e8dd7f1d9cfc7aba2f68aeaca2bd435 Mon Sep 17 00:00:00 2001 From: taoxiangdong Date: Thu, 22 Oct 2020 02:18:01 +0800 Subject: [PATCH] update build.sh --- CMakeLists.txt | 2 +- build.sh | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ec9296a9..56f8f856 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -78,7 +78,7 @@ if (ENABLE_OPEN_SRC) if(PRODUCT STREQUAL "flr3") message(FATAL_ERROR "This platform is not supported in train mode, build terminated") endif() - else if(PLATFORM STREQUAL "inference") + elseif(PLATFORM STREQUAL "inference") find_module(slog libslog.so ${ASCEND_DRIVER_DIR}) find_module(mmpa libmmpa.so ${ASCEND_DRIVER_DIR}) find_module(msprof libmsprof.so ${ASCEND_DRIVER_DIR}) diff --git a/build.sh b/build.sh index 32a59c98..1a25e244 100644 --- a/build.sh +++ b/build.sh @@ -134,7 +134,16 @@ build_graphengine() echo "execute command: cmake ${CMAKE_ARGS} .. failed." return 1 fi - make ${VERBOSE} -j${THREAD_NUM} && make install + COMMON_TARGET="ge_common engine fmk_parser parser_common _caffe_parser fmk_onnx_parser graph register " + TARGET=${COMMON_TARGET} + if [ "x${PLATFORM}" = "xtrain" ] + then + TARGET="ge_runner ge_local_engine ge_local_opskernel_builder host_cpu_engine host_cpu_opskernel_builder ${TARGET}" + elif [ "x${PLATFORM}" = "xinference" ] + TARGET="ge_compiler atc_ge_local_engine atc_ge_local_opskernel_builder atc_host_cpu_engine atc_host_cpu_opskernel_builder atc opensrc_ascendcl ${TARGET}" + fi + + make ${VERBOSE} -j${THREAD_NUM} ${TARGET} && make install if [ $? -ne 0 ] then echo "execute command: make ${VERBOSE} -j${THREAD_NUM} && make install failed."