When you are compiling CUDA code for Nvidia GPUs it’s important to know which is the Compute Capability of the GPU that you are going to use. How many times you got the error
nvcc fatal : Unsupported gpu architecture ‘compute_XX’
and you do not know how to correctly solve it.
The solution is relatively simple, you must add the correct FLAG to “nvcc” call:
-gencode arch=compute_XX,code=[sm_XX,compute_XX]
where “XX” is the Compute Capability of the Nvidia GPU board that you are going to use.
Now you need to know the correct value to replace “XX“, Nvidia helps us with the useful “CUDA GPUs” webpage.
For example, if your GPU is an Nvidia Titan Xp, you know that it is a “GeForce product“, you search for it in the right table and you find that its Compute Capability is 6.1, so the correct FLAG to use in the compiler is
-gencode arch=compute_61,code=[sm_61,compute_61]
if you are instead an embedded developer and you are a lucky owner of an Nvidia Jetson TX2, you must search in “TEGRA/Jetson products” and you will find that the Compute Capability of the TX2 is 6.2, so you need to use this configuration:
-gencode arch=compute_62,code=[sm_62,compute_62]
straightforward!
If you are compiling software that will run on different machines and you do not know exactly which GPU is installed on them, you can generate an application that supports more than one Nvidia GPU technology:
ARCH= -gencode arch=compute_30,code=[sm_30,compute_30] \ -gencode arch=compute_35,code=[sm_35,compute_35] \ -gencode arch=compute_50,code=[sm_50,compute_50] \ -gencode arch=compute_52,code=[sm_52,compute_52] \ -gencode arch=compute_61,code=[sm_61,compute_61] nvcc $(ARCH) [other nvcc options]
Following a list of the compute capabilities for the most common GPUs:
Jetson Products
GPU | Compute Capability |
---|---|
Jetson AGX Xavier | 7.2 |
Jetson Nano | 5.3 |
Jetson TX2 | 6.2 |
Jetson TX1 | 5.3 |
Tegra X1 | 5.3 |
Tesla Workstation Products
GPU | Compute Capability |
---|---|
Tesla K80 | 3.7 |
Tesla K40 | 3.5 |
Tesla K20 | 3.5 |
Tesla C2075 | 2.0 |
Tesla C2050/C2070 | 2.0 |
Tesla NVIDIA Data Center Products
GPU | Compute Capability |
---|---|
NVIDIA A100 | 8.0 |
NVIDIA T4 | 7.5 |
NVIDIA V100 | 7.0 |
Tesla P100 | 6.0 |
Tesla P40 | 6.1 |
Tesla P4 | 6.1 |
Tesla M60 | 5.2 |
Tesla M40 | 5.2 |
Tesla K80 | 3.7 |
Tesla K40 | 3.5 |
Tesla K20 | 3.5 |
Tesla K10 | 3.0 |
Quadro Desktop Products
GPU | Compute Capability |
---|---|
Quadro RTX 8000 | 7.5 |
Quadro RTX 6000 | 7.5 |
Quadro RTX 5000 | 7.5 |
Quadro RTX 4000 | 7.5 |
Quadro GV100 | 7.0 |
Quadro GP100 | 6.0 |
Quadro P6000 | 6.1 |
Quadro P5000 | 6.1 |
Quadro P4000 | 6.1 |
Quadro P2200 | 6.1 |
Quadro P2000 | 6.1 |
Quadro P1000 | 6.1 |
Quadro P620 | 6.1 |
Quadro P600 | 6.1 |
Quadro P400 | 6.1 |
Quadro M6000 24GB | 5.2 |
Quadro M6000 | 5.2 |
Quadro K6000 | 3.5 |
Quadro M5000 | 5.2 |
Quadro K5200 | 3.5 |
Quadro K5000 | 3.0 |
Quadro M4000 | 5.2 |
Quadro K4200 | 3.0 |
Quadro K4000 | 3.0 |
Quadro M2000 | 5.2 |
Quadro K2200 | 3.0 |
Quadro K2000 | 3.0 |
Quadro K2000D | 3.0 |
Quadro K1200 | 5.0 |
Quadro K620 | 5.0 |
Quadro K600 | 3.0 |
Quadro K420 | 3.0 |
Quadro 410 | 3.0 |
Quadro Plex 7000 | 2.0 |
Quadro Mobile Products
GPU | Compute Capability |
---|---|
RTX 5000 | 7.5 |
RTX 4000 | 7.5 |
RTX 3000 | 7.5 |
T2000 | 7.5 |
T1000 | 7.5 |
P620 | 6.1 |
P520 | 6.1 |
Quadro P5200 | 6.1 |
Quadro P4200 | 6.1 |
Quadro P3200 | 6.1 |
Quadro P5000 | 6.1 |
Quadro P4000 | 6.1 |
Quadro P3000 | 6.1 |
Quadro P2000 | 6.1 |
Quadro P1000 | 6.1 |
Quadro P600 | 6.1 |
Quadro P500 | 6.1 |
Quadro M5500M | 5.2 |
Quadro M2200 | 5.2 |
Quadro M1200 | 5.0 |
Quadro M620 | 5.2 |
Quadro M520 | 5.0 |
Quadro K6000M | 3.0 |
Quadro K5200M | 3.0 |
Quadro K5100M | 3.0 |
Quadro M5000M | 5.0 |
Quadro K500M | 3.0 |
Quadro K4200M | 3.0 |
Quadro K4100M | 3.0 |
Quadro M4000M | 5.0 |
Quadro K3100M | 3.0 |
Quadro M3000M | 5.0 |
Quadro K2200M | 3.0 |
Quadro K2100M | 3.0 |
Quadro M2000M | 5.0 |
Quadro K1100M | 3.0 |
Quadro M1000M | 5.0 |
Quadro K620M | 5.0 |
Quadro K610M | 3.5 |
Quadro M600M | 5.0 |
Quadro K510M | 3.5 |
Quadro M500M | 5.0 |
NVS Desktop Products
GPU | Compute Capability |
---|---|
NVIDIA NVS 810 | 5.0 |
NVIDIA NVS 510 | 3.0 |
NVIDIA NVS 315 | 2.1 |
NVIDIA NVS 310 | 2.1 |
NVS Mobile Products
GeForce and TITAN Products
GeForce Notebook Products
[Source] Nvidia Developer – Last update: January 19th, 2021