Skip to content
Search

CUDA:Architecture

lastmod 2026-08-20created 2016-11-033 edits

How to check supported architectures

nvidia-smi by itself does not directly print the full list of architectures (sm_XX) that the system or driver is compatible with, and its ability to check the Compute Capability (sm version) of the currently installed GPU is also limited.

Ways to check the full sm_XX list and the sm version of the current GPU are as follows.

Check the full sm_XX list supported by the currently installed CUDA compiler (nvcc)

You can check the list of supported architectures for the installed CUDA toolkit version.

nvcc --help | grep -A 30 -- "--gpu-architecture"

Using PyTorch (the easiest way)

## Pytorch 설치 후 실행
python3 -c "import torch; print(f'sm_{torch.cuda.get_device_capability()[0]}{torch.cuda.get_device_capability()[1]}')"

Build and run CUDA Samples / deviceQuery

## CUDA Samples 디렉토리에서 deviceQuery 빌드 후 실행
./deviceQuery | grep "CUDA Capability"

Thread vs Block vs Warp

Thread

Block

Warp

When a thread block runs, it is executed in units of Warps. Each thread block is mapped to one or more warps, which usually consist of 32 threads. For example, a thread block of 128 threads is mapped to 4 Warps of 32 threads each. However, if the thread block size is not a multiple of 32, the unused threads in the last warp are automatically disabled.

Cuda_warp_example_image.png

See also

Favorite site

author Zer0 sitemap