当前位置: 首页 > news >正文

配置有nvlink的H20使用pytorch报错

背景

装有nvlink的h20机器上配置好驱动和cuda之后使用pytorch报错

(pytorch2.4) root@xx-dev-H20:~# python
Python 3.12.0 | packaged by Anaconda, Inc. | (main, Oct 2 2023, 17:29:18) [GCC 11.2.0] on linux
Type “help”, “copyright”, “credits” or “license” for more information.
>>> import torch
torch.>>> torch.cuda.is_available()
/root/anaconda3/envs/pytorch2.4/lib/python3.12/site-packages/torch/cuda/init.py:128: UserWarning: CUDA initialization: Unexpected error from cudaGetDeviceCount(). Did you run some cuda functions before calling NumCudaDevices() that might have already set an error? Error 802: system not yet initialized (Triggered internally at /opt/conda/conda-bld/pytorch_1724789220573/work/c10/cuda/CUDAFunctions.cpp:108.)
return torch._C._cuda_getDeviceCount() > 0
False

解决

在nvidia fabricmanager官网找到和H20机器上的驱动版本相对应的fabricmanager版本安装,启动即可

(pytorch2.4) root@xx-dev-H20:/opt/fabricmanager-linux-x86_64-550.163.01-archive# python
Python 3.12.0 | packaged by Anaconda, Inc. | (main, Oct  2 2023, 17:29:18) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 
>>> 
>>> 
>>> import torch
>>> torch.
KeyboardInterrupt
>>> torch.cuda.is_available()
True

查看nvlink吞吐量
nvidia-smi nvlink --getthroughput d
watch -n 1 ‘nvidia-smi nvlink -gt d’

reference

fabricmanager下载地址
https://developer.download.nvidia.cn/compute/nvidia-driver/redist/fabricmanager/linux-x86_64/
nccl使用nvlink通信
https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/env.html

http://www.lqws.cn/news/515233.html

相关文章:

  • 在树莓派上用 .NET8.0 挂载TCP服务端
  • React ref 和 JS 对象的区别
  • Linux系统之Tomcat服务
  • django csrf的局限性
  • 亚远景-ASPICE与ISO 26262:汽车安全与软件质量的协同
  • 云原生灰度方案对比:服务网格灰度(Istio ) 与 K8s Ingress 灰度(Nginx Ingress )
  • 【Pandas】pandas DataFrame asfreq
  • stm32week17+18+19+20
  • IP-GUARD外设以及网络禁用策略制定
  • ubuntu22.04可以执行sudo命令,但不在sudo组
  • 学习日记-spring-day37-6.25
  • NETCONF 典型工作流程
  • Spark 之 UT
  • 新能源汽车电池类型差异分析
  • 网络安全漏洞扫描是什么?如何识别目标进行扫描?
  • LangGraph--基础学习(Subgraphs 子图)
  • easy-caffeine一个简洁灵活易用基于caffeine的本地缓存框架
  • dovi交叉编译方法(编译libdovi.so)
  • PyTorch 入门之官方文档学习笔记(二)训练分类器
  • 利用Pytorch玩一玩文生图的HDGAN
  • 长尾关键词SEO优化高效策略
  • 微信小程序安卓手机输入框文字飘出输入框
  • 【服务器】服务器选型设计
  • Hadoop之HDFS
  • 【iOS】iOS崩溃总结
  • 一篇文章了解XML
  • 了解笔记本电脑制造:从品牌到代工厂的全产业链
  • Node.js-fs模块
  • linux内核中的链表实现
  • sentinel与seata组件在微服务中的基本作用