diff options
Diffstat (limited to 'libs/rocm-hipamd/MAKEPKG')
| -rw-r--r-- | libs/rocm-hipamd/MAKEPKG | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/libs/rocm-hipamd/MAKEPKG b/libs/rocm-hipamd/MAKEPKG new file mode 100644 index 0000000..d355e8b --- /dev/null +++ b/libs/rocm-hipamd/MAKEPKG @@ -0,0 +1,64 @@ +#!/bin/mkpkg +# description: HIP Runtime (AMD GPU compute - CLR/hipamd) +# url: https://github.com/ROCm/rocm-systems + +name=rocm-hipamd +_name=therock +version=10.0 +release=2 +depends=(rocm-rocminfo rocm-rocr-runtime rocm-llvm) +makedeps=(cmake ninja python3 py-cppheaderparser py-ply) +source=( + https://github.com/ROCm/rocm-systems/releases/download/$_name-$version/clr.tar.gz + https://github.com/ROCm/rocm-systems/releases/download/$_name-$version/hip.tar.gz + fix-os-posix-basename.awk +) +sha256sums=( + "07caed9d726232008a2120da24f4e4bbc4998accbeadd309181fce04a9da9f99" + "373958090db3cab854fa8a0baa5e4f9afe0ea423def204b241bfcbe74f6ce0ca" + "0af885dac36e4f2314f226eb7b618dbf468919c3d2d13915c9cc2635c09753d5" +) + +patch() { + awk -f "$SRC/fix-os-posix-basename.awk" \ + clr/rocclr/os/os_posix.cpp > os_posix.cpp.tmp + mv os_posix.cpp.tmp clr/rocclr/os/os_posix.cpp + + sed -i 's/__attribute__((tls_model("initial-exec")))//g' \ + clr/rocclr/thread/thread.cpp \ + clr/rocclr/thread/thread.hpp \ + clr/rocclr/platform/activity.cpp \ + clr/rocclr/platform/activity.hpp + + sed -i '1i #include <functional>' \ + clr/hipamd/src/hrr/playback/hrr_playback.cpp +} + +build() { + + cmake -S clr -B build -G Ninja -Wno-dev \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_C_COMPILER=/usr/lib/rocm/llvm/bin/clang \ + -DCMAKE_CXX_COMPILER=/usr/lib/rocm/llvm/bin/clang++ \ + -DCMAKE_PREFIX_PATH="/usr;/usr/lib/rocm/llvm" \ + -DCLR_BUILD_HIP=ON \ + -DCLR_BUILD_OCL=OFF \ + -DHIP_COMMON_DIR="$PWD/hip" \ + -DHIP_PLATFORM=amd \ + -DROCM_PATH=/usr \ + -DHIP_ENABLE_ROCPROFILER_REGISTER=OFF \ + -DHIPCC_BIN_DIR=/nonexistent + + ninja -C build + DESTDIR=$PKG ninja -C build install +} + +signify() { + untrusted comment: public key + RWTZ9IduCSQ/mL8337TEUinPwT92xFEUpD92hkS7IxcOnzTt9QdpohT3 +} + +# vim: filetype=sh + |
