| @@ -1,8 +1,7 @@ | |||||
| message(STATUS "ENABLE_GE set to FALSE, compiling GraphEngine") | |||||
| message(STATUS "compiling GraphEngine") | |||||
| set(GE_SOURCE_DIR ${CMAKE_SOURCE_DIR}/graphengine) | set(GE_SOURCE_DIR ${CMAKE_SOURCE_DIR}/graphengine) | ||||
| message(STATUS "ge dir: ${GE_SOURCE_DIR}") | message(STATUS "ge dir: ${GE_SOURCE_DIR}") | ||||
| # download json headers, rather than whole repository | |||||
| include(${GE_SOURCE_DIR}/cmake/ge_utils.cmake) | include(${GE_SOURCE_DIR}/cmake/ge_utils.cmake) | ||||
| include(${GE_SOURCE_DIR}/cmake/external_libs/json.cmake) | include(${GE_SOURCE_DIR}/cmake/external_libs/json.cmake) | ||||
| include(${GE_SOURCE_DIR}/cmake/external_libs/eigen.cmake) | include(${GE_SOURCE_DIR}/cmake/external_libs/eigen.cmake) | ||||
| @@ -11,7 +10,7 @@ include(${GE_SOURCE_DIR}/cmake/external_libs/protobuf.cmake) | |||||
| include(${GE_SOURCE_DIR}/cmake/external_libs/onnx.cmake) | include(${GE_SOURCE_DIR}/cmake/external_libs/onnx.cmake) | ||||
| include(${GE_SOURCE_DIR}/cmake/external_libs/securec.cmake) | include(${GE_SOURCE_DIR}/cmake/external_libs/securec.cmake) | ||||
| # for CPU/GPU mode, find slog from local prebuild | |||||
| # for UT, find slog and error_manager from local prebuild | |||||
| if (NOT ENABLE_D) | if (NOT ENABLE_D) | ||||
| set(GE_PREBUILD_PATH ${GE_SOURCE_DIR}/third_party/prebuild/${CMAKE_HOST_SYSTEM_PROCESSOR}) | set(GE_PREBUILD_PATH ${GE_SOURCE_DIR}/third_party/prebuild/${CMAKE_HOST_SYSTEM_PROCESSOR}) | ||||
| find_library(slog libslog.so ${GE_PREBUILD_PATH}) | find_library(slog libslog.so ${GE_PREBUILD_PATH}) | ||||
| @@ -183,16 +183,13 @@ if (NOT ENABLE_GE) | |||||
| set(ASCEND_PATH /usr/local/Ascend) | set(ASCEND_PATH /usr/local/Ascend) | ||||
| endif () | endif () | ||||
| set(ASCEND_DRIVER_PATH ${ASCEND_PATH}/driver/lib64/common) | set(ASCEND_DRIVER_PATH ${ASCEND_PATH}/driver/lib64/common) | ||||
| set(ASCEND_FWK_PATH ${ASCEND_PATH}/fwkacllib/lib64) | |||||
| install( | install( | ||||
| FILES | FILES | ||||
| ${CMAKE_BINARY_DIR}/graphengine/src/common/graph/libgraph.so | ${CMAKE_BINARY_DIR}/graphengine/src/common/graph/libgraph.so | ||||
| ${CMAKE_BINARY_DIR}/graphengine/src/ge/common/libge_common.so | ${CMAKE_BINARY_DIR}/graphengine/src/ge/common/libge_common.so | ||||
| ${CMAKE_BINARY_DIR}/graphengine/src/ge/ge_runtime/libge_runtime.so | ${CMAKE_BINARY_DIR}/graphengine/src/ge/ge_runtime/libge_runtime.so | ||||
| ${ASCEND_DRIVER_PATH}/libslog.so | |||||
| ${ASCEND_DRIVER_PATH}/libc_sec.so | |||||
| ${ASCEND_FWK_PATH}/liberror_manager.so | |||||
| ${CMAKE_SOURCE_DIR}/build/graphengine/libc_sec.so | |||||
| DESTINATION ${INSTALL_LIB_DIR} | DESTINATION ${INSTALL_LIB_DIR} | ||||
| COMPONENT mindspore | COMPONENT mindspore | ||||
| ) | ) | ||||
| @@ -200,8 +197,6 @@ if (NOT ENABLE_GE) | |||||
| install( | install( | ||||
| FILES | FILES | ||||
| ${CMAKE_BINARY_DIR}/graphengine/src/common/graph/libgraph.so | ${CMAKE_BINARY_DIR}/graphengine/src/common/graph/libgraph.so | ||||
| ${CMAKE_SOURCE_DIR}/graphengine/third_party/prebuild/${CMAKE_HOST_SYSTEM_PROCESSOR}/libslog.so | |||||
| ${CMAKE_SOURCE_DIR}/graphengine/third_party/prebuild/${CMAKE_HOST_SYSTEM_PROCESSOR}/liberror_manager.so | |||||
| ${CMAKE_SOURCE_DIR}/build/graphengine/libc_sec.so | ${CMAKE_SOURCE_DIR}/build/graphengine/libc_sec.so | ||||
| ${LIBEVENT_LIB_LIST} | ${LIBEVENT_LIB_LIST} | ||||
| DESTINATION ${INSTALL_LIB_DIR} | DESTINATION ${INSTALL_LIB_DIR} | ||||
| @@ -1,10 +1,10 @@ | |||||
| SET(CMAKE_BUILD_TYPE "Debug") | SET(CMAKE_BUILD_TYPE "Debug") | ||||
| if (CMAKE_SYSTEM_NAME MATCHES "Windows") | if (CMAKE_SYSTEM_NAME MATCHES "Windows") | ||||
| SET(CMAKE_C_FLAGS_DEBUG "$ENV{CFLAGS} -fPIC -O0 -Wall -Wno-deprecated-declarations -g2 -ggdb -fno-inline-functions -fno-omit-frame-pointer") | |||||
| SET(CMAKE_C_FLAGS_DEBUG "$ENV{CFLAGS} -fPIC -O0 -Wall -Wno-deprecated-declarations -g2 -ggdb -fno-inline-functions -fno-omit-frame-pointer -fstack-protector-all") | |||||
| else() | else() | ||||
| SET(CMAKE_C_FLAGS_DEBUG "$ENV{CFLAGS} -fPIC -O0 -Wall -Wno-deprecated-declarations -g2 -ggdb -fno-inline-functions -fno-omit-frame-pointer -D_LIBCPP_INLINE_VISIBILITY='' -D'_LIBCPP_EXTERN_TEMPLATE(...)='") | |||||
| SET(CMAKE_C_FLAGS_DEBUG "$ENV{CFLAGS} -fPIC -O0 -Wall -Wno-deprecated-declarations -g2 -ggdb -fno-inline-functions -fno-omit-frame-pointer -fstack-protector-all -D_LIBCPP_INLINE_VISIBILITY='' -D'_LIBCPP_EXTERN_TEMPLATE(...)='") | |||||
| endif() | endif() | ||||
| SET(CMAKE_C_FLAGS_RELEASE "$ENV{CFLAGS} -fPIC -O3 -Wall -Wno-deprecated-declarations") | |||||
| SET(CMAKE_C_FLAGS_RELEASE "$ENV{CFLAGS} -fPIC -O3 -Wall -Wno-deprecated-declarations -fstack-protector-all") | |||||
| set(CMAKE_EXPORT_COMPILE_COMMANDS ON) | set(CMAKE_EXPORT_COMPILE_COMMANDS ON) | ||||
| #add flags | #add flags | ||||