commit: a79d33f02cf0ee5cd3663ac04c149f1ffebc6ab4 Author: Sv. Lockal <lockalsash <AT> gmail <DOT> com> AuthorDate: Sun Oct 12 14:43:20 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=a79d33f0
sci-libs/rocFFT: 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/rocFFT/Manifest | 1 + sci-libs/rocFFT/metadata.xml | 2 +- sci-libs/rocFFT/rocFFT-7.0.2.ebuild | 156 ++++++++++++++++++++++++++++++++++++ 3 files changed, 158 insertions(+), 1 deletion(-) diff --git a/sci-libs/rocFFT/Manifest b/sci-libs/rocFFT/Manifest index 8d41327e0c4c..4266f5fa4514 100644 --- a/sci-libs/rocFFT/Manifest +++ b/sci-libs/rocFFT/Manifest @@ -1,2 +1,3 @@ DIST rocFFT-6.3.3.tar.gz 1386087 BLAKE2B 239f42cbb6ddc2f275a9ea2e356cab1b62670ebea3ed0e660f36ed816703bef650cd6e1181d1bcc4403a379c432ea033a2ee90a308b885bf82f1a4616643c07d SHA512 76dcc4bbb6bca97a5b87f88f7b60badde31ee2ff3254d16e99c3d6c7fb9fb6c7eb5166edd50dfb0dada54f4dbdd2436a9e507c806118a05ec93cea480ac1e1c4 DIST rocFFT-6.4.3.tar.gz 1429076 BLAKE2B 2254c6c29d75d3ea63d5c61f51a274d9539d6da64981fc703d9f0570a75730918e3e7e7e8a378ab84038664ab912b86fe50ccd39165bc7eeae168204e90ee2e4 SHA512 e92889885aa5825b36a6de2e3fbf5f8d84f3519a25b6a9fe271533df4916644aadb0710cb00e53a29faa560a18e426d656bc7bd47486f80cab8c55f75f9b5071 +DIST rocFFT-7.0.2.tar.gz 1434378 BLAKE2B 1c6a6fe3b90ada9151074ce199464b5e0ba2f8c047078d700b1bf47b6670d2ad2bba8c8d40c0814db8f627550e93c1931912fb2e2e8b631e0ee9208f7f92284f SHA512 4a142396cba47043c2920a1dbe9e5853ac7ba3e85e1b172408f68a93524f466163794a8a0c49d914c21110ac2a5cf78c4a5735689c443e438e45f6e93f4f4773 diff --git a/sci-libs/rocFFT/metadata.xml b/sci-libs/rocFFT/metadata.xml index ab2a20524390..438808c913cb 100644 --- a/sci-libs/rocFFT/metadata.xml +++ b/sci-libs/rocFFT/metadata.xml @@ -14,7 +14,7 @@ <name>Sv. Lockal</name> </maintainer> <upstream> - <remote-id type="github">ROCm/rocFFT</remote-id> + <remote-id type="github">ROCm/rocm-libraries</remote-id> </upstream> <use> <flag name="benchmark">Build and install rocfft benchmark tools.</flag> diff --git a/sci-libs/rocFFT/rocFFT-7.0.2.ebuild b/sci-libs/rocFFT/rocFFT-7.0.2.ebuild new file mode 100644 index 000000000000..5973993ef25a --- /dev/null +++ b/sci-libs/rocFFT/rocFFT-7.0.2.ebuild @@ -0,0 +1,156 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..13} ) +ROCM_VERSION=${PV} + +inherit cmake check-reqs edo multiprocessing python-r1 rocm + +DESCRIPTION="Next generation FFT implementation for ROCm" +HOMEPAGE="https://github.com/ROCm/rocm-libraries/tree/develop/projects/rocfft" +SRC_URI="https://github.com/ROCm/rocFFT/archive/rocm-${PV}.tar.gz -> rocFFT-${PV}.tar.gz" +S="${WORKDIR}/rocFFT-rocm-${PV}" + +LICENSE="MIT" +SLOT="0/$(ver_cut 1-2)" +KEYWORDS="~amd64" + +# RDEPEND: perfscripts? dev-python/plotly[${PYTHON_USEDEP}] # currently masked by arch/amd64/x32/package.mask +RDEPEND=" + dev-db/sqlite:3 + dev-util/hip:= + perfscripts? ( + media-gfx/asymptote + dev-texlive/texlive-latex + dev-tex/latexmk + sys-apps/texinfo + dev-python/sympy[${PYTHON_USEDEP}] + dev-python/numpy[${PYTHON_USEDEP}] + dev-python/scipy[${PYTHON_USEDEP}] + dev-python/pandas[${PYTHON_USEDEP}] + ${PYTHON_DEPS} + ) +" + +DEPEND=" + ${RDEPEND} + ${PYTHON_DEPS} + dev-util/hip:${SLOT} + benchmark? ( + dev-db/sqlite:3 + dev-util/hip:= + dev-libs/boost + sci-libs/hipRAND:${SLOT} + ) + test? ( + dev-cpp/gtest + dev-libs/boost + sci-libs/fftw + llvm-runtimes/openmp + sci-libs/hipRAND:${SLOT} + ) +" + +BDEPEND=" + >=dev-build/cmake-3.22 + dev-build/rocm-cmake + dev-db/sqlite +" + +CHECKREQS_DISK_BUILD="7G" + +IUSE="benchmark perfscripts test" +REQUIRED_USE="perfscripts? ( benchmark ) ${PYTHON_REQUIRED_USE} ${ROCM_REQUIRED_USE}" +RESTRICT="!test? ( test )" + +required_mem() { + if use test; then + echo "52G" + else + if [[ -n "${AMDGPU_TARGETS}" ]]; then + # count how many archs user specified in ${AMDGPU_TARGETS} + local NARCH=$(($(awk -F";" '{print NF-1}' <<< "${AMDGPU_TARGETS}" || die)+1)) + else + # The default number of AMDGPU_TARGETS for rocFFT-4.3.0. May change in the future. + local NARCH=7 + fi + echo "$(($(makeopts_jobs)*${NARCH}*25+2200))M" # A linear function estimating how much memory required + fi +} + +pkg_pretend() { + return # leave the disk space check to pkg_setup phase +} + +pkg_setup() { + export CHECKREQS_MEMORY=$(required_mem) + check-reqs_pkg_setup + python_setup +} + +src_prepare() { + if use perfscripts; then + pushd scripts/perf || die + sed -e "/\/opt\/rocm/d" -e "/rocmversion/s,rocm_info.strip(),\"${PV}\"," -i perflib/specs.py || dir + sed -e "/^top/,+1d" -i rocfft-perf suites.py || die + sed -e "s,perflib,${PN}_perflib,g" -i rocfft-perf suites.py perflib/*.py || die + sed -e "/^top = /s,__file__).*$,\"${EPREFIX}/usr/share/${PN}-perflib\")," \ + -i perflib/pdf.py perflib/generators.py || die + popd || die + fi + + # Silence "QA Notice: Compatibility with CMake < 3.5 has been removed from CMake 4" + sed -e "/CMAKE_MINIMUM_REQUIRED/ s/3.0/3.16/" -i docs/samples/CMakeLists.txt || die + + cmake_src_prepare +} + +src_configure() { + rocm_use_clang + + local mycmakeargs=( + -DCMAKE_SKIP_RPATH=ON + -DGPU_TARGETS="$(get_amdgpu_flags)" + -Wno-dev + -DROCM_SYMLINK_LIBS=OFF + -DBUILD_CLIENTS_TESTS=$(usex test ON OFF) + -DBUILD_CLIENTS_BENCH=$(usex benchmark ON OFF) + -DSQLITE_USE_SYSTEM_PACKAGE=ON + ) + + cmake_src_configure +} + +src_test() { + check_amdgpu + cd "${BUILD_DIR}/clients/staging" || die + export LD_LIBRARY_PATH=${BUILD_DIR}/library/src/:${BUILD_DIR}/library/src/device + HIP_VISIBLE_DEVICES=0 edob ./rocfft-test +} + +src_install() { + cmake_src_install + + if use benchmark; then + cd "${BUILD_DIR}"/clients/staging || die + dobin dyna-rocfft-bench rocfft-bench + dosym dyna-rocfft-bench /usr/bin/dyna-rocfft-rider + dosym rocfft-bench /usr/bin/dyna-rocfft-rider + + if ! use perfscripts; then + # prevent collision with dev-util/perf + rm -rf "${ED}"/usr/bin/perf || die + fi + fi + + if use perfscripts; then + cd "${S}"/scripts/perf || die + python_foreach_impl python_doexe rocfft-perf + python_moduleinto ${PN}_perflib + python_foreach_impl python_domodule perflib/*.py + insinto /usr/share/${PN}-perflib + doins *.asy suites.py + fi +}
