|
|
|
@ -16,8 +16,11 @@ endif()
|
|
|
|
|
|
|
|
|
|
if(DEFINED ENV{D_PKG_SERVER})
|
|
|
|
|
set(GE_PB_PKG $ENV{D_PKG_SERVER})
|
|
|
|
|
message("Download packages from PKG server")
|
|
|
|
|
endif()
|
|
|
|
|
message("Download packages from DPKG server")
|
|
|
|
|
elseif(DEFINED ENV{MSLIBS_SERVER})
|
|
|
|
|
set(GE_PB_PKG "http://$ENV{MSLIBS_SERVER}:8081")
|
|
|
|
|
message("Download packages from MSPKG server")
|
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
|
|
set(ASCEND_DRIVER_DIR ${ASCEND_DIR}/driver/lib64)
|
|
|
|
|
set(ASCEND_DRIVER_COMMON_DIR ${ASCEND_DIR}/driver/lib64/common)
|
|
|
|
@ -37,7 +40,7 @@ set(ATLAS_MS_RUNTIME_PATH ${ATLAS_RUNTIME_DIR} ${ATLAS_ACL_DIR} ${ATLAS_ATC_DIR}
|
|
|
|
|
option(ENABLE_OPEN_SRC "Enable graphengine compile in opensource." FALSE)
|
|
|
|
|
|
|
|
|
|
if (ENABLE_OPEN_SRC)
|
|
|
|
|
set(HI_PYTHON python3.7)
|
|
|
|
|
set(HI_PYTHON python3)
|
|
|
|
|
|
|
|
|
|
include(cmake/external_libs/protobuf_shared.cmake)
|
|
|
|
|
include(cmake/external_libs/protobuf_static.cmake)
|
|
|
|
@ -71,7 +74,7 @@ if (ENABLE_OPEN_SRC)
|
|
|
|
|
set(STATIC_ACL_LIB ${GE_LIB_PATH})
|
|
|
|
|
find_module(slog libslog.so ${GE_LIB_PATH})
|
|
|
|
|
find_module(static_mmpa libmmpa.a ${GE_LIB_PATH})
|
|
|
|
|
find_module(msprof libmsprof.so ${GE_LIB_PATH})
|
|
|
|
|
find_module(msprofiler libmsprofiler.a ${GE_LIB_PATH})
|
|
|
|
|
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})
|
|
|
|
@ -80,20 +83,19 @@ if (ENABLE_OPEN_SRC)
|
|
|
|
|
find_module(error_manager liberror_manager.so ${GE_LIB_PATH})
|
|
|
|
|
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(msprofiler_fwk libmsprofiler_fwk.a ${GE_LIB_PATH})
|
|
|
|
|
#find_module(ascendcl_static libascendcl.a ${GE_LIB_PATH})
|
|
|
|
|
else()
|
|
|
|
|
find_module(slog libslog.so ${ASCEND_ATC_DIR} ${ASCEND_DRIVER_COMMON_DIR})
|
|
|
|
|
find_module(static_mmpa libmmpa.a ${ASCEND_ATC_DIR} ${ASCEND_RUNTIME_DIR})
|
|
|
|
|
find_module(error_manager liberror_manager.so ${ASCEND_ATC_DIR} ${ASCEND_RUNTIME_DIR})
|
|
|
|
|
if(PLATFORM STREQUAL "train")
|
|
|
|
|
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(msprofiler_fwk libmsprofiler_fwk.a ${ASCEND_RUNTIME_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")
|
|
|
|
@ -106,20 +108,17 @@ if (ENABLE_OPEN_SRC)
|
|
|
|
|
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(ascendcl_static libascendcl.a ${ASCEND_ACL_DIR})
|
|
|
|
|
if(PRODUCT STREQUAL "flr3")
|
|
|
|
|
find_module(msprof libmsprof.so ${ASCEND_DRIVER_SHARE_DIR})
|
|
|
|
|
elseif(PRODUCT STREQUAL "flr1")
|
|
|
|
|
find_module(ascend_hal_stub libascend_hal.so ${ASCEND_DRIVER_DIR}/driver)
|
|
|
|
|
find_module(msprof libmsprof.so ${ASCEND_DRIVER_COMMON_DIR})
|
|
|
|
|
elseif(PRODUCT STREQUAL "flr2")
|
|
|
|
|
# flr2 ascend_hal_stub limsprof ?
|
|
|
|
|
else()
|
|
|
|
|
find_module(ascend_hal_stub libascend_hal.so ${ASCEND_DRIVER_DIR})
|
|
|
|
|
find_module(msprof libmsprof.so ${ASCEND_DRIVER_DIR})
|
|
|
|
|
endif()
|
|
|
|
|
elseif(PLATFORM STREQUAL "all")
|
|
|
|
|
find_module(msprof libmsprof.so ${ASCEND_DRIVER_COMMON_DIR})
|
|
|
|
|
find_module(msprofiler libmsprofiler.a ${ASCEND_DRIVER_COMMON_DIR})
|
|
|
|
|
find_module(hccl libhccl.so ${ASCEND_RUNTIME_DIR})
|
|
|
|
|
find_module(adump_server libadump_server.a ${ASCEND_ACL_DIR})
|
|
|
|
|
find_module(runtime libruntime.so ${ASCEND_ACL_DIR})
|
|
|
|
@ -127,14 +126,14 @@ if (ENABLE_OPEN_SRC)
|
|
|
|
|
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(msprofiler_fwk libmsprofiler_fwk.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})
|
|
|
|
|
else()
|
|
|
|
|
message(STATUS "PLATFORM param is invalid, should be train or inference, you choose nothing!")
|
|
|
|
|
message(STATUS "PLATFORM param is invalid, should be train or inference, you choose nothing!")
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
if (ENABLE_GE_COV OR ENABLE_GE_UT)
|
|
|
|
|
if (ENABLE_GE_COV OR ENABLE_GE_UT)
|
|
|
|
|
add_subdirectory(tests)
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|