From 94c1cbb2dd7ea51fecc8eecf3bda8ea4b25f3f41 Mon Sep 17 00:00:00 2001 From: taoxiangdong Date: Thu, 22 Oct 2020 09:09:01 +0800 Subject: [PATCH] update build.sh --- CMakeLists.txt | 24 ++++++++++++++++++++---- build.sh | 6 ++++-- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a77cef4e..ac30b4b8 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -80,9 +80,6 @@ if (ENABLE_OPEN_SRC) message(FATAL_ERROR "This platform is not supported in train mode, build terminated") endif() 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}) find_module(adump_server libadump_server.a ${ASCEND_ACL_DIR}) find_module(runtime libruntime.so ${ASCEND_ACL_DIR}) find_module(runtime_compile libruntime_compile.so ${ASCEND_ATC_DIR}) @@ -91,11 +88,30 @@ if (ENABLE_OPEN_SRC) find_module(error_manager_static liberror_manager.a ${ASCEND_ACL_DIR}) find_module(msprofiler libmsprofiler.a ${ASCEND_ACL_DIR}) find_module(ascendcl_static libascendcl.a ${ASCEND_ACL_DIR}) + find_module(slog libslog.so ${ASCEND_ATC_DIR}) + find_module(mmpa libmmpa.so ${ASCEND_ATC_DIR}) if(NOT PRODUCT STREQUAL "flr3") find_module(ascend_hal_stub libascend_hal.so ${ASCEND_DRIVER_DIR}) + find_module(msprof libmsprof.so ${ASCEND_DRIVER_DIR}) + else() + find_module(msprof libmsprof.so ${ASCEND_ATC_DIR}) // 驱动包 endif() + elseif(PLATFORM STREQUAL "all") + find_module(slog libslog.so ${ASCEND_DRIVER_DIR}) + find_module(mmpa libmmpa.so ${ASCEND_DRIVER_DIR}) + find_module(msprof libmsprof.so ${ASCEND_DRIVER_DIR}) + find_module(hccl libhccl.so ${ASCEND_RUNTIME_DIR}) + find_module(adump_server libadump_server.a ${ASCEND_RUNTIME_DIR}) + find_module(runtime libruntime.so ${ASCEND_RUNTIME_DIR}) + find_module(runtime_compile libruntime_compile.so ${ASCEND_ATC_DIR}) + find_module(resource libresource.so ${ASCEND_RUNTIME_DIR}) + find_module(error_manager liberror_manager.so ${ASCEND_RUNTIME_DIR}) + find_module(error_manager_static liberror_manager.a ${ASCEND_ACL_DIR}) + find_module(msprofiler libmsprofiler.a ${ASCEND_RUNTIME_DIR}) + find_module(ascend_hal_stub libascend_hal.so ${ASCEND_DRIVER_DIR}) + find_module(ascendcl_static libascendcl.a ${ASCEND_ACL_DIR}) else() - message(FATAL_ERROR "Mode param is invalid, should be train or inference, build terminated") + message(FATAL_ERROR "PLATFORM param is invalid, should be train or inference, build terminated") endif() endif() diff --git a/build.sh b/build.sh index fa123352..e16f3fe2 100644 --- a/build.sh +++ b/build.sh @@ -208,9 +208,11 @@ generate_package() GRAPHENGINE_LIB_PATH="lib" - find output/ -name graphengine_lib.tar -exec rm {} \; - cd "${OUTPUT_PATH}" + + find ./ -name graphengine_lib.tar -exec rm {} \; + + find ./bin -name atc -exec cp {} "${OUTPUT_PATH}/${GRAPHENGINE_LIB_PATH}" \; tar -cf graphengine_lib.tar "${GRAPHENGINE_LIB_PATH}" }