1.环境

版本 Windows 10 企业版
版本号 21H2
安装日期 ‎2022/‎3/‎13
操作系统内部版本 19044.1826
体验 Windows Feature Experience Pack 120.2212.4180.0

2.搭建GPU加速环境

a.确定主机显卡驱动版本:在“NVIDIA控制面板”→“系统属性”查看显卡驱动版本

b.确定显卡驱动支持CUDA版本(网上有人说显卡驱动中给出的CUDA版本是此版本显卡驱动能支持的最高CUDA版本)

c. 通过nvidia官网(Release Notes :: CUDA Toolkit Documentation )确定系统所安装显卡驱动支持最高CUDA版本

Table 2. CUDA Toolkit and Minimum Required Driver Version for CUDA Minor Version Compatibility

CUDA Toolkit Minimum Required Driver Version for CUDA Minor Version Compatibility*
Linux x86_64 Driver Version Linux AArch64 Driver Version Windows x86_64 Driver Version
CUDA 11.7.x >=450.80.02 >=452.39
CUDA 11.6.x
CUDA 11.5.x
CUDA 11.4.x
CUDA 11.3.x
CUDA 11.2.x
CUDA 11.1 (11.1.0)
CUDA 11.0 (11.0.3) >=450.36.06** >=450.28.01** >=451.22**

* 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 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

For convenience, the NVIDIA driver is installed as part of the CUDA Toolkit installation. Note that this driver is for development purposes and is not recommended for use in production with Tesla GPUs.

For running CUDA applications in production with Tesla GPUs, it is recommended to download the latest driver for Tesla GPUs from the NVIDIA driver downloads site at Official Drivers | NVIDIA.

During the installation of the CUDA Toolkit, the installation of the NVIDIA driver may be skipped on Windows (when using the interactive or silent installation) or on Linux (by using meta packages).

For more information on customizing the install process on Windows, see Installation Guide Windows :: CUDA Toolkit Documentation.

For meta packages on Linux, see Installation Guide Linux :: CUDA Toolkit Documentation

d.从nvidia官网(CUDA Toolkit Archive | NVIDIA Developer )下载对应版本cuda(需要注册官方账号才能下载)

e.从nvidia官网(cuDNN Archive | NVIDIA Developer)下载cuda对应版本cudnn,解压cuDNN的安装压缩包,得到三个文件夹和一个txt,全部复制粘贴到cuda安装目录(C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\V11.6)

f.安装Anaconda3-2022.05-Windows-x86_64

g.从官网(Start Locally | PyTorch)安装Pytorch

cd D:\SF\03.Win\01.Env\02.Python\Anaconda3-2022.05-Windows-x86_64-ai\Scripts

pip3.exe install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu116

在cmd中执行上一个命令时可能出现"Defaulting to user installation because normal site-packages is not writeable",是因为安装Anaconda3时是指定安装给所有用户使用(安装时提示获取管理员权限),而调用pip3时打开cmd是使用的当前非管理员账户。改用管理员账户打开cmd可以解决此问题。

在cmd中执行上一个命令时可能出现"Can't connect to HTTPS URL because the SSL module is not available"错误提示,是因为Anaconda3的lib没有被加入到系统path环境中,在cmd中执行 set PATH=%PATH%;D:\SF\03.Win\01.Env\02.Python\Anaconda3-2022.05-Windows-x86_64-ai\Library\bin

在cmd中执行上一个命令时可能出现网速慢的情况,可以给cmd设置代理,

set http_proxy=http://127.0.0.1:1189
set https_proxy=http://127.0.0.1:1189

测试安装是否成功,进入python:

import torch
print(torch.__version__)
不报错且输出版本号即正确。

torch.cuda.is_available()
这可以测试cuda是否可用

h.安装tensorflow    pip3.exe install tensorflow-gpu==2.9.0

测试安装是否成功

>>> import tensorflow as tf
>>> print(tf.test.is_gpu_available())

3.FQA

3.1.conda环境中通过pip安装包时提示文件名过长

Enable Long Paths in Windows 10

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem]
"LongPathsEnabled"=dword:00000001

3.2.在conda环境中通过conda安装包失败

可以尝试使用pip安装

3.3.conda环境中通过pip安装包时提示“ClobberError: This transaction has incompatible packages due to a shared path”,

pip安装tensorflow-gpu后提示"cudart64_101.dll not found"

修改用户目录中的文件C:\Users\yu\.condarc,

channels:
- defaults

将channels修改如下

channels:
- conda-forge

3.4.Anaconda3安装时,可以指定“给当前用户”;否则使用Anaconda3的软件必须以管理员身份运行

3.5.cmd设置或修改环境变量

set PATH=%PATH%;D:\SF\03.Win\01.Env\02.Python\Anaconda3-2022.05-Windows-x86_64-3.9.12\envs\conda-py-3.7\Library\bin

set PATH=%PATH%;D:\SF\03.Win\01.Env\02.Python\Anaconda3-2022.05-Windows-x86_64-3.9.12\Library\bin
set PATH=%PATH%;D:\SF\03.Win\01.Env\02.Python\Anaconda3-2022.05-Windows-x86_64-3.9.12-jm\Library\bin

3.6.cmd设置proxy

set https_proxy=http://127.0.0.1:8002
set http_proxy=http://127.0.0.1:8002

在Win10平台上搭建AI训练(英伟达GPU加速)环境相关推荐

  1. 本周AI热点回顾:百度推出全球首个mRNA疫苗不稳定性解决方案、性能提升20倍:英伟达GPU旗舰A100

    01 百度推出全球首个mRNA疫苗不稳定性解决方案LinearDesign 新冠疫情爆发后,RNA设计领域世界知名专家.斯坦福大学生物化学系Rhiju Das教授关注到疫苗研发存在的一个非常棘手的问题 ...

  2. 本周AI热点回顾:十四五规划“人工智能第一!”;深度学习漫画第一卷现已开源;英伟达GPU“屠榜”MLPerf

    点击左上方蓝字关注我们 01 人工智能第一!十四五规划建议正式发布 近日,中国共产党第十九届中央委员会第五次全体会议深入分析国际国内形势后,就制定国民经济和社会发展「十四五」规划和2035年远景目标提 ...

  3. 玩深度学习选哪块英伟达 GPU?有性价比排名还不够!

    本文來源地址:https://www.leiphone.com/news/201705/uo3MgYrFxgdyTRGR.html 与"传统" AI 算法相比,深度学习(DL)的计 ...

  4. 5 年提速 500 倍,英伟达 GPU 创纪录突破与技术有哪些?

    作者:诗颖 摘要:日前,英伟达 Developer Blog 上一篇博文详细陈述了英伟达 Volta Tensor Core GPU 在深度学习社群取得的巨大突破,以及种种突破背后的技术细节. 201 ...

  5. AMD与Intel,挑战英伟达GPU

    AMD与Intel,挑战英伟达GPU 作为CPU界的霸主,英特尔对高性能GPU市场一直没有死心.从1998年和Real3D合作推出的i740独显,到2009年无故流产的Larrabee独显,再到去年公 ...

  6. 谷歌TPU2代有望取代英伟达GPU?测评结果显示…

    原作:Elmar Haußmann 安妮 Root 编译自 RiseML Blog 量子位 出品 | 公众号 QbitAI 去年5月,谷歌推出了第二代TPU芯片,这是一个自定义开发的深度学习加速芯片, ...

  7. 薅资本主义羊毛新姿势,英伟达GPU免费用

    作者 | 阿司匹林 出品 | 人工智能头条(公众号ID:AI_Thinker) 在到处都是开源工具和学习资料的今天,深度学习的门槛已经大大降低.然而,学习的门槛降低并不意味着学习的成本降低了,比如说动 ...

  8. 英伟达GPU“屠榜”,谷歌TPU“退赛”,MLPerf最新推理榜单出炉

    晓查 发自 凹非寺  量子位 报道 | 公众号 QbitAI MLPerf推理基准测试第二版(v0.7)近日发布. 在数据中心分类下,英伟达2年前的推理卡T4依然能"大杀特杀",7 ...

  9. 英伟达GPU中的Tnesor Cores数量多寡与显卡性能有什么关联?

    前言 最近在调研常用显卡的参数,看到Nvidia Tensor Cores常用于其中作为对比,呈现在性能好的显卡比如A100比RTX 3060更多更全面,开始思考Tensor Cores细致的作用是什 ...

最新文章

  1. 阿里问题定位神器 Arthas 的骚操作,定位线上BUG,超给力
  2. 剑指offer:连续子数组的最大和
  3. 强交变磁场下的AD转换数值的变化
  4. 死锁产生的原因及四个必要条件
  5. 在mysql中更改数据类型_如何在MySQL中更改列的数据类型?
  6. svgaps绘制时不能用中文命名吗_设计师需要了解的切图命名规范
  7. 只用2000行代码实现google protocol buffer c++版的功能
  8. android dts配置_rk3288 — i2s dts配置
  9. iOS设计模式 - 桥接
  10. Java-整数相加求和
  11. 学前儿童语言教育模拟试卷c卷,学前儿童语言教育模拟试卷参考答案.doc
  12. 电脑数据丢失,如何才能够快速将被删的数据文件恢复找回?
  13. ubuntu18.04 linux journalctl 命令
  14. imovie结合QuickTime Player进行手机视频剪辑
  15. CSS盒模型之内边距、边框、外边距 十九问(持续更新)
  16. 赛福基因公开课第二节《神经系统遗传病基因检测简介》
  17. 关于使用佳信客服产品时产生的14问
  18. docker 安装redmine
  19. 手工卡纸做机器人_折纸大全手把手教你安卓机器人的手工制作教程
  20. 出线资格 finals berth

热门文章

  1. 电子护照ocr扫描系统
  2. Mac 远程连接 Windows 桌面工具 Parallels Client 使用教程
  3. 计算机的基础知识---位(bit)、字节(byte)、编码(Encoding)和大小端
  4. 突发!LayUI宣布下线
  5. Cris 的Python笔记(十一):面向对象三大特征之多态
  6. OpenWrt 4G路由器DIY
  7. 台式计算机卡拉ok点歌系统,台式机改造歌厅点歌系统几款实用范例
  8. word插入图片,嵌入型,无效果
  9. 拜托,面试请不要再问我 SpringCloudAlibaba 底层原理
  10. 标量、矢量、矩阵的求导归纳