Gentoo Archives: gentoo-commits

From: Benda XU <heroxbd@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/rocPRIM/
Date: Tue, 03 May 2022 05:41:47
Message-Id: 1651556493.092917707f6d4fb13477f53cefc4c35f6e961f89.heroxbd@gentoo
1 commit: 092917707f6d4fb13477f53cefc4c35f6e961f89
2 Author: YiyangWu <xgreenlandforwyy <AT> gmail <DOT> com>
3 AuthorDate: Mon May 2 02:21:23 2022 +0000
4 Commit: Benda XU <heroxbd <AT> gentoo <DOT> org>
5 CommitDate: Tue May 3 05:41:33 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=09291770
7
8 sci-libs/rocPRIM: bump version to 5.0.2
9
10 rocPRIM now supports RDNA2. Tests past on RX 6700XT.
11 Paralell tests disabled due to device access conflict.
12 All tests passed on single Radeon RX 6700XT
13
14 Package-Manager: Portage-3.0.30, Repoman-3.0.3
15 Signed-off-by: Yiyang Wu <xgreenlandforwyy <AT> gmail.com>
16 Signed-off-by: Benda Xu <heroxbd <AT> gentoo.org>
17
18 sci-libs/rocPRIM/Manifest | 1 +
19 sci-libs/rocPRIM/rocPRIM-5.0.2.ebuild | 77 +++++++++++++++++++++++++++++++++++
20 2 files changed, 78 insertions(+)
21
22 diff --git a/sci-libs/rocPRIM/Manifest b/sci-libs/rocPRIM/Manifest
23 index 21e0c5acf8c2..f10d002c910a 100644
24 --- a/sci-libs/rocPRIM/Manifest
25 +++ b/sci-libs/rocPRIM/Manifest
26 @@ -1,2 +1,3 @@
27 DIST rocPRIM-4.0.0.tar.gz 285576 BLAKE2B 44f3542068dee48c0f2bb475f4d3fd74592fe27f4ca00a7b754014deaaa7187c4363d4b2e7fe13ff771b48d2885b848b9632ef71ce85e80e0946e4e5f13495d8 SHA512 c37fce4f16788d82379459af69b9f47f2bccb3b0e655e7314a23936cc99a474afb0092f240bd950341f1b02ce93d03abce0df7ce62ffcb5d577171ce870dd1d2
28 DIST rocPRIM-4.3.0.tar.gz 290071 BLAKE2B f69ada9859ef9238d4f8c50bc2b10d131c986dbd8982cc0c7f8614cd51746080aba3b3e7b0ef3e1d5006c179a823f4fcb8ce03cc0a4c88fad3cb46947c7b7fb6 SHA512 9925f832637d19360bf1624dd7a6ef931fb740ee725e35c3159a09a3c569af6f61e3337124c8e0561e60c8595d0d533a4402b91345056ff8d276c6e1dd491036
29 +DIST rocPRIM-5.0.2.tar.gz 364102 BLAKE2B 4e56f37c8ed02a4c4dadfab25e1e840c85c90b6f656858ad15dfa0f8de38b8f130d49a49461dfa09d3f07389e57b2a9cdefe5958b6faa80a639f98d276ca3e66 SHA512 d4d14203d721f7f62f35b2af91c261366f150a24fc21dc5a508743ee5a6246a6a3ad437db03f3ddaad5799cc2ba6d7b8d1e37a8e038eb4156d7962313e36f520
30
31 diff --git a/sci-libs/rocPRIM/rocPRIM-5.0.2.ebuild b/sci-libs/rocPRIM/rocPRIM-5.0.2.ebuild
32 new file mode 100644
33 index 000000000000..e14d3d1eae50
34 --- /dev/null
35 +++ b/sci-libs/rocPRIM/rocPRIM-5.0.2.ebuild
36 @@ -0,0 +1,77 @@
37 +# Copyright 1999-2022 Gentoo Authors
38 +# Distributed under the terms of the GNU General Public License v2
39 +
40 +EAPI=8
41 +
42 +inherit cmake
43 +
44 +DESCRIPTION="HIP parallel primitives for developing performant GPU-accelerated code on ROCm"
45 +HOMEPAGE="https://github.com/ROCmSoftwarePlatform/rocPRIM"
46 +SRC_URI="https://github.com/ROCmSoftwarePlatform/rocPRIM/archive/rocm-${PV}.tar.gz -> rocPRIM-${PV}.tar.gz"
47 +
48 +LICENSE="MIT"
49 +KEYWORDS="~amd64"
50 +SLOT="0/$(ver_cut 1-2)"
51 +IUSE="benchmark test"
52 +
53 +RDEPEND="dev-util/hip
54 + benchmark? ( dev-cpp/benchmark )
55 + test? ( dev-cpp/gtest )"
56 +BDEPEND="dev-util/rocm-cmake
57 + >=dev-util/cmake-3.22"
58 +DEPEND="${RDEPEND}"
59 +
60 +S="${WORKDIR}/rocPRIM-rocm-${PV}"
61 +
62 +RESTRICT="!test? ( test )"
63 +
64 +src_prepare() {
65 + # "hcc" is depcreated, new platform ist "rocclr"
66 + sed -e "/HIP_PLATFORM STREQUAL/s,hcc,rocclr," -i cmake/VerifyCompiler.cmake || die
67 +
68 + # Install according to FHS
69 + sed -e "/PREFIX rocprim/d" \
70 + -e "/INSTALL_INTERFACE/s,rocprim/include,include/rocprim," \
71 + -e "/DESTINATION/s,rocprim/include,include," \
72 + -e "/rocm_install_symlink_subdir(rocprim)/d" \
73 + -i rocprim/CMakeLists.txt || die
74 +
75 + # disable downloading googletest and googlebenchmark
76 + sed -r -e '/Downloading/{:a;N;/\n *\)$/!ba; d}' -i cmake/Dependencies.cmake || die
77 +
78 + # remove GIT dependency
79 + sed -r -e '/find_package\(Git/{:a;N;/\nendif/!ba; d}' -i cmake/Dependencies.cmake || die
80 +
81 + # install benchmark files
82 + if use benchmark; then
83 + sed -e "/get_filename_component/s,\${BENCHMARK_SOURCE},${PN}_\${BENCHMARK_SOURCE}," \
84 + -e "/add_executable/a\ install(TARGETS \${BENCHMARK_TARGET})" -i benchmark/CMakeLists.txt || die
85 + fi
86 +
87 + eapply_user
88 + cmake_src_prepare
89 +}
90 +
91 +src_configure() {
92 + # Grant access to the device
93 + addwrite /dev/kfd
94 + addpredict /dev/dri/
95 +
96 + # Compiler to use
97 + export CXX=hipcc
98 +
99 + local mycmakeargs=(
100 + -DBUILD_TEST=$(usex test ON OFF)
101 + -DBUILD_BENCHMARK=$(usex benchmark ON OFF)
102 + ${AMDGPU_TARGETS+-DAMDGPU_TARGETS="${AMDGPU_TARGETS}"}
103 + )
104 +
105 + cmake_src_configure
106 +}
107 +
108 +src_test() {
109 + # Grant access to the device
110 + addwrite /dev/kfd
111 + addwrite /dev/dri/
112 + MAKEOPTS="-j1" cmake_src_test
113 +}