diff options
author | V3n3RiX <venerix@koprulu.sector> | 2025-01-07 06:41:06 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2025-01-07 06:41:06 +0000 |
commit | d69399c7befdd98cda62d6a1788ae2aa7f104c5e (patch) | |
tree | eac7184f4cfe7d67580c1d0a0d9942a91e6cb4ee /sci-libs/rocPRIM | |
parent | e4d9d6796d5018e338f0b27a3bc97716195bf0b8 (diff) |
gentoo auto-resync : 07:01:2025 - 06:41:06
Diffstat (limited to 'sci-libs/rocPRIM')
-rw-r--r-- | sci-libs/rocPRIM/Manifest | 5 | ||||
-rw-r--r-- | sci-libs/rocPRIM/files/rocPRIM-6.3.0-expand-isa-compatibility.patch | 33 | ||||
-rw-r--r-- | sci-libs/rocPRIM/files/rocPRIM-6.3.0-fix-clang-template.patch | 29 | ||||
-rw-r--r-- | sci-libs/rocPRIM/files/rocPRIM-6.3.0-fix-libcxx.patch | 71 | ||||
-rw-r--r-- | sci-libs/rocPRIM/rocPRIM-6.3.0.ebuild | 70 |
5 files changed, 208 insertions, 0 deletions
diff --git a/sci-libs/rocPRIM/Manifest b/sci-libs/rocPRIM/Manifest index 705ca7510043..4fdd45b6c51a 100644 --- a/sci-libs/rocPRIM/Manifest +++ b/sci-libs/rocPRIM/Manifest @@ -1,8 +1,13 @@ AUX rocPRIM-5.7.1-expand-isa-compatibility.patch 1655 BLAKE2B 23392f6237ec706e0763c6165f854b0638757d70b5dc756125b6a5e861f2d5dc9e557362035a57dc2557241a1e32a631cb2e8660d1e8107c73a7aff734af76eb SHA512 f2ffc71c6322b66685de4c78737d546ea27779e36d952d06fd14017e2bf4efb905f2f6da8f56e3a3f5314aa594b624cd3cd9f749bf74c97a425982f264cf82ee +AUX rocPRIM-6.3.0-expand-isa-compatibility.patch 1821 BLAKE2B 4e2964d6627ce135766a789e4c6ae3b7461f2024fb77d22c29a8630a5182953cc586d659604433580c855e97bf0372536c6e154a904b934bb125d5faec5269c8 SHA512 30bfd36c5a5be5ba1f11df572fa175ebdb61d17735cbcb71dac644d800a374f3253ff0cda9aac47a4941c43c8010806ec5ba0a97e6b12a32ed78746011b57a66 +AUX rocPRIM-6.3.0-fix-clang-template.patch 1539 BLAKE2B d9bf6f6cbe67eb247b5f0507b4fc3e4c837b4c0727192a026de55f325dc2f49b3a7d13d4b5b6713b031402e57d4d3b6e4769af8f011d74bc8a3ddc5c02363cf6 SHA512 77aa48c0f351ec46a77fb9d53eeae5cae6218b3520595c50ef87bf68b08bd7ca83a6fd9e4d96651a15b4dbf4b5d4e1257daacb124e25704d5ff417890e071361 +AUX rocPRIM-6.3.0-fix-libcxx.patch 2660 BLAKE2B 08e6a8504c1efc7ae79ea9c456ce64d5795b5c4b2f0632633e0356c097cc5ac5eb1255c86f8000f75de061dfa59cdf1d0c1fe0eb0bcb260d746471c527b06f15 SHA512 da832438d7f8ccb2e0abe353a8de4c982cc31bf728ad191cf41818b749a2876d63f39ae567f96f5a4ce6b12ca81699847912a13f63197dd6e518ba0fcd25b752 DIST rocPRIM-5.1.3.tar.gz 374510 BLAKE2B ab6960e7bd2159ac7a0d72ba6d594684f8d47028eca0940eabd35b346ac3d432a734ec575ee71341f339a9d0dead10dfafe81fb651a3b7da681aa900a5132d0e SHA512 54e14f2b40795153b862a64c9b3d336f35feccfda725daad75fae356b0147c577735884b65218c26c370ebec710af0f84aeef3103067a50db077cf9e24d2b64a DIST rocPRIM-5.7.1.tar.gz 535649 BLAKE2B 469bf59b5c92c37df96f58bac5a6559dc2cb879e5f82e539881d79bda57d23c25a9b114466042258e87862a88cd53d260155d7785c9a69a1800b0d05e931f56d SHA512 b2f0bc07dbc5cd111dd513f6c05dbc533908c52ea99caf77d6a4dd35db2b28f98c80006bd1f50a232873eab00b70e54231c38bfd1035c8845029d53690fd5e71 DIST rocPRIM-6.1.1.tar.gz 611372 BLAKE2B 984df214179a6d2c90b31bd30ec9472a0b985d9d488ea195968f25df4cac97ce48bfa4c322f2d578771ac63caeafc2c69c9dae911bc3a9d920ab9558ba7d6e15 SHA512 298eebc8a5d3fd7da71ab98a22fd39183436b3d9e14945e450f0fb35e38ea8fb99c5f2b342f1f77f21899a14d506ce96a965fbdb24f106ec9638dcd6afe6ae98 +DIST rocPRIM-6.3.0.tar.gz 745936 BLAKE2B 1cdcf886c823959bbb03f53cb6e17abdb009fa48f8e00e96f8d962dd28ef9fb8b6ed796be079b0a3948adc832de8e3449d6439711db821b8a26c5cdc7122ce61 SHA512 c38f3cebfb32c0c9d4f9c1ad261c1dbe793dec1ebc92cf024ef32606f99c91e178526d77a24ad18792099e6f3aafcea43f7bc9282bbc144672684cd5fe296a8b EBUILD rocPRIM-5.1.3.ebuild 2012 BLAKE2B db384e213038bbe8dc5e925905b9637bf5dc14de1b59f1f574abcc0f46aebe876484c0b9704acd0bf447a01727e1a94b388de9989669f64569043bf46cfb6e5e SHA512 3cf65a5a20fcb5b90cc871e266df7d96e791c70f82c33f088349a5cf03a39f0b114972a7fbf25ce8df4d80fc47af379f8cc0bd0466d261a1acee79e4ca7b3dbe EBUILD rocPRIM-5.7.1.ebuild 2234 BLAKE2B 504db3f20d2bc78f46e3a93d5eac96b275197444448185b0ebce64df866f6e27aa966cc940be9d91cdb3756bfaad2bb00e76cea40fe489e7603e63571d50f590 SHA512 bb10e2ded213c8e5554707e25cde78205cd0b6eb217e68242def0c2126fcd2dbc1dd0182c56df65e6bba5ed7c1931637079106d012a748cf3c53eeb13589e04a EBUILD rocPRIM-6.1.1.ebuild 1543 BLAKE2B 70aebece6353eed300659e250f714964d9d3565b165e0f43b670e881f7fe13ed9f7e2998500e7ccdc518f6832bc1ef6920b5b7aae67ecb943619392e4a1f8e91 SHA512 36134f4158d97463a798686d2e5e5881c55f96b2ec91b81f402476a2d0ed9a0fe0d2cdb6cd156d1ef4319e8ea635c0706248706b3e5aafa3e180c1e92b06c428 +EBUILD rocPRIM-6.3.0.ebuild 1773 BLAKE2B e66bef09d0499d7015c1e29d54598f80a309eec0a989552bce43a89b5d2233c4f1887e765d9228f863be01828550b78a9986fd99da0960ebbc4407b5733312e2 SHA512 46b8d6ae1eeef2654397f39512194bfcf27088d6885eacd97b22d0991f198e2b7e630005b20c1e59af17ec87c1e73222a53aaf59e16e7b0815281bce0f07fa63 MISC metadata.xml 672 BLAKE2B 93644f07bd8f34b43e335ec631b69abdfee76bfe55fcccc9c33b772945e72870f4307803a121226d2d87aa55a07f31274f376a6d8a44a9f5996a861d21dc5c38 SHA512 e8f5caa76c96a1ef5affce0a29f07e12fc4a10057c77bbc9f53288fd886488fddde59a713be80fd72dbaa9656abb6d4851995a000e160398c09ed28000a53712 diff --git a/sci-libs/rocPRIM/files/rocPRIM-6.3.0-expand-isa-compatibility.patch b/sci-libs/rocPRIM/files/rocPRIM-6.3.0-expand-isa-compatibility.patch new file mode 100644 index 000000000000..8a13924c1056 --- /dev/null +++ b/sci-libs/rocPRIM/files/rocPRIM-6.3.0-expand-isa-compatibility.patch @@ -0,0 +1,33 @@ +diff --git a/rocprim/include/rocprim/device/config_types.hpp b/rocprim/include/rocprim/device/config_types.hpp +index 58729b1..7e356da 100644 +--- a/rocprim/include/rocprim/device/config_types.hpp ++++ b/rocprim/include/rocprim/device/config_types.hpp +@@ -204,16 +204,23 @@ constexpr bool prefix_equals(const char* lhs, const char* rhs, std::size_t n) + constexpr target_arch get_target_arch_from_name(const char* const arch_name, const std::size_t n) + { + constexpr const char* target_names[] +- = {"gfx803", "gfx900", "gfx906", "gfx908", "gfx90a", "gfx1030", "gfx1100", "gfx1102"}; ++ = {"gfx803", ++ "gfx900", "gfx902", "gfx909", "gfx912", ++ "gfx906", ++ "gfx908", ++ "gfx90a", ++ "gfx1030", "gfx1031", "gfx1032", "gfx1033", "gfx1034", "gfx1035", "gfx1036", ++ "gfx1100", "gfx1101", ++ "gfx1102", "gfx1103", "gfx1150", "gfx1151", "gfx1152", "gfx1153"}; + constexpr target_arch target_architectures[] = { + target_arch::gfx803, +- target_arch::gfx900, ++ target_arch::gfx900, target_arch::gfx900, target_arch::gfx900, target_arch::gfx900, + target_arch::gfx906, + target_arch::gfx908, + target_arch::gfx90a, +- target_arch::gfx1030, +- target_arch::gfx1100, +- target_arch::gfx1102, ++ target_arch::gfx1030, target_arch::gfx1030, target_arch::gfx1030, target_arch::gfx1030, target_arch::gfx1030, target_arch::gfx1030, target_arch::gfx1030, ++ target_arch::gfx1100, target_arch::gfx1100, ++ target_arch::gfx1102, target_arch::gfx1102, target_arch::gfx1102, target_arch::gfx1102, target_arch::gfx1102, target_arch::gfx1102, + }; + static_assert(sizeof(target_names) / sizeof(target_names[0]) + == sizeof(target_architectures) / sizeof(target_architectures[0]), diff --git a/sci-libs/rocPRIM/files/rocPRIM-6.3.0-fix-clang-template.patch b/sci-libs/rocPRIM/files/rocPRIM-6.3.0-fix-clang-template.patch new file mode 100644 index 000000000000..089ce6187979 --- /dev/null +++ b/sci-libs/rocPRIM/files/rocPRIM-6.3.0-fix-clang-template.patch @@ -0,0 +1,29 @@ +Fix compilation with clang-19 +Backports https://github.com/ROCm/rocPRIM/commit/c57b04baea872078bfb5b4af1165c7584fd3a95b +--- a/rocprim/include/rocprim/device/detail/device_radix_sort.hpp ++++ b/rocprim/include/rocprim/device/detail/device_radix_sort.hpp +@@ -526,15 +526,15 @@ ROCPRIM_DEVICE ROCPRIM_FORCE_INLINE void sort_single(KeysInputIterator keys_i + + ROCPRIM_SHARED_MEMORY typename sort_single_helper::storage_type storage; + +- sort_single_helper().template sort_single(keys_input, +- keys_output, +- values_input, +- values_output, +- size, +- decomposer, +- bit, +- current_radix_bits, +- storage); ++ sort_single_helper().template sort_single<>(keys_input, ++ keys_output, ++ values_input, ++ values_output, ++ size, ++ decomposer, ++ bit, ++ current_radix_bits, ++ storage); + } + + template<class T> diff --git a/sci-libs/rocPRIM/files/rocPRIM-6.3.0-fix-libcxx.patch b/sci-libs/rocPRIM/files/rocPRIM-6.3.0-fix-libcxx.patch new file mode 100644 index 000000000000..3827829483fb --- /dev/null +++ b/sci-libs/rocPRIM/files/rocPRIM-6.3.0-fix-libcxx.patch @@ -0,0 +1,71 @@ +Fix ambiguous declarations for libc++, which treats __int128_t as integral. +The issue was fixed in develop branch, but not in release. +Upstream commit: https://github.com/ROCm/rocPRIM/commit/81f6073790dee8d310e5b68cf46aae4b797cc059 +--- a/rocprim/include/rocprim/thread/radix_key_codec.hpp ++++ b/rocprim/include/rocprim/thread/radix_key_codec.hpp +@@ -78,6 +78,7 @@ struct radix_key_codec_integral<Key, + } + }; + ++#ifndef _LIBCPP_VERSION + template<class Key, class BitKey> + struct radix_key_codec_integral< + Key, +@@ -104,6 +105,7 @@ struct radix_key_codec_integral< + return static_cast<unsigned int>(bit_key >> start) & mask; + } + }; ++#endif + + template<class Key, class BitKey> + struct radix_key_codec_integral<Key, +@@ -135,6 +137,7 @@ struct radix_key_codec_integral<Key, + } + }; + ++#ifndef _LIBCPP_VERSION + template<class Key, class BitKey> + struct radix_key_codec_integral<Key, + BitKey, +@@ -164,6 +167,7 @@ struct radix_key_codec_integral<Key, + return static_cast<unsigned int>(bit_key >> start) & mask; + } + }; ++#endif + + template<class Key, class BitKey> + struct radix_key_codec_floating +@@ -225,6 +229,7 @@ struct radix_key_codec_base<Key, typename std::enable_if<::rocprim::is_integral< + : radix_key_codec_integral<Key, typename std::make_unsigned<Key>::type> + {}; + ++#ifndef _LIBCPP_VERSION + template<class Key> + struct radix_key_codec_base<Key, + typename std::enable_if<std::is_same<Key, __int128_t>::value>::type> +@@ -236,6 +241,7 @@ struct radix_key_codec_base<Key, + typename std::enable_if<std::is_same<Key, __uint128_t>::value>::type> + : radix_key_codec_integral<Key, __uint128_t> + {}; ++#endif + + template<> + struct radix_key_codec_base<bool> +--- a/test/rocprim/test_utils_data_generation.hpp ++++ b/test/rocprim/test_utils_data_generation.hpp +@@ -268,6 +268,7 @@ inline OutputIter segmented_generate_n(OutputIter it, size_t size, Generator&& g + return it + size; + } + ++#ifndef _LIBCPP_VERSION + template<class OutputIter, class U, class V, class Generator> + inline auto generate_random_data_n(OutputIter it, size_t size, U min, V max, Generator&& gen) + -> std::enable_if_t<std::is_same<it_value_t<OutputIter>, __int128_t>::value, OutputIter> +@@ -299,6 +300,7 @@ inline auto generate_random_data_n(OutputIter it, size_t size, U min, V max, Gen + + return segmented_generate_n(it, size, [&]() { return static_cast<T>(distribution(gen)); }); + } ++#endif + + template<class OutputIter, class U, class V, class Generator> + inline auto generate_random_data_n(OutputIter it, size_t size, U min, V max, Generator&& gen) diff --git a/sci-libs/rocPRIM/rocPRIM-6.3.0.ebuild b/sci-libs/rocPRIM/rocPRIM-6.3.0.ebuild new file mode 100644 index 000000000000..cd561fb6b22d --- /dev/null +++ b/sci-libs/rocPRIM/rocPRIM-6.3.0.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ROCM_VERSION=${PV} +inherit cmake flag-o-matic rocm + +DESCRIPTION="HIP parallel primitives for developing performant GPU-accelerated code on ROCm" +HOMEPAGE="https://github.com/ROCm/rocPRIM" +SRC_URI="https://github.com/ROCm/rocPRIM/archive/rocm-${PV}.tar.gz -> rocPRIM-${PV}.tar.gz" +S="${WORKDIR}/rocPRIM-rocm-${PV}" + +LICENSE="MIT" +SLOT="0/$(ver_cut 1-2)" +KEYWORDS="~amd64" +IUSE="benchmark test" +REQUIRED_USE=" + benchmark? ( ${ROCM_REQUIRED_USE} ) + test? ( ${ROCM_REQUIRED_USE} ) +" + +RDEPEND="dev-util/hip + benchmark? ( dev-cpp/benchmark ) + test? ( dev-cpp/gtest )" +BDEPEND="dev-build/rocm-cmake + >=dev-build/cmake-3.22" +DEPEND="${RDEPEND}" + +RESTRICT="!test? ( test )" + +PATCHES=( + "${FILESDIR}"/${PN}-6.3.0-expand-isa-compatibility.patch + "${FILESDIR}"/${PN}-6.3.0-fix-clang-template.patch + "${FILESDIR}"/${PN}-6.3.0-fix-libcxx.patch +) + +src_prepare() { + # install benchmark files + 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 + + cmake_src_prepare +} + +src_configure() { + rocm_use_hipcc + + # too many warnings in tests + append-cxxflags -Wno-explicit-specialization-storage-class -Wno-deprecated-declarations + + local mycmakeargs=( + -DCMAKE_SKIP_RPATH=ON + -DAMDGPU_TARGETS="$(get_amdgpu_flags)" + -DBUILD_TEST=$(usex test ON OFF) + -DBUILD_BENCHMARK=$(usex benchmark ON OFF) + -DBUILD_FILE_REORG_BACKWARD_COMPATIBILITY=OFF + -DROCM_SYMLINK_LIBS=OFF + ) + + cmake_src_configure +} + +src_test() { + check_amdgpu + # uses HMM to fit tests to default <512M iGPU VRAM + ROCPRIM_USE_HMM="1" cmake_src_test -j1 +} |