VSIXTorch icon indicating copy to clipboard operation
VSIXTorch copied to clipboard

cannot find cuDNN

Open pvandwalle opened this issue 3 years ago • 4 comments

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

pvandwalle avatar Aug 11 '22 04:08 pvandwalle

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

adlane98 avatar Aug 12 '22 17:08 adlane98

https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html#install-windows

mszhanyi avatar Aug 15 '22 08:08 mszhanyi

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!

NinjaDoggy avatar Jan 16 '23 16:01 NinjaDoggy

@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 https://github.com/mszhanyi/VSIXTorch/issues/11#issuecomment-1213348584

mszhanyi avatar Jan 17 '23 03:01 mszhanyi