commit: 76f7adfca3ac15178d34fd387e7eb32aa9bccd77 Author: Sv. Lockal <lockalsash <AT> gmail <DOT> com> AuthorDate: Sun Oct 12 13:45:27 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Tue Oct 21 18:47:33 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=76f7adfc
sci-libs/hipCUB: add 7.0.2 Bug: https://bugs.gentoo.org/964799 Signed-off-by: Sv. Lockal <lockalsash <AT> gmail.com> Part-of: https://github.com/gentoo/gentoo/pull/44165 Signed-off-by: Sam James <sam <AT> gentoo.org> sci-libs/hipCUB/Manifest | 1 + .../files/hipCUB-7.0.1-no-tests-install.patch | 20 +++++++ sci-libs/hipCUB/hipCUB-7.0.2.ebuild | 68 ++++++++++++++++++++++ sci-libs/hipCUB/metadata.xml | 2 +- 4 files changed, 90 insertions(+), 1 deletion(-) diff --git a/sci-libs/hipCUB/Manifest b/sci-libs/hipCUB/Manifest index cdc3b58df421..d67762b99a71 100644 --- a/sci-libs/hipCUB/Manifest +++ b/sci-libs/hipCUB/Manifest @@ -1,2 +1,3 @@ DIST hipCUB-6.3.3.tar.gz 387580 BLAKE2B e0b605835be2b685c1cfa099a807e30fa061af8b14bafa1167c8249383230761a0d08532c831d3cb015e8e1b58119899d3cb7330990ca046045ea40058ee03e5 SHA512 2ec96088d34edeff48f8ee103a619f2ca7c741dcb020a3d1833a00e2072510790a563e98662aef7aa2a348034f3c8169ee39dcc61ab95202c734901ba53dfa4b DIST hipCUB-6.4.3.tar.gz 419173 BLAKE2B 7e1e707210191eee00aab01f8768a272f1fb5c35bb9e0635fe32ad50f4a8b56634d5f097f5eb2d1d5625f30f62450368a25a95ac2ba8fe85da2effd8efd669c9 SHA512 fb8018cf6200a468601149b6508b50944a27c3f7562012fef39e3a0ca13ed5ff597b1a3ad9e02273b70020ebd19ed10322e46d324f09fcf32a4f363e0ba72036 +DIST hipCUB-7.0.2.tar.gz 442494 BLAKE2B 62357955317e612f49023db12f844ea04ed8c16930000ce805c5a4bdd9c53207b6a064a5770bfb74f01f06872f72f0649b8322dda704816e608c2691ab6526cc SHA512 2c26a622c82e53d5e06cfb45066aac4bb4f7702b96d7753eb9acc0266fb8bc9c3f3068dba2acf023b1644be95bbe48e3a554db053e446757651615f9bd5ef7a6 diff --git a/sci-libs/hipCUB/files/hipCUB-7.0.1-no-tests-install.patch b/sci-libs/hipCUB/files/hipCUB-7.0.1-no-tests-install.patch new file mode 100644 index 000000000000..52dc898b6d7b --- /dev/null +++ b/sci-libs/hipCUB/files/hipCUB-7.0.1-no-tests-install.patch @@ -0,0 +1,20 @@ +Exclude test-related files from installation +--- a/test/CMakeLists.txt ++++ b/test/CMakeLists.txt +@@ -47,16 +47,8 @@ function(add_relative_test test_name test_target) + else() + add_test(NAME "${test_name}" COMMAND "./${rel_path}") + endif() +- rocm_install(TARGETS ${test_target} COMPONENT tests) + file(APPEND "${INSTALL_TEST_FILE}" "add_test(${test_name} \"../${EXE_NAME}\")\n") + endfunction() + + # hipCUB tests + add_subdirectory(hipcub) +- +-rocm_install( +- FILES "${INSTALL_TEST_FILE}" +- DESTINATION "${CMAKE_INSTALL_BINDIR}/${PROJECT_NAME}" +- COMPONENT tests +- RENAME "CTestTestfile.cmake" +-) diff --git a/sci-libs/hipCUB/hipCUB-7.0.2.ebuild b/sci-libs/hipCUB/hipCUB-7.0.2.ebuild new file mode 100644 index 000000000000..21704d0d8d57 --- /dev/null +++ b/sci-libs/hipCUB/hipCUB-7.0.2.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ROCM_VERSION=${PV} + +inherit cmake rocm + +DESCRIPTION="Wrapper of rocPRIM or CUB for GPU parallel primitives" +HOMEPAGE="https://github.com/ROCm/rocm-libraries/tree/develop/projects/hipcub" +SRC_URI="https://github.com/ROCm/hipCUB/archive/rocm-${PV}.tar.gz -> hipCUB-${PV}.tar.gz" +S="${WORKDIR}/hipCUB-rocm-${PV}" + +LICENSE="BSD" +SLOT="0/$(ver_cut 1-2)" +KEYWORDS="~amd64" +IUSE="benchmark test" +REQUIRED_USE=" + benchmark? ( ${ROCM_REQUIRED_USE} ) + test? ( ${ROCM_REQUIRED_USE} ) +" +RESTRICT="!test? ( test )" + +RDEPEND=" + benchmark? ( + dev-util/hip:${SLOT} + dev-cpp/benchmark:= + ) +" +DEPEND=" + ${RDEPEND} + dev-util/hip:${SLOT} + sci-libs/rocPRIM:${SLOT} + test? ( dev-cpp/gtest ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-7.0.1-no-tests-install.patch +) + +src_prepare() { + sed -e "s:set(ROCM_INSTALL_LIBDIR lib):set(ROCM_INSTALL_LIBDIR $(get_libdir)):" \ + -i cmake/ROCMExportTargetsHeaderOnly.cmake || die + + cmake_src_prepare +} + +src_configure() { + rocm_use_clang + + local mycmakeargs=( + -DGPU_TARGETS="$(get_amdgpu_flags)" + -DBUILD_TEST=$(usex test ON OFF) + -DBUILD_BENCHMARK=$(usex benchmark ON OFF) + -DBUILD_FILE_REORG_BACKWARD_COMPATIBILITY=OFF + ) + + cmake_src_configure +} + +src_test() { + check_amdgpu + # Expected time on gfx1100 (-j32) is 85s + # HipcubDeviceHistogramMultiEven/0.MultiEven in 6.4.1 has bad array access (probably fixed in the future release) + local CMAKE_SKIP_TESTS=(hipcub.DeviceHistogram) + cmake_src_test +} diff --git a/sci-libs/hipCUB/metadata.xml b/sci-libs/hipCUB/metadata.xml index 64944bcdc745..10ad711b9ddb 100644 --- a/sci-libs/hipCUB/metadata.xml +++ b/sci-libs/hipCUB/metadata.xml @@ -17,7 +17,7 @@ <name>Sv. Lockal</name> </maintainer> <upstream> - <remote-id type="github">ROCm/hipCUB</remote-id> + <remote-id type="github">ROCm/rocm-libraries</remote-id> </upstream> <use> <flag name="benchmark">Build and install benchmark binaries.</flag>
