-
Notifications
You must be signed in to change notification settings - Fork 156
/
CMakeLists.txt
25 lines (19 loc) · 890 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
CMAKE_MINIMUM_REQUIRED(VERSION 2.6 FATAL_ERROR)
CMAKE_POLICY(VERSION 2.6)
SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
IF(LUAROCKS_PREFIX)
MESSAGE(STATUS "Installing CuDNN through Luarocks")
STRING(REGEX REPLACE "(.*)lib/luarocks/rocks.*" "\\1" CMAKE_INSTALL_PREFIX "${LUAROCKS_PREFIX}")
MESSAGE(STATUS "Prefix inferred from Luarocks: ${CMAKE_INSTALL_PREFIX}")
ENDIF()
FIND_PACKAGE(Torch REQUIRED)
FIND_PACKAGE(CUDA 7.0 REQUIRED)
FIND_PACKAGE(CUDNN 5 EXACT QUIET)
IF(NOT CUDNN_FOUND)
# CUDNN_INSTALL(5.1 "${Torch_INSTALL_LIB}" "${Torch_INSTALL_INCLUDE}" "${Torch_INSTALL_BIN}")
# FIND_PACKAGE(CUDNN 5 EXACT REQUIRED)
MESSAGE(STATUS "CuDNN 5.1 not found at install-time. Please make sure it's in LD_LIBRARY_PATH at runtime")
ENDIF()
FILE(GLOB luasrc *.lua)
SET(src "")
ADD_TORCH_PACKAGE(cudnn "${src}" "${luasrc}" "NVIDIA CuDNN Bindings")