diff options
author | Sv. Lockal <lockalsash@gmail.com> | 2023-10-18 18:59:22 +0000 |
---|---|---|
committer | Benda Xu <heroxbd@gentoo.org> | 2023-11-20 00:32:15 +0800 |
commit | dfec413c0bdb97875fe7e0c66109c7718698a551 (patch) | |
tree | 2a17b1aafdf0e2b6abd3664a2e155a5c62acfd9a /sci-libs/rocFFT | |
parent | app-text/calibre: update Manifest with updated checksum for PGP sig (diff) | |
download | gentoo-dfec413c0bdb97875fe7e0c66109c7718698a551.tar.gz gentoo-dfec413c0bdb97875fe7e0c66109c7718698a551.tar.bz2 gentoo-dfec413c0bdb97875fe7e0c66109c7718698a551.zip |
sci-libs/rocFFT: add 5.7.1 and fix test dependencies.
Cannonicalize the include path as no directory hacks are needed for
5.7.1.
Bug: https://github.com/gentoo/gentoo/pull/33400
Signed-off-by: Sv. Lockal <lockalsash@gmail.com>
Signed-off-by: Benda Xu <heroxbd@gentoo.org>
Diffstat (limited to 'sci-libs/rocFFT')
-rw-r--r-- | sci-libs/rocFFT/Manifest | 1 | ||||
-rw-r--r-- | sci-libs/rocFFT/rocFFT-5.7.1-r1.ebuild | 150 |
2 files changed, 151 insertions, 0 deletions
diff --git a/sci-libs/rocFFT/Manifest b/sci-libs/rocFFT/Manifest index f93c38954772..b850aef411dd 100644 --- a/sci-libs/rocFFT/Manifest +++ b/sci-libs/rocFFT/Manifest @@ -1 +1,2 @@ DIST rocFFT-5.1.3.tar.gz 845470 BLAKE2B 86060ce4f8612869fedc5bc92ed6a5bb7fbc539b26c7f5ab0ded5406ab6c340f64116782285d040824e54557af87d9ddb6f907fd1550b80c3da903d3c1d5e5c0 SHA512 175402856bd4753e74ce14326569be99221e21d0ce675e007900f6982c53e1566ad0b060eec545e0f17ff4dc4811688cc1003dc986226205ee95ee6f22d1ca43 +DIST rocFFT-5.7.1.tar.gz 1192841 BLAKE2B 58f880f7ff866f85af70666d17e8b1a3ac8e63e853520546f746d74cecd805687fd689367a09d2b1ec4e1059b44b858377dce362cd4cae91cb85aad7c3185c00 SHA512 48467589cb4bc1334a4074bacc6a726c850dc2a79ef82622301d61c4269fb81c0b2b9fce56d72bddca584d1797a8634d243a9a6b8cf943e687b2b0f5c931116f diff --git a/sci-libs/rocFFT/rocFFT-5.7.1-r1.ebuild b/sci-libs/rocFFT/rocFFT-5.7.1-r1.ebuild new file mode 100644 index 000000000000..dc007e4729f1 --- /dev/null +++ b/sci-libs/rocFFT/rocFFT-5.7.1-r1.ebuild @@ -0,0 +1,150 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{9..11} ) +ROCM_VERSION=${PV} + +inherit cmake check-reqs edo multiprocessing python-r1 rocm + +DESCRIPTION="Next generation FFT implementation for ROCm" +HOMEPAGE="https://github.com/ROCmSoftwarePlatform/rocFFT" +SRC_URI="https://github.com/ROCmSoftwarePlatform/rocFFT/archive/rocm-${PV}.tar.gz -> rocFFT-${PV}.tar.gz" + +LICENSE="MIT" +KEYWORDS="~amd64" +SLOT="0/$(ver_cut 1-2)" + +# RDEPEND: perfscripts? dev-python/plotly[${PYTHON_USEDEP}] # currently masked by arch/amd64/x32/package.mask +RDEPEND=" +perfscripts? ( + >=media-gfx/asymptote-2.61 + 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="dev-util/hip + ${PYTHON_DEPS}" + +BDEPEND=" + test? ( + dev-cpp/gtest + dev-libs/boost + >=sci-libs/fftw-3 + sys-libs/libomp + sci-libs/hipRAND:${SLOT}[${ROCM_USEDEP}] + ) + >=dev-util/cmake-3.22 + dev-util/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 )" + +S="${WORKDIR}/rocFFT-rocm-${PV}" + +PATCHES=() + +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() { + sed -e "s/PREFIX rocfft//" \ + -e "/rocm_install_symlink_subdir/d" \ + -i library/src/CMakeLists.txt || die + + sed -e "/rocm_install_symlink_subdir/d" \ + -e "$!N;s:PREFIX\n[ ]*rocfft:# PREFIX rocfft\n:;P;D" \ + -i library/src/device/CMakeLists.txt || die + + 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 + fi + + cmake_src_prepare +} + +src_configure() { + addpredict /dev/kfd + addpredict /dev/dri/ + + local mycmakeargs=( + -DCMAKE_SKIP_RPATH=On + -DAMDGPU_TARGETS="$(get_amdgpu_flags)" + -Wno-dev + -DROCM_SYMLINK_LIBS=OFF + -DBUILD_CLIENTS_TESTS=$(usex test ON OFF) + -DBUILD_CLIENTS_SELFTEST=$(usex test ON OFF) + -DPYTHON3_EXE=${EPYTHON} + -DBUILD_CLIENTS_RIDER=$(usex benchmark ON OFF) + -DSQLITE_USE_SYSTEM_PACKAGE=ON + -DBUILD_FILE_REORG_BACKWARD_COMPATIBILITY=OFF + ) + + CXX=hipcc 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 + edob ./${PN,,}-test + edob ./${PN,,}-selftest +} + +src_install() { + cmake_src_install + + if use benchmark; then + cd "${BUILD_DIR}"/clients/staging || die + dobin *rider + 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 +} |