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/rocThrust/
Date: Thu, 22 Sep 2022 01:08:51 +0000 (UTC)	[thread overview]
Message-ID: <1663808874.a440582ae525e51c5f4d2fa4b0ebfb9c748a3e20.heroxbd@gentoo> (raw)

commit:     a440582ae525e51c5f4d2fa4b0ebfb9c748a3e20
Author:     Yiyang Wu <xgreenlandforwyy <AT> gmail <DOT> com>
AuthorDate: Fri Jul 15 12:18:41 2022 +0000
Commit:     Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Thu Sep 22 01:07:54 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a440582a

sci-libs/rocThrust: add 5.1.3, using rocm.eclass

No need to rebuilt rocThrust when hip upgrade because it is dynamically
linked to libhipamd, while llvm SLOT does not matter because it is only
used to produce GPU kernels, libclang and libLLVM does not linked in.

Signed-off-by: Yiyang Wu <xgreenlandforwyy <AT> gmail.com>
Signed-off-by: Benda Xu <heroxbd <AT> gentoo.org>

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

diff --git a/sci-libs/rocThrust/Manifest b/sci-libs/rocThrust/Manifest
index 1f55b8280b6b..13445c171f29 100644
--- a/sci-libs/rocThrust/Manifest
+++ b/sci-libs/rocThrust/Manifest
@@ -1,3 +1,4 @@
 DIST rocThrust-4.0.0.tar.gz 1166346 BLAKE2B 02c89e0c4ab2c888a20b7c956a73012157f2735e6ec76369a1f75fbc17bb3f995d1914106ec58562f28243fbe5f019ac230ac3313b6aacb4d8b868f3ac1f091e SHA512 476aa5706487c5801cc91908806a1a1fcb550171f63e0b2debd9b59b18c7435c484578ec456ccfabc140dd7bca7d9bb432a7ba223946b1fca22e72e7d053af2d
 DIST rocThrust-4.3.0.tar.gz 1156832 BLAKE2B a462cfaa31883253fabba584ca77622cc5a7234bd9979472a84ec77b91c60f48f1064149b86d624aaedd70262fb65fb6aadb03cc6e00939d4eed6cd11bfc0090 SHA512 8c6aa3aefd59c87cc8278930bf90021867f519c356c86a3c3ebfcdf90887b8631250b6a9a8156f77c0cbf7ddbad7881e5e1b802f1cd1305cc3a2e7d95ef4e6f3
 DIST rocThrust-5.0.2.tar.gz 1183550 BLAKE2B 88021266dc9ffcb8f5e803acfe767c52aaa04b2348d0dcb204eb74bdf44ed26eb6d98f8d85324b90fe73228b52a0ad22686b87274c868ef19ec8ded825b58ea9 SHA512 3599b9498db392d480c08873d9e84ff1c05e5417e14e43e56f190fe4490873fec37c944a3c252942d6275a4fa4af85c82d39b62b0fdb5daa82023a2df8a3228f
+DIST rocThrust-5.1.3.tar.gz 1186518 BLAKE2B 2defe71247915940917438d4f0d0a811dca7de39e5168248968fa9c165b81d94b0e20f3df9b84db1fbdcd2eb87942dec5d3adbbe1a699eb51eeb4e1b2f0a88d0 SHA512 189c70343a410cf3f3c1589ef24c68a38b5270d8780d15261a124b8250f279a3c3c7afef38e6310d57cb1741b3ee75f0b4ac0bb9dfcf4a4fb0e7e6c0516faf74

diff --git a/sci-libs/rocThrust/rocThrust-5.1.3.ebuild b/sci-libs/rocThrust/rocThrust-5.1.3.ebuild
new file mode 100644
index 000000000000..c7ef0e87fa4a
--- /dev/null
+++ b/sci-libs/rocThrust/rocThrust-5.1.3.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ROCM_VERSION=${PV}
+
+inherit cmake rocm
+
+DESCRIPTION="HIP back-end for the parallel algorithm library Thrust"
+HOMEPAGE="https://github.com/ROCmSoftwarePlatform/rocThrust"
+SRC_URI="https://github.com/ROCmSoftwarePlatform/rocThrust/archive/rocm-${PV}.tar.gz -> rocThrust-${PV}.tar.gz"
+
+LICENSE="Apache-2.0"
+KEYWORDS="~amd64"
+SLOT="0/$(ver_cut 1-2)"
+IUSE="benchmark test"
+REQUIRED_USE="${ROCM_REQUIRED_USE}"
+
+RESTRICT="!test? ( test )"
+
+RDEPEND="dev-util/hip
+	sci-libs/rocPRIM:${SLOT}[${ROCM_USEDEP}]
+	test? ( dev-cpp/gtest )"
+DEPEND="${RDEPEND}"
+BDEPEND=">=dev-util/cmake-3.22"
+
+S="${WORKDIR}/rocThrust-rocm-${PV}"
+
+PATCHES=( "${FILESDIR}/${PN}-4.0-operator_new.patch" )
+
+src_prepare() {
+	sed -e "/PREFIX rocthrust/d" \
+		-e "/DESTINATION/s:rocthrust/include/thrust:include/thrust:" \
+		-e "/rocm_install_symlink_subdir(rocthrust)/d" \
+		-e "/<INSTALL_INTERFACE/s:rocthrust/include/:include/:" -i thrust/CMakeLists.txt || die
+
+	sed -e "s:\${CMAKE_INSTALL_INCLUDEDIR}:&/rocthrust:" \
+		-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
+
+	eapply_user
+	cmake_src_prepare
+}
+
+src_configure() {
+	addpredict /dev/kfd
+	addpredict /dev/dri/
+
+	local mycmakeargs=(
+		-DSKIP_RPATH=On
+		-DAMDGPU_TARGETS="$(get_amdgpu_flags)"
+		-DBUILD_TEST=$(usex test ON OFF)
+		-DBUILD_BENCHMARKS=$(usex benchmark ON OFF)
+	)
+
+	CXX=hipcc cmake_src_configure
+}
+
+src_test() {
+	check_amdgpu
+	MAKEOPTS="-j1" cmake_src_test
+}
+
+src_install() {
+	cmake_src_install
+
+	use benchmark && dobin "${BUILD_DIR}"/benchmarks/benchmark_thrust_bench
+}


             reply	other threads:[~2022-09-22  1:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-22  1:08 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/rocThrust/ Sam James
2024-03-08 19:22 Sam James
2023-11-27 14:35 Benda XU
2023-07-05 18:15 Craig Andrews
2023-02-01  9:53 Andreas Sturmlechner
2022-08-06 14:23 Benda XU
2022-05-03  5:41 Benda XU
2022-05-02  6:02 Benda XU
2022-01-24 11:17 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=1663808874.a440582ae525e51c5f4d2fa4b0ebfb9c748a3e20.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