obsolete cleanup 2
This commit is contained in:
parent
0054db520c
commit
a57673c7a1
262 changed files with 194 additions and 27353 deletions
|
|
@ -1,90 +0,0 @@
|
|||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
LLVM_COMPAT=( 20 )
|
||||
|
||||
inherit cmake llvm-r1 prefix
|
||||
|
||||
MY_P=llvm-project-rocm-${PV}
|
||||
components=( "amd/comgr" )
|
||||
|
||||
DESCRIPTION="Radeon Open Compute Code Object Manager"
|
||||
HOMEPAGE="https://github.com/ROCm/llvm-project/tree/amd-staging/amd/comgr"
|
||||
SRC_URI="https://github.com/ROCm/llvm-project/archive/rocm-${PV}.tar.gz -> ${MY_P}.tar.gz"
|
||||
S="${WORKDIR}/${MY_P}/${components[0]}"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0/$(ver_cut 1-2)"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
IUSE="test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-5.1.3-rocm-path.patch"
|
||||
"${FILESDIR}/0001-Find-CLANG_RESOURCE_DIR-using-clang-print-resource-d.patch"
|
||||
"${FILESDIR}/${PN}-6.0.0-extend-isa-compatibility-check.patch"
|
||||
"${FILESDIR}/${PN}-6.3.0-fix-comgr-default-flags.patch"
|
||||
"${FILESDIR}/${PN}-6.1.0-dont-add-nogpulib.patch"
|
||||
"${FILESDIR}/${PN}-6.3.0-llvm-19-compat.patch"
|
||||
"${FILESDIR}/${PN}-6.3.0-bypass-device-libs-copy.patch"
|
||||
)
|
||||
|
||||
RDEPEND="
|
||||
dev-libs/rocm-device-libs:${SLOT}
|
||||
llvm-core/clang-runtime:=
|
||||
$(llvm_gen_dep '
|
||||
llvm-core/clang:${LLVM_SLOT}=
|
||||
llvm-core/lld:${LLVM_SLOT}=
|
||||
')
|
||||
dev-util/hipcc:${SLOT}
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
CMAKE_BUILD_TYPE=Release
|
||||
|
||||
src_unpack() {
|
||||
if [[ ${PV} == *9999 ]] ; then
|
||||
git-r3_fetch
|
||||
git-r3_checkout '' . '' "${components[@]}"
|
||||
else
|
||||
archive="${MY_P}.tar.gz"
|
||||
ebegin "Unpacking from ${archive}"
|
||||
tar -x -z -o \
|
||||
-f "${DISTDIR}/${archive}" \
|
||||
"${components[@]/#/${MY_P}/}" || die
|
||||
eend ${?}
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
sed '/sys::path::append(HIPPath/s,"hip","",' -i src/comgr-env.cpp || die
|
||||
sed "/return LLVMPath;/s,LLVMPath,llvm::SmallString<128>(\"$(get_llvm_prefix)\")," -i src/comgr-env.cpp || die
|
||||
eapply $(prefixify_ro "${FILESDIR}"/${PN}-6.3.2-rocm_path.patch)
|
||||
|
||||
cmake_src_prepare
|
||||
|
||||
# Replace @CLANG_RESOURCE_DIR@ in patches
|
||||
local CLANG_RESOURCE_DIR="$("$(get_llvm_prefix)"/bin/clang -print-resource-dir)"
|
||||
sed "s,@CLANG_RESOURCE_DIR@,\"${CLANG_RESOURCE_DIR}\"," -i src/comgr-compiler.cpp || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DLLVM_DIR="$(get_llvm_prefix)"
|
||||
-DCMAKE_STRIP="" # disable stripping defined at lib/comgr/CMakeLists.txt:58
|
||||
-DBUILD_TESTING=$(usex test ON OFF)
|
||||
)
|
||||
# Prevent CMake from finding systemwide hip, which breaks tests
|
||||
use test && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_hip=ON )
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_test() {
|
||||
local CMAKE_SKIP_TESTS=(
|
||||
comgr_nested_kernel_test # See https://github.com/ROCm/llvm-project/issues/35
|
||||
)
|
||||
cmake_src_test
|
||||
}
|
||||
|
|
@ -1,94 +0,0 @@
|
|||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
LLVM_COMPAT=( 20 )
|
||||
|
||||
inherit cmake llvm-r1 prefix
|
||||
|
||||
MY_P=llvm-project-rocm-${PV}
|
||||
components=( "amd/comgr" )
|
||||
|
||||
DESCRIPTION="Radeon Open Compute Code Object Manager"
|
||||
HOMEPAGE="https://github.com/ROCm/llvm-project/tree/amd-staging/amd/comgr"
|
||||
if [[ $PV == 9999 ]]; then
|
||||
SRC_URI="TODO"
|
||||
else
|
||||
SRC_URI="https://github.com/ROCm/llvm-project/archive/rocm-${PV}.tar.gz -> ${MY_P}.tar.gz"
|
||||
fi
|
||||
S="${WORKDIR}/${MY_P}/${components[0]}"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0/$(ver_cut 1-2)"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
IUSE="test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-5.1.3-rocm-path.patch"
|
||||
"${FILESDIR}/0001-Find-CLANG_RESOURCE_DIR-using-clang-print-resource-d.patch"
|
||||
"${FILESDIR}/${PN}-6.0.0-extend-isa-compatibility-check.patch"
|
||||
"${FILESDIR}/${PN}-6.3.0-fix-comgr-default-flags.patch"
|
||||
"${FILESDIR}/${PN}-6.1.0-dont-add-nogpulib.patch"
|
||||
"${FILESDIR}/${PN}-6.3.0-llvm-19-compat.patch"
|
||||
"${FILESDIR}/${PN}-6.3.0-bypass-device-libs-copy.patch"
|
||||
)
|
||||
|
||||
RDEPEND="
|
||||
dev-libs/rocm-device-libs:${SLOT}
|
||||
llvm-core/clang-runtime:=
|
||||
$(llvm_gen_dep '
|
||||
llvm-core/clang:${LLVM_SLOT}=
|
||||
llvm-core/lld:${LLVM_SLOT}=
|
||||
')
|
||||
dev-util/hipcc:${SLOT}
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
CMAKE_BUILD_TYPE=Release
|
||||
|
||||
src_unpack() {
|
||||
if [[ ${PV} == *9999 ]] ; then
|
||||
git-r3_fetch
|
||||
git-r3_checkout '' . '' "${components[@]}"
|
||||
else
|
||||
archive="${MY_P}.tar.gz"
|
||||
ebegin "Unpacking from ${archive}"
|
||||
tar -x -z -o \
|
||||
-f "${DISTDIR}/${archive}" \
|
||||
"${components[@]/#/${MY_P}/}" || die
|
||||
eend ${?}
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
sed '/sys::path::append(HIPPath/s,"hip","",' -i src/comgr-env.cpp || die
|
||||
sed "/return LLVMPath;/s,LLVMPath,llvm::SmallString<128>(\"$(get_llvm_prefix)\")," -i src/comgr-env.cpp || die
|
||||
eapply $(prefixify_ro "${FILESDIR}"/${PN}-6.3.2-rocm_path.patch)
|
||||
|
||||
cmake_src_prepare
|
||||
|
||||
# Replace @CLANG_RESOURCE_DIR@ in patches
|
||||
local CLANG_RESOURCE_DIR="$("$(get_llvm_prefix)"/bin/clang -print-resource-dir)"
|
||||
sed "s,@CLANG_RESOURCE_DIR@,\"${CLANG_RESOURCE_DIR}\"," -i src/comgr-compiler.cpp || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DLLVM_DIR="$(get_llvm_prefix)"
|
||||
-DCMAKE_STRIP="" # disable stripping defined at lib/comgr/CMakeLists.txt:58
|
||||
-DBUILD_TESTING=$(usex test ON OFF)
|
||||
)
|
||||
# Prevent CMake from finding systemwide hip, which breaks tests
|
||||
use test && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_hip=ON )
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_test() {
|
||||
local CMAKE_SKIP_TESTS=(
|
||||
comgr_nested_kernel_test # See https://github.com/ROCm/llvm-project/issues/35
|
||||
)
|
||||
cmake_src_test
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
DIST roct-thunk-interface-5.7.1.tar.gz 665529 BLAKE2B 407601d45976ad66e85999c53bcaa62fefa2ea823e1d3296a9aabe8b6a9c915776344de4499fcf6f9ee80193201308b27b387a7225aca5d2cc7e294143eefacd SHA512 c0dc449c8b713ac543f6cd6c876ea0f160dcb1a5c4a52a2b1364fcae0039e9fe195e4223a2644d7d3a7fbc2a48166e798d15b9088e2097b65974e2ba5e48bdcf
|
||||
DIST roct-thunk-interface-6.1.1.tar.gz 666377 BLAKE2B b30d733fb769f7169e97b8a28eaa61c84205aec06b55d662d24f159a3c84190f3252f090413769e56eb621abc789fae521cb7b26d7cdac952ff1e4e120707bc9 SHA512 2c579606d2ced9f8b5e32841db745819771b7d6ce0cef90b818e3710470e30c7715540125d99ed5ea13c4e672d5af6d8ad2dd5975ef76cab7ba993d86cf74eb4
|
||||
DIST roct-thunk-interface-6.1.2.tar.gz 666380 BLAKE2B ffff2405bbb95a6908670a23cf6090147a5669f8ab0c999047203731c99c511738a33ac8d3fc0f0e5432e3744e948ec3fe658d6a578ecc63606c8a5662025b0a SHA512 083b1a865608016f78c094a27ece3858072e72d80e1322e7cef22261222a0f868d3b72ebfcd80a11e4719e90d3d3fc7b0c683aed77714f54f520bb126b13ab7c
|
||||
DIST roct-thunk-interface-6.3.2.tar.gz 2260102 BLAKE2B 706cd4cc61c3007aec2b7822c02a7c98399454b366f2a2c221ae53ea3ee4c288c47c7fcfbe8f1cbd38d071ab5c90a2d79c054a0b0d2a2f6892a051b843794d32 SHA512 0326242deae601275d71fb268781735b117e713e73b1bcac2fd732828d993dee5840dec011fdc4350be2afdbc8266b6d1b65d5dff0d465a5b9c9cc091a5c645c
|
||||
DIST roct-thunk-interface-6.3.3.tar.gz 2260073 BLAKE2B bca4a1809a90a4009b7f1f6e97764ab2f6d235b1c8d16d0417309c6484b2449ff807d248fe05e97867a10e660a86345c442a055081faefa17bbdf6a55b981867 SHA512 5b59d817f0fe5c87cb6eb639c8d1b8e5814b7b236eb961c9b7e2ade81163710b4cebb63f45cdf508a9ae6eb5dc380a63c09b9aa44cb082fe2b85c727efed8061
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
The built hsakmt library is right under BUILD_DIR, not BUILD_DIR/lib
|
||||
===================================================================
|
||||
--- a/tests/kfdtest/CMakeLists.txt
|
||||
+++ b./tests/kfdtest/CMakeLists.txt
|
||||
@@ -117,7 +117,7 @@ else()
|
||||
endif()
|
||||
|
||||
if( DEFINED LIBHSAKMT_PATH )
|
||||
- set ( HSAKMT_LIBRARY_DIRS ${LIBHSAKMT_PATH}/lib )
|
||||
+ set ( HSAKMT_LIBRARY_DIRS ${LIBHSAKMT_PATH}/ )
|
||||
set ( HSAKMT_LIBRARIES hsakmt )
|
||||
endif()
|
||||
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
https://github.com/ROCm/ROCT-Thunk-Interface/pull/102
|
||||
From 6d7d48bb6843405aac2777388edf4c7c2a6f9dc3 Mon Sep 17 00:00:00 2001
|
||||
From: Yiyang Wu <xgreenlandforwyy@gmail.com>
|
||||
Date: Tue, 30 Apr 2024 13:35:08 +0800
|
||||
Subject: [PATCH] Allow linking libLLVM dynamic library rather than separate
|
||||
components
|
||||
|
||||
---
|
||||
tests/kfdtest/CMakeLists.txt | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tests/kfdtest/CMakeLists.txt b/tests/kfdtest/CMakeLists.txt
|
||||
index 9d1172e..ccad7f4 100644
|
||||
--- a/tests/kfdtest/CMakeLists.txt
|
||||
+++ b/tests/kfdtest/CMakeLists.txt
|
||||
@@ -154,7 +154,11 @@ include_directories(${LLVM_INCLUDE_DIRS})
|
||||
separate_arguments(LLVM_DEFINITIONS_LIST NATIVE_COMMAND ${LLVM_DEFINITIONS})
|
||||
add_definitions(${LLVM_DEFINITIONS_LIST})
|
||||
|
||||
-llvm_map_components_to_libnames(llvm_libs AMDGPUAsmParser Core Support)
|
||||
+if (LLVM_LINK_LLVM_DYLIB)
|
||||
+ set(llvm_libs LLVM)
|
||||
+else()
|
||||
+ llvm_map_components_to_libnames(llvm_libs AMDGPUAsmParser Core Support)
|
||||
+endif()
|
||||
|
||||
include_directories(${PROJECT_SOURCE_DIR}/gtest-1.6.0)
|
||||
include_directories(${PROJECT_SOURCE_DIR}/include)
|
||||
--
|
||||
2.44.0
|
||||
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
Issue: https://github.com/ROCm/ROCT-Thunk-Interface/issues/103
|
||||
===================================================================
|
||||
--- ROCT-Thunk-Interface-rocm-6.1.1.orig/tests/kfdtest/scripts/kfdtest.exclude
|
||||
+++ ROCT-Thunk-Interface-rocm-6.1.1/tests/kfdtest/scripts/kfdtest.exclude
|
||||
@@ -63,6 +63,7 @@ PERMANENT_BLACKLIST_ALL_ASICS=\
|
||||
# failures can be found
|
||||
# NOTE: If you update this alphabetical listing, add the corresponding JIRA ticket for reference
|
||||
#
|
||||
+# KFDIPCTest.BasicTest are not compatible with upstream amdgpu kernel module
|
||||
# KFDQMTest.GPUDoorbellWrite fails intermittently (KFD-318)
|
||||
# KFDQMTest.mGPUShareBO (KFD-334)
|
||||
# KFDHWSTest.* (SWDEV-193035)
|
||||
@@ -72,6 +73,7 @@ PERMANENT_BLACKLIST_ALL_ASICS=\
|
||||
# KFDDBGTest.SuspendQueues (SWDEV-417850)
|
||||
# KFDDBGTest.HitAddressWatch (SWDEV-420281)
|
||||
TEMPORARY_BLACKLIST_ALL_ASICS=\
|
||||
+"KFDIPCTest.BasicTest:"\
|
||||
"KFDQMTest.GPUDoorbellWrite:"\
|
||||
"KFDQMTest.mGPUShareBO:"\
|
||||
"KFDQMTest.SdmaEventInterrupt:"\
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
Add header for llvm_shutdown.
|
||||
Backports https://github.com/ROCm/ROCT-Thunk-Interface/commit/8bb5764ee1c4e3a8dc7588b597831389b4481345
|
||||
--- a/tests/kfdtest/src/Assemble.cpp
|
||||
+++ b/tests/kfdtest/src/Assemble.cpp
|
||||
@@ -69,6 +69,9 @@
|
||||
#else
|
||||
#include <llvm/Support/TargetRegistry.h>
|
||||
#endif
|
||||
+#if LLVM_VERSION_MAJOR > 18
|
||||
+#include "llvm/Support/ManagedStatic.h"
|
||||
+#endif
|
||||
|
||||
#include <linux/elf.h>
|
||||
#include "OSWrapper.hpp"
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
diff --git a/src/libhsakmt.ver b/src/libhsakmt.ver
|
||||
index dc17215..964f3d0 100644
|
||||
--- a/src/libhsakmt.ver
|
||||
+++ b/src/libhsakmt.ver
|
||||
@@ -75,6 +75,9 @@ hsaKmtSetXNACKMode;
|
||||
hsaKmtGetXNACKMode;
|
||||
hsaKmtOpenSMI;
|
||||
hsaKmtExportDMABufHandle;
|
||||
+hsaKmtWaitOnMultipleEvents_Ext;
|
||||
+hsaKmtReplaceAsanHeaderPage;
|
||||
+hsaKmtWaitOnEvent_Ext;
|
||||
|
||||
local: *;
|
||||
};
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
Upstream PR: https://github.com/ROCm/ROCT-Thunk-Interface/pull/96
|
||||
Bug: https://github.com/ROCm/ROCT-Thunk-Interface/issues/65
|
||||
--- a/src/globals.c
|
||||
+++ b/src/globals.c
|
||||
@@ -32,5 +32,9 @@ unsigned long kfd_open_count;
|
||||
unsigned long system_properties_count;
|
||||
pthread_mutex_t hsakmt_mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
bool is_dgpu;
|
||||
+
|
||||
+#ifndef PAGE_SIZE
|
||||
int PAGE_SIZE;
|
||||
+#endif
|
||||
+
|
||||
int PAGE_SHIFT;
|
||||
--- a/src/libhsakmt.h
|
||||
+++ b/src/libhsakmt.h
|
||||
@@ -62,7 +62,11 @@ extern HsaVersionInfo kfd_version_info;
|
||||
do { if ((minor) > kfd_version_info.KernelInterfaceMinorVersion)\
|
||||
return HSAKMT_STATUS_NOT_SUPPORTED; } while (0)
|
||||
|
||||
+/* Might be defined in limits.h on platforms where it is constant (used by musl) */
|
||||
+/* See also: https://pubs.opengroup.org/onlinepubs/7908799/xsh/limits.h.html */
|
||||
+#ifndef PAGE_SIZE
|
||||
extern int PAGE_SIZE;
|
||||
+#endif
|
||||
extern int PAGE_SHIFT;
|
||||
|
||||
/* VI HW bug requires this virtual address alignment */
|
||||
--- a/src/openclose.c
|
||||
+++ b/src/openclose.c
|
||||
@@ -116,7 +116,9 @@ static void clear_after_fork(void)
|
||||
|
||||
static inline void init_page_size(void)
|
||||
{
|
||||
+#ifndef PAGE_SIZE
|
||||
PAGE_SIZE = sysconf(_SC_PAGESIZE);
|
||||
+#endif
|
||||
PAGE_SHIFT = ffs(PAGE_SIZE) - 1;
|
||||
}
|
||||
|
||||
--- a/src/topology.c
|
||||
+++ b/src/topology.c
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <ctype.h>
|
||||
+#include <limits.h>
|
||||
|
||||
#include <errno.h>
|
||||
#include <sys/sysinfo.h>
|
||||
@@ -1369,6 +1370,10 @@ static int topology_create_temp_cpu_cache_list(int node,
|
||||
* which can be present twice in the string above. 29 is for the prefix
|
||||
* and the +6 is for the cache suffix
|
||||
*/
|
||||
+#ifndef MAXNAMLEN
|
||||
+/* MAXNAMLEN is the BSD name for NAME_MAX. glibc aliases this as NAME_MAX, but not musl */
|
||||
+#define MAXNAMLEN NAME_MAX
|
||||
+#endif
|
||||
const uint32_t MAXPATHSIZE = 29 + MAXNAMLEN + (MAXNAMLEN + 6);
|
||||
cpu_cacheinfo_t *p_temp_cpu_ci_list; /* a list of cpu_ci */
|
||||
char path[MAXPATHSIZE], node_dir[MAXPATHSIZE];
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
https://github.com/ROCm/ROCT-Thunk-Interface/pull/102
|
||||
From 8385d8795b994f31e00e651dc4f41e18d82ff968 Mon Sep 17 00:00:00 2001
|
||||
From: Yiyang Wu <xgreenlandforwyy@gmail.com>
|
||||
Date: Tue, 30 Apr 2024 15:07:12 +0800
|
||||
Subject: [PATCH] hsaKmtCheckRuntimeDebugSupport should be visible for kfdtest
|
||||
|
||||
---
|
||||
src/debug.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/debug.c b/src/debug.c
|
||||
index 932e829..67c32c8 100644
|
||||
--- a/src/debug.c
|
||||
+++ b/src/debug.c
|
||||
@@ -268,7 +268,7 @@ HSAKMT_STATUS HSAKMTAPI hsaKmtDbgAddressWatch(HSAuint32 NodeId,
|
||||
#define HSA_RUNTIME_ENABLE_MAX_MAJOR 1
|
||||
#define HSA_RUNTIME_ENABLE_MIN_MINOR 13
|
||||
|
||||
-HSAKMT_STATUS hsaKmtCheckRuntimeDebugSupport(void) {
|
||||
+HSAKMT_STATUS HSAKMTAPI hsaKmtCheckRuntimeDebugSupport(void) {
|
||||
HsaNodeProperties node = {0};
|
||||
HsaSystemProperties props = {0};
|
||||
HsaVersionInfo versionInfo = {0};
|
||||
--
|
||||
2.44.0
|
||||
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
https://github.com/ROCm/ROCR-Runtime/issues/263
|
||||
--- a/src/libhsakmt.ver
|
||||
+++ b/src/libhsakmt.ver
|
||||
@@ -89,6 +89,8 @@ hsaKmtPcSamplingDestroy;
|
||||
hsaKmtPcSamplingStart;
|
||||
hsaKmtPcSamplingStop;
|
||||
hsaKmtPcSamplingSupport;
|
||||
+hsaKmtCreateQueueExt;
|
||||
+hsaKmtRegisterGraphicsHandleToNodesExt;
|
||||
local: *;
|
||||
};
|
||||
|
||||
|
|
@ -1,71 +0,0 @@
|
|||
Fix error: 'hsakmt_page_size' undeclared (musl-only)
|
||||
Upstream bug: https://github.com/ROCm/ROCR-Runtime/issues/267
|
||||
--- a/src/libhsakmt.h
|
||||
+++ b/src/libhsakmt.h
|
||||
@@ -64,14 +64,15 @@ extern HsaVersionInfo hsakmt_kfd_version_info;
|
||||
do { if ((minor) > hsakmt_kfd_version_info.KernelInterfaceMinorVersion)\
|
||||
return HSAKMT_STATUS_NOT_SUPPORTED; } while (0)
|
||||
|
||||
+extern int hsakmt_page_size;
|
||||
+extern int hsakmt_page_shift;
|
||||
+
|
||||
/* Might be defined in limits.h on platforms where it is constant (used by musl) */
|
||||
/* See also: https://pubs.opengroup.org/onlinepubs/7908799/xsh/limits.h.html */
|
||||
#ifndef PAGE_SIZE
|
||||
-extern int hsakmt_page_size;
|
||||
#define PAGE_SIZE hsakmt_page_size
|
||||
#endif
|
||||
#ifndef PAGE_SHIFT
|
||||
-extern int hsakmt_page_shift;
|
||||
#define PAGE_SHIFT hsakmt_page_shift
|
||||
#endif
|
||||
|
||||
--- a/tests/kfdtest/src/KFDTestUtilQueue.cpp
|
||||
+++ b/tests/kfdtest/src/KFDTestUtilQueue.cpp
|
||||
@@ -57,13 +57,13 @@ class AsyncMPSQ {
|
||||
void PlacePacketOnNode(PacketList &packetList, int node, TSPattern tsp);
|
||||
|
||||
/* Run the packets placed on nodes and return immediately.*/
|
||||
- void Submit(void) { ASSERT_NE((HSAuint64)m_queue, NULL); m_queue->SubmitPacket(); }
|
||||
+ void Submit(void) { ASSERT_NE(m_queue, nullptr); m_queue->SubmitPacket(); }
|
||||
|
||||
/* Return only when all packets are consumed.
|
||||
* If there is any packet issues some IO operations, wait these IO to complete too.
|
||||
*/
|
||||
void Wait(void) {
|
||||
- ASSERT_NE((HSAuint64)m_queue, NULL);
|
||||
+ ASSERT_NE(m_queue, nullptr);
|
||||
m_queue->Wait4PacketConsumption(m_event, std::max((unsigned int)6000, g_TestTimeOut));
|
||||
}
|
||||
|
||||
@@ -244,7 +244,7 @@ HSAuint64 AsyncMPSQ::Report(int indexOfPacket, HSAuint64 &begin, HSAuint64 &end)
|
||||
if (m_ts_pattern == HEAD_TAIL)
|
||||
indexOfPacket = 0;
|
||||
|
||||
- EXPECT_NE((HSAuint64)m_ts, NULL)
|
||||
+ EXPECT_NE(m_ts, nullptr)
|
||||
<< " Error " << ++error << ": No timestamp buf!" << std::endl;
|
||||
/* m_ts_count is equal to packets count + 1, see PlacePacketOnNode().
|
||||
* So the max index of a packet is m_ts_count - 2.
|
||||
--- a/tests/kfdtest/src/OSWrapper.hpp
|
||||
+++ b/tests/kfdtest/src/OSWrapper.hpp
|
||||
@@ -23,6 +23,8 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
+#include <limits.h>
|
||||
+#include <sys/user.h>
|
||||
#include <string>
|
||||
|
||||
#include "KFDTestFlags.hpp"
|
||||
@@ -33,10 +35,8 @@
|
||||
|
||||
#ifndef PAGE_SIZE
|
||||
#define PAGE_SIZE (1<<12)
|
||||
-#define PAGE_SHIFT (12)
|
||||
#endif
|
||||
#ifndef PAGE_SHIFT
|
||||
-#define PAGE_SIZE (1<<12)
|
||||
#define PAGE_SHIFT (12)
|
||||
#endif
|
||||
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>candrews@gentoo.org</email>
|
||||
<name>Craig Andrews</name>
|
||||
</maintainer>
|
||||
<maintainer type="person" proxied="yes">
|
||||
<email>gentoo@holzke.net</email>
|
||||
<name>Wilfried Holzke</name>
|
||||
</maintainer>
|
||||
<maintainer type="project" proxied="proxy">
|
||||
<email>proxy-maint@gentoo.org</email>
|
||||
<name>Proxy Maintainers</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<remote-id type="github">ROCm/ROCT-Thunk-Interface</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit cmake linux-info
|
||||
|
||||
if [[ ${PV} == *9999 ]] ; then
|
||||
EGIT_REPO_URI="https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface/"
|
||||
inherit git-r3
|
||||
else
|
||||
SRC_URI="https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz"
|
||||
S="${WORKDIR}/ROCT-Thunk-Interface-rocm-${PV}"
|
||||
KEYWORDS="~amd64"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Radeon Open Compute Thunk Interface"
|
||||
HOMEPAGE="https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface"
|
||||
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"
|
||||
DEPEND="${RDEPEND}"
|
||||
BDEPEND="x11-libs/libdrm[video_cards_amdgpu]"
|
||||
|
||||
CMAKE_BUILD_TYPE=Release
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-5.7.0-functions.patch"
|
||||
"${FILESDIR}/${PN}-5.7.1-musl.patch"
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
sed -e "s:get_version ( \"1.0.0\" ):get_version ( \"${PV}\" ):" -i CMakeLists.txt || die
|
||||
cmake_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DCPACK_PACKAGING_INSTALL_PREFIX="${EPREFIX}/usr"
|
||||
)
|
||||
cmake_src_configure
|
||||
}
|
||||
|
|
@ -1,81 +0,0 @@
|
|||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
ROCM_SKIP_GLOBALS=1
|
||||
inherit cmake linux-info rocm
|
||||
|
||||
if [[ ${PV} == *9999 ]] ; then
|
||||
EGIT_REPO_URI="https://github.com/ROCm/ROCT-Thunk-Interface/"
|
||||
inherit git-r3
|
||||
else
|
||||
SRC_URI="https://github.com/ROCm/ROCT-Thunk-Interface/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz"
|
||||
S="${WORKDIR}/ROCT-Thunk-Interface-rocm-${PV}"
|
||||
KEYWORDS="~amd64"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Radeon Open Compute Thunk Interface"
|
||||
HOMEPAGE="https://github.com/ROCm/ROCT-Thunk-Interface"
|
||||
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-core/llvm
|
||||
dev-cpp/gtest )"
|
||||
|
||||
IUSE="test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
CMAKE_BUILD_TYPE=Release
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-5.7.1-musl.patch"
|
||||
"${FILESDIR}/${PN}-6.1.0-visibility.patch"
|
||||
"${FILESDIR}/kfdtest-6.1.0-linklibLLVM.patch"
|
||||
"${FILESDIR}/kfdtest-6.1.0-libpath.patch"
|
||||
"${FILESDIR}/kfdtest-6.1.0-skipIPCtest.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
|
||||
cmake_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DCPACK_PACKAGING_INSTALL_PREFIX="${EPREFIX}/usr"
|
||||
)
|
||||
cmake_src_configure
|
||||
|
||||
if use test; then
|
||||
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
|
||||
}
|
||||
|
|
@ -1,87 +0,0 @@
|
|||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
LLVM_COMPAT=( 20 )
|
||||
ROCM_SKIP_GLOBALS=1
|
||||
inherit cmake linux-info llvm-r1 rocm
|
||||
|
||||
if [[ ${PV} == *9999 ]] ; then
|
||||
EGIT_REPO_URI="https://github.com/ROCm/ROCT-Thunk-Interface/"
|
||||
inherit git-r3
|
||||
else
|
||||
SRC_URI="https://github.com/ROCm/ROCT-Thunk-Interface/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz"
|
||||
S="${WORKDIR}/ROCT-Thunk-Interface-rocm-${PV}"
|
||||
KEYWORDS="~amd64"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Radeon Open Compute Thunk Interface"
|
||||
HOMEPAGE="https://github.com/ROCm/ROCT-Thunk-Interface"
|
||||
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}-5.7.1-musl.patch"
|
||||
"${FILESDIR}/${PN}-6.1.0-visibility.patch"
|
||||
"${FILESDIR}/kfdtest-6.1.0-linklibLLVM.patch"
|
||||
"${FILESDIR}/kfdtest-6.1.0-libpath.patch"
|
||||
"${FILESDIR}/kfdtest-6.1.0-skipIPCtest.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
|
||||
cmake_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DCPACK_PACKAGING_INSTALL_PREFIX="${EPREFIX}/usr"
|
||||
)
|
||||
cmake_src_configure
|
||||
|
||||
if use test; then
|
||||
export LIBHSAKMT_PATH="${BUILD_DIR}"
|
||||
local mycmakeargs=(
|
||||
-DLLVM_DIR="$(get_llvm_prefix)"
|
||||
)
|
||||
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
|
||||
}
|
||||
|
|
@ -1,92 +0,0 @@
|
|||
# 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 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/ROCR-Runtime/tree/amd-staging/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}-6.3.0-functions.patch"
|
||||
"${FILESDIR}/${PN}-6.3.0-musl.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() {
|
||||
local mycmakeargs=(
|
||||
-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
|
||||
-DBUILD_SHARED_LIBS=ON
|
||||
)
|
||||
cmake_src_configure
|
||||
|
||||
if use test; then
|
||||
export LIBHSAKMT_PATH="${BUILD_DIR}"
|
||||
local mycmakeargs=(
|
||||
-DLLVM_DIR="$(get_llvm_prefix)"
|
||||
)
|
||||
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
|
||||
}
|
||||
|
|
@ -1,92 +0,0 @@
|
|||
# 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 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/ROCR-Runtime/tree/amd-staging/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}-6.3.0-functions.patch"
|
||||
"${FILESDIR}/${PN}-6.3.0-musl.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() {
|
||||
local mycmakeargs=(
|
||||
-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
|
||||
-DBUILD_SHARED_LIBS=ON
|
||||
)
|
||||
cmake_src_configure
|
||||
|
||||
if use test; then
|
||||
export LIBHSAKMT_PATH="${BUILD_DIR}"
|
||||
local mycmakeargs=(
|
||||
-DLLVM_DIR="$(get_llvm_prefix)"
|
||||
)
|
||||
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
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue