summaryrefslogtreecommitdiff
path: root/sci-libs/rocPRIM
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-11-27 22:51:10 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-11-27 22:51:10 +0000
commitee0c4d5e506a6c64994a15c3af5cf1ca22045567 (patch)
treebdf578939023d42f04092ddb4bcd190eb391770f /sci-libs/rocPRIM
parent161eaa4b12ca6314376288834bba20b7824d0d77 (diff)
gentoo auto-resync : 27:11:2023 - 22:51:09
Diffstat (limited to 'sci-libs/rocPRIM')
-rw-r--r--sci-libs/rocPRIM/Manifest3
-rw-r--r--sci-libs/rocPRIM/files/rocPRIM-5.7.1-expand-isa-compatibility.patch29
-rw-r--r--sci-libs/rocPRIM/rocPRIM-5.7.1.ebuild79
3 files changed, 111 insertions, 0 deletions
diff --git a/sci-libs/rocPRIM/Manifest b/sci-libs/rocPRIM/Manifest
index 11b13d053cff..52b8bdb91b38 100644
--- a/sci-libs/rocPRIM/Manifest
+++ b/sci-libs/rocPRIM/Manifest
@@ -1,3 +1,6 @@
+AUX rocPRIM-5.7.1-expand-isa-compatibility.patch 1655 BLAKE2B 23392f6237ec706e0763c6165f854b0638757d70b5dc756125b6a5e861f2d5dc9e557362035a57dc2557241a1e32a631cb2e8660d1e8107c73a7aff734af76eb SHA512 f2ffc71c6322b66685de4c78737d546ea27779e36d952d06fd14017e2bf4efb905f2f6da8f56e3a3f5314aa594b624cd3cd9f749bf74c97a425982f264cf82ee
DIST rocPRIM-5.1.3.tar.gz 374510 BLAKE2B ab6960e7bd2159ac7a0d72ba6d594684f8d47028eca0940eabd35b346ac3d432a734ec575ee71341f339a9d0dead10dfafe81fb651a3b7da681aa900a5132d0e SHA512 54e14f2b40795153b862a64c9b3d336f35feccfda725daad75fae356b0147c577735884b65218c26c370ebec710af0f84aeef3103067a50db077cf9e24d2b64a
+DIST rocPRIM-5.7.1.tar.gz 535649 BLAKE2B 469bf59b5c92c37df96f58bac5a6559dc2cb879e5f82e539881d79bda57d23c25a9b114466042258e87862a88cd53d260155d7785c9a69a1800b0d05e931f56d SHA512 b2f0bc07dbc5cd111dd513f6c05dbc533908c52ea99caf77d6a4dd35db2b28f98c80006bd1f50a232873eab00b70e54231c38bfd1035c8845029d53690fd5e71
EBUILD rocPRIM-5.1.3.ebuild 2010 BLAKE2B 218a066418881203dbeb62f807710b03d65280ec8248a6c695b83a166adec72164d86e58e678275f4660c3623c31fd825886ba732452cea580eeee19b2200557 SHA512 74016423cd91a7b7ea67f3086d1170cddd6d8e8b51ad3fb7d9da0ebcc88adb3076347b25d1e5e09ca59a6a61c3e2a4e4eaee541705050de3b553d6cc4a030bc6
+EBUILD rocPRIM-5.7.1.ebuild 2232 BLAKE2B 435def61918b9b810946875c9695ff0e466f384bce86695cafbe957f0c7922416708551553bbb654895a741ab4642e7e523c84593dda4e59ecd9659d2c77513b SHA512 15c54b12d2f5aca904074c864ecfaf3d6e6685afd58d74d0e842b247590e7f04d7c1dee727959e473a06ac3fe864155de0da7743f2933a0aea015232105b0585
MISC metadata.xml 583 BLAKE2B c7ec5d60d52e656c8e1808803ded22d8a49dba10ea8cfce85c15025cb39ebbc7e66da25c3db8b5281e264167ff860e24ec39ecdab5286a79beaedb4a6d2090b4 SHA512 f89eeedcbfe6a86245fd00bc4114d64b1464d151db3b6b998f5679949310c7513ffdca1c5f320cc7d22f011dc67807d39f5e74e11155b3fbf50f439245e7176b
diff --git a/sci-libs/rocPRIM/files/rocPRIM-5.7.1-expand-isa-compatibility.patch b/sci-libs/rocPRIM/files/rocPRIM-5.7.1-expand-isa-compatibility.patch
new file mode 100644
index 000000000000..84e3e7875ee8
--- /dev/null
+++ b/sci-libs/rocPRIM/files/rocPRIM-5.7.1-expand-isa-compatibility.patch
@@ -0,0 +1,29 @@
+This patch allows to HSA_OVERRIDE_GFX_VERSION environment variable (library just crashes otherwise)
+--- a/rocprim/include/rocprim/device/config_types.hpp
++++ b/rocprim/include/rocprim/device/config_types.hpp
+@@ -197,15 +197,21 @@ 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", "gfx1102"};
++ = {"gfx803",
++ "gfx900", "gfx902", "gfx909", "gfx912",
++ "gfx906",
++ "gfx908",
++ "gfx90a",
++ "gfx1030", "gfx1031", "gfx1032", "gfx1033", "gfx1034", "gfx1035", "gfx1036",
++ "gfx1100", "gfx1101", "gfx1102", "gfx1103", "gfx1150", "gfx1151"};
+ 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::gfx1102,
++ target_arch::gfx1030, target_arch::gfx1030, target_arch::gfx1030, target_arch::gfx1030, target_arch::gfx1030, target_arch::gfx1030, target_arch::gfx1030,
++ 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/rocPRIM-5.7.1.ebuild b/sci-libs/rocPRIM/rocPRIM-5.7.1.ebuild
new file mode 100644
index 000000000000..3353023628db
--- /dev/null
+++ b/sci-libs/rocPRIM/rocPRIM-5.7.1.ebuild
@@ -0,0 +1,79 @@
+# 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 parallel primitives for developing performant GPU-accelerated code on ROCm"
+HOMEPAGE="https://github.com/ROCmSoftwarePlatform/rocPRIM"
+SRC_URI="https://github.com/ROCmSoftwarePlatform/rocPRIM/archive/rocm-${PV}.tar.gz -> rocPRIM-${PV}.tar.gz"
+
+LICENSE="MIT"
+KEYWORDS="~amd64"
+SLOT="0/$(ver_cut 1-2)"
+IUSE="benchmark test"
+REQUIRED_USE="${ROCM_REQUIRED_USE}"
+
+RDEPEND="dev-util/hip
+ benchmark? ( dev-cpp/benchmark )
+ test? ( dev-cpp/gtest )"
+BDEPEND="dev-util/rocm-cmake
+ >=dev-util/cmake-3.22"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/rocPRIM-rocm-${PV}"
+
+RESTRICT="!test? ( test )"
+
+PATCHES=( "${FILESDIR}"/${PN}-5.7.1-expand-isa-compatibility.patch )
+
+src_prepare() {
+ # "hcc" is depcreated, new platform ist "rocclr"
+ sed -e "/HIP_PLATFORM STREQUAL/s,hcc,rocclr," -i cmake/VerifyCompiler.cmake || die
+
+ # Install according to FHS
+ sed -e "/PREFIX rocprim/d" \
+ -e "/INSTALL_INTERFACE/s,rocprim/include,include/rocprim," \
+ -e "/DESTINATION/s,rocprim/include,include," \
+ -e "/rocm_install_symlink_subdir(rocprim)/d" \
+ -i rocprim/CMakeLists.txt || 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
+
+ # 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
+
+ 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_BENCHMARK=$(usex benchmark ON OFF)
+ -DBUILD_FILE_REORG_BACKWARD_COMPATIBILITY=OFF
+ -DROCM_SYMLINK_LIBS=OFF
+ )
+
+ CXX=hipcc cmake_src_configure
+}
+
+src_test() {
+ check_amdgpu
+ # uses HMM to fit tests to default <512M iGPU VRAM
+ MAKEOPTS="-j1" ROCPRIM_USE_HMM="1" cmake_src_test
+}