CUDA版本 更新

本文介绍了Windows系统下CUDA版本升级的相关内容。先阐述了升级前需了解CUDA的兼容性,运行CUDA应用程序对系统的要求。接着给出升级实操步骤,包括查看本机显卡型号、显卡硬件对应的驱动版本、显卡驱动版本下对应的CUDA版本,最后可一键安装更新驱动版本。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一. 升级版本之前先了解一下CUDA的兼容性

The NVIDIA® CUDA® Toolkit enables developers to build NVIDIA GPU accelerated compute applications for desktop computers, enterprise, and data centers to hyperscalers. It consists of the CUDA compiler toolchain including the CUDA runtime (cudart) and various CUDA libraries and tools. To build an application, a developer has to install only the CUDA Toolkit and necessary libraries required for linking.

In order to run a CUDA application, the system should have a CUDA enabled GPU and an NVIDIA display driver that is compatible with the CUDA Toolkit that was used to build the application itself. If the application relies on dynamic linking for libraries, then the system should have the right version of such libraries as well.

NVIDIA® CUDA® Toolkit使开发人员能够为桌面计算机、企业和数据中心到超大规模计算提供 NVIDIA GPU 加速的计算应用程序。它包括 CUDA 编译器工具链,包括 CUDA 运行时(cudart)和各种 CUDA 库和工具。要构建一个应用程序,开发人员只需安装 CUDA 工具包和链接所需的必要库。

要运行CUDA应用程序,系统应具有支持CUDA的GPU,并且具有与用于构建应用程序的CUDA工具包兼容的NVIDIA显示驱动程序。如果应用程序依赖于动态链接的库,那么系统还应具有正确版本的这些库。

Figure 1. Components of CUDA

2、通常,升级CUDA Toolkit 涉及升级工具包和驱动程序(both the toolkit and the driver) ,以获取最新的工具包和驱动程序功能。

Every CUDA toolkit also ships with an NVIDIA display driver package for convenience. This driver supports all the features introduced in that version of the CUDA Toolkit. Please check the toolkit and driver version mapping in the release notes. The driver package includes both the user mode CUDA driver (libcuda.so) and kernel mode components necessary to run the application.

Typically, upgrading a CUDA Toolkit involves upgrading both the toolkit and the driver to get the bleeding edge toolkit and driver capabilities.

 

二. 升级版本实操

1.查看本机显卡型号

电脑搜索NVIDIA,  调出控制面板如下,eg:GTX 1660ti。

2. 查看显卡硬件对应的驱动版本

官方驱动 | NVIDIA

如本文的GTX1660Ti,

NVIDIA Studio 驱动程序 | 552.22 | Windows 10 64-bit, Windows 11 | NVIDIA下载 Chinese (Simplified) NVIDIA Studio 驱动程序 匹配 Windows 10 64-bit, Windows 11 操作系统. 发布日期 2024.4.16icon-default.png?t=N7T8https://www.nvidia.cn/download/driverResults.aspx/224288/cn/  ​​​​​

结果如下:

3 查看显卡驱动版本下对应的CUDA版本

如GTX1660Ti,对应的最高驱动版本为552.22,基于此查找对应的CUDA版本,官网链接如下

CUDA 12.4 Update 1 Release Notes

 Using a Minimum Required Version that is different from Toolkit Driver Version could be allowed in compatibility mode – please read the CUDA Compatibility Guide for details.

** CUDA 11.0 was released with an earlier driver version, but by upgrading to Tesla Recommended Drivers 450.80.02 (Linux) / 452.39 (Windows), minor version compatibility is possible across the CUDA 11.x family of toolkits.

The version of the development NVIDIA GPU Driver packaged in each CUDA Toolkit release is shown below.

Table 3 CUDA Toolkit and Corresponding Driver Versions

CUDA Toolkit

Toolkit Driver Version

Linux x86_64 Driver Version

Windows x86_64 Driver Version

CUDA 12.4 Update 1

>=550.54.15

>=551.78

CUDA 12.4 GA

>=550.54.14

>=551.61

CUDA 12.3 Update 1

>=545.23.08

>=546.12

CUDA 12.3 GA

>=545.23.06

>=545.84

CUDA 12.2 Update 2

>=535.104.05

>=537.13

CUDA 12.2 Update 1

>=535.86.09

>=536.67

CUDA 12.2 GA

>=535.54.03

>=536.25

CUDA 12.1 Update 1

>=530.30.02

>=531.14

CUDA 12.1 GA

>=530.30.02

>=531.14

CUDA 12.0 Update 1

>=525.85.12

>=528.33

CUDA 12.0 GA

>=525.60.13

>=527.41

CUDA 11.8 GA

>=520.61.05

>=520.06

CUDA 11.7 Update 1

>=515.48.07

>=516.31

CUDA 11.7 GA

>=515.43.04

>=516.01

CUDA 11.6 Update 2

>=510.47.03

>=511.65

CUDA 11.6 Update 1

>=510.47.03

>=511.65

CUDA 11.6 GA

>=510.39.01

>=511.23

CUDA 11.5 Update 2

>=495.29.05

>=496.13

CUDA 11.5 Update 1

>=495.29.05

>=496.13

CUDA 11.5 GA

>=495.29.05

>=496.04

CUDA 11.4 Update 4

>=470.82.01

>=472.50

CUDA 11.4 Update 3

>=470.82.01

>=472.50

CUDA 11.4 Update 2

>=470.57.02

>=471.41

CUDA 11.4 Update 1

>=470.57.02

>=471.41

CUDA 11.4.0 GA

>=470.42.01

>=471.11

CUDA 11.3.1 Update 1

>=465.19.01

>=465.89

CUDA 11.3.0 GA

>=465.19.01

>=465.89

CUDA 11.2.2 Update 2

>=460.32.03

>=461.33

CUDA 11.2.1 Update 1

>=460.32.03

>=461.09

CUDA 11.2.0 GA

>=460.27.03

>=460.82

CUDA 11.1.1 Update 1

>=455.32

>=456.81

CUDA 11.1 GA

>=455.23

>=456.38

CUDA 11.0.3 Update 1

>= 450.51.06

>= 451.82

CUDA 11.0.2 GA

>= 450.51.05

>= 451.48

CUDA 11.0.1 RC

>= 450.36.06

>= 451.22

CUDA 10.2.89

>= 440.33

>= 441.22

CUDA 10.1 (10.1.105 general release, and updates)

>= 418.39

>= 418.96

CUDA 10.0.130

>= 410.48

>= 411.31

CUDA 9.2 (9.2.148 Update 1)

>= 396.37

>= 398.26

CUDA 9.2 (9.2.88)

>= 396.26

>= 397.44

CUDA 9.1 (9.1.85)

>= 390.46

>= 391.29

CUDA 9.0 (9.0.76)

>= 384.81

>= 385.54

CUDA 8.0 (8.0.61 GA2)

>= 375.26

>= 376.51

CUDA 8.0 (8.0.44)

>= 367.48

>= 369.30

CUDA 7.5 (7.5.16)

>= 352.31

>= 353.66

CUDA 7.0 (7.0.28)

>= 346.46

>= 347.62

 4 安装更新驱动版本(一键更新完成)

 

### 如何在Linux系统上升级CUDA版本 对于希望在Linux系统上升级CUDA版本的情况,操作涉及移除旧版CUDA工具包并安装新版。具体命令如下: 当需要卸载现有CUDA组件时,可以执行以下指令来清理已有的CUDA库文件和依赖项: ```bash $ sudo yum remove "*cublas*" "cuda*" ``` 此命令适用于基于Red Hat的企业级Linux发行版及其衍生产品,如CentOS[^1]。 针对Ubuntu这类Debian系操作系统,则推荐先更新本地软件源索引再进行安装或升级动作: ```bash sudo apt-get update ``` 随后按照官方文档指引下载对应架构与系统的CUDA安装器,并通过下列方式完成部署过程(假设已经获取到.run类型的离线安装程序): ```bash chmod +x cuda_*.run sudo ./cuda_*.run --override # 使用--override选项可覆盖先前存在的相同路径下的文件而不中断整个流程 ``` 如果计划采用APT仓库在线安装的形式,在确保网络连接正常的情况下可以直接运行下面的语句序列实现快速便捷地切换至目标版本: ```bash wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-keyring_1.0-1_all.deb sudo dpkg -i cuda-keyring_1.0-1_all.deb sudo apt-get update sudo apt-get -y install cuda-12-1 ``` 上述方法特别适合于那些偏好自动化处理以及保持系统整洁度较高的用户群体[^2]。 另外需要注意的是,在更换了新的CUDA版本之后可能还需要同步调整cuDNN的相关设置以匹配当前使用的框架需求。例如,可以通过apt包管理器轻松搞定这一环节: ```bash sudo apt install libcudnn8=8.9.7.*+cuda12.1-1 \ libcudnn8-dev=8.9.7.*+cuda12.1-1 \ libcudnn8-samples=8.9.7.*+cuda12.1-1 ``` 这里指定了特定版本号以便精确控制兼容性问题[^3]。 最后提醒一点,由于不同硬件平台之间可能存在差异化的适配情况,因此建议事先查阅设备制造商提供的最新驱动支持列表,以免因驱动不兼容而导致不必要的麻烦。比如遇到类似`RuntimeError: The NVIDIA driver on your system is too old (found version 11070)`这样的错误提示时,应当及时访问[NVIDIA官方网站](http://www.nvidia.com/Download/index.aspx)下载相匹配的新版图形处理器驱动程序来进行修复[^4]。
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

LeapMay

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

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

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

打赏作者

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

抵扣说明:

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

余额充值