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

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。

声明:本站所有项目资源都可以正常运行,亲测无错!而且我们录制了演示视频,在我们注明的环境版本下,项目运行效果完全和演示视频一致。客服QQ:下载须知