Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ports/cudnn/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Source: cudnn
Version: 7.6.5
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we change this to 8 in concert with #17331 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it really depends for me
on one side, the broader the compatibility the better (and so i’d push for even a lower version in the minimum accepted by the portfile)
on another hand, these port files which are not installing anything and just finding compatible versions on the systems are already breaking binary caches at least for me. Different configs produce the same hash due to the same portfile and become invalid when consumed on the wrong system. To fix this at least reducing acceptable versions is helpful

Port-Version: 1
Description: NVIDIA's cuDNN deep neural network acceleration library
Build-Depends: cuda
Supports: (windows|linux)&x64
4 changes: 2 additions & 2 deletions ports/cudnn/FindCUDNN.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
include(FindPackageHandleStandardArgs)

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}
HINTS $ENV{CUDA_PATH} $ENV{CUDA_TOOLKIT_ROOT_DIR} $ENV{cudnn} $ENV{CUDNN} $ENV{CUDNN_ROOT_DIR} /usr/include
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}
HINTS $ENV{CUDA_PATH} $ENV{CUDA_TOOLKIT_ROOT_DIR} $ENV{cudnn} $ENV{CUDNN} $ENV{CUDNN_ROOT_DIR} /usr/lib/x86_64-linux-gnu/
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)
Expand Down
12 changes: 7 additions & 5 deletions ports/cudnn/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,18 @@ set(VCPKG_POLICY_MISMATCHED_NUMBER_OF_BINARIES enabled) # only release bits are

set(MINIMUM_CUDNN_VERSION "7.6.5")

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)

# Try to find CUDNN if it exists; only download if it doesn't exist
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}
HINTS ${CUDA_TOOLKIT_ROOT} $ENV{CUDA_PATH} $ENV{CUDA_TOOLKIT_ROOT_DIR} $ENV{cudnn} $ENV{CUDNN} $ENV{CUDNN_ROOT_DIR} /usr/include
PATH_SUFFIXES cuda/include include)
message(STATUS "CUDNN_INCLUDE_DIR: ${CUDNN_INCLUDE_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}
HINTS ${CUDA_TOOLKIT_ROOT} $ENV{CUDA_PATH} $ENV{CUDA_TOOLKIT_ROOT_DIR} $ENV{cudnn} $ENV{CUDNN} $ENV{CUDNN_ROOT_DIR} /usr/lib/x86_64-linux-gnu/
PATH_SUFFIXES lib lib64 cuda/lib cuda/lib64 lib/x64)
message(STATUS "CUDNN_LIBRARY: ${CUDNN_LIBRARY}")
if(EXISTS "${CUDNN_INCLUDE_DIR}/cudnn.h")
file(READ ${CUDNN_INCLUDE_DIR}/cudnn.h CUDNN_HEADER_CONTENTS)
elseif(EXISTS "${CUDNN_INCLUDE_DIR}/cudnn_v8.h")
Expand Down Expand Up @@ -64,9 +69,6 @@ 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 ${_CUDNN_VERSION} located on system: (include ${CUDNN_INCLUDE_DIR} lib: ${CUDNN_LIBRARY})")
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -1526,7 +1526,7 @@
},
"cudnn": {
"baseline": "7.6.5",
"port-version": 0
"port-version": 1
},
"cunit": {
"baseline": "2.1.3-6",
Expand Down
5 changes: 5 additions & 0 deletions versions/c-/cudnn.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "495cc586b4bfdb28c3c339d3f471b9fbfc8bc481",
"version-string": "7.6.5",
"port-version": 1
},
{
"git-tree": "681f177cf063d3c8e655a18011c158ffad49fdbd",
"version-string": "7.6.5",
Expand Down