Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot find cuDNN #11

Open
pvandwalle opened this issue Aug 11, 2022 · 4 comments
Open

cannot find cuDNN #11

pvandwalle opened this issue Aug 11, 2022 · 4 comments

Comments

@pvandwalle
Copy link

This is really amazing but so far it doesnt find cuDNN, which is installed in C:\Program Files\NVDIA\CUDNN\v8.x
Hence the project cannot be created at all.

" you choose to create a torch project with cuda but cuDNN isn't installed. "

whereas pytroch is able to use cudNN

@adlane98
Copy link

Try copying:

  • all .h files in your CUDNN\v8.x\include folder to $CUDA_PATH\include
  • all .lib files in your CUDNN\v8.x\lib folder to $CUDA_PATH\lib\x64

@mszhanyi
Copy link
Owner

@NinjaDoggy
Copy link

I ran into the same issue, and I'm pretty sure cuDNN was installed properly because I was able to run a cmake project with libtorch.

Code:
#include <torch/torch.h>
#include

int main() {
torch::Tensor tensor = torch::rand({ 2, 3 });
std::cout << "cudnn is available: " << torch::cuda::cudnn_is_available() << "\n";
if (torch::cuda::is_available()) {
std::cout << "CUDA is available! Training on GPU\n";
auto tensor_cuda = tensor.cuda();
std::cout << tensor_cuda << "\n";
} else {
std::cout << "CUDA is not available! Training on CPU\n";
std::cout << tensor << "\n";
}
}

Result:
cudnn is available: 1
CUDA is available! Training on GPU
0.6249 0.2578 0.3856
0.5703 0.2497 0.4719
[ CUDAFloatType{2,3} ]

Copying the files like @adlane98 suggested fixed it!

@mszhanyi
Copy link
Owner

mszhanyi commented Jan 17, 2023

@NinjaDoggy , Thank your feedback. did you set CUDNN_PATH in your machine.?
So far, the extension didn't support CUDNN_PATH, I'll add the support later.
Now, the workaround is to copy cudnn files as #11 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants