AMD GPU MI210 深度学习疑难杂症

ROCm 官方文档

ROCm

Pytorch

PyTorch for ROCm 官方文档

方法一:使用 docker 镜像 rocm/pytorch

方法二:Pytorch 官方轮子

APEX

  • Pytorch 扩展,用于混合精度与分布式训练的工具
  • Github

ModuleNotFoundError: fused_layer_norm_cuda

通过源码安装 APEX 解决,注意 Pytorch 版本对应的源码分支

  1. GitHub 拉取相应分支源码
  2. cd apex
  3. 输入命令安装 apex,耗费时间可能较长
1
2
3
4
5
# if pip >= 23.1 (ref: https://pip.pypa.io/en/stable/news/#v23-1) which supports multiple `--config-settings` with the same key...
pip install -v --no-build-isolation --config-settings "--build-option=--cpp_ext" --config-settings "--build-option=--cuda_ext" ./

# otherwise
python setup.py install --cpp_ext --cuda_ext

AMD GPU MI210 深度学习疑难杂症

https://derolol.github.io/2024/09/11/project/rocm/

Author

derolol

Posted on

2024-09-11

Updated on

2024-09-11

Licensed under

p