Unverified Commit e87b4936 authored by Robert Kimball's avatar Robert Kimball Committed by GitHub

working (#423)

parent ea29c6e3
......@@ -78,9 +78,6 @@ set(NGRAPH_INSTALL_DOC "${CMAKE_INSTALL_PREFIX}/doc")
# Compiler-specific logic...
#-----------------------------------------------------------------------------------------------
# Default values...
set(NGRAPH_CXX_WARNING_FLAGS "")
# Compiler-specific logic...
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "^(Apple)?Clang$")
message( STATUS "Setting clang flags...")
......@@ -107,10 +104,12 @@ endif()
# GPU support
#-----------------------------------------------------------------------------------------------
# Setup CUDA and cuDNN if NGRAPH_GPU_ENABLE=TRUE
if(NGRAPH_GPU_ENABLE)
find_package(CUDA 8 REQUIRED)
find_package(CUDA 8 QUIET)
if(CUDA_FOUND AND (NOT DEFINED NGRAPH_GPU_ENABLE OR NGRAPH_GPU_ENABLE))
message(STATUS "GPU Backend Enabled")
set(NGRAPH_GPU_ENABLE TRUE)
find_package(CUDNN 5 QUIET REQUIRED)
include_directories(${CUDA_INCLUDE_DIRS} ${CUDNN_INCLUDE_DIR} ${LLVM_INCLUDE_DIR})
include_directories(SYSTEM ${CUDA_INCLUDE_DIRS} ${CUDNN_INCLUDE_DIR} ${LLVM_INCLUDE_DIR})
if (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND
NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 6.0 AND
CUDA_HOST_COMPILER STREQUAL CMAKE_C_COMPILER)
......@@ -119,6 +118,8 @@ if(NGRAPH_GPU_ENABLE)
"Please select a correct compiler version\n"
)
endif()
elseif(NGRAPH_GPU_ENABLE)
message(FATAL_ERROR "GPU was required but CUDA library was not found")
endif()
#-----------------------------------------------------------------------------------------------
......
......@@ -128,14 +128,8 @@ if(NGRAPH_ADDRESS_SANITIZER)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -fsanitize=address -fno-omit-frame-pointer")
endif()
include_directories(
"${NGRAPH_INCLUDE_PATH}"
)
include_directories(
SYSTEM
"${EIGEN_INCLUDE_DIR}"
)
include_directories("${NGRAPH_INCLUDE_PATH}")
include_directories(SYSTEM "${EIGEN_INCLUDE_DIR}")
if (NGRAPH_CPU_ENABLE AND LLVM_INCLUDE_DIR AND
MKLDNN_INCLUDE_DIR)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment