gpt4 book ai didi

windows - 如何用CMake找到CUDNN?

转载 作者:行者123 更新时间:2023-12-03 11:07:36 29 4
gpt4 key购买 nike

显然我正确安装了 CUDA 和 CUDNN,但是 FindCUDA 仍然找到 CUDA,但是 FindCUDNN.cmake 没有找到 CUDNN

我还应该检查什么来调试它?

操作系统:Windows 10

cmake版本 3.17.2

CUDA 版本 10.2

CUDNN版本 cudnn-10.2-windows10-x64-v7.6.5.32

使用安装程序安装的 CUDA,到 C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2

按照说明设置PATH enter image description here

CUDNN 文件复制到相应的 bin、include 和 lib 文件夹中

enter image description here

enter image description here

enter image description here

[cmake] -- Found CUDA: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.2 (found version "10.2") 
[cmake] CMake Error at C:/Program Files/CMake/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:164 (message):
[cmake] Could NOT find CUDNN (missing: CUDNN_LIBRARY CUDNN_INCLUDE_DIR)
[cmake] Call Stack (most recent call first):
[cmake] C:/Program Files/CMake/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:445 (_FPHSA_FAILURE_MESSAGE)
[cmake] cmake/FindCUDNN.cmake:90 (find_package_handle_standard_args)
[cmake] CMakeLists.txt:17 (find_package)

FindCUDNN.cmake:https://gist.github.com/WurmD/26af2940d8dec7cc48d38bc30fd1b3ef

最佳答案

...
set "cudaRoot=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.3"
...
-DCUDNN_LIBRARY="%cudaRoot%\lib" ^
-DCUDNN_INCLUDE_DIR="%cudaRoot%\include" ^
...

关于windows - 如何用CMake找到CUDNN?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61533880/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com