From b5e395658524c7703c3e0031dcf618d821820269 Mon Sep 17 00:00:00 2001 From: Patrick Lauer Date: Sun, 9 Nov 2025 06:14:33 +0000 Subject: [PATCH] dev-libs/roct-thunk-interface: add 7.1.0 Signed-off-by: Patrick Lauer --- dev-libs/roct-thunk-interface/Manifest | 1 + ...roct-thunk-interface-7.1.0-functions.patch | 12 +++ .../roct-thunk-interface-7.1.0.ebuild | 96 +++++++++++++++++++ 3 files changed, 109 insertions(+) create mode 100644 dev-libs/roct-thunk-interface/files/roct-thunk-interface-7.1.0-functions.patch create mode 100644 dev-libs/roct-thunk-interface/roct-thunk-interface-7.1.0.ebuild diff --git a/dev-libs/roct-thunk-interface/Manifest b/dev-libs/roct-thunk-interface/Manifest index f7df5473fbe4..0ac95ef386db 100644 --- a/dev-libs/roct-thunk-interface/Manifest +++ b/dev-libs/roct-thunk-interface/Manifest @@ -1,3 +1,4 @@ DIST roct-thunk-interface-6.3.3.tar.gz 2260073 BLAKE2B bca4a1809a90a4009b7f1f6e97764ab2f6d235b1c8d16d0417309c6484b2449ff807d248fe05e97867a10e660a86345c442a055081faefa17bbdf6a55b981867 SHA512 5b59d817f0fe5c87cb6eb639c8d1b8e5814b7b236eb961c9b7e2ade81163710b4cebb63f45cdf508a9ae6eb5dc380a63c09b9aa44cb082fe2b85c727efed8061 DIST roct-thunk-interface-6.4.3.tar.gz 2292387 BLAKE2B 4299e49cf0ead06d1736fe7f5f39b499749f38b7432d0ab1d870310bf087463636696651b12291be14fb56b28099da605887dcb4662e02dfa81bd0801a9d3aa2 SHA512 424af4015d7fe50c97ec27314bfbb21a768617afc29a7ce2fb61edb1fc3933e9451e285ce94a6177c33aed26f7e8c223343c0ec3936e0fe918a85361e6873ba2 DIST roct-thunk-interface-7.0.2.tar.gz 2261260 BLAKE2B 767a05ef9409919a8b3d519ae734906ad64eafdaa626d8cf36ac98a7ca048fa332465dde989331fd07cf70ff1f1404e877ad4b9f14e2382e8f8ee11c2f3b35da SHA512 536b85c1dcfa2748b5231221c7c58e32165abd075cd09be2de40d3721b43b9b7bce2b52ab26407cad21e1a7ef8fb55f6f4cfad94a9b87cf0301fd2d4867574fd +DIST roct-thunk-interface-7.1.0.tar.gz 2303601 BLAKE2B 171884e840cc9791da36b5fef2cfcc0c78ed5fa6607b71b69df0c2c04336f59158c22053c0c0cdb566e31fd864e526372ab1ab008245371c7aff22a9e96c71f2 SHA512 9892078a0ac15be29daba1dc005e93dc4e6f35e9bcf946ef3c0f1c07e81c61e29f6370accbcf181da9be6a55c4ea540bf608b1b8cbd510679088de2d24bceb89 diff --git a/dev-libs/roct-thunk-interface/files/roct-thunk-interface-7.1.0-functions.patch b/dev-libs/roct-thunk-interface/files/roct-thunk-interface-7.1.0-functions.patch new file mode 100644 index 000000000000..da600e582631 --- /dev/null +++ b/dev-libs/roct-thunk-interface/files/roct-thunk-interface-7.1.0-functions.patch @@ -0,0 +1,12 @@ +https://github.com/ROCm/rocm-systems/issues/284 +--- a/src/libhsakmt.ver 2025-10-23 22:15:14.000000000 -0000 ++++ b/src/libhsakmt.ver 2025-11-08 08:09:20.103216984 -0000 +@@ -90,6 +90,9 @@ + hsaKmtPcSamplingStop; + hsaKmtPcSamplingSupport; + hsaKmtAisReadWriteFile; ++hsaKmtCreateQueueExt; ++hsaKmtRegisterGraphicsHandleToNodesExt; ++hsaKmtModelEnabled; + local: *; + }; diff --git a/dev-libs/roct-thunk-interface/roct-thunk-interface-7.1.0.ebuild b/dev-libs/roct-thunk-interface/roct-thunk-interface-7.1.0.ebuild new file mode 100644 index 000000000000..0eb3af4e1e3e --- /dev/null +++ b/dev-libs/roct-thunk-interface/roct-thunk-interface-7.1.0.ebuild @@ -0,0 +1,96 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LLVM_COMPAT=( 20 ) +ROCM_SKIP_GLOBALS=1 +inherit cmake flag-o-matic linux-info llvm-r1 rocm + +if [[ ${PV} == *9999 ]] ; then + EGIT_REPO_URI="https://github.com/ROCm/ROCR-Runtime/" + inherit git-r3 + S="${WORKDIR}/${P}/libhsakmt" +else + SRC_URI="https://github.com/ROCm/ROCR-Runtime/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}/ROCR-Runtime-rocm-${PV}/libhsakmt" + KEYWORDS="~amd64" +fi + +DESCRIPTION="Radeon Open Compute Thunk Interface" +HOMEPAGE="https://github.com/ROCm/rocm-systems/tree/develop/projects/rocr-runtime/libhsakmt" +CONFIG_CHECK="~HSA_AMD ~HMM_MIRROR ~ZONE_DEVICE ~DRM_AMDGPU ~DRM_AMDGPU_USERPTR" +LICENSE="MIT" +SLOT="0/$(ver_cut 1-2)" + +RDEPEND="sys-process/numactl + x11-libs/libdrm[video_cards_amdgpu]" +DEPEND="${RDEPEND} + test? ( + $(llvm_gen_dep "llvm-core/llvm:\${LLVM_SLOT}") + dev-cpp/gtest + )" + +IUSE="test" +RESTRICT="!test? ( test )" + +CMAKE_BUILD_TYPE=Release + +PATCHES=( + "${FILESDIR}/${PN}-7.1.0-functions.patch" + "${FILESDIR}/kfdtest-6.1.0-skipIPCtest.patch" + "${FILESDIR}/kfdtest-6.2.4-fix-llvm-header.patch" +) + +test_wrapper() { + local S="$1" + shift 1 + local CMAKE_USE_DIR="${S}" + local BUILD_DIR="${S}_build" + cd "${S}" || die + "$@" +} + +src_prepare() { + sed -e "s/get_version ( \"1.0.0\" )/get_version ( \"${PV}\" )/" -i CMakeLists.txt || die + + # https://github.com/ROCm/ROCR-Runtime/issues/263 + sed -e "s/\${HSAKMT_TARGET} STATIC/\${HSAKMT_TARGET}/" -i CMakeLists.txt || die + + cmake_src_prepare +} + +src_configure() { + llvm_prepend_path "${LLVM_SLOT}" + + # QA warnings + append-cxxflags -Wno-unused-value + + local mycmakeargs=( + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr" + -DBUILD_SHARED_LIBS=ON + ) + cmake_src_configure + + if use test; then + # ODR violations (bug #956958) + filter-lto + + export LIBHSAKMT_PATH="${BUILD_DIR}" + test_wrapper "${S}/tests/kfdtest" cmake_src_configure + fi +} + +src_compile() { + cmake_src_compile + if use test; then + LIBRARY_PATH="${BUILD_DIR}" test_wrapper "${S}/tests/kfdtest" cmake_src_compile + fi +} + +src_test() { + check_amdgpu + TESTDIR="${S}/tests/kfdtest_build/" + cd "${TESTDIR}" || die + PATH="${PATH}:${TESTDIR}" ./run_kfdtest.sh +}