ubuntu20.04 安装rocm

系统版本

ubuntu 20.04.1

ubuntu 18.04.5

1)前置准备首先安装NUMA支持库

sudo apt update
sudo apt dist-upgrade
sudo apt install libnuma-dev
sudo reboot

安装ROCm apt源


wget -qO - http://repo.radeon.com/rocm/apt/debian/rocm.gpg.key | sudo apt-key add -
echo 'deb [arch=amd64] http://repo.radeon.com/rocm/apt/debian/ xenial main' | sudo tee /etc/apt/sources.list.d/rocm.list

安装ROCm


sudo apt update
sudo apt install rocm-dkms


将账户加入video用户组


sudo usermod -a -G video $LOGNAME 

将ROCm路径加入系统PATH环境变量



echo 'export PATH=$PATH:/opt/rocm/bin:/opt/rocm/profiler/bin:/opt/rocm/opencl/bin/x86_64' | sudo tee -a /etc/profile.d/rocm.sh

2)安装与配置

配置支持环境



sudo apt update
sudo apt install rocm-libs miopen-hip cxlactivitylogger

pip安装tensorflow-rocm本体



pip install --user tensorflow-rocm

安装rccl库



sudo apt install rccl








标签: pytorch ROCm
2021.3.6   /   热度:3175   /   分类: python

发表评论:

©地球仪的BLOG  |  Powered by Emlog