NVIDIA CUDA Compiler Driver NVCC

NVIDIA CUDA Compiler Driver NVCC

        • [4.2.8.23. `--list-gpu-code` (`-code-ls`)](#4.2.8.23. --list-gpu-code (-code-ls))
        • [4.2.8.24. `--list-gpu-arch` (`-arch-ls`)](#4.2.8.24. --list-gpu-arch (-arch-ls))
  • References

https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/

The documentation for nvcc, the CUDA compiler driver.

CUDA code runs on both the central processing unit (CPU) and graphics processing unit (GPU). NVCC separates these two parts and sends host code (the part of code which will be run on the CPU) to a C compiler like GNU Compiler Collection (GCC) or Intel C++ Compiler (ICC) or Microsoft Visual C++ Compiler, and sends the device code (the part which will run on the GPU) to the GPU. The device code is further compiled by NVCC. NVCC is based on LLVM.

Any source file containing CUDA language extensions (.cu) must be compiled with nvcc.

  • Nvidia CUDA Compiler (NVCC)

Nvidia CUDA Compiler (NVCC) is a compiler by Nvidia intended for use with CUDA.

复制代码
strong@foreverstrong:~$ which nvcc
/usr/local/cuda-8.0/bin/nvcc

C:\Users\cheng>nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Fri_Feb__8_19:08:26_Pacific_Standard_Time_2019
Cuda compilation tools, release 10.1, V10.1.105

C:\Users\cheng>

C:\Users\cheng>nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Fri_Feb__8_19:08:26_Pacific_Standard_Time_2019
Cuda compilation tools, release 10.1, V10.1.105

C:\Users\cheng>

C:\Users\cheng>nvidia-smi
Tue Feb 25 23:59:24 2025
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 528.49       Driver Version: 528.49       CUDA Version: 12.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name            TCC/WDDM | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ... WDDM  | 00000000:01:00.0 Off |                  N/A |
| N/A   44C    P0    22W /  60W |      0MiB /  6144MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

C:\Users\cheng>

nvidia-sminvcc --version 显示的 CUDA Version 差异:

  • nvcc --version refers to the version of the CUDA toolkit installed on the system. The CUDA toolkit includes the compiler, libraries, and other tools. (NVIDIA Toolkit driver)
  • nvidia-smi refers to the CUDA GPU driver version supported by the installed NVIDIA graphics driver. (GPU driver, aka CUDA Driver)

The CUDA driver version must be greater than or equal to the CUDA toolkit version for proper functionality.

复制代码
strong@foreverstrong:~$ ls -l /dev/nv*
crw-rw-rw- 1 root root 195,   0 11月  7 14:59 /dev/nvidia0
crw-rw-rw- 1 root root 195, 255 11月  7 14:59 /dev/nvidiactl
crw-rw-rw- 1 root root 195, 254 11月  7 14:59 /dev/nvidia-modeset
crw-rw-rw- 1 root root 242,   0 11月  7 14:59 /dev/nvidia-uvm
crw-rw-rw- 1 root root 242,   1 11月  7 19:07 /dev/nvidia-uvm-tools
4.2.8.23. --list-gpu-code (-code-ls)

List the non-accelerated gpu architectures (sm_XX) supported by the tool and exit.

If both --list-gpu-code and --list-gpu-arch are set, the list is displayed using the same format as the --generate-code value.

4.2.8.24. --list-gpu-arch (-arch-ls)

List the non-accelerated virtual device architectures (compute_XX) supported by the tool and exit.

If both --list-gpu-arch and --list-gpu-code are set, the list is displayed using the same format as the --generate-code value.

复制代码
nvcc --list-gpu-arch

References

1\] Yongqiang Cheng,

相关推荐
赞奇科技Xsuperzone16 分钟前
DGX Spark 实战解析:模型选择与效率优化全指南
大数据·人工智能·gpt·spark·nvidia
视***间1 天前
方寸之间,算力之巅 视程空间—EDG SC6N0-S T5X 超算计算机以 Jetson AGX Thor 重构个人计算边界
边缘计算·nvidia·算力·ai算力·视程空间
万俟淋曦2 天前
NVIDIA DriveOS 推动新一代智能汽车实现突破
人工智能·ai·汽车·nvidia·智能汽车·driveos·driveworks
安全二次方security²4 天前
CUDA C++编程指南(1)——简介
nvidia·cuda·c/c++·device·cuda编程·architecture·compute unified
算家计算8 天前
英伟达亮出最强AI芯片!性能暴增3倍,算力竞赛迎来新节点
人工智能·nvidia·芯片
扫地的小何尚11 天前
AI创新的火花:NVIDIA DGX Spark开箱与深度解析
大数据·人工智能·spark·llm·gpu·nvidia·dgx
扫地的小何尚13 天前
一小时内使用NVIDIA Nemotron创建你自己的Bash计算机使用智能体
开发语言·人工智能·chrome·bash·gpu·nvidia
安全二次方security²14 天前
CUDA-GDB(11)——调试示例演练
gdb·nvidia·cuda·调试·cuda-gdb·autostep·mpi cuda
BothSavage21 天前
Ubuntu-8卡H20服务器升级nvidia驱动+cuda版本
linux·服务器·ubuntu·gpu·nvidia·cuda·nvcc
mortimer25 天前
在 Windows 上部署 NVIDIA Parakeet-TDT 遇到的坑
python·github·nvidia