diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-11-27 22:51:10 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-11-27 22:51:10 +0000 |
commit | ee0c4d5e506a6c64994a15c3af5cf1ca22045567 (patch) | |
tree | bdf578939023d42f04092ddb4bcd190eb391770f /sci-libs/rocThrust | |
parent | 161eaa4b12ca6314376288834bba20b7824d0d77 (diff) |
gentoo auto-resync : 27:11:2023 - 22:51:09
Diffstat (limited to 'sci-libs/rocThrust')
-rw-r--r-- | sci-libs/rocThrust/Manifest | 2 | ||||
-rw-r--r-- | sci-libs/rocThrust/rocThrust-5.7.1.ebuild | 76 |
2 files changed, 78 insertions, 0 deletions
diff --git a/sci-libs/rocThrust/Manifest b/sci-libs/rocThrust/Manifest index f2b8a1036412..6a304a67915a 100644 --- a/sci-libs/rocThrust/Manifest +++ b/sci-libs/rocThrust/Manifest @@ -1,4 +1,6 @@ AUX rocThrust-4.0-operator_new.patch 1699 BLAKE2B 1f8e4eb035768acd424cc2bae173c2c107b15b7f670c430ff5db5bb3657fdcafcea7933890176537c6147c1bee3cb675464d6d948724ba186868ff277eaa71f2 SHA512 5d9d48561e7feabc9341f13877d7e6bd49b59b140fe249956e87e785ed8afd1222aa1e7d77759af6ad8843e87d21362ba85ac9204bfcf160f30a4bcfb3d2e88b DIST rocThrust-5.1.3.tar.gz 1186518 BLAKE2B 2defe71247915940917438d4f0d0a811dca7de39e5168248968fa9c165b81d94b0e20f3df9b84db1fbdcd2eb87942dec5d3adbbe1a699eb51eeb4e1b2f0a88d0 SHA512 189c70343a410cf3f3c1589ef24c68a38b5270d8780d15261a124b8250f279a3c3c7afef38e6310d57cb1741b3ee75f0b4ac0bb9dfcf4a4fb0e7e6c0516faf74 +DIST rocThrust-5.7.1.tar.gz 1122808 BLAKE2B 41a5d57d03c7f95baf861b772c9513c7fbc26eee8a2f388897eb9b9f9fad3cdad81e2a79932c5b9a6d88b4e1596bf64e59e01337943a036ddb792f7b352ecd31 SHA512 52a9640808f0ed78ae2d6f25e741af59ae4e977535a0431f16c0fa1ee9a395e6f389cf29e61c02ac274cf16fcd193e5df6fb2edc340059ab282ed7cd877fc8b4 EBUILD rocThrust-5.1.3.ebuild 1928 BLAKE2B d26a61ca2cbe3519a9a33cfe39146bc93b4233d62a17fde1377ee9db98673dbcc81f4cb77e30c17a5f1714a824cd0c84fc21018d547c3f4ad062ef43af7b0943 SHA512 c843826b0d9a312a06022519d7d069ff1ccb21d7ad4363396ef28776bc8af7d778fee2a2e4b954d7ca0db60c21d4ed639672b9db4c370992d8b10400e1db90bf +EBUILD rocThrust-5.7.1.ebuild 2056 BLAKE2B 4f9a2c31c65c76360e2828bf6cc56a2c92eaea79f1112136d140a69e8d85c9c21a94e60cadb3784b3ff7ef6d97ff4299f4f610aa9a128f88657bdc781eaf9fe1 SHA512 e6d50df41d26b89d55b199913adcc8e5e862e278bff5698c236f8562de90bce5e91bf471b6a742d4c6f202c0ab45407d480be53812bd8197ab635aef3f4be3f2 MISC metadata.xml 541 BLAKE2B bab886722d16c8fb7095c256dabd189817881b1b9707351efa2d83c327b6a448f7fe829e93c6cc25b3379ae11d121fd6049dcb15d8fa7273bf891f6ae7643a76 SHA512 a3c55751d755b67531a8ba70a6183e50208fe7c5ecf7feb4eef2acb0671803aafe54a6c3d3b430a592e39d3ec15ed964fda3d552c216546af31608cea796a559 diff --git a/sci-libs/rocThrust/rocThrust-5.7.1.ebuild b/sci-libs/rocThrust/rocThrust-5.7.1.ebuild new file mode 100644 index 000000000000..68d0b7198b14 --- /dev/null +++ b/sci-libs/rocThrust/rocThrust-5.7.1.ebuild @@ -0,0 +1,76 @@ +# Copyright 1999-2023 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=( + -DCMAKE_SKIP_RPATH=ON + -DAMDGPU_TARGETS="$(get_amdgpu_flags)" + -DBUILD_TEST=$(usex test ON OFF) + -DBUILD_BENCHMARKS=$(usex benchmark ON OFF) + -DBUILD_FILE_REORG_BACKWARD_COMPATIBILITY=OFF + ) + + CXX=hipcc cmake_src_configure +} + +src_test() { + check_amdgpu + # uses HMM to fit tests to default <512M iGPU VRAM + MAKEOPTS="-j1" ROCTHRUST_USE_HMM="1" cmake_src_test +} + +src_install() { + cmake_src_install + + use benchmark && dobin "${BUILD_DIR}"/benchmarks/benchmark_thrust_bench +} |