Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@daveselinger
Last active July 19, 2022 14:37
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daveselinger/9504a8496bef102a5b60613106255621 to your computer and use it in GitHub Desktop.
Save daveselinger/9504a8496bef102a5b60613106255621 to your computer and use it in GitHub Desktop.
Install ROCM and hipCaffe on Ubuntu 16.04
# https://rocm.github.io/ROCmHipCaffeQuickstart.html
# But fixed :)
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/debian/ xenial main > /etc/apt/sources.list.d/rocm.list'
sudo add-apt-repository ppa:oibaf/graphics-drivers
sudo apt update
sudo apt upgrade
sudo apt install mesa-vdpau-drivers
sudo apt install mesa-opencl-icd
sudo apt install rocm
sudo apt install rocm-libs
sudo apt install miopen-hip miopengemm
sudo apt install -y \
g++-multilib \
libunwind-dev \
git \
cmake cmake-curses-gui \
vim \
emacs-nox \
curl \
wget \
rpm \
unzip \
bc
cp -r /opt/rocm/hip/samples ~/hip-samples && cd ~/hip-samples/0_Intro/square/
make
./square.hip.out
export HIP_PLATFORM='hcc'
# Fully undocumented but incredibly important.
# Otherwies you will get this error: Can't exec "/usr/local/cuda/bin/nvcc": No such file or directory at /opt/rocm/hip/bin/hipcc line 474.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment