summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYiyang Wu <xgreenlandforwyy@gmail.com>2023-01-27 13:37:34 +0800
committerSam James <sam@gentoo.org>2023-02-02 12:53:03 +0000
commitff5673d31363d797f1e40afa8038b9a9fa4c56c1 (patch)
tree92cd57b6bb495c6ef62bd3d23a91c8851f840983 /dev-libs
parentdev-libs/rocm-comgr: fix clang include dir search (diff)
downloadgentoo-ff5673d31363d797f1e40afa8038b9a9fa4c56c1.tar.gz
gentoo-ff5673d31363d797f1e40afa8038b9a9fa4c56c1.tar.bz2
gentoo-ff5673d31363d797f1e40afa8038b9a9fa4c56c1.zip
dev-libs/rocm-comgr: enable tests
Includes a patch that fixes the failed test due to unsupported feature of vanilla llvm, which is a better approach compares to https://src.fedoraproject.org/rpms/rocm-compilersupport/c/84acb10b0c831e674a4d01e677a51d7c672d2f43?branch=rawhide 100% tests passed, 0 tests failed out of 29 Total Test time (real) = 7.45 sec * Tests succeeded. Bug: https://bugs.gentoo.org/836475 Signed-off-by: Yiyang Wu <xgreenlandforwyy@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-libs')
-rw-r--r--dev-libs/rocm-comgr/files/rocm-comgr-5.3.3-fix-tests.patch17
-rw-r--r--dev-libs/rocm-comgr/rocm-comgr-5.3.3-r1.ebuild4
2 files changed, 21 insertions, 0 deletions
diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-5.3.3-fix-tests.patch b/dev-libs/rocm-comgr/files/rocm-comgr-5.3.3-fix-tests.patch
new file mode 100644
index 000000000000..08a40460c762
--- /dev/null
+++ b/dev-libs/rocm-comgr/files/rocm-comgr-5.3.3-fix-tests.patch
@@ -0,0 +1,17 @@
+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
+===================================================================
+--- comgr.orig/test/source1.cl
++++ comgr/test/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);
+ }
diff --git a/dev-libs/rocm-comgr/rocm-comgr-5.3.3-r1.ebuild b/dev-libs/rocm-comgr/rocm-comgr-5.3.3-r1.ebuild
index 0215adeaba17..c00adc6c1727 100644
--- a/dev-libs/rocm-comgr/rocm-comgr-5.3.3-r1.ebuild
+++ b/dev-libs/rocm-comgr/rocm-comgr-5.3.3-r1.ebuild
@@ -17,6 +17,9 @@ else
KEYWORDS="~amd64"
fi
+IUSE="test"
+RESTRICT="!test? ( test )"
+
PATCHES=(
"${FILESDIR}/${PN}-5.1.3-clang-fix-include.patch"
"${FILESDIR}/${PN}-5.1.3-rocm-path.patch"
@@ -24,6 +27,7 @@ PATCHES=(
"${FILESDIR}/0001-Specify-clang-exe-path-in-Driver-Creation.patch"
"${FILESDIR}/0001-Find-CLANG_RESOURCE_DIR-using-clang-print-resource-d.patch"
"${FILESDIR}/${PN}-5.3.3-HIPIncludePath-not-needed.patch"
+ "${FILESDIR}/${PN}-5.3.3-fix-tests.patch"
)
DESCRIPTION="Radeon Open Compute Code Object Manager"