Skip to content

Instantly share code, notes, and snippets.

@Hermann-SW
Last active December 21, 2024 09:23
Show Gist options
  • Save Hermann-SW/e4cfaac17994e4860bb08b71078a5126 to your computer and use it in GitHub Desktop.
Save Hermann-SW/e4cfaac17994e4860bb08b71078a5126 to your computer and use it in GitHub Desktop.
Use gpuowl pre_c++20 branch with rocm/dev-ubuntu-18.04 for PRE_VEGA "Radeon RX 480" GPU
#!/bin/bash
set -x
apt-get update 2>&1 > /dev/null
apt-get install -y git 2>&1 > /dev/null
usermod -a -G video root
echo ROC_ENABLE_PRE_VEGA=1 >> /etc/environment
echo HSA_OVERRIDE_GFX_VERSION=8.0.3 >> /etc/environment
cat > /root/doit <<EOF
echo -e "\nNow executing /root/doit"
set -x
groups
/opt/rocm/bin/clinfo | grep "Number"
/opt/rocm/bin/clinfo | grep Board
apt install -y software-properties-common 2>&1 > /dev/null
add-apt-repository ppa:ubuntu-toolchain-r/test -y 2>&1 > /dev/null
apt-get install -y "g++-9" 2>&1 > /dev/null
apt-get install -y libgmp-dev 2>&1 > /dev/null
apt-get install -y vim 2>&1 > /dev/null
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 10
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 10
git clone -b pre_c++20 https://github.com/Hermann-SW/gpuowl.git 2>&1 > /dev/null
cd gpuowl/
sed -i "s#\(lOpenCL\)#\1 -L/opt/rocm/lib#" Makefile
make amd > /dev/null
echo "PRP=0,1,2,859433,-1,77,0" > worktodo.txt
build-release/prpll-amd
EOF
# execute created /root/doit script
chmod 755 /root/doit
su - root ./doit
echo -e "\nEnter login shell for further work"
su -l - root
@Hermann-SW
Copy link
Author

Revision 3 uses gpuowl pre_c++20 branch for upcoming dev work
(rocm/dev-ubuntu-18.04 for PRE_VEGA "Radeon RX 480" GPU).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment