!8965 Synchronize latest Ascend software suite 09 Dec 2020, with refactored GraphEngine
From: @nicholas_yhr Reviewed-by: Signed-off-by:pull/8965/MERGE
commit
63d5eb215f
@ -0,0 +1,39 @@
|
|||||||
|
message(STATUS "Compiling GraphEngine")
|
||||||
|
set(GE_SOURCE_DIR ${CMAKE_SOURCE_DIR}/graphengine)
|
||||||
|
|
||||||
|
message(STATUS "[ME] build_path: ${BUILD_PATH}")
|
||||||
|
|
||||||
|
function(find_submodule_lib module name path)
|
||||||
|
find_library(${module}_LIBRARY_DIR NAMES ${name} NAMES_PER_DIR PATHS ${path}
|
||||||
|
PATH_SUFFIXES lib
|
||||||
|
)
|
||||||
|
if ("${${module}_LIBRARY_DIR}" STREQUAL "${module}_LIBRARY_DIR-NOTFOUND")
|
||||||
|
message(FATAL_ERROR "${name} not found in any of following paths: ${path}")
|
||||||
|
endif()
|
||||||
|
add_library(${module} SHARED IMPORTED)
|
||||||
|
set_target_properties(${module} PROPERTIES
|
||||||
|
IMPORTED_LOCATION ${${module}_LIBRARY_DIR}
|
||||||
|
)
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
if (ENABLE_D OR ENABLE_ACL OR ENABLE_TESTCASES)
|
||||||
|
set(_ge_tmp_CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
|
||||||
|
set(_ge_tmp_ENABLE_GITEE ${ENABLE_GITEE})
|
||||||
|
set(ENABLE_GITEE ON)
|
||||||
|
set(CMAKE_INSTALL_PREFIX ${BUILD_PATH}/graphengine)
|
||||||
|
|
||||||
|
if (ENABLE_TESTCASES)
|
||||||
|
# use slog, error manager, mmpa in non ascend mode, e.g. tests
|
||||||
|
set(GE_PREBUILD_PATH ${GE_SOURCE_DIR}/third_party/prebuild/${CMAKE_HOST_SYSTEM_PROCESSOR})
|
||||||
|
set(ENABLE_MS_TESTCASES TRUE)
|
||||||
|
find_submodule_lib(slog libslog.so ${GE_PREBUILD_PATH})
|
||||||
|
find_submodule_lib(error_manager liberror_manager.so ${GE_PREBUILD_PATH})
|
||||||
|
find_submodule_lib(static_mmpa libmmpa.a ${GE_PREBUILD_PATH})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_subdirectory(${GE_SOURCE_DIR})
|
||||||
|
set(CMAKE_INSTALL_PREFIX ${_ge_tmp_CMAKE_INSTALL_PREFIX})
|
||||||
|
set(ENABLE_GITEE ${_ge_tmp_ENABLE_GITEE})
|
||||||
|
else()
|
||||||
|
message(FATAL_ERROR "No compile option defined for GraphEngine, exiting")
|
||||||
|
endif()
|
@ -1 +1 @@
|
|||||||
Subproject commit ce23341ee2c7e48b39f227b293d1aa7f54effd34
|
Subproject commit 20a0326976db65ca01f43ae4ccdd85677faaeb5e
|
Loading…
Reference in new issue