diff options
Diffstat (limited to 'sci-libs/rocFFT')
-rw-r--r-- | sci-libs/rocFFT/Manifest | 15 | ||||
-rw-r--r-- | sci-libs/rocFFT/files/rocFFT-4.2.0-add-functional-header.patch | 12 | ||||
-rw-r--r-- | sci-libs/rocFFT/files/rocFFT-5.0.2-add-math-header.patch | 12 | ||||
-rw-r--r-- | sci-libs/rocFFT/files/rocFFT-5.1.3-add-stdexcept-header.patch | 11 | ||||
-rw-r--r-- | sci-libs/rocFFT/files/rocFFT-5.1.3-unbundle-sqlite.patch | 67 | ||||
-rw-r--r-- | sci-libs/rocFFT/files/rocFFT-6.1.1-find-hip-use-config.patch | 31 | ||||
-rw-r--r-- | sci-libs/rocFFT/rocFFT-5.7.1-r2.ebuild | 3 | ||||
-rw-r--r-- | sci-libs/rocFFT/rocFFT-6.1.1.ebuild | 3 | ||||
-rw-r--r-- | sci-libs/rocFFT/rocFFT-6.3.0.ebuild (renamed from sci-libs/rocFFT/rocFFT-5.1.3-r1.ebuild) | 84 | ||||
-rw-r--r-- | sci-libs/rocFFT/rocFFT-6.3.2.ebuild | 151 |
10 files changed, 238 insertions, 151 deletions
diff --git a/sci-libs/rocFFT/Manifest b/sci-libs/rocFFT/Manifest index da6a587fc92f..744d4bc70bfc 100644 --- a/sci-libs/rocFFT/Manifest +++ b/sci-libs/rocFFT/Manifest @@ -1,12 +1,11 @@ -AUX rocFFT-4.2.0-add-functional-header.patch 426 BLAKE2B 82c289bb6663690163c11950d05c21acf73ac3c759b9c081f30bd2f86e8416a1d9e064d6879e3e5624b44488a6caf3d6d215e8a3c37647e5bfb0d58b85985081 SHA512 09bcfe421f20a6e5ba66a0efc4beecbdb591b2422eecc851c99c6cde12da904ab2bb86c5985bbc68fe9a859fdc986b21f6ae855cb631eb5e15819b6f39e3ef00 -AUX rocFFT-5.0.2-add-math-header.patch 468 BLAKE2B 66cedbbc2b7aeaa2e42324e02325dc3f0c8869b109cdeb46892d597346532dcae2bd51739b85b97ecb6982935ec38f1332a4857d719b1c7c9e3a1e83f60623d1 SHA512 f714ba071838ebba8c6ab32b92eab52430622ef5f7eeea04f7a8c71b8a2a547688faf0f8d93a9be90183aebb976ec51722bcee81d960545046c82fd3df9b6f01 -AUX rocFFT-5.1.3-add-stdexcept-header.patch 340 BLAKE2B b21454151dd2c41948e00b50360b3adbc93c08e7e849b11c032ba0b8dc76d1159883349065d7c87bf3098d0e67d4da48db220b58934de39fcb3c4d006a902a5e SHA512 a49f2bad5ea87f67a7d5dc7adb820a42ab2b92b0f1436a564c3906dcc4598de154d18247d8b4e8f3e12c3947da05890a4a9ba6f76852bebd1fcf26928ee48e0c -AUX rocFFT-5.1.3-unbundle-sqlite.patch 2326 BLAKE2B 5a08f2ec7486f0687c4af46e09a01678e8255254bb78ae864436353d10017f86f1b3b557527a32771de43fa24148c3be5d233639bdf3e6746b2d120623bf934d SHA512 c545053741c55abf1dbcda89e9ece1bccb42a5db86c0329499b332299c5c7b73150650634cc7506bef2ee7e16a25bf1aacd5477bf13884e2cb01c48a113b33ab AUX rocFFT-5.7.1-fix-rocm-link-path.patch 492 BLAKE2B daf4d865d8b2b5f3dc97a845f262c266588da910f517e31a10cf7896c6bc1c4fd794c01be39c7aa74d5eb80e4066b8d3dd8a8841210e0075ad4e593dc0f85f66 SHA512 b715c08515b6d289f1b045db7053ff08a27aa9cf940beacba47167a72f168d75f4652d98b33fc2bef303832f0689cf51d71f893e415ba4b4cd7a0f21c677de69 -DIST rocFFT-5.1.3.tar.gz 845470 BLAKE2B 86060ce4f8612869fedc5bc92ed6a5bb7fbc539b26c7f5ab0ded5406ab6c340f64116782285d040824e54557af87d9ddb6f907fd1550b80c3da903d3c1d5e5c0 SHA512 175402856bd4753e74ce14326569be99221e21d0ce675e007900f6982c53e1566ad0b060eec545e0f17ff4dc4811688cc1003dc986226205ee95ee6f22d1ca43 +AUX rocFFT-6.1.1-find-hip-use-config.patch 1108 BLAKE2B 9ae46c2dc754d3a9d68863012c46b6642c71459facd75a4425f8942fad1df1df15d3030255e1b54c537152b521ca4becdc8426003e05aceedc92087aeffd14bf SHA512 02322003c1e6385fb4cff1049a9554baa91d2eca75bc0c9869b92e95c6c579d7f5e361b5b2ce98ca2ab5613891c24230833ae13f13a814f863510ef4340b9260 DIST rocFFT-5.7.1.tar.gz 1192841 BLAKE2B 58f880f7ff866f85af70666d17e8b1a3ac8e63e853520546f746d74cecd805687fd689367a09d2b1ec4e1059b44b858377dce362cd4cae91cb85aad7c3185c00 SHA512 48467589cb4bc1334a4074bacc6a726c850dc2a79ef82622301d61c4269fb81c0b2b9fce56d72bddca584d1797a8634d243a9a6b8cf943e687b2b0f5c931116f DIST rocFFT-6.1.1.tar.gz 1257210 BLAKE2B 01d383d32bb91a9cd1d68a3b1ef2c6d71b33a9a49389c558adca2673ce4a74aab9f0a420977d4f4d5e8b8e72f3d9bfe3a8019e137968b58984edac4f2e1a9146 SHA512 fb35b4d21b8bd598702f79707cdf19b7c30a9e62176f5f7a71b93076f904a98446dac4fa8bffcd7ba20ecb797aec727e730c8232de881a52d519c0c00a907bf9 -EBUILD rocFFT-5.1.3-r1.ebuild 3926 BLAKE2B ef9cf52ee86139887f87b96f02d28bcb80420af8d3538060596a51b3b8b7369eee5da63d90e8132935acf32cba06024840427cf2e5a2b7662388e75c1b1b4272 SHA512 3a34f05845f726fd6cb71d0315ee6338e1e381910a8dca2d6c655ae80e1ba3f1765a2313f2795be8eb737195fa23e2597bcda89a1e6db778cfddf35485462beb -EBUILD rocFFT-5.7.1-r2.ebuild 3950 BLAKE2B ecd5ec8e81290c4bc83dd413c7b0dc292712244bbc6a432f593ddb868dfe24a5486acd590315b12ec9e3a074746aa4d84b0c8376aa1db490e8ea96867b7a3fd1 SHA512 48cb8edd4005f616d4e6886dce3b48bcb972b05ba35dc67739bfdca193a19fccba464bd275ca07bd98dff70fe7a237d256e2a45e4c2910ebe8f26648a262a555 -EBUILD rocFFT-6.1.1.ebuild 3747 BLAKE2B 13cf175e01205c53fb7b2541eb00cf1d9326a0eae51e26b96273ca70dc2917294a52414ef1bc2faee3383790e1ce3ac4ca8fac86a7eaf8b052728f779f31fceb SHA512 500a4a7ac83004b143c6742cfc319d6fecda12dc3d56282e0ae940e7ef2be67b14dab3a68dfdc1a6d1ffa24e76cd12ee4621b43434dba8e9a87fc39292321460 +DIST rocFFT-6.3.0.tar.gz 1386056 BLAKE2B 1aab60818328cb3a6448f6d555faf2db3b3839e2b3abd7a37cc48054e67321e7c98c319b2f078dfd351f56263c35731608ae65fca427fc3eaaf06c8410b99d89 SHA512 4ac2dac24e77a9d767fa08a9d393cb2c94bc2a8ca32cb75ea53dd83011989bd344ae3c11c9bfc557e71c645ebea34c53a5e050ce6810259f84287e6baf829c08 +DIST rocFFT-6.3.2.tar.gz 1385667 BLAKE2B 3415cca976b31534498b87b1bc800d96aa00c9c8b2665350323f03c47eff922ff3d0b46374af7cee5958572487c51432ef55ffe8c19c8b19e093c7ca7ec05961 SHA512 e58d00810c661ef640d4e33894b41847e69de150fbdf4cd72c14d44b9298a514df7e47bd52902482beb6fb52de6e7cd01e298dec756fec150de967049a370d33 +EBUILD rocFFT-5.7.1-r2.ebuild 4003 BLAKE2B ec65bb2120e61d38bc2a3d8f920c5d1553c4658b99f4171dbdb5b1f6b233652432aa45bc36b61b2c842ff20a20ab288c8b7236cbb6b972ab12647d127dbdabf4 SHA512 12ceadc7a10d718d36aeee65179335f7335a4db15f55b2da6bd6f0df8de3037d021a166c86dc35228efb18cafdd33f0209702e05e2e4ca80d0b9b960c76a0bfa +EBUILD rocFFT-6.1.1.ebuild 3800 BLAKE2B 54624734bdc9c4583c50dac8f802f3ef648734146a70e5b1fae26f77556e60f97b9a5a7fff2a73782dae3eec8df4578650f0ecf2c6608a3009f5e645ab0bdd2a SHA512 77b86a3ac007c317f6aae00a6fb9895ab1cda1fad9ca4c889812134fa8368e26d2d1f943288c39342977ecf54ae71463a97e449cbc82a102825590cd4d670255 +EBUILD rocFFT-6.3.0.ebuild 3774 BLAKE2B 5dc6cba52c92afc16321ce3ede491a7aceb502a1228a9cf755be11fca6510a7d9330ef9f4e868f246608e0eec321ceba7467864f90a994bf064160093960e9de SHA512 789b6ad1e5ff3a95bdaf32c1aacbfd2495713e5b3c1af77459b5a0f36e1b2ae72601741e05bce8ecbca6f7fc10286bf2e62c4b841cc0365ecfd7b119d04e2ee1 +EBUILD rocFFT-6.3.2.ebuild 3774 BLAKE2B 5dc6cba52c92afc16321ce3ede491a7aceb502a1228a9cf755be11fca6510a7d9330ef9f4e868f246608e0eec321ceba7467864f90a994bf064160093960e9de SHA512 789b6ad1e5ff3a95bdaf32c1aacbfd2495713e5b3c1af77459b5a0f36e1b2ae72601741e05bce8ecbca6f7fc10286bf2e62c4b841cc0365ecfd7b119d04e2ee1 MISC metadata.xml 764 BLAKE2B 0490d64e75e9269408f31d4ac87f4845f01a306adf829d57d89401cab19c84412896f351c1dc9f6a918679447f1fe62a7fc958bff9c98f1990fe021f99b35e01 SHA512 0135bae193ac9439a86dca5e26a32366eae7b67175c955aace1a1d620f1df5176a3e3a302a5e6f1e6473777e5b51ab772aa67a01ba023e9c8bbb180352ae8e0b diff --git a/sci-libs/rocFFT/files/rocFFT-4.2.0-add-functional-header.patch b/sci-libs/rocFFT/files/rocFFT-4.2.0-add-functional-header.patch deleted file mode 100644 index 75dee06362b6..000000000000 --- a/sci-libs/rocFFT/files/rocFFT-4.2.0-add-functional-header.patch +++ /dev/null @@ -1,12 +0,0 @@ -resolves compilation error: no member named 'multiplies' in namespace 'std' for library/src/twiddles.cpp - ---- a/library/src/include/twiddles.h 2021-04-15 10:24:46.000000000 -0700 -+++ b/library/src/include/twiddles.h 2021-07-21 22:27:10.760604147 -0700 -@@ -9,6 +9,7 @@ - #include "../../../shared/gpubuf.h" - #include "rocfft.h" - #include <cassert> -+#include <functional> - #include <math.h> - #include <numeric> - #include <tuple> diff --git a/sci-libs/rocFFT/files/rocFFT-5.0.2-add-math-header.patch b/sci-libs/rocFFT/files/rocFFT-5.0.2-add-math-header.patch deleted file mode 100644 index 1a35126f1d8c..000000000000 --- a/sci-libs/rocFFT/files/rocFFT-5.0.2-add-math-header.patch +++ /dev/null @@ -1,12 +0,0 @@ -fix compilation issue: error: use of undeclared identifier 'ceil' 'floor' -=================================================================== ---- rocFFT-rocm-5.0.2.orig/library/src/device/generator/stockham_gen_base.h -+++ rocFFT-rocm-5.0.2/library/src/device/generator/stockham_gen_base.h -@@ -20,6 +20,7 @@ - - #pragma once - #include "stockham_gen.h" -+#include <math.h> - - // Base class for stockham kernels. Subclasses are responsible for - // different tiling types. diff --git a/sci-libs/rocFFT/files/rocFFT-5.1.3-add-stdexcept-header.patch b/sci-libs/rocFFT/files/rocFFT-5.1.3-add-stdexcept-header.patch deleted file mode 100644 index edfd89ea4b70..000000000000 --- a/sci-libs/rocFFT/files/rocFFT-5.1.3-add-stdexcept-header.patch +++ /dev/null @@ -1,11 +0,0 @@ -Contributed-by: perestoronin https://bugs.gentoo.org/693200#c25 ---- a/library/src/include/twiddles.h -+++ b/library/src/include/twiddles.h -@@ -14,6 +14,7 @@ - #include <numeric> - #include <tuple> - #include <vector> -+#include <stdexcept> - - static const size_t LTWD_BASE_DEFAULT = 8; - static const size_t LARGE_TWIDDLE_THRESHOLD = 4096; diff --git a/sci-libs/rocFFT/files/rocFFT-5.1.3-unbundle-sqlite.patch b/sci-libs/rocFFT/files/rocFFT-5.1.3-unbundle-sqlite.patch deleted file mode 100644 index b18b55eb8048..000000000000 --- a/sci-libs/rocFFT/files/rocFFT-5.1.3-unbundle-sqlite.patch +++ /dev/null @@ -1,67 +0,0 @@ -Disable rocFFT fetching SQLite3 and link to system libsqlite.so -Index: rocFFT-rocm-5.1.3/library/src/CMakeLists.txt -=================================================================== ---- rocFFT-rocm-5.1.3.orig/library/src/CMakeLists.txt -+++ rocFFT-rocm-5.1.3/library/src/CMakeLists.txt -@@ -134,49 +134,22 @@ set( rocfft_source - rtcsubprocess.cpp - ) - --# SQLite 3.36.0 enabled the backup API by default, which we need --# for cache serialization. We also want to use a static SQLite, --# and distro static libraries aren't typically built --# position-independent. --include( FetchContent ) -- --set(SQLITE_SRC_URL https://sqlite.org/2021/sqlite-amalgamation-3360000.zip CACHE STRING "Location of SQLite source code") --set(SQLITE_SRC_SHA256 999826fe4c871f18919fdb8ed7ec9dd8217180854dd1fe21eea96aed36186729 CACHE STRING "SHA256 hash of SQLite source code") -- --# embed SQLite --FetchContent_Declare(sqlite_local -- URL ${SQLITE_SRC_URL} -- URL_HASH SHA256=${SQLITE_SRC_SHA256} --) --FetchContent_MakeAvailable(sqlite_local) --add_library( sqlite3 OBJECT ${sqlite_local_SOURCE_DIR}/sqlite3.c ) --set_target_properties( sqlite3 PROPERTIES -- C_VISIBILITY_PRESET "hidden" -- VISIBILITY_INLINES_HIDDEN ON -- POSITION_INDEPENDENT_CODE ON -- ) -- --# we don't need extensions, and omitting them from SQLite removes the --# need for dlopen/dlclose from within rocFFT --target_compile_options( -- sqlite3 -- PRIVATE -DSQLITE_OMIT_LOAD_EXTENSION --) -- - set_property( - SOURCE rtc.cpp - PROPERTY OBJECT_DEPENDS ${kgen_embed_h} - ) - -+find_package( SQLite3 REQUIRED ) -+ - prepend_path( ".." rocfft_headers_public relative_rocfft_headers_public ) - - add_library( rocfft - ${rocfft_source} - ${relative_rocfft_headers_public} -- $<TARGET_OBJECTS:sqlite3> - ) - add_library( roc::rocfft ALIAS rocfft ) - -+target_link_libraries( rocfft PRIVATE ${SQLite3_LIBRARIES} ) - if( NOT WIN32 ) - target_link_libraries( rocfft PRIVATE -lstdc++fs ) - endif() -@@ -209,7 +182,7 @@ endif() - target_include_directories( rocfft - PRIVATE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/library/src/include> - $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/library/src/device> -- ${sqlite_local_SOURCE_DIR} -+ ${SQLite3_LIBRARIES} - PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/library/include> - $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include> - $<INSTALL_INTERFACE:include> diff --git a/sci-libs/rocFFT/files/rocFFT-6.1.1-find-hip-use-config.patch b/sci-libs/rocFFT/files/rocFFT-6.1.1-find-hip-use-config.patch new file mode 100644 index 000000000000..27353eee35d1 --- /dev/null +++ b/sci-libs/rocFFT/files/rocFFT-6.1.1-find-hip-use-config.patch @@ -0,0 +1,31 @@ +Upstream PR: https://github.com/ROCm/rocFFT/pull/530 +From b29c984bfaaec9d372fb566f5136fe3c473ff22d Mon Sep 17 00:00:00 2001 +From: Yiyang Wu <xgreenlandforwyy@gmail.com> +Date: Sun, 20 Oct 2024 23:22:50 +0800 +Subject: [PATCH] Require rocFFT use hip-config.cmake to find HIP + +Sometimes rocFFT use FindHIP.cmake which is not desired -- it does not +have hip::device and hip::host target imported and result in cmake +generating error. + +Reference: https://bugs.gentoo.org/932155 +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index bcb9819c..da697834 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -186,7 +186,7 @@ set(AMDGPU_TARGETS "${DEFAULT_GPUS}" CACHE STRING "Target default GPUs if AMDGPU + rocm_check_target_ids(AMDGPU_TARGETS TARGETS "${AMDGPU_TARGETS}") + + # HIP is required - library and clients use HIP to access the device +-find_package( HIP REQUIRED ) ++find_package( HIP REQUIRED CONFIG ) + + # The nvidia backend can be used to compile for CUDA devices. + # Specify the CUDA prefix in the CUDA_PREFIX variable. +-- +2.45.2 + diff --git a/sci-libs/rocFFT/rocFFT-5.7.1-r2.ebuild b/sci-libs/rocFFT/rocFFT-5.7.1-r2.ebuild index 0c383fa01164..35da60ceea6b 100644 --- a/sci-libs/rocFFT/rocFFT-5.7.1-r2.ebuild +++ b/sci-libs/rocFFT/rocFFT-5.7.1-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -61,6 +61,7 @@ S="${WORKDIR}/rocFFT-rocm-${PV}" PATCHES=( "${FILESDIR}"/${PN}-5.7.1-fix-rocm-link-path.patch + "${FILESDIR}"/${PN}-6.1.1-find-hip-use-config.patch ) required_mem() { diff --git a/sci-libs/rocFFT/rocFFT-6.1.1.ebuild b/sci-libs/rocFFT/rocFFT-6.1.1.ebuild index d1289f597217..da1508311eb7 100644 --- a/sci-libs/rocFFT/rocFFT-6.1.1.ebuild +++ b/sci-libs/rocFFT/rocFFT-6.1.1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -59,6 +59,7 @@ RESTRICT="!test? ( test )" PATCHES=( "${FILESDIR}"/${PN}-5.7.1-fix-rocm-link-path.patch + "${FILESDIR}"/${PN}-6.1.1-find-hip-use-config.patch ) required_mem() { diff --git a/sci-libs/rocFFT/rocFFT-5.1.3-r1.ebuild b/sci-libs/rocFFT/rocFFT-6.3.0.ebuild index 7b75953d510f..474f33952068 100644 --- a/sci-libs/rocFFT/rocFFT-5.1.3-r1.ebuild +++ b/sci-libs/rocFFT/rocFFT-6.3.0.ebuild @@ -1,20 +1,21 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 -PYTHON_COMPAT=( python3_{10..11} ) +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/ROCmSoftwarePlatform/rocFFT" -SRC_URI="https://github.com/ROCmSoftwarePlatform/rocFFT/archive/rocm-${PV}.tar.gz -> rocFFT-${PV}.tar.gz" +HOMEPAGE="https://github.com/ROCm/rocFFT" +SRC_URI="https://github.com/ROCm/rocFFT/archive/rocm-${PV}.tar.gz -> rocFFT-${PV}.tar.gz" +S="${WORKDIR}/rocFFT-rocm-${PV}" LICENSE="MIT" -KEYWORDS="~amd64" SLOT="0/$(ver_cut 1-2)" +KEYWORDS="~amd64" # RDEPEND: perfscripts? dev-python/plotly[${PYTHON_USEDEP}] # currently masked by arch/amd64/x32/package.mask RDEPEND=" @@ -29,39 +30,48 @@ perfscripts? ( dev-python/pandas[${PYTHON_USEDEP}] ) ${PYTHON_DEPS}" -DEPEND="dev-util/hip - ${PYTHON_DEPS}" +DEPEND="=dev-util/hip-6* + ${PYTHON_DEPS} + benchmark? ( + dev-libs/boost + sci-libs/hipRAND:${SLOT}[${ROCM_USEDEP}] + ) + test? ( + dev-cpp/gtest + dev-libs/boost + >=sci-libs/fftw-3 + llvm-runtimes/openmp + sci-libs/hipRAND:${SLOT}[${ROCM_USEDEP}] + ) +" BDEPEND=" - test? ( dev-cpp/gtest dev-libs/boost - >=sci-libs/fftw-3 llvm-runtimes/openmp ) >=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 )" -S="${WORKDIR}/rocFFT-rocm-${PV}" - PATCHES=( - "${FILESDIR}/${PN}-4.2.0-add-functional-header.patch" - "${FILESDIR}/${PN}-5.1.3-unbundle-sqlite.patch" - "${FILESDIR}/${PN}-5.0.2-add-math-header.patch" - "${FILESDIR}/${PN}-5.1.3-add-stdexcept-header.patch" ) + "${FILESDIR}"/${PN}-5.7.1-fix-rocm-link-path.patch + "${FILESDIR}"/${PN}-6.1.1-find-hip-use-config.patch +) required_mem() { if use test; then echo "52G" else if [[ -n "${AMDGPU_TARGETS}" ]]; then - local NARCH=$(($(awk -F";" '{print NF-1}' <<< "${AMDGPU_TARGETS}" || die)+1)) # count how many archs user specified in ${AMDGPU_TARGETS} + # count how many archs user specified in ${AMDGPU_TARGETS} + local NARCH=$(($(awk -F";" '{print NF-1}' <<< "${AMDGPU_TARGETS}" || die)+1)) else - local NARCH=7 # The default number of AMDGPU_TARGETS for rocFFT-4.3.0. May change in the future. + # 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 @@ -78,21 +88,13 @@ pkg_setup() { } src_prepare() { - sed -e "s/PREFIX rocfft//" \ - -e "/rocm_install_symlink_subdir/d" \ - -e "/<INSTALL_INTERFACE/s,include,include/rocfft," \ - -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 + sed -e "/^top = /s,__file__).*$,\"${EPREFIX}/usr/share/${PN}-perflib\")," \ + -i perflib/pdf.py perflib/generators.py || die popd fi @@ -100,30 +102,27 @@ src_prepare() { } src_configure() { - addpredict /dev/kfd - addpredict /dev/dri/ + rocm_use_hipcc local mycmakeargs=( - -DCMAKE_SKIP_RPATH=On + -DCMAKE_SKIP_RPATH=ON -DAMDGPU_TARGETS="$(get_amdgpu_flags)" -Wno-dev - -DCMAKE_INSTALL_INCLUDEDIR="include/rocfft/" -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) + -DBUILD_CLIENTS_BENCH=$(usex benchmark ON OFF) + -DSQLITE_USE_SYSTEM_PACKAGE=ON + -DBUILD_FILE_REORG_BACKWARD_COMPATIBILITY=OFF ) - CXX=hipcc cmake_src_configure + 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 + edob ./rocfft-test } src_install() { @@ -131,7 +130,14 @@ src_install() { if use benchmark; then cd "${BUILD_DIR}"/clients/staging || die - dobin *rider + 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 diff --git a/sci-libs/rocFFT/rocFFT-6.3.2.ebuild b/sci-libs/rocFFT/rocFFT-6.3.2.ebuild new file mode 100644 index 000000000000..474f33952068 --- /dev/null +++ b/sci-libs/rocFFT/rocFFT-6.3.2.ebuild @@ -0,0 +1,151 @@ +# 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/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=" +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-6* + ${PYTHON_DEPS} + benchmark? ( + dev-libs/boost + sci-libs/hipRAND:${SLOT}[${ROCM_USEDEP}] + ) + test? ( + dev-cpp/gtest + dev-libs/boost + >=sci-libs/fftw-3 + llvm-runtimes/openmp + sci-libs/hipRAND:${SLOT}[${ROCM_USEDEP}] + ) +" + +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 )" + +PATCHES=( + "${FILESDIR}"/${PN}-5.7.1-fix-rocm-link-path.patch + "${FILESDIR}"/${PN}-6.1.1-find-hip-use-config.patch +) + +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 + fi + + cmake_src_prepare +} + +src_configure() { + rocm_use_hipcc + + 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_BENCH=$(usex benchmark ON OFF) + -DSQLITE_USE_SYSTEM_PACKAGE=ON + -DBUILD_FILE_REORG_BACKWARD_COMPATIBILITY=OFF + ) + + 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 ./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 +} |