AMD cpu 下 Pytorch 多卡并行卡死问题解决
Posted jiangoil
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了AMD cpu 下 Pytorch 多卡并行卡死问题解决相关的知识,希望对你有一定的参考价值。
dataparallel not working on nvidia gpus and amd cpus
问题:
多卡运行时, 网络会卡在那里不能运行.
系统是 AMD Ryzen5 1600x 和 两张taitanXP
之前两张卡是2070+taitanXP是可以多卡运行的, 只不过是显存不一样大...
看了下日志, 都是下面的错误
these error messages were found in the dmesg log: [1118468.873266] nvidia 0000:0a:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x000f address=0x00000000ea13a000 flags=0x0020] [1118468.942145] nvidia 0000:0a:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x000f address=0x00000000ea139068 flags=0x0020] [1118468.942189] nvidia 0000:0a:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x000f address=0x00000000d0000040 flags=0x0020] [1118468.942227] nvidia 0000:0a:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x000f address=0x00000000d00007c0 flags=0x0020] [1118468.942265] nvidia 0000:0a:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x000f address=0x00000000d0001040 flags=0x0020] [1118468.942303] nvidia 0000:0a:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x000f address=0x00000000d0000f40 flags=0x0020] [1118468.942340] nvidia 0000:0a:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x000f address=0x00000000d00016c0 flags=0x0020] [1118468.942377] nvidia 0000:0a:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x000f address=0x00000000d0002040 flags=0x0020]
搜了一下, 似乎是一个bug . . .
临时解决办法:
修改 /etc/default/grub
GRUB_DEFAULT=0 GRUB_TIMEOUT_STYLE=hidden GRUB_TIMEOUT=10 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX="iommu=soft" # 注意修改这一行 ...
然后
sudo update grub
最后重启
这样就可以正常运行了
以上是关于AMD cpu 下 Pytorch 多卡并行卡死问题解决的主要内容,如果未能解决你的问题,请参考以下文章