From 94c1cbb2dd7ea51fecc8eecf3bda8ea4b25f3f41 Mon Sep 17 00:00:00 2001 From: taoxiangdong Date: Thu, 22 Oct 2020 09:09:01 +0800 Subject: [PATCH 1/4] 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}" } From aaa88576cff52e2a816ba8a67e4128c9c74acacb Mon Sep 17 00:00:00 2001 From: taoxiangdong Date: Thu, 22 Oct 2020 09:14:07 +0800 Subject: [PATCH 2/4] update build.sh --- build.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build.sh b/build.sh index e16f3fe2..60ca950c 100644 --- a/build.sh +++ b/build.sh @@ -142,6 +142,10 @@ build_graphengine() elif [ "x${PLATFORM}" = "xinference" ] then 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}" + elif [ "x${PLATFORM}" = "xall" ] + then + # build all the target + TARGET="" fi make ${VERBOSE} ${TARGET} -j${THREAD_NUM} && make install From c60e9e3ed78512e4ce5499f58cc91a15369b89c7 Mon Sep 17 00:00:00 2001 From: taoxiangdong Date: Thu, 22 Oct 2020 09:18:53 +0800 Subject: [PATCH 3/4] update cmake --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ac30b4b8..66b7b992 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -94,7 +94,7 @@ if (ENABLE_OPEN_SRC) 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}) // 驱动包 + find_module(msprof libmsprof.so ${ASCEND_ATC_DIR}) endif() elseif(PLATFORM STREQUAL "all") find_module(slog libslog.so ${ASCEND_DRIVER_DIR}) From c112c01955a7227bc6590e77eac113a6cdb5028c Mon Sep 17 00:00:00 2001 From: taoxiangdong Date: Thu, 22 Oct 2020 09:36:04 +0800 Subject: [PATCH 4/4] update cmakelist --- CMakeLists.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 66b7b992..f8d419bc 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -66,30 +66,30 @@ if (ENABLE_OPEN_SRC) set(ASCEND_ATC_DIR ${ASCEND_DIR}/atc/lib64) set(ASCEND_ACL_DIR ${ASCEND_DIR}/acllib/lib64) if(PLATFORM STREQUAL "train") - 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(slog libslog.so ${ASCEND_ATC_DIR}) + find_module(mmpa libmmpa.so ${ASCEND_ATC_DIR}) + find_module(msprof libmsprof.so ${ASCEND_DRIVER_COMMON_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(resource libresource.so ${ASCEND_RUNTIME_DIR}) find_module(error_manager liberror_manager.so ${ASCEND_RUNTIME_DIR}) find_module(msprofiler libmsprofiler.a ${ASCEND_RUNTIME_DIR}) - find_module(ascend_hal_stub libascend_hal.so ${ASCEND_DRIVER_DIR}) + find_module(ascend_hal_stub libascend_hal.so ${ASCEND_DRIVER_DIR}/driver) if(PRODUCT STREQUAL "flr3") message(FATAL_ERROR "This platform is not supported in train mode, build terminated") endif() elseif(PLATFORM STREQUAL "inference") + find_module(slog libslog.so ${ASCEND_ATC_DIR}) + find_module(mmpa libmmpa.so ${ASCEND_ATC_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}) - find_module(resource libresource.so ${ASCEND_ACL_DIR}) - find_module(error_manager liberror_manager.so ${ASCEND_ACL_DIR}) + find_module(resource libresource.so ${ASCEND_ATC_DIR}) + find_module(error_manager liberror_manager.so ${ASCEND_ATC_DIR}) 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})