From 2dd6b72cef4a7a977c9b1ca200931c2b2e17b855 Mon Sep 17 00:00:00 2001 From: Frank <65999885+FrankXie05@users.noreply.github.com> Date: Thu, 19 Sep 2024 20:32:44 +0000 Subject: [PATCH] [cudnn] Add version v9.4 (#40892) --- ports/cudnn/FindCUDNN.cmake | 8 ++++++-- ports/cudnn/portfile.cmake | 8 ++++++-- ports/cudnn/vcpkg.json | 2 +- versions/baseline.json | 2 +- versions/c-/cudnn.json | 5 +++++ 5 files changed, 19 insertions(+), 6 deletions(-) diff --git a/ports/cudnn/FindCUDNN.cmake b/ports/cudnn/FindCUDNN.cmake index 3a50dae8dd..872b5c43a3 100644 --- a/ports/cudnn/FindCUDNN.cmake +++ b/ports/cudnn/FindCUDNN.cmake @@ -23,11 +23,15 @@ # include(FindPackageHandleStandardArgs) +file(GLOB CUDNN_VERSION_DIRS + LIST_DIRECTORIES true + "$ENV{CUDA_PATH}/../../../NVIDIA/CUDNN/v[1-9]*.[1-9]*" +) find_path(CUDNN_INCLUDE_DIR NAMES cudnn.h cudnn_v8.h cudnn_v7.h - HINTS ${CUDA_TOOLKIT_ROOT} $ENV{CUDA_PATH} $ENV{CUDA_TOOLKIT_ROOT_DIR} $ENV{cudnn} $ENV{CUDNN} $ENV{CUDNN_ROOT_DIR} $ENV{CUDA_PATH}/../../../NVIDIA/CUDNN/v9.0 $ENV{CUDA_PATH}/../../../NVIDIA/CUDNN/v9.1 $ENV{CUDA_PATH}/../../../NVIDIA/CUDNN/v9.2 $ENV{CUDA_PATH}/../../../NVIDIA/CUDNN/v9.3 /usr/include /usr/include/x86_64-linux-gnu/ /usr/include/aarch64-linux-gnu/ + HINTS ${CUDA_TOOLKIT_ROOT} $ENV{CUDA_PATH} $ENV{CUDA_TOOLKIT_ROOT_DIR} $ENV{cudnn} $ENV{CUDNN} $ENV{CUDNN_ROOT_DIR} ${CUDNN_VERSION_DIRS} /usr/include /usr/include/x86_64-linux-gnu/ /usr/include/aarch64-linux-gnu/ PATH_SUFFIXES cuda/include include include/11.8 include/12.0 include/12.1 include/12.2 include/12.3 include/12.4 include/12.5 include/12.6) find_library(CUDNN_LIBRARY NAMES cudnn cudnn8 cudnn7 - HINTS ${CUDA_TOOLKIT_ROOT} $ENV{CUDA_PATH} $ENV{CUDA_TOOLKIT_ROOT_DIR} $ENV{cudnn} $ENV{CUDNN} $ENV{CUDNN_ROOT_DIR} $ENV{CUDA_PATH}/../../../NVIDIA/CUDNN/v9.0 $ENV{CUDA_PATH}/../../../NVIDIA/CUDNN/v9.1 $ENV{CUDA_PATH}/../../../NVIDIA/CUDNN/v9.2 $ENV{CUDA_PATH}/../../../NVIDIA/CUDNN/v9.3 /usr/lib/x86_64-linux-gnu/ /usr/include/aarch64-linux-gnu/ /usr/ + HINTS ${CUDA_TOOLKIT_ROOT} $ENV{CUDA_PATH} $ENV{CUDA_TOOLKIT_ROOT_DIR} $ENV{cudnn} $ENV{CUDNN} $ENV{CUDNN_ROOT_DIR} ${CUDNN_VERSION_DIRS} /usr/lib/x86_64-linux-gnu/ /usr/include/aarch64-linux-gnu/ /usr/ PATH_SUFFIXES lib lib64 cuda/lib cuda/lib64 lib/x64 cuda/lib/x64 lib/11.8/x64 lib/12.0/x64 lib/12.1/x64 lib/12.2/x64 lib/12.3/x64 lib/12.4/x64 lib/12.5/x64 lib/12.6/x64) if(EXISTS "${CUDNN_INCLUDE_DIR}/cudnn.h") diff --git a/ports/cudnn/portfile.cmake b/ports/cudnn/portfile.cmake index 77e1cb4023..99a21742db 100644 --- a/ports/cudnn/portfile.cmake +++ b/ports/cudnn/portfile.cmake @@ -3,12 +3,16 @@ set(MINIMUM_CUDNN_VERSION "7.6.5") 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 +file(GLOB CUDNN_VERSION_DIRS + LIST_DIRECTORIES true + "$ENV{CUDA_PATH}/../../../NVIDIA/CUDNN/v[1-9]*.[1-9]*" +) find_path(CUDNN_INCLUDE_DIR NAMES cudnn.h cudnn_v8.h cudnn_v7.h - HINTS ${CUDA_TOOLKIT_ROOT} $ENV{CUDA_PATH} $ENV{CUDA_TOOLKIT_ROOT_DIR} $ENV{cudnn} $ENV{CUDNN} $ENV{CUDNN_ROOT_DIR} $ENV{CUDA_PATH}/../../../NVIDIA/CUDNN/v9.0 $ENV{CUDA_PATH}/../../../NVIDIA/CUDNN/v9.1 $ENV{CUDA_PATH}/../../../NVIDIA/CUDNN/v9.2 $ENV{CUDA_PATH}/../../../NVIDIA/CUDNN/v9.3 /usr/include /usr/include/x86_64-linux-gnu/ /usr/include/aarch64-linux-gnu/ + HINTS ${CUDA_TOOLKIT_ROOT} $ENV{CUDA_PATH} $ENV{CUDA_TOOLKIT_ROOT_DIR} $ENV{cudnn} $ENV{CUDNN} $ENV{CUDNN_ROOT_DIR} ${CUDNN_VERSION_DIRS} /usr/include /usr/include/x86_64-linux-gnu/ /usr/include/aarch64-linux-gnu/ PATH_SUFFIXES cuda/include include include/11.8 include/12.0 include/12.1 include/12.2 include/12.3 include/12.4 include/12.5 include/12.6) message(STATUS "CUDNN_INCLUDE_DIR: ${CUDNN_INCLUDE_DIR}") find_library(CUDNN_LIBRARY NAMES cudnn cudnn8 cudnn7 - HINTS ${CUDA_TOOLKIT_ROOT} $ENV{CUDA_PATH} $ENV{CUDA_TOOLKIT_ROOT_DIR} $ENV{cudnn} $ENV{CUDNN} $ENV{CUDNN_ROOT_DIR} $ENV{CUDA_PATH}/../../../NVIDIA/CUDNN/v9.0 $ENV{CUDA_PATH}/../../../NVIDIA/CUDNN/v9.1 $ENV{CUDA_PATH}/../../../NVIDIA/CUDNN/v9.2 $ENV{CUDA_PATH}/../../../NVIDIA/CUDNN/v9.3 /usr/lib/x86_64-linux-gnu/ /usr/include/aarch64-linux-gnu/ /usr/ + HINTS ${CUDA_TOOLKIT_ROOT} $ENV{CUDA_PATH} $ENV{CUDA_TOOLKIT_ROOT_DIR} $ENV{cudnn} $ENV{CUDNN} $ENV{CUDNN_ROOT_DIR} ${CUDNN_VERSION_DIRS} /usr/lib/x86_64-linux-gnu/ /usr/include/aarch64-linux-gnu/ /usr/ PATH_SUFFIXES lib lib64 cuda/lib cuda/lib64 lib/x64 cuda/lib/x64 lib/11.8/x64 lib/12.0/x64 lib/12.1/x64 lib/12.2/x64 lib/12.3/x64 lib/12.4/x64 lib/12.5/x64 lib/12.6/x64) message(STATUS "CUDNN_LIBRARY: ${CUDNN_LIBRARY}") if(EXISTS "${CUDNN_INCLUDE_DIR}/cudnn.h") diff --git a/ports/cudnn/vcpkg.json b/ports/cudnn/vcpkg.json index 8beada76d4..ee26880a34 100644 --- a/ports/cudnn/vcpkg.json +++ b/ports/cudnn/vcpkg.json @@ -1,7 +1,7 @@ { "name": "cudnn", "version": "7.6.5", - "port-version": 13, + "port-version": 14, "description": "NVIDIA's cuDNN deep neural network acceleration library.", "homepage": "https://developer.nvidia.com/cudnn", "license": null, diff --git a/versions/baseline.json b/versions/baseline.json index ab32ead123..b1cfaaf365 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2114,7 +2114,7 @@ }, "cudnn": { "baseline": "7.6.5", - "port-version": 13 + "port-version": 14 }, "cunit": { "baseline": "2.1.3", diff --git a/versions/c-/cudnn.json b/versions/c-/cudnn.json index a7d2195e7e..e89beef743 100644 --- a/versions/c-/cudnn.json +++ b/versions/c-/cudnn.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "8e17b3aaaea3a6da5858cb6202c3e2cd8e9f9a5e", + "version": "7.6.5", + "port-version": 14 + }, { "git-tree": "92d21a780ad42ae4fa7aaf9481d8a43a832d6e4c", "version": "7.6.5",