Skip to content

Commit

Permalink
Set minimum CUDA version to 7.5 and fix threading issue of dnn_cuda
Browse files Browse the repository at this point in the history
… library
  • Loading branch information
stwunsch authored and lmoneta committed Nov 4, 2016
1 parent 30eebd8 commit d52ad59
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmake/modules/SearchInstalledSoftware.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1264,7 +1264,7 @@ endif()
#---Check for CUDA and BLAS ---------------------------------------------------------
if(tmva AND cuda)
message(STATUS "Looking for CUDA for optional parts of TMVA")
find_package(CUDA QUIET)
find_package(CUDA 7.5)
if(NOT CUDA_FOUND)
if(fail-on-missing)
message(FATAL_ERROR "CUDA not found. Ensure that the installation of CUDA is in the CMAKE_PREFIX_PATH")
Expand Down
5 changes: 3 additions & 2 deletions tmva/tmva/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# CMakeLists.txt file for building ROOT tmva package
# @author Pere Mato, CERN
############################################################################
#---The following is needed because client codes of TMVA (in ROOT itself) assumes to find header files under /TVMA
#---The following is needed because client codes of TMVA (in ROOT itself) assumes to find header files under /TMVA
#execute_process(COMMAND cmake -E create_symlink ${CMAKE_CURRENT_SOURCE_DIR}/inc ${CMAKE_CURRENT_SOURCE_DIR}/inc/TMVA)

if(NOT CMAKE_PROJECT_NAME STREQUAL ROOT)
Expand Down Expand Up @@ -45,6 +45,7 @@ foreach(hs headers1 headers2 headers3 headers4 headers5)
endforeach()
endforeach()

#---Assign source files to the implementations -----------------
SET(DNN_FILES src/DNN/Architectures/Reference.cxx)
SET(DNN_CUDA_FILES src/DNN/Architectures/Cuda.cu
src/DNN/Architectures/Cuda/CudaBuffers.cxx
Expand All @@ -55,10 +56,10 @@ SET(DNN_CPU_FILES src/DNN/Architectures/Cpu.cxx

#---Handle CUDA dependent code. -----------------
if(CUDA_FOUND)
CUDA_INCLUDE_DIRECTORIES(${ROOT_INCLUDE_DIRS})
CUDA_ADD_LIBRARY(dnn_cuda ${DNN_CUDA_FILES})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DDNNCUDA")
set(DNN_CUDA_LIBRARIES dnn_cuda ${CUDA_CUBLAS_LIBRARIES})
add_dependencies(dnn_cuda move_headers)
else()
set(DNN_CUDA_LIBRARIES)
endif()
Expand Down

0 comments on commit d52ad59

Please sign in to comment.