summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYiyang Wu <xgreenlandforwyy@gmail.com>2023-10-21 14:18:48 +0800
committerYixun Lan <dlan@gentoo.org>2023-11-01 09:26:19 +0000
commitb5e1a592b74cbf80aed97f6b75d74ce4f9073258 (patch)
tree6aa7f55d95cc67f005011263459f7505d62fb994 /dev-libs/rocm-comgr
parentlinux-mod-r1.eclass: fix DEPMOD override for kernel 6.6 (diff)
downloadgentoo-b5e1a592b74cbf80aed97f6b75d74ce4f9073258.tar.gz
gentoo-b5e1a592b74cbf80aed97f6b75d74ce4f9073258.tar.bz2
gentoo-b5e1a592b74cbf80aed97f6b75d74ce4f9073258.zip
dev-libs/rocm-comgr: Bump fix-test.patch as well
This is a small change only on test code that let all tests pass, does not affect installed package at all. References: https://bugs.gentoo.org/836475#c5 References: https://github.com/gentoo/gentoo/pull/33400#issuecomment-1773686422 Closes: https://bugs.gentoo.org/836475 Signed-off-by: Yiyang Wu <xgreenlandforwyy@gmail.com> Signed-off-by: Yixun Lan <dlan@gentoo.org>
Diffstat (limited to 'dev-libs/rocm-comgr')
-rw-r--r--dev-libs/rocm-comgr/files/rocm-comgr-5.7.1-fix-tests.patch50
-rw-r--r--dev-libs/rocm-comgr/rocm-comgr-5.7.1.ebuild1
2 files changed, 51 insertions, 0 deletions
diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-5.7.1-fix-tests.patch b/dev-libs/rocm-comgr/files/rocm-comgr-5.7.1-fix-tests.patch
new file mode 100644
index 000000000000..80f1f90dbe94
--- /dev/null
+++ b/dev-libs/rocm-comgr/files/rocm-comgr-5.7.1-fix-tests.patch
@@ -0,0 +1,50 @@
+Vanilla LLVM does not support calling AMDGPU_KERNEL across different sources/bitcodes.
+Without this patch https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/issues/45 occurs.
+Reference: https://github.com/llvm/llvm-project/issues/60313
+===================================================================
+Index: comgr/test/source/source1.cl
+===================================================================
+--- comgr.orig/test/source/source1.cl
++++ comgr/test/source/source1.cl
+@@ -35,7 +35,9 @@
+
+ #include "include-a.h"
+
++void kernel source3(__global int *j) { *j = FOO; }
++
+ void kernel source1(__global int *j) {
+ *j += 2;
+- source2(j);
++ source3(j);
+ }
+Index: comgr/test/mangled_names_test.c
+===================================================================
+--- comgr.orig/test/mangled_names_test.c
++++ comgr/test/mangled_names_test.c
+@@ -162,7 +162,7 @@ int main(int argc, char *argv[]) {
+ exit(1);
+ }
+
+- const char *bcNames[] = {"source1", "source2"};
++ const char *bcNames[] = {"source3", "source1"};
+
+ for (size_t I = 0; I < numNames; ++I) {
+ size_t Size;
+@@ -249,14 +249,14 @@ int main(int argc, char *argv[]) {
+
+ Status = amd_comgr_populate_mangled_names(DataExec, &numNames);
+
+- if (numNames != 4) {
++ if (numNames != 6) {
+ printf("amd_populate_mangled_names Failed: "
+- "produced %zu executable names (expected 4)\n",
++ "produced %zu executable names (expected 6)\n",
+ Count);
+ exit(1);
+ }
+
+- const char *execNames[] = {"source1", "source1.kd", "source2", "source2.kd"};
++ const char *execNames[] = {"source3", "source3.kd", "source1", "source1.kd", "source2", "source2.kd"};
+
+ for (size_t I = 0; I < numNames; ++I) {
+ size_t Size;
diff --git a/dev-libs/rocm-comgr/rocm-comgr-5.7.1.ebuild b/dev-libs/rocm-comgr/rocm-comgr-5.7.1.ebuild
index 28f2b5385c71..dd4856872ff2 100644
--- a/dev-libs/rocm-comgr/rocm-comgr-5.7.1.ebuild
+++ b/dev-libs/rocm-comgr/rocm-comgr-5.7.1.ebuild
@@ -29,6 +29,7 @@ PATCHES=(
"${FILESDIR}/${PN}-5.7.0-disassembly.patch"
"${FILESDIR}/${PN}-5.7.0-metadata.patch"
"${FILESDIR}/${PN}-5.7.0-symbolizer.patch"
+ "${FILESDIR}/${PN}-5.7.1-fix-tests.patch"
)
DESCRIPTION="Radeon Open Compute Code Object Manager"