diff --git a/ports/cuda/CONTROL b/ports/cuda/CONTROL index 8b0c0a671c..d9719ab409 100644 --- a/ports/cuda/CONTROL +++ b/ports/cuda/CONTROL @@ -1,5 +1,5 @@ Source: cuda Version: 10.1 -Port-Version: 5 +Port-Version: 7 Description: A parallel computing platform and programming model Homepage: https://developer.nvidia.com/cuda-toolkit diff --git a/ports/cuda/portfile.cmake b/ports/cuda/portfile.cmake index ecdce4cfb0..a4b202cd9b 100644 --- a/ports/cuda/portfile.cmake +++ b/ports/cuda/portfile.cmake @@ -8,6 +8,6 @@ include(${CMAKE_CURRENT_LIST_DIR}/vcpkg_find_cuda.cmake) vcpkg_find_cuda(OUT_CUDA_TOOLKIT_ROOT CUDA_TOOLKIT_ROOT) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg_find_cuda.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/vcpkg_find_cuda) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg_find_cuda.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/ports/cuda/vcpkg_find_cuda.cmake b/ports/cuda/vcpkg_find_cuda.cmake index f04d509836..64b7585404 100644 --- a/ports/cuda/vcpkg_find_cuda.cmake +++ b/ports/cuda/vcpkg_find_cuda.cmake @@ -1,5 +1,5 @@ function(vcpkg_find_cuda) - cmake_parse_arguments(PARSE_ARGV 0 vfc "" "OUT_CUDA_TOOLKIT_ROOT" "") + cmake_parse_arguments(PARSE_ARGV 0 vfc "" "OUT_CUDA_TOOLKIT_ROOT;OUT_CUDA_VERSION" "") if(NOT vfc_OUT_CUDA_TOOLKIT_ROOT) message(FATAL_ERROR "vcpkg_find_cuda() requres an OUT_CUDA_TOOLKIT_ROOT argument") @@ -7,13 +7,11 @@ function(vcpkg_find_cuda) set(CUDA_REQUIRED_VERSION "10.1.0") - set(CUDA_PATHS + set(CUDA_PATHS ENV CUDA_PATH ENV CUDA_HOME ENV CUDA_BIN_PATH - ENV CUDA_PATH_V11_0 - ENV CUDA_PATH_V10_2 - ENV CUDA_PATH_V10_1) + ENV CUDA_TOOLKIT_ROOT_DIR) if (VCPKG_TARGET_IS_WINDOWS) find_program(NVCC @@ -30,7 +28,7 @@ function(vcpkg_find_cuda) else() set(platform_base "/Developer/NVIDIA/CUDA-") endif() - + file(GLOB possible_paths "${platform_base}*") set(FOUND_PATH ) foreach (p ${possible_paths}) @@ -43,7 +41,7 @@ function(vcpkg_find_cuda) endif() endif() endforeach() - + find_program(NVCC NAMES nvcc PATHS @@ -77,16 +75,19 @@ function(vcpkg_find_cuda) # Cuda compilation tools, release 8.0, V8.0.44 string(REGEX MATCH "V([0-9]+)\\.([0-9]+)\\.([0-9]+)" CUDA_VERSION ${NVCC_OUTPUT}) message(STATUS "Found CUDA ${CUDA_VERSION}") - set(CUDA_VERSION_MAJOR ${CMAKE_MATCH_1}) - set(CUDA_VERSION_MINOR ${CMAKE_MATCH_2}) - set(CUDA_VERSION_PATCH ${CMAKE_MATCH_3}) + set(CUDA_VERSION_MAJOR "${CMAKE_MATCH_1}") + set(CUDA_VERSION_MINOR "${CMAKE_MATCH_2}") + set(CUDA_VERSION_MAJOR_MINOR "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}") - if ("${CUDA_VERSION_MAJOR}.${CUDA_VERSION_MINOR}." VERSION_LESS ${CUDA_REQUIRED_VERSION}) - message(FATAL_ERROR "CUDA ${CUDA_VERSION} found, but v${CUDA_REQUIRED_VERSION} is required. Please download and install a more recent version of CUDA from:" + if (CUDA_VERSION_MAJOR_MINOR VERSION_LESS CUDA_REQUIRED_VERSION) + message(FATAL_ERROR "CUDA v${CUDA_VERSION_MAJOR_MINOR} found, but v${CUDA_REQUIRED_VERSION} is required. Please download and install a more recent version of CUDA from:" "\n https://developer.nvidia.com/cuda-downloads\n") endif() get_filename_component(CUDA_TOOLKIT_ROOT "${NVCC}" DIRECTORY) get_filename_component(CUDA_TOOLKIT_ROOT "${CUDA_TOOLKIT_ROOT}" DIRECTORY) set(${vfc_OUT_CUDA_TOOLKIT_ROOT} "${CUDA_TOOLKIT_ROOT}" PARENT_SCOPE) + if(DEFINED vfc_OUT_CUDA_VERSION) + set(${vfc_OUT_CUDA_VERSION} "${CUDA_VERSION_MAJOR_MINOR}" PARENT_SCOPE) + endif() endfunction() diff --git a/ports/cudnn/CONTROL b/ports/cudnn/CONTROL index 3166890d3d..864748b44b 100644 --- a/ports/cudnn/CONTROL +++ b/ports/cudnn/CONTROL @@ -1,6 +1,5 @@ Source: cudnn -Version: 7.6 -Port-Version: 4 +Version: 7.6.5 Description: NVIDIA's cuDNN deep neural network acceleration library Build-Depends: cuda Supports: (windows|linux)&x64 diff --git a/ports/cudnn/FindCUDNN.cmake b/ports/cudnn/FindCUDNN.cmake index 594fd5dd6a..b1d05d49eb 100644 --- a/ports/cudnn/FindCUDNN.cmake +++ b/ports/cudnn/FindCUDNN.cmake @@ -24,41 +24,49 @@ include(FindPackageHandleStandardArgs) -if(NOT CUDNN_INCLUDE_DIR) - find_path(CUDNN_INCLUDE_DIR cudnn.h - HINTS ${CUDA_HOME} ${CUDA_TOOLKIT_ROOT_DIR} $ENV{cudnn} $ENV{CUDNN} $ENV{CUDNN_ROOT_DIR} - PATH_SUFFIXES cuda/include include) -endif() - -if(NOT CUDNN_LIBRARY) - find_library(CUDNN_LIBRARY cudnn - HINTS ${CUDA_HOME} ${CUDA_TOOLKIT_ROOT_DIR} $ENV{cudnn} $ENV{CUDNN} $ENV{CUDNN_ROOT_DIR} - PATH_SUFFIXES lib lib64 cuda/lib cuda/lib64 lib/x64) -endif() - +find_path(CUDNN_INCLUDE_DIR NAMES cudnn.h cudnn_v8.h cudnn_v7.h + HINTS ${CUDA_HOME} ${CUDA_PATH} ${CUDA_TOOLKIT_ROOT_DIR} $ENV{cudnn} $ENV{CUDNN} $ENV{CUDNN_ROOT_DIR} + PATH_SUFFIXES cuda/include include) +find_library(CUDNN_LIBRARY NAMES cudnn cudnn8 cudnn7 + HINTS ${CUDA_HOME} ${CUDA_PATH} ${CUDA_TOOLKIT_ROOT_DIR} $ENV{cudnn} $ENV{CUDNN} $ENV{CUDNN_ROOT_DIR} + PATH_SUFFIXES lib lib64 cuda/lib cuda/lib64 lib/x64) if(EXISTS "${CUDNN_INCLUDE_DIR}/cudnn.h") file(READ ${CUDNN_INCLUDE_DIR}/cudnn.h CUDNN_HEADER_CONTENTS) - if(EXISTS "${CUDNN_INCLUDE_DIR}/cudnn_version.h") - file(READ "${CUDNN_INCLUDE_DIR}/cudnn_version.h" CUDNN_VERSION_H_CONTENTS) - string(APPEND CUDNN_HEADER_CONTENTS "${CUDNN_VERSION_H_CONTENTS}") - unset(CUDNN_VERSION_H_CONTENTS) - endif() - string(REGEX MATCH "define CUDNN_MAJOR * +([0-9]+)" - CUDNN_VERSION_MAJOR "${CUDNN_HEADER_CONTENTS}") - string(REGEX REPLACE "define CUDNN_MAJOR * +([0-9]+)" "\\1" - CUDNN_VERSION_MAJOR "${CUDNN_VERSION_MAJOR}") - string(REGEX MATCH "define CUDNN_MINOR * +([0-9]+)" - CUDNN_VERSION_MINOR "${CUDNN_HEADER_CONTENTS}") - string(REGEX REPLACE "define CUDNN_MINOR * +([0-9]+)" "\\1" - CUDNN_VERSION_MINOR "${CUDNN_VERSION_MINOR}") - string(REGEX MATCH "define CUDNN_PATCHLEVEL * +([0-9]+)" - CUDNN_VERSION_PATCH "${CUDNN_HEADER_CONTENTS}") - string(REGEX REPLACE "define CUDNN_PATCHLEVEL * +([0-9]+)" "\\1" - CUDNN_VERSION_PATCH "${CUDNN_VERSION_PATCH}") - if(NOT CUDNN_VERSION_MAJOR) - set(CUDNN_VERSION "?") +elseif(EXISTS "${CUDNN_INCLUDE_DIR}/cudnn_v8.h") + file(READ ${CUDNN_INCLUDE_DIR}/cudnn_v8.h CUDNN_HEADER_CONTENTS) +elseif(EXISTS "${CUDNN_INCLUDE_DIR}/cudnn_v7.h") + file(READ ${CUDNN_INCLUDE_DIR}/cudnn_v7.h CUDNN_HEADER_CONTENTS) +endif +if(EXISTS "${CUDNN_INCLUDE_DIR}/cudnn_version.h") + file(READ "${CUDNN_INCLUDE_DIR}/cudnn_version.h" CUDNN_VERSION_H_CONTENTS) + string(APPEND CUDNN_HEADER_CONTENTS "${CUDNN_VERSION_H_CONTENTS}") + unset(CUDNN_VERSION_H_CONTENTS) +elseif(EXISTS "${CUDNN_INCLUDE_DIR}/cudnn_version_v8.h") + file(READ "${CUDNN_INCLUDE_DIR}/cudnn_version_v8.h" CUDNN_VERSION_H_CONTENTS) + string(APPEND CUDNN_HEADER_CONTENTS "${CUDNN_VERSION_H_CONTENTS}") + unset(CUDNN_VERSION_H_CONTENTS) +elseif(EXISTS "${CUDNN_INCLUDE_DIR}/cudnn_version_v7.h") + file(READ "${CUDNN_INCLUDE_DIR}/cudnn_version_v7.h" CUDNN_VERSION_H_CONTENTS) + string(APPEND CUDNN_HEADER_CONTENTS "${CUDNN_VERSION_H_CONTENTS}") + unset(CUDNN_VERSION_H_CONTENTS) +endif() +if(CUDNN_HEADER_CONTENTS) + string(REGEX MATCH "define CUDNN_MAJOR * +([0-9]+)" + _CUDNN_VERSION_MAJOR "${CUDNN_HEADER_CONTENTS}") + string(REGEX REPLACE "define CUDNN_MAJOR * +([0-9]+)" "\\1" + _CUDNN_VERSION_MAJOR "${_CUDNN_VERSION_MAJOR}") + string(REGEX MATCH "define CUDNN_MINOR * +([0-9]+)" + _CUDNN_VERSION_MINOR "${CUDNN_HEADER_CONTENTS}") + string(REGEX REPLACE "define CUDNN_MINOR * +([0-9]+)" "\\1" + _CUDNN_VERSION_MINOR "${_CUDNN_VERSION_MINOR}") + string(REGEX MATCH "define CUDNN_PATCHLEVEL * +([0-9]+)" + _CUDNN_VERSION_PATCH "${CUDNN_HEADER_CONTENTS}") + string(REGEX REPLACE "define CUDNN_PATCHLEVEL * +([0-9]+)" "\\1" + _CUDNN_VERSION_PATCH "${_CUDNN_VERSION_PATCH}") + if(NOT _CUDNN_VERSION_MAJOR) + set(_CUDNN_VERSION "?") else() - set(CUDNN_VERSION "${CUDNN_VERSION_MAJOR}.${CUDNN_VERSION_MINOR}.${CUDNN_VERSION_PATCH}") + set(_CUDNN_VERSION "${_CUDNN_VERSION_MAJOR}.${_CUDNN_VERSION_MINOR}.${_CUDNN_VERSION_PATCH}") endif() endif() diff --git a/ports/cudnn/portfile.cmake b/ports/cudnn/portfile.cmake index 768ef39aa8..e8497541f1 100644 --- a/ports/cudnn/portfile.cmake +++ b/ports/cudnn/portfile.cmake @@ -9,40 +9,48 @@ endif() vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) set(VCPKG_POLICY_MISMATCHED_NUMBER_OF_BINARIES enabled) # only release bits are provided -#note: this port must be kept in sync with CUDA port: every time one is upgraded, the other must be too -set(CUDNN_VERSION "7.6.0") -set(CUDNN_FULL_VERSION "${CUDNN_VERSION}-cuda10.1_0") -string(REPLACE "." ";" VERSION_LIST ${CUDNN_VERSION}) -list(GET VERSION_LIST 0 CUDNN_VERSION_MAJOR) -list(GET VERSION_LIST 1 CUDNN_VERSION_MINOR) -list(GET VERSION_LIST 2 CUDNN_VERSION_PATCH) +set(MINIMUM_CUDNN_VERSION "7.6.5") # Try to find CUDNN if it exists; only download if it doesn't exist -find_path(CUDNN_INCLUDE_DIR cudnn.h - HINTS ${CUDA_HOME} ${CUDA_TOOLKIT_ROOT_DIR} $ENV{cudnn} $ENV{CUDNN} $ENV{CUDNN_ROOT_DIR} +find_path(CUDNN_INCLUDE_DIR NAMES cudnn.h cudnn_v8.h cudnn_v7.h + HINTS ${CUDA_HOME} ${CUDA_PATH} $ENV{CUDA_TOOLKIT_ROOT_DIR} $ENV{cudnn} $ENV{CUDNN} $ENV{CUDNN_ROOT_DIR} PATH_SUFFIXES cuda/include include) -find_library(CUDNN_LIBRARY cudnn - HINTS ${CUDA_HOME} ${CUDA_TOOLKIT_ROOT_DIR} $ENV{cudnn} $ENV{CUDNN} $ENV{CUDNN_ROOT_DIR} +find_library(CUDNN_LIBRARY NAMES cudnn cudnn8 cudnn7 + HINTS ${CUDA_HOME} ${CUDA_PATH} $ENV{CUDA_TOOLKIT_ROOT_DIR} $ENV{cudnn} $ENV{CUDNN} $ENV{CUDNN_ROOT_DIR} PATH_SUFFIXES lib lib64 cuda/lib cuda/lib64 lib/x64) if(EXISTS "${CUDNN_INCLUDE_DIR}/cudnn.h") file(READ ${CUDNN_INCLUDE_DIR}/cudnn.h CUDNN_HEADER_CONTENTS) - if(EXISTS "${CUDNN_INCLUDE_DIR}/cudnn_version.h") - file(READ "${CUDNN_INCLUDE_DIR}/cudnn_version.h" CUDNN_VERSION_H_CONTENTS) - string(APPEND CUDNN_HEADER_CONTENTS "${CUDNN_VERSION_H_CONTENTS}") - unset(CUDNN_VERSION_H_CONTENTS) - endif() - string(REGEX MATCH "define CUDNN_MAJOR * +([0-9]+)" - _CUDNN_VERSION_MAJOR "${CUDNN_HEADER_CONTENTS}") - string(REGEX REPLACE "define CUDNN_MAJOR * +([0-9]+)" "\\1" - _CUDNN_VERSION_MAJOR "${_CUDNN_VERSION_MAJOR}") - string(REGEX MATCH "define CUDNN_MINOR * +([0-9]+)" - _CUDNN_VERSION_MINOR "${CUDNN_HEADER_CONTENTS}") - string(REGEX REPLACE "define CUDNN_MINOR * +([0-9]+)" "\\1" - _CUDNN_VERSION_MINOR "${_CUDNN_VERSION_MINOR}") - string(REGEX MATCH "define CUDNN_PATCHLEVEL * +([0-9]+)" - _CUDNN_VERSION_PATCH "${CUDNN_HEADER_CONTENTS}") - string(REGEX REPLACE "define CUDNN_PATCHLEVEL * +([0-9]+)" "\\1" - _CUDNN_VERSION_PATCH "${_CUDNN_VERSION_PATCH}") +elseif(EXISTS "${CUDNN_INCLUDE_DIR}/cudnn_v8.h") + file(READ ${CUDNN_INCLUDE_DIR}/cudnn_v8.h CUDNN_HEADER_CONTENTS) +elseif(EXISTS "${CUDNN_INCLUDE_DIR}/cudnn_v7.h") + file(READ ${CUDNN_INCLUDE_DIR}/cudnn_v7.h CUDNN_HEADER_CONTENTS) +endif() +if(EXISTS "${CUDNN_INCLUDE_DIR}/cudnn_version.h") + file(READ "${CUDNN_INCLUDE_DIR}/cudnn_version.h" CUDNN_VERSION_H_CONTENTS) + string(APPEND CUDNN_HEADER_CONTENTS "${CUDNN_VERSION_H_CONTENTS}") + unset(CUDNN_VERSION_H_CONTENTS) +elseif(EXISTS "${CUDNN_INCLUDE_DIR}/cudnn_version_v8.h") + file(READ "${CUDNN_INCLUDE_DIR}/cudnn_version_v8.h" CUDNN_VERSION_H_CONTENTS) + string(APPEND CUDNN_HEADER_CONTENTS "${CUDNN_VERSION_H_CONTENTS}") + unset(CUDNN_VERSION_H_CONTENTS) +elseif(EXISTS "${CUDNN_INCLUDE_DIR}/cudnn_version_v7.h") + file(READ "${CUDNN_INCLUDE_DIR}/cudnn_version_v7.h" CUDNN_VERSION_H_CONTENTS) + string(APPEND CUDNN_HEADER_CONTENTS "${CUDNN_VERSION_H_CONTENTS}") + unset(CUDNN_VERSION_H_CONTENTS) +endif() +if(CUDNN_HEADER_CONTENTS) + string(REGEX MATCH "define CUDNN_MAJOR * +([0-9]+)" + _CUDNN_VERSION_MAJOR "${CUDNN_HEADER_CONTENTS}") + string(REGEX REPLACE "define CUDNN_MAJOR * +([0-9]+)" "\\1" + _CUDNN_VERSION_MAJOR "${_CUDNN_VERSION_MAJOR}") + string(REGEX MATCH "define CUDNN_MINOR * +([0-9]+)" + _CUDNN_VERSION_MINOR "${CUDNN_HEADER_CONTENTS}") + string(REGEX REPLACE "define CUDNN_MINOR * +([0-9]+)" "\\1" + _CUDNN_VERSION_MINOR "${_CUDNN_VERSION_MINOR}") + string(REGEX MATCH "define CUDNN_PATCHLEVEL * +([0-9]+)" + _CUDNN_VERSION_PATCH "${CUDNN_HEADER_CONTENTS}") + string(REGEX REPLACE "define CUDNN_PATCHLEVEL * +([0-9]+)" "\\1" + _CUDNN_VERSION_PATCH "${_CUDNN_VERSION_PATCH}") if(NOT _CUDNN_VERSION_MAJOR) set(_CUDNN_VERSION "?") else() @@ -50,26 +58,47 @@ if(EXISTS "${CUDNN_INCLUDE_DIR}/cudnn.h") endif() endif() -if (CUDNN_INCLUDE_DIR AND CUDNN_LIBRARY AND _CUDNN_VERSION VERSION_GREATER_EQUAL CUDNN_VERSION) +if (CUDNN_INCLUDE_DIR AND CUDNN_LIBRARY AND _CUDNN_VERSION VERSION_GREATER_EQUAL MINIMUM_CUDNN_VERSION) set(CUDNN_FOUND TRUE) else() set(CUDNN_FOUND FALSE) endif() +include(${CURRENT_INSTALLED_DIR}/share/cuda/vcpkg_find_cuda.cmake) +vcpkg_find_cuda(OUT_CUDA_TOOLKIT_ROOT CUDA_TOOLKIT_ROOT OUT_CUDA_VERSION CUDA_VERSION) + # Download CUDNN if not found if (CUDNN_FOUND) - message(STATUS "Found CUDNN located on system: (include ${CUDNN_INCLUDE_DIR} lib: ${CUDNN_LIBRARY})") + message(STATUS "Found CUDNN ${_CUDNN_VERSION} located on system: (include ${CUDNN_INCLUDE_DIR} lib: ${CUDNN_LIBRARY})") set(VCPKG_POLICY_EMPTY_PACKAGE enabled) -else() - message(STATUS "CUDNN not found on system - downloading...") - if(VCPKG_TARGET_IS_WINDOWS) - set(CUDNN_DOWNLOAD_LINK "https://anaconda.org/anaconda/cudnn/${CUDNN_VERSION}/download/win-64/cudnn-${CUDNN_FULL_VERSION}.tar.bz2") - set(SHA512_CUDNN "c0218407e7bc2b3c1497f1709dedee345bc619603ec0efa094e392888c0d513d645a1241501f9b406f688defa811578f36b49f456eb533535ecd526702156eea") - set(CUDNN_OS "windows") - elseif(VCPKG_TARGET_IS_LINUX) - set(CUDNN_DOWNLOAD_LINK "https://anaconda.org/anaconda/cudnn/${CUDNN_VERSION}/download/linux-64/cudnn-${CUDNN_FULL_VERSION}.tar.bz2") - set(SHA512_CUDNN "128ccdc0ec24a1133947d7a8eff6cd8edc224134fa5065a11a1a01a99dbaee7d799db1454e0a59e411cf6db244f8c2420c160488a5dd4830addc3578b2011e3d") - set(CUDNN_OS "linux") +elseif(CUDA_VERSION VERSION_EQUAL "10.1" OR CUDA_VERSION VERSION_EQUAL "10.2") + message(STATUS "CUDNN not found on system - downloading a version compatible with your CUDA v${CUDA_VERSION}...") + if(${CUDA_VERSION} VERSION_EQUAL "10.1") + set(CUDNN_VERSION "7.6.5") + set(CUDNN_VERSION_MAJOR "7") + set(CUDNN_FULL_VERSION "7.6.5-cuda10.1_0") + if(VCPKG_TARGET_IS_WINDOWS) + set(CUDNN_DOWNLOAD_LINK "https://anaconda.org/anaconda/cudnn/${CUDNN_VERSION}/download/win-64/cudnn-${CUDNN_FULL_VERSION}.tar.bz2") + set(SHA512_CUDNN "0fb18dd49de877ad6bae24b53ffe007a99915cc9601697a556897e018cc6d99d3aa68716ea99248cf6a9dfaeeb1a551453c606d04e8bbb3e9315bf768184f15b") + set(CUDNN_OS "windows") + elseif(VCPKG_TARGET_IS_LINUX) + set(CUDNN_DOWNLOAD_LINK "https://anaconda.org/anaconda/cudnn/${CUDNN_VERSION}/download/linux-64/cudnn-${CUDNN_FULL_VERSION}.tar.bz2") + set(SHA512_CUDNN "4d901d96ee8f37e3977240b9e6e6eeecb33848388db953a789be47de8f357d815c3a106ceab04297c4df0d8ed9c2795b2a22304e93cd1e53322307d3f3cd668e") + set(CUDNN_OS "linux") + endif() + elseif(${CUDA_VERSION} VERSION_EQUAL "10.2") + set(CUDNN_VERSION "7.6.5") + set(CUDNN_VERSION_MAJOR "7") + set(CUDNN_FULL_VERSION "7.6.5-cuda10.2_0") + if(VCPKG_TARGET_IS_WINDOWS) + set(CUDNN_DOWNLOAD_LINK "https://anaconda.org/anaconda/cudnn/${CUDNN_VERSION}/download/win-64/cudnn-${CUDNN_FULL_VERSION}.tar.bz2") + set(SHA512_CUDNN "86ca2f5f510d4fbeb37548d0bcab42474a1c4041be2cf96c4964f1e51c3641dc4bf25e8434cd5ff99fac9f53946e5f0e83bd845613144731d136cd60913d4aaa") + set(CUDNN_OS "windows") + elseif(VCPKG_TARGET_IS_LINUX) + set(CUDNN_DOWNLOAD_LINK "https://anaconda.org/anaconda/cudnn/${CUDNN_VERSION}/download/linux-64/cudnn-${CUDNN_FULL_VERSION}.tar.bz2") + set(SHA512_CUDNN "b15b554c2ec004105cec8ee2a99f33fab0f9aed12128522730be4fa6204a5b2dff29e42901b5c4840b5ebf35607e8a54f35eb30525885067165b05dd95aa391b") + set(CUDNN_OS "linux") + endif() endif() vcpkg_download_distfile(ARCHIVE @@ -88,15 +117,19 @@ else() file(INSTALL "${SOURCE_PATH}/Library/include/cudnn.h" DESTINATION ${CURRENT_PACKAGES_DIR}/include) file(INSTALL "${SOURCE_PATH}/Library/lib/x64/cudnn.lib" DESTINATION ${CURRENT_PACKAGES_DIR}/lib) file(INSTALL "${SOURCE_PATH}/Library/bin/cudnn64_${CUDNN_VERSION_MAJOR}.dll" DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + set(LICENSE_PATH "${SOURCE_PATH}/info/LICENSE.txt") elseif(VCPKG_TARGET_IS_LINUX) file(INSTALL "${SOURCE_PATH}/include/cudnn.h" DESTINATION ${CURRENT_PACKAGES_DIR}/include) file(INSTALL "${SOURCE_PATH}/lib/libcudnn.so.${CUDNN_VERSION}" DESTINATION ${CURRENT_PACKAGES_DIR}/lib) file(INSTALL "${SOURCE_PATH}/lib/libcudnn.so.${CUDNN_VERSION_MAJOR}" DESTINATION ${CURRENT_PACKAGES_DIR}/lib) file(INSTALL "${SOURCE_PATH}/lib/libcudnn.so" DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + set(LICENSE_PATH "${SOURCE_PATH}/info/licenses/NVIDIA_SLA_cuDNN_Support.txt") endif() - file(INSTALL "${SOURCE_PATH}/info/LICENSE.txt" DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + file(INSTALL "${LICENSE_PATH}" DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/FindCUDNN.cmake" DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) -endif() # NOT CUDNN_FOUND +else() # CUDNN NOT FOUND AND NOT AUTO-DOWNLOADABLE + message(FATAL_ERROR "Please install manually cuDNN for your CUDA v${CUDA_VERSION}") +endif() diff --git a/versions/baseline.json b/versions/baseline.json index e20cb0d6e3..d5ba938841 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -1514,11 +1514,11 @@ }, "cuda": { "baseline": "10.1", - "port-version": 5 + "port-version": 7 }, "cudnn": { - "baseline": "7.6", - "port-version": 4 + "baseline": "7.6.5", + "port-version": 0 }, "cunit": { "baseline": "2.1.3-6", diff --git a/versions/c-/cuda.json b/versions/c-/cuda.json index 4c9ba054ab..6b1b43323b 100644 --- a/versions/c-/cuda.json +++ b/versions/c-/cuda.json @@ -1,5 +1,15 @@ { "versions": [ + { + "git-tree": "f81f6321111048d45f0c5e41644ee26a0ccb9c13", + "version-string": "10.1", + "port-version": 7 + }, + { + "git-tree": "cd48424964a6d19d032e14e84dbd41c5cdcb05ef", + "version-string": "10.1", + "port-version": 6 + }, { "git-tree": "0022275f9aa9e2d70f6a35d7e28fb27ab21fd13e", "version-string": "10.1", diff --git a/versions/c-/cudnn.json b/versions/c-/cudnn.json index 4ae95501c8..ddb1b99670 100644 --- a/versions/c-/cudnn.json +++ b/versions/c-/cudnn.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "681f177cf063d3c8e655a18011c158ffad49fdbd", + "version-string": "7.6.5", + "port-version": 0 + }, { "git-tree": "8f40428fb1779b79fbbb08e3e52e984fe656439d", "version-string": "7.6",