public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Benda XU" <heroxbd@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/hipCUB/
Date: Tue,  3 May 2022 05:41:40 +0000 (UTC)	[thread overview]
Message-ID: <1651556493.fcd1defe545055ec827cf020a27e0ae6458af829.heroxbd@gentoo> (raw)

commit:     fcd1defe545055ec827cf020a27e0ae6458af829
Author:     YiyangWu <xgreenlandforwyy <AT> gmail <DOT> com>
AuthorDate: Mon May  2 06:16:07 2022 +0000
Commit:     Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Tue May  3 05:41:33 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fcd1defe

sci-libs/hipCUB: bump to 5.0.2

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Yiyang Wu <xgreenlandforwyy <AT> gmail.com>
Signed-off-by: Benda Xu <heroxbd <AT> gentoo.org>

 sci-libs/hipCUB/Manifest            |  1 +
 sci-libs/hipCUB/hipCUB-5.0.2.ebuild | 74 +++++++++++++++++++++++++++++++++++++
 2 files changed, 75 insertions(+)

diff --git a/sci-libs/hipCUB/Manifest b/sci-libs/hipCUB/Manifest
index 4d4a1a030483..4038ecb82108 100644
--- a/sci-libs/hipCUB/Manifest
+++ b/sci-libs/hipCUB/Manifest
@@ -1,2 +1,3 @@
 DIST hipCUB-4.0.0.tar.gz 137513 BLAKE2B b7ef4d53037fba04771162ae8993def648f5e1401654286ffc6987bbb4b25baa1b1b14bc37035e1afe46eeffe3e564f244e339cdfd0e5a242574d248bf4683db SHA512 e778b94c86e09bf3b0bc043fb15ed8725387b875e8631a7e8599aee8da2d8085190effc9681d742fc0d286cc0c20762341f1f24699c8a52e9734611c716530d5
 DIST hipCUB-4.3.0.tar.gz 154097 BLAKE2B 68a46f1416c969e4bf8e245c2aa8aee626f1e8089182ffb8f5090d540efe98606a616499d52b14da3733b3a6f4da690ea1718ea58fb6166351f4b4807f1b8228 SHA512 7c0abcf034d885615a9a4f05e6ca906e99b0ffbe36ae3d4b9d9d79b01d21077dc86be659548b45dad8498b84bec24dc0a5be78040c1ab21ca458d22fa7fae43d
+DIST hipCUB-5.0.2.tar.gz 243032 BLAKE2B 68256c0868bd23dbd78075ab286fc0738dc90f330a7e99186803e7920b3366f5608986dd9e3f4c5a045f9ec3f2461a66ab5b708d5d1d3fc748d042dd929a7993 SHA512 ae4d55fcf513eb5dd1316e335a0de30f6098eba70e877b41905bc59f3fb500ad9a46a28de77b74b914a15ffc38ad5c5f4dbdf36139505c26b94c43ffa5c90e01

diff --git a/sci-libs/hipCUB/hipCUB-5.0.2.ebuild b/sci-libs/hipCUB/hipCUB-5.0.2.ebuild
new file mode 100644
index 000000000000..176c254b3384
--- /dev/null
+++ b/sci-libs/hipCUB/hipCUB-5.0.2.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="Wrapper of rocPRIM or CUB for GPU parallel primitives"
+HOMEPAGE="https://github.com/ROCmSoftwarePlatform/hipCUB"
+SRC_URI="https://github.com/ROCmSoftwarePlatform/hipCUB/archive/rocm-${PV}.tar.gz -> hipCUB-${PV}.tar.gz"
+
+LICENSE="BSD"
+KEYWORDS="~amd64"
+SLOT="0/$(ver_cut 1-2)"
+IUSE="benchmark test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="dev-util/hip
+	sci-libs/rocPRIM:${SLOT}
+	benchmark? ( dev-cpp/benchmark )
+	test? ( dev-cpp/gtest )
+"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/hipCUB-rocm-${PV}"
+
+PATCHES="${FILESDIR}/${PN}-4.3.0-add-memory-header.patch"
+
+src_prepare() {
+	sed -e "/PREFIX hipcub/d" \
+		-e "/DESTINATION/s:hipcub/include/:include/:" \
+		-e "/rocm_install_symlink_subdir(hipcub)/d" \
+		-e "/<INSTALL_INTERFACE/s:hipcub/include/:include/hipcub/:" -i hipcub/CMakeLists.txt || die
+
+	sed	-e "s:\${ROCM_INSTALL_LIBDIR}:\${CMAKE_INSTALL_LIBDIR}:" -i cmake/ROCMExportTargetsHeaderOnly.cmake || die
+
+	# disable downloading googletest and googlebenchmark
+	sed  -r -e '/Downloading/{:a;N;/\n *\)$/!ba; d}' -i cmake/Dependencies.cmake || die
+
+	# remove GIT dependency
+	sed  -r -e '/find_package\(Git/{:a;N;/\nendif/!ba; d}' -i cmake/Dependencies.cmake || die
+
+	if use benchmark; then
+		sed -e "/get_filename_component/s,\${BENCHMARK_SOURCE},${PN}_\${BENCHMARK_SOURCE}," \
+			-e "/add_executable/a\  install(TARGETS \${BENCHMARK_TARGET})" -i benchmark/CMakeLists.txt || die
+	fi
+
+	eapply_user
+	cmake_src_prepare
+}
+
+src_configure() {
+	# Grant access to the device
+	addwrite /dev/kfd
+	addpredict /dev/dri/
+
+	# Compiler to use
+	export CXX=hipcc
+
+	local mycmakeargs=(
+		-DBUILD_TEST=$(usex test ON OFF)
+		-DBUILD_BENCHMARK=$(usex benchmark ON OFF)
+		${AMDGPU_TARGETS+-DAMDGPU_TARGETS="${AMDGPU_TARGETS}"}
+	)
+
+	cmake_src_configure
+}
+
+src_test() {
+	# Grant access to the device
+	addwrite /dev/kfd
+	addwrite /dev/dri/
+	MAKEOPTS="-j1" cmake_src_test
+}


             reply	other threads:[~2022-05-03  5:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-03  5:41 Benda XU [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-09-09 18:20 [gentoo-commits] repo/gentoo:master commit in: sci-libs/hipCUB/ Sam James
2024-06-26  9:21 Sam James
2024-03-08 19:22 Sam James
2023-11-27 14:35 Benda XU
2023-02-01  9:53 Andreas Sturmlechner
2022-12-19 14:00 Andreas Sturmlechner
2022-09-22  1:08 Benda XU
2021-01-24  7:49 Benda XU

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1651556493.fcd1defe545055ec827cf020a27e0ae6458af829.heroxbd@gentoo \
    --to=heroxbd@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox