Last active
March 7, 2019 11:50
-
-
Save daveselinger/8cba6d41eaa70b220725091390ff52c1 to your computer and use it in GitHub Desktop.
Ubuntu 16.04 with proprietary AMD driver for OpenCL on Theano.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Shout out to jarutis here https://gist.github.com/jarutis/ff28bca8cfb9ce0c8b1a | |
## install Catalyst proprietary | |
## sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.BAK | |
sudo apt update | |
sudo apt dist-upgrade | |
# on a clean install not needed but could be helpful | |
sudo apt-get remove --purge fglrx* | |
## install build essentials | |
sudo apt install linux-headers-generic cmake build-essential git | |
## Need to download this from here: https://www2.ati.com/drivers/linux/ubuntu/amdgpu-pro-17.30-465504.tar.xz | |
## and http://developer.amd.com/amd-accelerated-parallel-processing-app-sdk/ | |
# because it requires a browser, you can either download using Xwindows, or I download on my mac and then SCP it to the machine: | |
# e.g.: scp ~/Downloads/AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2 ubuntu@IPADDRESS_x.xx.xx.xx:~/Downloads | |
cd ~/Downloads | |
tar xf amdgpu-pro-17.30-465504.tar.xz | |
cd amdgpu-pro-17.30-465504 | |
sudo ./amdgpu-pro-install -y | |
sudo reboot | |
## Now clinfo should work | |
## install AMD APP SDK from ~/Downloads | |
## Accept the license and install in /opt | |
cd ~/Downloads | |
tar xjf AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2 | |
sudo ./AMD-APP-SDK-v3.0.130.136-GA-linux64.sh | |
# Read license, user /opt (default) directory | |
# log out log back in. | |
## OPTIONAL (AND DOES NOT WORK) Install ROCM-OpenCL extensions | |
## sudo apt install -y rocm-amdgpu-pro | |
echo 'export LLVM_BIN=/opt/amdgpu-pro/bin' | sudo tee /etc/profile.d/amdgpu-pro.sh | |
export LLVM_BIN=/opt/amdgpu-pro/bin | |
## install conda and pygpu | |
sudo apt install curl -y | |
cd ~/Downloads | |
curl -O https://repo.continuum.io/archive/Anaconda3-4.2.0-Linux-x86_64.sh | |
conda install pygpu | |
## Theano | |
pip install Theano | |
THEANO_FLAGS=device=opencl0:0 python test.py |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you dude, really appreciated. This worked with the new AMD versions for both packages in 16.04.01