diff --git a/README.md b/README.md index ae3e1330c02..b711870aca8 100644 --- a/README.md +++ b/README.md @@ -164,7 +164,7 @@ We highly recommend installing an [Anaconda](https://www.anaconda.com/download) If you want to compile with CUDA support, [select a supported version of CUDA from our support matrix](https://pytorch.org/get-started/locally/), then install the following: - [NVIDIA CUDA](https://developer.nvidia.com/cuda-downloads) -- [NVIDIA cuDNN](https://developer.nvidia.com/cudnn) v7 or above +- [NVIDIA cuDNN](https://developer.nvidia.com/cudnn) v8.5 or above - [Compiler](https://gist.github.com/ax3l/9489132) compatible with CUDA Note: You could refer to the [cuDNN Support Matrix](https://docs.nvidia.com/deeplearning/cudnn/pdf/cuDNN-Support-Matrix.pdf) for cuDNN versions with the various supported CUDA, CUDA driver and NVIDIA hardware diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake index bcbb982cb50..4b009211708 100644 --- a/cmake/Dependencies.cmake +++ b/cmake/Dependencies.cmake @@ -1222,6 +1222,9 @@ endif(USE_LLVM) # ---[ cuDNN if(USE_CUDNN) + if(CUDNN_VERSION VERSION_LESS 8.5) + message(FATAL_ERROR "PyTorch needs CuDNN-8.5 or above, but found ${CUDNN_VERSION}. Builds are still possible with `USE_CUDNN=0`") + endif() set(CUDNN_FRONTEND_INCLUDE_DIR ${CMAKE_CURRENT_LIST_DIR}/../third_party/cudnn_frontend/include) target_include_directories(torch::cudnn INTERFACE ${CUDNN_FRONTEND_INCLUDE_DIR}) endif()