diff --git a/CMakeLists.txt b/CMakeLists.txt index baf05030..e67ecb1f 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,7 +56,7 @@ if (ENABLE_OPEN_SRC) set(GE_LIB_PATH ${GE_LIB_PATH}/${GE_SYS_ARCH}) set(STATIC_ACL_LIB ${GE_LIB_PATH}) find_module(slog libslog.so ${GE_LIB_PATH}) - find_module(mmpa libmmpa.so ${GE_LIB_PATH}) + find_module(mmpa libmmpa.a ${GE_LIB_PATH}) find_module(msprof libmsprof.so ${GE_LIB_PATH}) find_module(hccl libhccl.so ${GE_LIB_PATH}) find_module(adump_server libadump_server.a ${GE_LIB_PATH}) @@ -67,10 +67,10 @@ if (ENABLE_OPEN_SRC) find_module(ascend_hal_stub libascend_hal.so ${GE_LIB_PATH}) find_module(error_manager_static liberror_manager.a ${GE_LIB_PATH}) find_module(msprofiler libmsprofiler.a ${GE_LIB_PATH}) - #find_module(ascendcl_static libascendcl.a ${GE_LIB_PATH}) + #find_module(ascendcl_static libascendcl.a ${GE_LIB_PATH}) else() find_module(slog libslog.so ${ASCEND_ATC_DIR}) - find_module(mmpa libmmpa.so ${ASCEND_ATC_DIR}) + find_module(mmpa libmmpa.a ${ASCEND_ATC_DIR}) if(PLATFORM STREQUAL "train") find_module(msprof libmsprof.so ${ASCEND_DRIVER_COMMON_DIR}) find_module(hccl libhccl.so ${ASCEND_RUNTIME_DIR}) @@ -114,7 +114,7 @@ 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(ascend_hal_stub libascend_hal.so ${ASCEND_DRIVER_DIR}/driver) - #find_module(ascendcl_static libascendcl.a ${ASCEND_ACL_DIR}) + #find_module(ascendcl_static libascendcl.a ${ASCEND_ACL_DIR}) else() message(FATAL_ERROR "PLATFORM param is invalid, should be train or inference, build terminated") endif() diff --git a/ge/CMakeLists.txt b/ge/CMakeLists.txt index 6eba7bc4..c895e7ce 100755 --- a/ge/CMakeLists.txt +++ b/ge/CMakeLists.txt @@ -648,6 +648,7 @@ target_link_libraries(ge_runner ge_memory adump_server msprofiler + static_mmpa -Wl,--no-as-needed graph ge_common @@ -655,7 +656,6 @@ target_link_libraries(ge_runner register c_sec slog - mmpa msprof runtime resource @@ -712,6 +712,7 @@ target_include_directories(ge_compiler PRIVATE target_link_libraries(ge_compiler $ ge_memory + static_mmpa -Wl,--no-as-needed graph ge_common @@ -720,7 +721,6 @@ target_link_libraries(ge_compiler c_sec error_manager slog - mmpa runtime_compile resource -Wl,--as-needed @@ -770,6 +770,7 @@ target_link_libraries(opensrc_ascendcl PRIVATE ge_executor ge_common_static graph_static + static_mmpa ascend_protobuf_static register_static error_manager_static @@ -779,11 +780,11 @@ target_link_libraries(opensrc_ascendcl PRIVATE -Wl,--no-as-needed c_sec runtime - mmpa slog msprof ascend_hal_stub -Wl,--as-needed + -lrt -ldl json ) diff --git a/ge/common/CMakeLists.txt b/ge/common/CMakeLists.txt index 444f93a2..117b7f86 100755 --- a/ge/common/CMakeLists.txt +++ b/ge/common/CMakeLists.txt @@ -105,6 +105,7 @@ target_include_directories(ge_common PRIVATE target_link_libraries(ge_common PRIVATE $ + static_mmpa -Wl,--no-as-needed graph ascend_protobuf @@ -112,7 +113,6 @@ target_link_libraries(ge_common PRIVATE c_sec error_manager slog - mmpa -Wl,--as-needed json -lrt diff --git a/ge/common/ge_common.mk b/ge/common/ge_common.mk index 0e3fc972..3fffd203 100755 --- a/ge/common/ge_common.mk +++ b/ge/common/ge_common.mk @@ -110,11 +110,12 @@ LOCAL_SHARED_LIBRARIES := \ libascend_protobuf \ libc_sec \ libslog \ - libmmpa \ libgraph \ libregister \ liberror_manager \ +LOCAL_STATIC_LIBRARIES += libmmpa + LOCAL_LDFLAGS := -lrt -ldl include $(BUILD_HOST_SHARED_LIBRARY) @@ -152,11 +153,12 @@ LOCAL_SHARED_LIBRARIES := \ libascend_protobuf \ libc_sec \ libslog \ - libmmpa \ libgraph \ libregister \ liberror_manager \ +LOCAL_STATIC_LIBRARIES += libmmpa + ifeq ($(device_os),android) LOCAL_LDFLAGS += -ldl LOCAL_LDLIBS += -L$(PWD)/prebuilts/clang/linux-x86/aarch64/android-ndk-r21/sysroot/usr/lib/aarch64-linux-android/29 -llog diff --git a/ge/ge_inference.mk b/ge/ge_inference.mk index 3b1dba01..0987f148 100755 --- a/ge/ge_inference.mk +++ b/ge/ge_inference.mk @@ -387,12 +387,12 @@ LOCAL_SRC_FILES += $(BUILER_SRC_FILES) LOCAL_SRC_FILES += $(ANALYZER_SRC_FILES) LOCAL_STATIC_LIBRARIES := libge_memory \ + libmmpa \ LOCAL_SHARED_LIBRARIES := \ libc_sec \ libascend_protobuf \ libslog \ - libmmpa \ libgraph \ libregister \ libge_common \ @@ -451,12 +451,12 @@ LOCAL_C_INCLUDES := $(DEVICE_LOCAL_C_INCLUDES) LOCAL_C_INCLUDES += $(ANALYZER_LOCAL_INCLUDES) LOCAL_STATIC_LIBRARIES := libge_memory \ + libmmpa \ LOCAL_SHARED_LIBRARIES := \ libc_sec \ libascend_protobuf \ libslog \ - libmmpa \ libgraph \ libregister \ libresource \ diff --git a/ge/ge_runner.mk b/ge/ge_runner.mk index c9be823f..a2679ed1 100644 --- a/ge/ge_runner.mk +++ b/ge/ge_runner.mk @@ -372,12 +372,12 @@ LOCAL_SRC_FILES += $(LIBCLIENT_LOCAL_SRC_FILES) LOCAL_STATIC_LIBRARIES := libge_memory \ libadump_server \ libmsprofiler \ + libmmpa \ LOCAL_SHARED_LIBRARIES := \ libc_sec \ libascend_protobuf \ libslog \ - libmmpa \ libgraph \ libregister \ libge_common \