From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 81F161382C5 for ; Sun, 24 Jan 2021 07:49:53 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B56CAE0958; Sun, 24 Jan 2021 07:49:52 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8A803E0958 for ; Sun, 24 Jan 2021 07:49:52 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B4F783410D4 for ; Sun, 24 Jan 2021 07:49:50 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 654D64A4 for ; Sun, 24 Jan 2021 07:49:49 +0000 (UTC) From: "Benda XU" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Benda XU" Message-ID: <1611474341.21458c9061094f1fa0a47c93c1416c31bc6dc7de.heroxbd@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/rocThrust/, sci-libs/rocThrust/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: sci-libs/rocThrust/Manifest sci-libs/rocThrust/files/rocThrust-4.0-operator_new.patch sci-libs/rocThrust/metadata.xml sci-libs/rocThrust/rocThrust-4.0.0-r1.ebuild X-VCS-Directories: sci-libs/rocThrust/files/ sci-libs/rocThrust/ X-VCS-Committer: heroxbd X-VCS-Committer-Name: Benda XU X-VCS-Revision: 21458c9061094f1fa0a47c93c1416c31bc6dc7de X-VCS-Branch: master Date: Sun, 24 Jan 2021 07:49:49 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 6f68c9f0-b97c-49c1-9a1a-e88b75194bbe X-Archives-Hash: 71dd90893b46f3be2a5e9372ea8b2f3b commit: 21458c9061094f1fa0a47c93c1416c31bc6dc7de Author: Benda Xu gentoo org> AuthorDate: Thu Jan 21 11:36:45 2021 +0000 Commit: Benda XU gentoo org> CommitDate: Sun Jan 24 07:45:41 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=21458c90 sci-libs/rocThrust: ROCm backend for Thrust. Bug: https://bugs.gentoo.org/650804 Bug: https://github.com/gentoo/gentoo/pull/10724 Suggested-by: Yiyang Wu gmail.com> Suggested-by: Wilfried Holzke holzke.net> Package-Manager: Portage-3.0.12, Repoman-3.0.1 Signed-off-by: Benda Xu gentoo.org> sci-libs/rocThrust/Manifest | 1 + .../files/rocThrust-4.0-operator_new.patch | 29 +++++++++++++ sci-libs/rocThrust/metadata.xml | 18 ++++++++ sci-libs/rocThrust/rocThrust-4.0.0-r1.ebuild | 49 ++++++++++++++++++++++ 4 files changed, 97 insertions(+) diff --git a/sci-libs/rocThrust/Manifest b/sci-libs/rocThrust/Manifest new file mode 100644 index 00000000000..282c08da9b9 --- /dev/null +++ b/sci-libs/rocThrust/Manifest @@ -0,0 +1 @@ +DIST rocThrust-4.0.0.tar.gz 1166346 BLAKE2B 02c89e0c4ab2c888a20b7c956a73012157f2735e6ec76369a1f75fbc17bb3f995d1914106ec58562f28243fbe5f019ac230ac3313b6aacb4d8b868f3ac1f091e SHA512 476aa5706487c5801cc91908806a1a1fcb550171f63e0b2debd9b59b18c7435c484578ec456ccfabc140dd7bca7d9bb432a7ba223946b1fca22e72e7d053af2d diff --git a/sci-libs/rocThrust/files/rocThrust-4.0-operator_new.patch b/sci-libs/rocThrust/files/rocThrust-4.0-operator_new.patch new file mode 100644 index 00000000000..2b78fd0053e --- /dev/null +++ b/sci-libs/rocThrust/files/rocThrust-4.0-operator_new.patch @@ -0,0 +1,29 @@ +# Use copy assignment instead of copy constructor to avoid unavailability of placement new operator. +# But more likely there is another hidden bug, since this syntax is actually correct. +# There are still similar syntax remain in other headers, which may cause identical compilation error. + +# Suggested by Yuyi Wang +diff --color -uprN rocThrust-rocm-4.0.0.orig/thrust/system/hip/detail/uninitialized_copy.h rocThrust-rocm-4.0.0/thrust/system/hip/detail/uninitialized_copy.h +--- rocThrust-rocm-4.0.0.orig/thrust/system/hip/detail/uninitialized_copy.h 2021-01-21 20:42:44.439246148 +0800 ++++ rocThrust-rocm-4.0.0/thrust/system/hip/detail/uninitialized_copy.h 2021-01-21 21:13:20.926840762 +0800 +@@ -62,7 +62,7 @@ namespace __uninitialized_copy + InputType const& in = raw_reference_cast(input[idx]); + OutputType& out = raw_reference_cast(output[idx]); + +- ::new(static_cast(&out)) OutputType(in); ++ out = in; + } + }; // struct functor + +diff --color -uprN rocThrust-rocm-4.0.0.orig/thrust/system/hip/detail/uninitialized_fill.h rocThrust-rocm-4.0.0/thrust/system/hip/detail/uninitialized_fill.h +--- rocThrust-rocm-4.0.0.orig/thrust/system/hip/detail/uninitialized_fill.h 2021-01-21 20:42:44.439246148 +0800 ++++ rocThrust-rocm-4.0.0/thrust/system/hip/detail/uninitialized_fill.h 2021-01-21 21:13:07.022489406 +0800 +@@ -59,7 +59,7 @@ namespace __uninitialized_fill + { + value_type& out = raw_reference_cast(items[idx]); + +- ::new(static_cast(&out)) value_type(value); ++ out = value; + } + }; // struct functor + } // namespace __uninitialized_copy diff --git a/sci-libs/rocThrust/metadata.xml b/sci-libs/rocThrust/metadata.xml new file mode 100644 index 00000000000..b0a23ffc1e0 --- /dev/null +++ b/sci-libs/rocThrust/metadata.xml @@ -0,0 +1,18 @@ + + + + + sci@gentoo.org + + + candrews@gentoo.org + Craig Andrews + + + gentoo@holzke.net + Wilfried Holzke + + + ROCm-Developer-Tools/rocThrust + + diff --git a/sci-libs/rocThrust/rocThrust-4.0.0-r1.ebuild b/sci-libs/rocThrust/rocThrust-4.0.0-r1.ebuild new file mode 100644 index 00000000000..4ca8a58bad6 --- /dev/null +++ b/sci-libs/rocThrust/rocThrust-4.0.0-r1.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake + +DESCRIPTION="Thrust dependent software on AMD GPUs" +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" + +RDEPEND=">=dev-util/hip-${PV} + =sci-libs/rocPRIM-${PV}*" +DEPEND="${RDEPEND}" + +S="${WORKDIR}/rocThrust-rocm-${PV}" + +PATCHES="${FILESDIR}/rocThrust-4.0-operator_new.patch" + +src_prepare() { + sed -e "/PREFIX rocthrust/d" \ + -e "/DESTINATION/s:rocthrust/include/thrust:include/rocthrust/thrust:" \ + -e "/rocm_install_symlink_subdir(rocthrust)/d" \ + -e "/