CUDA|Windows 系统 CUDA、NVCC、CUDNN 版本查看方法

显卡、CUDA Driver、NVCC、CUDA Toolkit、CUDNN 含义详见:https://zhuanlan.zhihu.com/p/91334380

CUDA 官方文档地址:https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html(翻译:【翻译】CUDA 12.0 Toolkit主要组件版本说明

1. 显卡

  • 步骤 1:打开命令提示符(CMD)
  • 步骤 2:进入 CUDA 安装目录(例如 C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\extras\demo_suite
  • 步骤 3:执行命令 deviceQuery.exe

样例:

C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\extras\demo_suite>deviceQuery.exe
deviceQuery.exe Starting...

 CUDA Device Query (Runtime API) version (CUDART static linking)

Detected 1 CUDA Capable device(s)

Device 0: "NVIDIA GeForce GTX 1060 6GB"
  CUDA Driver Version / Runtime Version          11.7 / 9.0
  CUDA Capability Major/Minor version number:    6.1
  Total amount of global memory:                 6144 MBytes (6442188800 bytes)
  (10) Multiprocessors, (128) CUDA Cores/MP:     1280 CUDA Cores
  GPU Max Clock rate:                            1810 MHz (1.81 GHz)
  Memory Clock rate:                             4004 Mhz
  Memory Bus Width:                              192-bit
  L2 Cache Size:                                 1572864 bytes
  Maximum Texture Dimension Size (x,y,z)         1D=(131072), 2D=(131072, 65536), 3D=(16384, 16384, 16384)
  Maximum Layered 1D Texture Size, (num) layers  1D=(32768), 2048 layers
  Maximum Layered 2D Texture Size, (num) layers  2D=(32768, 32768), 2048 layers
  Total amount of constant memory:               65536 bytes
  Total amount of shared memory per block:       49152 bytes
  Total number of registers available per block: 65536
  Warp size:                                     32
  Maximum number of threads per multiprocessor:  2048
  Maximum number of threads per block:           1024
  Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
  Max dimension size of a grid size    (x,y,z): (2147483647, 65535, 65535)
  Maximum memory pitch:                          2147483647 bytes
  Texture alignment:                             512 bytes
  Concurrent copy and kernel execution:          Yes with 5 copy engine(s)
  Run time limit on kernels:                     Yes
  Integrated GPU sharing Host Memory:            No
  Support host page-locked memory mapping:       Yes
  Alignment requirement for Surfaces:            Yes
  Device has ECC support:                        Disabled
  CUDA Device Driver Mode (TCC or WDDM):         WDDM (Windows Display Driver Model)
  Device supports Unified Addressing (UVA):      Yes
  Device PCI Domain ID / Bus ID / location ID:   0 / 1 / 0
  Compute Mode:
     < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >

deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 11.7, CUDA Runtime Version = 9.0, NumDevs = 1, Device0 = NVIDIA GeForce GTX 1060 6GB
Result = PASS

在上例中:有一张显卡,显卡的型号为 “NVIDIA GeForce GTX 1060 6GB”。

2. 显卡驱动(GPU驱动、CUDA Driver)

  • 步骤 1:打开命令提示符(CMD)
  • 步骤 2:执行命令 nvidia-smi

样例:

C:\Users\Changxing>nvidia-smi
Wed Jan  4 23:02:57 2023
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 516.94       Driver Version: 516.94       CUDA Version: 11.7     |
|-------------------------------+----------------------+----------------------+
| 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  On |                  N/A |
| 48%   32C    P8    13W / 130W |    724MiB /  6144MiB |     12%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

在上例中:显卡驱动(Windows x86_64 Driver)的版本为 516.94

3. CUDA Driver Version

CUDA Runtime Version 和 CUDA Driver Version 的区别详见:https://zhuanlan.zhihu.com/p/91334380

方法一
  • 步骤 1:打开命令提示符(CMD)
  • 步骤 2:执行命令 nvidia-smi

样例:

C:\Users\Changxing>nvidia-smi
Wed Jan  4 23:02:57 2023
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 516.94       Driver Version: 516.94       CUDA Version: 11.7     |
|-------------------------------+----------------------+----------------------+
| 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  On |                  N/A |
| 48%   32C    P8    13W / 130W |    724MiB /  6144MiB |     12%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

在上例中:CUDA Driver Version 的版本为 11.7。

方法二
  • 步骤 1:打开命令提示符(CMD)
  • 步骤 2:进入 CUDA 安装目录(例如 C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\extras\demo_suite
  • 步骤 3:执行命令 deviceQuery.exe

样例:

C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\extras\demo_suite>deviceQuery.exe
deviceQuery.exe Starting...

 CUDA Device Query (Runtime API) version (CUDART static linking)

Detected 1 CUDA Capable device(s)

......

deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 11.7, CUDA Runtime Version = 9.0, NumDevs = 1, Device0 = NVIDIA GeForce GTX 1060 6GB
Result = PASS

在上例中:CUDA Runtime Version 的版本为 11.7。

4. CUDA Runtime Version

CUDA Runtime Version 和 CUDA Driver Version 的区别详见:https://zhuanlan.zhihu.com/p/91334380

方法一
  • 步骤 1:打开命令提示符(CMD)
  • 步骤 2:执行命令 nvcc --version

样例:

C:\Users\Changxing>nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2017 NVIDIA Corporation
Built on Fri_Sep__1_21:08:32_Central_Daylight_Time_2017
Cuda compilation tools, release 9.0, V9.0.176

在上例中:CUDA Runtime Version 的版本为 9.0.176。

方法二
  • 步骤 1:打开命令提示符(CMD)
  • 步骤 2:进入 CUDA 安装目录(例如 C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\extras\demo_suite
  • 步骤 3:执行命令 deviceQuery.exe

样例:

C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\extras\demo_suite>deviceQuery.exe
deviceQuery.exe Starting...

 CUDA Device Query (Runtime API) version (CUDART static linking)

Detected 1 CUDA Capable device(s)

......

deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 11.7, CUDA Runtime Version = 9.0, NumDevs = 1, Device0 = NVIDIA GeForce GTX 1060 6GB
Result = PASS

在上例中:CUDA Runtime Version 的版本为 9.0。

5. CUDNN

  • 步骤 1:进入 CUDA 安装目录(例如 C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\include
  • 步骤 2:打开 cudnn.h 文件
  • 步骤 3:搜索 CUDNN_MAJOR

样例:

#define CUDNN_MAJOR 7
#define CUDNN_MINOR 3
#define CUDNN_PATCHLEVEL 1

在上例中:CUDNN 的版本为 7.3.1。

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

长行

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值