# CUDA / CUDNN basics

**URL:** <https://discuss.pytorch.org/t/cuda-cudnn-basics/6214>\
**Category:** Uncategorized\
**Created:** [August 14, 2017, 8:36pm UTC](https://discuss.pytorch.org/t/cuda-cudnn-basics/6214 "2017-08-14T20:36:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![chilango](https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/c/e47c2d/32.png) [@chilango](https://discuss.pytorch.org/u/chilango)\
**Post date:** [August 14, 2017, 8:36pm UTC](https://discuss.pytorch.org/t/cuda-cudnn-basics/6214/1 "2017-08-14T20:36:33Z")

</div>

Trying to run an lstm batch on a local GPU and I’m getting the following typical error:

`/home/xxx/.conda/envs/torchenv/lib/python3.6/site-packages/torch/backends/cudnn/ __init__.py:40: UserWarning: PyTorch was compiled without cuDNN support. To use cuDNN, rebuild PyTorch making sure the library is visible to the build system. "PyTorch was compiled without cuDNN support. To use cuDNN, rebuild "`

These are the relevant packages in my environment:

(torchenv) [~/git/nn]$ conda list  
cuda80 1.0 0 soumith  
cudatoolkit 7.5 2  
cudnn 6.0.21 cuda7.5\_0  
pytorch 0.1.12 py36cuda7.5cudnn6.0\_1

`In [2]: torch.backends.cudnn.is_acceptable(torch.cuda.FloatTensor(1))`  
`False’

`In [3]: print(torch.backends.cudnn.version())`  
`None`

`In [4]: print(torch.cuda.is_available())`  
`True`

So CUDA and CUDNN are available, but pytorch was built against a previous version than the one in my system. A few beginner questions that I can’t find answers for in other questions here:

1. Am I seeing the “compiled without cuDNN support” errors because of version mismatch between build and visible versions?

2. If so, what is the best way to solve this? Should I uninstall pytorch and build from source? Or is there an organic way to do this using conda?

3. What are some good practices to keep a local node / cluster up to date and avoid these mismatches?

Using Linux 4.12.4-1-ARCH fwiw.

Thanks!

---

<div class="post-metadata">

**Author:** ![chilango](https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/c/e47c2d/32.png) [@chilango](https://discuss.pytorch.org/u/chilango)\
**Post date:** [August 14, 2017, 8:58pm UTC](https://discuss.pytorch.org/t/cuda-cudnn-basics/6214/2 "2017-08-14T20:58:55Z")

</div>

Not sure if also relevant:

(torchenv) [~/git/nn]$ nvcc --version  
nvcc: NVIDIA ® Cuda compiler driver  
Copyright © 2005-2016 NVIDIA Corporation  
Built on Tue\_Jan\_10\_13:22:03\_CST\_2017  
Cuda compilation tools, release 8.0, V8.0.61

---

<div class="post-metadata">

**Author:** ![QuantScientist](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/quantscientist/32/1393_2.png) [@QuantScientist](https://discuss.pytorch.org/u/QuantScientist)\
**Post date:** [August 15, 2017, 12:15pm UTC](https://discuss.pytorch.org/t/cuda-cudnn-basics/6214/3 "2017-08-15T12:15:18Z")

</div>

This is how I compiled PyTorch inside a Docker image with CUDA support:

> <https://github.com/QuantScientist/Deep-Learning-Boot-Camp/blob/master/docker/Dockerfile.gpu3>

---

<div class="post-metadata">

**Author:** ![QuantScientist](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/quantscientist/32/1393_2.png) [@QuantScientist](https://discuss.pytorch.org/u/QuantScientist)\
**Post date:** [August 15, 2017, 12:16pm UTC](https://discuss.pytorch.org/t/cuda-cudnn-basics/6214/4 "2017-08-15T12:16:12Z")

</div>

Also try this:

> <https://github.com/QuantScientist/Deep-Learning-Boot-Camp/blob/master/docker/deps_nvidia_docker.sh>

---

<div class="post-metadata">

**Author:** ![chilango](https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/c/e47c2d/32.png) [@chilango](https://discuss.pytorch.org/u/chilango)\
**Post date:** [August 15, 2017, 7:38pm UTC](https://discuss.pytorch.org/t/cuda-cudnn-basics/6214/5 "2017-08-15T19:38:00Z")

</div>

Thanks for the list of packages. I upgraded to 0.2.0 and now it automagically works. Thanks for fixing whatever bug this was to the dev team.

---

<div class="post-metadata">

**Author:** ![Savitha](https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/s/c2a13f/32.png) [@Savitha](https://discuss.pytorch.org/u/Savitha)\
**Post date:** [October 28, 2017, 11:37am UTC](https://discuss.pytorch.org/t/cuda-cudnn-basics/6214/6 "2017-10-28T11:37:49Z")

</div>

I am facing same issue but when I am trying to update pytorch to 0.2.0 its updated but when I checked in code its showing that its using pytorch 0.1.12  
issue:

 ![pytorch_issue](https://discuss.pytorch.org/uploads/default/original/2X/8/873a95e5e04edb439301e26191a40036cc84bc9c.png)  
my pytorch-gpu version 0.1.12  
pytorch version 0.2.0

is it using pytorch-gpu? if so I uninstalled pytorch-gpu then its giving me that no module torch.  
how can i fix this issue.
