microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
22.99k stars 6.34k forks source link

[cudnn] Build error on x64-windows #37799

Closed AbSomeone closed 6 months ago

AbSomeone commented 6 months ago

Package: cudnn:x64-windows@7.6.5#10

Host Environment

To Reproduce

vcpkg install dlib[cuda]:x64-windows Failure logs


-- Found CUDA V12.1.105
-- CUDNN_INCLUDE_DIR: CUDNN_INCLUDE_DIR-NOTFOUND
-- CUDNN_LIBRARY: CUDNN_LIBRARY-NOTFOUND
CMake Error at ports/cudnn/portfile.cmake:58 (message):
  Please download CUDNN from official sources (such as
  https://developer.nvidia.com/rdp/cudnn-download ) and extract the zip into
  your CUDA_TOOLKIT_ROOT (C:/Program Files/NVIDIA GPU Computing
  Toolkit/CUDA/v12.1).  (For example: tar.exe -xvf
  cudnn-11.2-windows-x64-v8.1.1.33.zip --strip 1 --directory "C:/Program
  Files/NVIDIA GPU Computing Toolkit/CUDA/v12.1"
Call Stack (most recent call first):
  scripts/ports.cmake:175 (include)
jimwang118 commented 6 months ago

You need to install cudnn locally and match the cuda version.

dannypike commented 6 months ago

I disagree. The cudnn vpkg package should match the installed version of CUDA. Not the other way around.

jimwang118 commented 6 months ago

I disagree. The cudnn vpkg package should match the installed version of CUDA. Not the other way around.

Cudnn in vcpkg also searches for locally installed packages and obtains the required files.

dannypike commented 6 months ago

I'm sorry but I don't understand why you said that?

My point was that you say we should install a version of CUDA to match the vcpkg package. I say that it is the other way around.

VCPKG should provide packages to match whatever valid and supported version of CUDA may be installed.

I have CUDA 11.8 on this PC because that is the version that matches what my customer is using. CUDA 11.8 is still supported by nVidia, so vcpkg should support it, too. If that needs two varieties of the vcpkg package, then that is what vcpkg should have.

jimwang118 commented 6 months ago

I'm sorry but I don't understand why you said that?

My point was that you say we should install a version of CUDA to match the vcpkg package. I say that it is the other way around.

VCPKG should provide packages to match whatever valid and supported version of CUDA may be installed.

I have CUDA 11.8 on this PC because that is the version that matches what my customer is using. CUDA 11.8 is still supported by nVidia, so vcpkg should support it, too. If that needs two varieties of the vcpkg package, then that is what vcpkg should have.

You do not need to install cuda that matches vcpkg. You only need to install cuda and cudnn on your local machine to match each other. vcpkg has no restrictions on cuda versions. In addition, you can check the portfile.cmake files of cuda and cudnn and find that they are not compiled from source code, but obtain available libraries by looking for locally installed files.

dannypike commented 6 months ago

Thank you for the clarification.

jimwang118 commented 6 months ago

If the above reply can solve your problem, I will close the issue.

dannypike commented 6 months ago

Are you asking me? I am happy, thank you, but I am not the original poster.

jimwang118 commented 6 months ago

Are you asking me? I am happy, thank you, but I am not the original poster.

Thanks for the reply, it would be great to help you solve the problem. @AbSomeone , can you install cuda normally by installing cudnn?