https://pypi.org/project/tensorflow-rocm/#history
https://github.com/ROCmSoftwarePlatform/tensorflow-upstream
https://github.com/xuhuisheng/rocm-build/tree/master/gfx803
AMD has dropped support for gfx803 (rx5xx family like rx570, rx580...) https://github.com/xuhuisheng/rocm-build/tree/master/gfx803
Tested with Ubuntu 18.04.2 LTS without installing any recent updates. No AMD specific software/driver is required to be installed beforehand.
$ uname -a
Linux linux1 4.18.0-15-generic #16~18.04.1-Ubuntu SMP Thu Feb 7 14:06:04 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
It's all about finding the right dependency versions for the pre-compile binary downloaded from pip3.
wget -qO - http://repo.radeon.com/rocm/apt/debian/rocm.gpg.key | sudo apt-key add -
sudo sh -c 'echo deb [arch=amd64] http://repo.radeon.com/rocm/apt/3.0/ xenial main > /etc/apt/sources.list.d/rocm.list'
Above cmnds will install rocm v3.0 which works with tensorflow-rocm==1.15.1
.
sudo apt-get update && sudo apt-get install -y \
build-essential \
clang \
clang-format \
clang-tidy \
cmake \
cmake-qt-gui \
ssh \
curl \
apt-utils \
pkg-config \
g++-multilib \
git \
libunwind-dev \
libfftw3-dev \
libelf-dev \
libncurses5-dev \
libpthread-stubs0-dev \
vim \
gfortran \
libboost-program-options-dev \
libssl-dev \
libboost-dev \
libboost-system-dev \
libboost-filesystem-dev \
rpm \
wget && \
sudo apt-get clean && \
sudo rm -rf /var/lib/apt/lists/*
Then install rocm (v 3.0 will be selected automatically)
sudo apt-get update && \
sudo apt-get install -y --allow-unauthenticated \
rocm-dkms rocm-dev rocm-libs rccl \
rocm-device-libs \
hsa-ext-rocr-dev hsakmt-roct-dev hsa-rocr-dev \
rocm-opencl rocm-opencl-dev \
rocm-utils
Also install:
sudo apt-get install miopen-hip
sudo adduser $LOGNAME video
sudo reboot
After that do:
sudo apt-get update && sudo apt-get install -y \
python3-numpy \
python3-dev \
python3-wheel \
python3-mock \
python3-future \
python3-pip \
python3-yaml \
python3-setuptools && \
sudo apt-get clean && \
sudo rm -rf /var/lib/apt/lists/*
Finally:
sudo pip3 install tensorflow-rocm==1.15.1
Find the simple tf test script in this gist below to test the whole setup.
gl hf. :)