diff options
Diffstat (limited to 'libs/rocm-rocr-runtime')
| -rw-r--r-- | libs/rocm-rocr-runtime/.footprint | 56 | ||||
| -rw-r--r-- | libs/rocm-rocr-runtime/.signature | 8 | ||||
| -rw-r--r-- | libs/rocm-rocr-runtime/MAKEPKG | 69 | ||||
| -rw-r--r-- | libs/rocm-rocr-runtime/fix-executable-null.awk | 4 | ||||
| -rw-r--r-- | libs/rocm-rocr-runtime/fix-hsa-signal-less.awk | 10 |
5 files changed, 147 insertions, 0 deletions
diff --git a/libs/rocm-rocr-runtime/.footprint b/libs/rocm-rocr-runtime/.footprint new file mode 100644 index 0000000..e7c0652 --- /dev/null +++ b/libs/rocm-rocr-runtime/.footprint @@ -0,0 +1,56 @@ +drwxr-xr-x root/root usr/ +drwxr-xr-x root/root usr/include/ +drwxr-xr-x root/root usr/include/hsa/ +-rw-r--r-- root/root usr/include/hsa/Brig.h +-rw-r--r-- root/root usr/include/hsa/amd_hsa_common.h +-rw-r--r-- root/root usr/include/hsa/amd_hsa_elf.h +-rw-r--r-- root/root usr/include/hsa/amd_hsa_kernel_code.h +-rw-r--r-- root/root usr/include/hsa/amd_hsa_queue.h +-rw-r--r-- root/root usr/include/hsa/amd_hsa_signal.h +-rw-r--r-- root/root usr/include/hsa/amd_launch_descriptor.h +-rw-r--r-- root/root usr/include/hsa/hsa.h +-rw-r--r-- root/root usr/include/hsa/hsa_amd_tool.h +-rw-r--r-- root/root usr/include/hsa/hsa_api_trace.h +-rw-r--r-- root/root usr/include/hsa/hsa_api_trace_version.h +-rw-r--r-- root/root usr/include/hsa/hsa_ext_amd.h +-rw-r--r-- root/root usr/include/hsa/hsa_ext_amd_aie.h +-rw-r--r-- root/root usr/include/hsa/hsa_ext_finalize.h +-rw-r--r-- root/root usr/include/hsa/hsa_ext_image.h +-rw-r--r-- root/root usr/include/hsa/hsa_ven_amd_aqlprofile.h +-rw-r--r-- root/root usr/include/hsa/hsa_ven_amd_loader.h +-rw-r--r-- root/root usr/include/hsa/hsa_ven_amd_pc_sampling.h +drwxr-xr-x root/root usr/include/hsakmt/ +-rw-r--r-- root/root usr/include/hsakmt/hsakmt.h +-rw-r--r-- root/root usr/include/hsakmt/hsakmt_drm.h +-rw-r--r-- root/root usr/include/hsakmt/hsakmtctx.h +-rw-r--r-- root/root usr/include/hsakmt/hsakmtmodel.h +-rw-r--r-- root/root usr/include/hsakmt/hsakmtmodeliface.h +-rw-r--r-- root/root usr/include/hsakmt/hsakmttypes.h +drwxr-xr-x root/root usr/include/hsakmt/drm/ +-rw-r--r-- root/root usr/include/hsakmt/drm/amdgpu.h +-rw-r--r-- root/root usr/include/hsakmt/drm/amdgpu_drm.h +-rw-r--r-- root/root usr/include/hsakmt/drm/drm.h +-rw-r--r-- root/root usr/include/hsakmt/drm/drm_mode.h +-rw-r--r-- root/root usr/include/hsakmt/drm/xf86drm.h +drwxr-xr-x root/root usr/lib/ +-rwxr-xr-x root/root usr/lib/libhsa-runtime64.so.1.21.0 +-rw-r--r-- root/root usr/lib/libhsakmt.a +lrwxrwxrwx root/root usr/lib/libhsa-runtime64.so -> libhsa-runtime64.so.1 +lrwxrwxrwx root/root usr/lib/libhsa-runtime64.so.1 -> libhsa-runtime64.so.1.21.0 +drwxr-xr-x root/root usr/lib/cmake/ +drwxr-xr-x root/root usr/lib/cmake/hsa-runtime64/ +-rw-r--r-- root/root usr/lib/cmake/hsa-runtime64/hsa-runtime64-config-version.cmake +-rw-r--r-- root/root usr/lib/cmake/hsa-runtime64/hsa-runtime64-config.cmake +-rw-r--r-- root/root usr/lib/cmake/hsa-runtime64/hsa-runtime64Targets-release.cmake +-rw-r--r-- root/root usr/lib/cmake/hsa-runtime64/hsa-runtime64Targets.cmake +drwxr-xr-x root/root usr/lib/cmake/hsakmt/ +-rw-r--r-- root/root usr/lib/cmake/hsakmt/hsakmt-config-version.cmake +-rw-r--r-- root/root usr/lib/cmake/hsakmt/hsakmt-config.cmake +-rw-r--r-- root/root usr/lib/cmake/hsakmt/hsakmtTargets-release.cmake +-rw-r--r-- root/root usr/lib/cmake/hsakmt/hsakmtTargets.cmake +drwxr-xr-x root/root usr/lib/pkgconfig/ +-rw-r--r-- root/root usr/lib/pkgconfig/libhsakmt.pc +drwxr-xr-x root/root usr/share/ +drwxr-xr-x root/root usr/share/doc/ +drwxr-xr-x root/root usr/share/doc/rocr/ +-rw-r--r-- root/root usr/share/doc/rocr/LICENSE.md diff --git a/libs/rocm-rocr-runtime/.signature b/libs/rocm-rocr-runtime/.signature new file mode 100644 index 0000000..ba29b67 --- /dev/null +++ b/libs/rocm-rocr-runtime/.signature @@ -0,0 +1,8 @@ +RWTZ9IduCSQ/mJ34tTHddaqoyakxj0gBVSCh41NrPRsfQ6O38d58Nth3Y3c7kP3F3BDfXacPtdUT04hxxa+z0Xosny72MlU6CwI= + +SHA256 (MAKEPKG) = 94b63e2d17f49dfbb72cf50cad7b758b1fd729039a29e1fa789a11633b93e4d2 +SHA256 (.footprint) = aa505c1c2309ad0e507664a097d89074818d106d9f9f173a2a8ff3882910eee3 +SHA256 (rocm-rocr-runtime-10.0.tar.gz) = 007bba7a393abf5bb41fd191033e015eba2fffa6fdb605e1ed4e488742752ca5 +SHA256 (fix-hsa-signal-less.awk) = b6f63254560b1cfcbeced1764bb522767fc5eefa88bb4e7938d1b894736bbddb +SHA256 (fix-executable-null.awk) = d4e2fe154741800dbf0a1b65e7ddbd7c6f9a6787bd53892e0f34d7d1ab0080f1 +SHA256 (rocm-rocr-runtime#10.0-1.pkg.tar.gz) = 14cc942605441704f631357a7db5e52e3cfad1bc1acd3c12d402bb03d4482c3d diff --git a/libs/rocm-rocr-runtime/MAKEPKG b/libs/rocm-rocr-runtime/MAKEPKG new file mode 100644 index 0000000..7615891 --- /dev/null +++ b/libs/rocm-rocr-runtime/MAKEPKG @@ -0,0 +1,69 @@ +#!/bin/mkpkg +# description: AMD ROCm HSA Runtime (ROCr) +# url: https://github.com/ROCm/ROCR-Runtime + +name=rocm-rocr-runtime +_name=therock +version=10.0 +release=1 +depends=(libdrm libelf numactl) +makedeps=(cmake ninja rocm-llvm) +source=( + https://github.com/ROCm/rocm-systems/releases/download/$_name-$version/rocr-runtime.tar.gz + fix-hsa-signal-less.awk + fix-executable-null.awk +) +renames=($name-$version.tar.gz + "" + "" +) + +sha256sums=( + "007bba7a393abf5bb41fd191033e015eba2fffa6fdb605e1ed4e488742752ca5" + "b6f63254560b1cfcbeced1764bb522767fc5eefa88bb4e7938d1b894736bbddb" + "d4e2fe154741800dbf0a1b65e7ddbd7c6f9a6787bd53892e0f34d7d1ab0080f1" +) + +patch() { + cd rocr-runtime + + # Add operator< to hsa_signal_t for libc++ 22 std::map compatibility + awk -f "$SRC/fix-hsa-signal-less.awk" \ + runtime/hsa-runtime/inc/hsa.h > hsa.h.tmp + mv hsa.h.tmp runtime/hsa-runtime/inc/hsa.h + + # Fix NULL return where uint64_t expected (musl defines NULL as nullptr) + awk -f "$SRC/fix-executable-null.awk" \ + runtime/hsa-runtime/loader/executable.cpp > executable.cpp.tmp + mv executable.cpp.tmp runtime/hsa-runtime/loader/executable.cpp + +} + +build() { + cd rocr-runtime + + cmake -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" \ + -DClang_DIR=/usr/lib/rocm/llvm/lib/cmake/clang \ + -DBUILD_SHARED_LIBS=ON \ + -DIMAGE_SUPPORT=ON \ + -DBUILD_ROCR=ON \ + -DBUILD_TESTS=OFF \ + -DROCM_PATCH_VERSION=0 + + ninja -C build + DESTDIR=$PKG ninja -C build install +} + +signify() { + untrusted comment: public key + RWTZ9IduCSQ/mL8337TEUinPwT92xFEUpD92hkS7IxcOnzTt9QdpohT3 +} + +# vim: filetype=sh + diff --git a/libs/rocm-rocr-runtime/fix-executable-null.awk b/libs/rocm-rocr-runtime/fix-executable-null.awk new file mode 100644 index 0000000..a40f104 --- /dev/null +++ b/libs/rocm-rocr-runtime/fix-executable-null.awk @@ -0,0 +1,4 @@ +/if\(!sec\) \{ return NULL; \}/ { + gsub(/return NULL;/, "return 0;") +} +{ print } diff --git a/libs/rocm-rocr-runtime/fix-hsa-signal-less.awk b/libs/rocm-rocr-runtime/fix-hsa-signal-less.awk new file mode 100644 index 0000000..674ed4b --- /dev/null +++ b/libs/rocm-rocr-runtime/fix-hsa-signal-less.awk @@ -0,0 +1,10 @@ +/uint64_t handle;$/ && found_signal { + print + print "#ifdef __cplusplus" + print " bool operator<(const hsa_signal_s& rhs) const { return handle < rhs.handle; }" + print "#endif" + found_signal = 0 + next +} +/typedef struct hsa_signal_s \{/ { found_signal = 1 } +{ print } |
