From 4fb6ab3c1cc21de40aefbd2fc2bf3954848f296f Mon Sep 17 00:00:00 2001 From: wqtshg Date: Wed, 14 Jul 2021 16:29:31 +0800 Subject: [PATCH 01/12] delete compiling macros --- CMakeLists.txt | 3 --- ge/CMakeLists.txt | 3 +-- ge/offline/CMakeLists.txt | 3 +-- ge/opskernel_manager/ops_kernel_builder_manager.cc | 10 ---------- metadef | 2 +- 5 files changed, 3 insertions(+), 18 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ac0240d9..bcb7265a 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -88,7 +88,6 @@ else () find_module(hccl libhccl.so ${GE_LIB_PATH}) find_module(adump_server libadump_server.a ${GE_LIB_PATH}) find_module(runtime libruntime.so ${GE_LIB_PATH}) - find_module(runtime_compile libruntime_compile.so ${GE_LIB_PATH}) find_module(resource libresource.so ${GE_LIB_PATH}) find_module(ascend_hal_stub libascend_hal.so ${GE_LIB_PATH}) find_module(msprofiler_fwk_ext libmsprofiler_fwk.a ${GE_LIB_PATH}) @@ -108,7 +107,6 @@ else () elseif(PLATFORM STREQUAL "inference") 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(msprofiler_ext libmsprofiler.a ${ASCEND_ACL_DIR}) if(PRODUCT STREQUAL "flr3") elseif(PRODUCT STREQUAL "flr1") @@ -123,7 +121,6 @@ else () find_module(runtime libruntime.so ${ASCEND_RUNTIME_DIR}) find_module(msprofiler_fwk_ext libmsprofiler_fwk.a ${ASCEND_RUNTIME_DIR}) find_module(ascend_hal_stub libascend_hal.so ${ASCEND_DRIVER_DIR}) - find_module(runtime_compile libruntime_compile.so ${ASCEND_ATC_DIR}) find_module(msprofiler_ext libmsprofiler.a ${ASCEND_ACL_DIR}) else() message(STATUS "PLATFORM param is invalid, should be train or inference, you choose nothing!") diff --git a/ge/CMakeLists.txt b/ge/CMakeLists.txt index d1a0da0f..c5a7619c 100755 --- a/ge/CMakeLists.txt +++ b/ge/CMakeLists.txt @@ -684,8 +684,7 @@ target_link_libraries(ge_compiler PRIVATE c_sec error_manager slog - $<$>:$> - $<$:$> + runtime opt_feature -Wl,--as-needed json diff --git a/ge/offline/CMakeLists.txt b/ge/offline/CMakeLists.txt index e11e4a03..f8104a75 100644 --- a/ge/offline/CMakeLists.txt +++ b/ge/offline/CMakeLists.txt @@ -62,8 +62,7 @@ target_link_libraries(atc_atc.bin PRIVATE parser_common gflags json - $<$>:$> - $<$:$> + runtime slog static_mmpa -lrt diff --git a/ge/opskernel_manager/ops_kernel_builder_manager.cc b/ge/opskernel_manager/ops_kernel_builder_manager.cc index 9f981302..ff603f38 100644 --- a/ge/opskernel_manager/ops_kernel_builder_manager.cc +++ b/ge/opskernel_manager/ops_kernel_builder_manager.cc @@ -20,15 +20,6 @@ namespace ge { namespace { -#ifdef ONLY_COMPILE_OPEN_SRC -const std::vector kBasicBuilderLibs = { - "libge_local_opskernel_builder.so", - "libhost_cpu_opskernel_builder.so", - "librts_kernel_builder.so", - "libaicpu_ascend_builder.so", - "libaicpu_tf_builder.so" -}; -#else const std::vector kBasicBuilderLibs = { "libge_local_opskernel_builder.so", "libhost_cpu_opskernel_builder.so", @@ -36,7 +27,6 @@ const std::vector kBasicBuilderLibs = { "libaicpu_ascend_engine.so", "libaicpu_tf_engine.so" }; -#endif const std::vector kHcclBuilderLibs = { "libhcom_opskernel_builder.so", diff --git a/metadef b/metadef index 5a9605f6..a725349b 160000 --- a/metadef +++ b/metadef @@ -1 +1 @@ -Subproject commit 5a9605f6cb1204a729a51fe36bc614cf1d94a496 +Subproject commit a725349b65aef2940555af2ddb7b9461fbe0d5fd From d783c46f6153c3898dc9780132b0625c61ff7507 Mon Sep 17 00:00:00 2001 From: wqtshg Date: Wed, 14 Jul 2021 18:09:06 +0800 Subject: [PATCH 02/12] delete compiling macros --- ge/CMakeLists.txt | 1 - ge/offline/CMakeLists.txt | 1 - 2 files changed, 2 deletions(-) diff --git a/ge/CMakeLists.txt b/ge/CMakeLists.txt index c5a7619c..d9ef5eef 100755 --- a/ge/CMakeLists.txt +++ b/ge/CMakeLists.txt @@ -622,7 +622,6 @@ target_compile_definitions(ge_compiler PRIVATE REUSE_MEMORY=1 FMK_SUPPORT_DUMP FMK_HOST_INFER - COMPILE_OMG_PACKAGE google=ascend_private FUNC_VISIBILITY $<$:ONLY_COMPILE_OPEN_SRC> diff --git a/ge/offline/CMakeLists.txt b/ge/offline/CMakeLists.txt index f8104a75..093027db 100644 --- a/ge/offline/CMakeLists.txt +++ b/ge/offline/CMakeLists.txt @@ -22,7 +22,6 @@ target_compile_options(atc_atc.bin PRIVATE target_compile_definitions(atc_atc.bin PRIVATE PROTOBUF_INLINE_NOT_IN_HEADERS=0 - COMPILE_OMG_PACKAGE google=ascend_private LOG_CPP FUNC_VISIBILITY From 3ad2a5e1700b64c64c00194c7042808e8f196e55 Mon Sep 17 00:00:00 2001 From: wqtshg Date: Wed, 14 Jul 2021 18:32:49 +0800 Subject: [PATCH 03/12] delete compiling macros --- ge/offline/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/ge/offline/CMakeLists.txt b/ge/offline/CMakeLists.txt index 093027db..85033743 100644 --- a/ge/offline/CMakeLists.txt +++ b/ge/offline/CMakeLists.txt @@ -90,7 +90,6 @@ target_compile_options(fwk_atc.bin PRIVATE target_compile_definitions(fwk_atc.bin PRIVATE PROTOBUF_INLINE_NOT_IN_HEADERS=0 - COMPILE_OMG_PACKAGE google=ascend_private LOG_CPP FUNC_VISIBILITY From c52e68a43ab8903899f75b64600e77c9b8a9165f Mon Sep 17 00:00:00 2001 From: wqtshg Date: Wed, 14 Jul 2021 19:34:27 +0800 Subject: [PATCH 04/12] delete compiling macros --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bcb7265a..92652a18 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,6 +29,7 @@ set(ASCEND_RUNTIME_DIR ${ASCEND_DIR}/fwkacllib/lib64) set(ASCEND_ATC_DIR ${ASCEND_DIR}/atc/lib64) set(ASCEND_ACL_DIR ${ASCEND_DIR}/acllib/lib64) set(STATIC_ACL_LIB ${ASCEND_ACL_DIR}) +set(ASCEND_RUNTIME_PATH ${ASCEND_RUNTIME_DIR} ${ASCEND_ACL_DIR} ${ASCEND_ATC_DIR}) set(ASCEND_MS_RUNTIME_PATH ${ASCEND_RUNTIME_DIR} ${ASCEND_ACL_DIR} ${ASCEND_ATC_DIR}) set(ASCEND_MS_DRIVER_PATH ${ASCEND_DRIVER_DIR} ${ASCEND_DRIVER_COMMON_DIR}) @@ -118,7 +119,7 @@ else () endif() elseif(PLATFORM STREQUAL "all") find_module(adump_server libadump_server.a ${ASCEND_RUNTIME_DIR}) - find_module(runtime libruntime.so ${ASCEND_RUNTIME_DIR}) + find_module(runtime libruntime.so ${ASCEND_RUNTIME_PATH}) find_module(msprofiler_fwk_ext libmsprofiler_fwk.a ${ASCEND_RUNTIME_DIR}) find_module(ascend_hal_stub libascend_hal.so ${ASCEND_DRIVER_DIR}) find_module(msprofiler_ext libmsprofiler.a ${ASCEND_ACL_DIR}) From 933afed91e1ee44a5effa404c0339a73c1a73800 Mon Sep 17 00:00:00 2001 From: wqtshg Date: Wed, 14 Jul 2021 19:45:35 +0800 Subject: [PATCH 05/12] delete compiling macros --- CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 92652a18..d884792d 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,7 +29,6 @@ set(ASCEND_RUNTIME_DIR ${ASCEND_DIR}/fwkacllib/lib64) set(ASCEND_ATC_DIR ${ASCEND_DIR}/atc/lib64) set(ASCEND_ACL_DIR ${ASCEND_DIR}/acllib/lib64) set(STATIC_ACL_LIB ${ASCEND_ACL_DIR}) -set(ASCEND_RUNTIME_PATH ${ASCEND_RUNTIME_DIR} ${ASCEND_ACL_DIR} ${ASCEND_ATC_DIR}) set(ASCEND_MS_RUNTIME_PATH ${ASCEND_RUNTIME_DIR} ${ASCEND_ACL_DIR} ${ASCEND_ATC_DIR}) set(ASCEND_MS_DRIVER_PATH ${ASCEND_DRIVER_DIR} ${ASCEND_DRIVER_COMMON_DIR}) @@ -119,7 +118,7 @@ else () endif() elseif(PLATFORM STREQUAL "all") find_module(adump_server libadump_server.a ${ASCEND_RUNTIME_DIR}) - find_module(runtime libruntime.so ${ASCEND_RUNTIME_PATH}) + find_module(runtime libruntime.so ${ASCEND_ATC_DIR}) find_module(msprofiler_fwk_ext libmsprofiler_fwk.a ${ASCEND_RUNTIME_DIR}) find_module(ascend_hal_stub libascend_hal.so ${ASCEND_DRIVER_DIR}) find_module(msprofiler_ext libmsprofiler.a ${ASCEND_ACL_DIR}) From 5c3811e31bd39c689fc4a9e4c044898ac0c0473e Mon Sep 17 00:00:00 2001 From: wqtshg Date: Wed, 14 Jul 2021 20:58:25 +0800 Subject: [PATCH 06/12] delete compiling macros --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d884792d..7859772c 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -120,7 +120,7 @@ else () find_module(adump_server libadump_server.a ${ASCEND_RUNTIME_DIR}) find_module(runtime libruntime.so ${ASCEND_ATC_DIR}) find_module(msprofiler_fwk_ext libmsprofiler_fwk.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}/stub) find_module(msprofiler_ext libmsprofiler.a ${ASCEND_ACL_DIR}) else() message(STATUS "PLATFORM param is invalid, should be train or inference, you choose nothing!") From 6ce87ac262172abe4f9c76edd843dd22f2b25072 Mon Sep 17 00:00:00 2001 From: wqtshg Date: Wed, 14 Jul 2021 21:01:57 +0800 Subject: [PATCH 07/12] delete compiling macros --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7859772c..0abd01b7 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -120,7 +120,7 @@ else () find_module(adump_server libadump_server.a ${ASCEND_RUNTIME_DIR}) find_module(runtime libruntime.so ${ASCEND_ATC_DIR}) find_module(msprofiler_fwk_ext libmsprofiler_fwk.a ${ASCEND_RUNTIME_DIR}) - find_module(ascend_hal_stub libascend_hal.so ${ASCEND_DRIVER_DIR}/stub) + find_module(ascend_hal_stub libascend_hal.so ${ASCEND_ATC_DIR}/stub) find_module(msprofiler_ext libmsprofiler.a ${ASCEND_ACL_DIR}) else() message(STATUS "PLATFORM param is invalid, should be train or inference, you choose nothing!") From 2b377cf467e6979904355770e283150275e148b5 Mon Sep 17 00:00:00 2001 From: wqtshg Date: Thu, 15 Jul 2021 10:35:53 +0800 Subject: [PATCH 08/12] delete compiling macros --- ge/offline/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/ge/offline/CMakeLists.txt b/ge/offline/CMakeLists.txt index 85033743..71ee286b 100644 --- a/ge/offline/CMakeLists.txt +++ b/ge/offline/CMakeLists.txt @@ -49,6 +49,7 @@ target_link_options(atc_atc.bin PRIVATE -Wl,-Bsymbolic ) +link_directories(${ASCEND_ATC_DIR}/stub) target_link_libraries(atc_atc.bin PRIVATE $ ascend_protobuf From 5da150f9597853a8e8b106a3df5c2e6fe4d9fbbc Mon Sep 17 00:00:00 2001 From: wqtshg Date: Thu, 15 Jul 2021 11:18:22 +0800 Subject: [PATCH 09/12] delete compiling macros --- ge/offline/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ge/offline/CMakeLists.txt b/ge/offline/CMakeLists.txt index 71ee286b..b0f34a13 100644 --- a/ge/offline/CMakeLists.txt +++ b/ge/offline/CMakeLists.txt @@ -49,9 +49,9 @@ target_link_options(atc_atc.bin PRIVATE -Wl,-Bsymbolic ) -link_directories(${ASCEND_ATC_DIR}/stub) target_link_libraries(atc_atc.bin PRIVATE $ + -L${ASCEND_ATC_DIR}/stub ascend_protobuf ge_common register From 5e4f19d629f1f03ce5bd6e14db83e48d74d39389 Mon Sep 17 00:00:00 2001 From: wqtshg Date: Thu, 15 Jul 2021 11:38:13 +0800 Subject: [PATCH 10/12] delete compiling macros --- ge/offline/CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ge/offline/CMakeLists.txt b/ge/offline/CMakeLists.txt index b0f34a13..0b70bb56 100644 --- a/ge/offline/CMakeLists.txt +++ b/ge/offline/CMakeLists.txt @@ -46,12 +46,11 @@ target_include_directories(atc_atc.bin PRIVATE ) target_link_options(atc_atc.bin PRIVATE - -Wl,-Bsymbolic + -Wl,-Bsymbolic,-L${ASCEND_ATC_DIR}/stub ) target_link_libraries(atc_atc.bin PRIVATE $ - -L${ASCEND_ATC_DIR}/stub ascend_protobuf ge_common register From a4f4c79afd3daa71f27a2fdbd266166804b6da45 Mon Sep 17 00:00:00 2001 From: wqtshg Date: Thu, 15 Jul 2021 12:41:43 +0800 Subject: [PATCH 11/12] delete compiling macros --- ge/offline/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ge/offline/CMakeLists.txt b/ge/offline/CMakeLists.txt index 0b70bb56..183af0fc 100644 --- a/ge/offline/CMakeLists.txt +++ b/ge/offline/CMakeLists.txt @@ -46,7 +46,7 @@ target_include_directories(atc_atc.bin PRIVATE ) target_link_options(atc_atc.bin PRIVATE - -Wl,-Bsymbolic,-L${ASCEND_ATC_DIR}/stub + -Wl,-Bsymbolic ) target_link_libraries(atc_atc.bin PRIVATE @@ -62,6 +62,7 @@ target_link_libraries(atc_atc.bin PRIVATE gflags json runtime + ascend_hal_stub slog static_mmpa -lrt From 0ace916b318c6e34bc1b7ab113be062683afdc71 Mon Sep 17 00:00:00 2001 From: wqtshg Date: Thu, 15 Jul 2021 13:55:21 +0800 Subject: [PATCH 12/12] delete compiling macros --- ge/offline/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ge/offline/CMakeLists.txt b/ge/offline/CMakeLists.txt index 183af0fc..1652a22a 100644 --- a/ge/offline/CMakeLists.txt +++ b/ge/offline/CMakeLists.txt @@ -46,7 +46,7 @@ target_include_directories(atc_atc.bin PRIVATE ) target_link_options(atc_atc.bin PRIVATE - -Wl,-Bsymbolic + -Wl,-Bsymbolic,-rpath-link=${ASCEND_ATC_DIR}/stub ) target_link_libraries(atc_atc.bin PRIVATE