# Minimum CUDA compute compatibility for PyTorch 1.3

**URL:** <https://discuss.pytorch.org/t/minimum-cuda-compute-compatibility-for-pytorch-1-3/60794>\
**Category:** Uncategorized\
**Created:** [November 12, 2019, 10:54pm UTC](https://discuss.pytorch.org/t/minimum-cuda-compute-compatibility-for-pytorch-1-3/60794 "2019-11-12T22:54:06Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![zhaopku](https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/z/ecc23a/32.png) [@zhaopku](https://discuss.pytorch.org/u/zhaopku)\
**Post date:** [November 12, 2019, 10:54pm UTC](https://discuss.pytorch.org/t/minimum-cuda-compute-compatibility-for-pytorch-1-3/60794/1 "2019-11-12T22:54:06Z")

</div>

I am using K40c GPUs with CUDA compute compatibility 3.5. I installed PyTorch via

> conda install pytorch torchvision cudatoolkit=10.1 -c pytorch

However, when I run the following program:

```auto
import torch

print(torch.cuda.is_available())
print(torch.version.cuda)
x = torch.tensor(1.0).cuda()
y = torch.tensor(2.0).cuda()

print(x+y)

```

I have error message:

```auto
True
10.1.243
Traceback (most recent call last):
  File "example.py", line 8, in <module>
    print(x+y)
RuntimeError: CUDA error: no kernel image is available for execution on the device

```

I am pretty sure that GPU driver and cuda toolkit are properly installed. Output of `nvidia-smi`:

```auto
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 418.74 Driver Version: 418.74 CUDA Version: 10.1 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 Tesla K40c On | 00000000:04:00.0 Off | 0 |
| 23% 39C P8 23W / 235W | 0MiB / 11441MiB | 0% Default |
+-------------------------------+----------------------+----------------------+

```

I do not have problems when I use PyTorch 1.1 with CUDA 9.0.176. My guess is PyTorch no longer supports K40c as its CUDA compute compatibility is too low (3.5). Or are there any other problems to this? And is there a solution so that I can use PyTorch 1.3 with K40c?

---

<div class="post-metadata">

**Author:** ![ptrblck](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/ptrblck/32/1823_2.png) [@ptrblck](https://discuss.pytorch.org/u/ptrblck)\
**Post date:** [November 12, 2019, 11:16pm UTC](https://discuss.pytorch.org/t/minimum-cuda-compute-compatibility-for-pytorch-1-3/60794/2 "2019-11-12T23:16:56Z")

</div>

CUDA10.1 should support GPUs with compute capability 3.0 to 7.5.  
Are you using Windows? If so, the minimal driver seems to be a bit higher than for Linux systems, i.e. `418.96`.

---

<div class="post-metadata">

**Author:** ![zhaopku](https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/z/ecc23a/32.png) [@zhaopku](https://discuss.pytorch.org/u/zhaopku)\
**Post date:** [November 12, 2019, 11:29pm UTC](https://discuss.pytorch.org/t/minimum-cuda-compute-compatibility-for-pytorch-1-3/60794/3 "2019-11-12T23:29:44Z")

</div>

No, I am using Linux, and according to nvidia, the minimum driver for Linux is 418.39. And ideas of why I am having the above problem?

---

<div class="post-metadata">

**Author:** ![zhaopku](https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/z/ecc23a/32.png) [@zhaopku](https://discuss.pytorch.org/u/zhaopku)\
**Post date:** [November 12, 2019, 11:32pm UTC](https://discuss.pytorch.org/t/minimum-cuda-compute-compatibility-for-pytorch-1-3/60794/4 "2019-11-12T23:32:09Z")

</div>

Please see my below comments. I don’t think I am using a too low version of gpu driver.

---

<div class="post-metadata">

**Author:** ![ptrblck](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/ptrblck/32/1823_2.png) [@ptrblck](https://discuss.pytorch.org/u/ptrblck)\
**Post date:** [November 12, 2019, 11:42pm UTC](https://discuss.pytorch.org/t/minimum-cuda-compute-compatibility-for-pytorch-1-3/60794/5 "2019-11-12T23:42:56Z")

</div>

Yes, that’s why I asked about Windows. 😉  
The driver should be new enough for Linux.

It seems the minimal compute capability is now 3.7 based on [this commit](https://github.com/pytorch/builder/commit/2aac90bd723dfbb3dc7728152bf0e6877ec4da16#diff-65bdb50b3eee4c380f3b65973141e454) for the binaries, so you might need to build from source.

---

<div class="post-metadata">

**Author:** ![ntomita](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/ntomita/32/33152_2.png) [@ntomita](https://discuss.pytorch.org/u/ntomita)\
**Post date:** [November 20, 2019, 5:02pm UTC](https://discuss.pytorch.org/t/minimum-cuda-compute-compatibility-for-pytorch-1-3/60794/6 "2019-11-20T17:02:11Z")

</div>

@ptrblck Why the stable 1.3 is also affected by this change? I observed exactly the same issue @zhaopku mentioned on my K40c gpus with PyTorch 1.3 installed via conda and drivers both 418 and 440. Shouldn’t this only affect for PyTorch 1.4+?

---

<div class="post-metadata">

**Author:** ![ntomita](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/ntomita/32/33152_2.png) [@ntomita](https://discuss.pytorch.org/u/ntomita)\
**Post date:** [November 20, 2019, 7:20pm UTC](https://discuss.pytorch.org/t/minimum-cuda-compute-compatibility-for-pytorch-1-3/60794/7 "2019-11-20T19:20:09Z")

</div>

So apparently the support was dropped at pytorch 1.3.1. I believe merging such change in minor revision is not nice or at least it should be clearly written and announced somewhere.

---

<div class="post-metadata">

**Author:** ![ptrblck](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/ptrblck/32/1823_2.png) [@ptrblck](https://discuss.pytorch.org/u/ptrblck)\
**Post date:** [November 20, 2019, 8:46pm UTC](https://discuss.pytorch.org/t/minimum-cuda-compute-compatibility-for-pytorch-1-3/60794/8 "2019-11-20T20:46:54Z")

</div>

It might have been updated in `1.3.1` and I agree with you regarding mentioning it in the release notes.

---

<div class="post-metadata">

**Author:** ![surya00060](https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/s/c2a13f/32.png) [@surya00060](https://discuss.pytorch.org/u/surya00060)\
**Post date:** [February 23, 2020, 5:59pm UTC](https://discuss.pytorch.org/t/minimum-cuda-compute-compatibility-for-pytorch-1-3/60794/9 "2020-02-23T17:59:19Z")

</div>

It would be great if the minimum CUDA compute compatibility is mentioned at the downloads page.

---

<div class="post-metadata">

**Author:** ![Brando\_Miranda](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/brando_miranda/32/14355_2.png) [@Brando\_Miranda](https://discuss.pytorch.org/u/Brando_Miranda)\
**Post date:** [June 9, 2020, 3:52pm UTC](https://discuss.pytorch.org/t/minimum-cuda-compute-compatibility-for-pytorch-1-3/60794/10 "2020-06-09T15:52:31Z")

</div>

Can you link the page please?

* * *

related:

- [https://github.com/pytorch/pytorch/issues/31285](https://github.com/pytorch/pytorch/issues/31285)
- [Minimum CUDA compute compatibility for PyTorch 1.3](https://discuss.pytorch.org/t/minimum-cuda-compute-compatibility-for-pytorch-1-3/60794/10)

---

<div class="post-metadata">

**Author:** ![jondo](https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/j/f08c70/32.png) [@jondo](https://discuss.pytorch.org/u/jondo)\
**Post date:** [January 27, 2022, 8:19am UTC](https://discuss.pytorch.org/t/minimum-cuda-compute-compatibility-for-pytorch-1-3/60794/11 "2022-01-27T08:19:57Z")

</div>

This would have helped here (but is still open):

> <https://github.com/pytorch/pytorch/issues/36066>
>
> \## 🚀 Feature
> Add specific Warning/Error message for unsupported GPU or Systems …
> 
> \## Motivation
> 
> Currently prebuilt binaries only support specific cuda versions and systems. When an unsupported device install pytorch and try to use cuda, it gets generic error "RuntimeError: CUDA error: no kernel image is available for execution on the device" This error is very confusing for beginners and easy to miss original reason.
> 
> \## Pitch
> 
> Instead of getting generic error. More specific error would be nice. Briefly explaining current binary is not supports GPU or system. Maybe it can also include some FAQ link for further details or solutions
> 
> \## Alternatives
> 
> 
> \## Additional context
> 
> Original bug report \[#31285\](https://github.com/pytorch/pytorch/issues/31285)
> 
> 
> cc @ngimel
