Last active
December 19, 2024 20:38
-
-
Save cgmb/fb25dd4cd0130ad1eb4a5ea224189532 to your computer and use it in GitHub Desktop.
Build magma for HIP
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
#!/bin/bash | |
# Build Magma on Ubuntu 24.04 | |
set -eux | |
export CXX=hipcc | |
apt-get -y update | |
apt-get -y upgrade | |
apt-get -y install git cmake build-essential libopenblas-dev gfortran hipcc librocblas-dev libhipblas-dev librocsparse-dev libhipsparse-dev | |
git clone https://github.com/icl-utk-edu/magma.git | |
cd magma | |
git checkout v2.8.0 | |
echo -e 'BACKEND = hip\nFORT = true\nGPU_TARGET = gfx803 gfx900 gfx906 gfx908 gfx90a gfx1010 gfx1030 gfx1100 gfx1101 gfx1102' > make.inc | |
sed -i '1s/python$/python3/' tools/codegen.py | |
sed -i 's/hip::host/hip::device/' CMakeLists.txt | |
make generate | |
cmake -S. -Bbuild -DBLA_VENDOR=OpenBLAS -DAMDGPU_TARGETS="gfx803;gfx900;gfx906;gfx908;gfx90a;gfx1010;gfx1030;gfx1100;gfx1101;gfx1102" -DMAGMA_ENABLE_HIP=ON | |
make -j8 -C build |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment