* [gentoo-commits] repo/gentoo:master commit in: sci-libs/rocFFT/, sci-libs/rocFFT/files/
@ 2021-11-03 12:08 Benda XU
0 siblings, 0 replies; 2+ messages in thread
From: Benda XU @ 2021-11-03 12:08 UTC (permalink / raw
To: gentoo-commits
commit: 3362227c089bdcccbc8249be6f8e8959dfb6e937
Author: YiyangWu <xgreenlandforwyy <AT> gmail <DOT> com>
AuthorDate: Mon Aug 23 08:41:19 2021 +0000
Commit: Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Wed Nov 3 12:08:13 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3362227c
sci-libs/rocFFT: bump version to 4.3.0
- Calculate needed memory for build rather than set to 28GiB.
- Enable src_test.
- Compatible with AMDGPU_TARGETS env variable.
- No rpath found in the installed libraries for this version.
- Use python-any-r1 because python script is used to generate kernels.
Closes: https://github.com/gentoo/gentoo/pull/22129
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Yiyang Wu <xgreenlandforwyy <AT> gmail.com>
Signed-off-by: Benda Xu <heroxbd <AT> gentoo.org>
sci-libs/rocFFT/Manifest | 1 +
| 12 +++
sci-libs/rocFFT/rocFFT-4.3.0.ebuild | 106 +++++++++++++++++++++
3 files changed, 119 insertions(+)
diff --git a/sci-libs/rocFFT/Manifest b/sci-libs/rocFFT/Manifest
index 61085466662..8757f213cfe 100644
--- a/sci-libs/rocFFT/Manifest
+++ b/sci-libs/rocFFT/Manifest
@@ -1 +1,2 @@
DIST rocFFT-4.0.0.tar.gz 772176 BLAKE2B f08db9487449e707ba814a66d23992f68c140017a38f72ee45b3b224fc3e46abd40b976aef645f4432601265b38cff8939456981c686360eba135349b5d28fb5 SHA512 db9a6b49162dfb7924aa5f5dc8d42c92a5a741e03c3c0b4ece2cfb72de7506a345f3d28d31a3d7755cfe78078c448c9f952ca671e472335a4301de8702916176
+DIST rocFFT-4.3.0.tar.gz 840748 BLAKE2B 236a5faa930751d35e501a9a32ecc8b4075448ef21a0ffb0bb7ec04f4ed1cb67b908aa153b5b424e0823d3e306cf375d7c01a77d687220ed79de6d374037e003 SHA512 765d41e4018a04a53e847c03de80eec830d3e8766187fb8cb493624afa2673175347c16e6eeeebd4ad7d88bb866e58f7e572708f22238723c710b98565a0cd3d
--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
new file mode 100644
index 00000000000..75dee06362b
--- /dev/null
+++ b/sci-libs/rocFFT/files/rocFFT-4.2.0-add-functional-header.patch
@@ -0,0 +1,12 @@
+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/rocFFT-4.3.0.ebuild b/sci-libs/rocFFT/rocFFT-4.3.0.ebuild
new file mode 100644
index 00000000000..3666f751adf
--- /dev/null
+++ b/sci-libs/rocFFT/rocFFT-4.3.0.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7..10} )
+
+inherit cmake check-reqs flag-o-matic multiprocessing python-any-r1
+
+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="dev-util/hip:${SLOT}"
+
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}"
+
+BDEPEND="
+ test? ( dev-cpp/gtest dev-libs/boost
+ >=sci-libs/fftw-3
+)"
+
+CHECKREQS_DISK_BUILD="7G"
+
+IUSE="test"
+
+RESTRICT="!test? ( test )"
+
+S="${WORKDIR}/rocFFT-rocm-${PV}"
+
+PATCHES=("${FILESDIR}/${PN}-4.2.0-add-functional-header.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}
+ else
+ local NARCH=7 # The default number of AMDGPU_TARGETS for rocFFT-4.3.0. May change in the future.
+ 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" \
+ -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
+
+ eapply_user
+ cmake_src_prepare
+}
+
+src_configure() {
+ # Grant access to the device
+ addwrite /dev/kfd
+ addpredict /dev/dri/
+
+ # Compiler to use
+ export CXX=hipcc
+
+ local mycmakeargs=(
+ -Wno-dev
+ -DCMAKE_INSTALL_INCLUDEDIR="include/rocFFT/"
+ -DCMAKE_SKIP_RPATH=ON
+ -DBUILD_CLIENTS_TESTS=$(usex test ON OFF)
+ -DBUILD_CLIENTS_SELFTEST=OFF # rocFFT-4.3.0 self test fails. See https://github.com/ROCmSoftwarePlatform/rocFFT/issues/324. Enable it for rocFFT-4.4
+ ${AMDGPU_TARGETS+-DAMDGPU_TARGETS="${AMDGPU_TARGETS}"}
+ -D__skip_rocmclang="ON" ## fix cmake-3.21 configuration issue caused by officialy support programming language "HIP"
+ )
+
+ cmake_src_configure
+}
+
+src_test() {
+ addwrite /dev/kfd
+ addpredict /dev/dri
+ cd "${BUILD_DIR}/clients/staging" || die
+ einfo "Running rocfft-test"
+ LD_LIBRARY_PATH=${BUILD_DIR}/library/src/:${BUILD_DIR}/library/src/device ./rocfft-test || die
+
+ # rocFFT-4.3.0 self test fails. See https://github.com/ROCmSoftwarePlatform/rocFFT/issues/324. Enable it for rocFFT-4.4
+ # einfo "Running rocfft-selftest"
+ # LD_LIBRARY_PATH=${BUILD_DIR}/library/src/:${BUILD_DIR}/library/src/device ./rocfft-selftest || die
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-libs/rocFFT/, sci-libs/rocFFT/files/
@ 2024-03-08 19:22 Sam James
0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2024-03-08 19:22 UTC (permalink / raw
To: gentoo-commits
commit: b79a363ec62995eb6f93d7421561b283694b77af
Author: Sv. Lockal <lockalsash <AT> gmail <DOT> com>
AuthorDate: Wed Jan 10 21:07:43 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Mar 8 19:22:02 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b79a363e
sci-libs/rocFFT: fix build with ld.lld
Signed-off-by: Sv. Lockal <lockalsash <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../rocFFT/files/rocFFT-5.7.1-fix-rocm-link-path.patch | 14 ++++++++++++++
sci-libs/rocFFT/rocFFT-5.7.1-r1.ebuild | 4 +++-
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/sci-libs/rocFFT/files/rocFFT-5.7.1-fix-rocm-link-path.patch b/sci-libs/rocFFT/files/rocFFT-5.7.1-fix-rocm-link-path.patch
new file mode 100644
index 000000000000..03731516d8fb
--- /dev/null
+++ b/sci-libs/rocFFT/files/rocFFT-5.7.1-fix-rocm-link-path.patch
@@ -0,0 +1,14 @@
+ld.lld with "-L/usr/lib -lhiprtc -ldl" fails in attempt to link
+64-bit library to 32-bit /usr/lib/libdl.so.2 with:
+"ld.lld: error: <...>/Scrt1.o is incompatible with elf32-i386"
+--- a/library/src/CMakeLists.txt
++++ b/library/src/CMakeLists.txt
+@@ -46,7 +46,7 @@ else()
+ if( WIN32 )
+ set( ROCFFT_RTC_LINK_LIBS "${HIP_PATH}/lib/hiprtc.lib" )
+ else()
+- set( ROCFFT_RTC_LINK_LIBS -L${ROCM_PATH}/lib -lhiprtc -ldl )
++ set( ROCFFT_RTC_LINK_LIBS -lhiprtc -ldl )
+ endif()
+ endif()
+
diff --git a/sci-libs/rocFFT/rocFFT-5.7.1-r1.ebuild b/sci-libs/rocFFT/rocFFT-5.7.1-r1.ebuild
index 5da8c917f384..4a924bd502a7 100644
--- a/sci-libs/rocFFT/rocFFT-5.7.1-r1.ebuild
+++ b/sci-libs/rocFFT/rocFFT-5.7.1-r1.ebuild
@@ -54,7 +54,9 @@ RESTRICT="!test? ( test )"
S="${WORKDIR}/rocFFT-rocm-${PV}"
-PATCHES=()
+PATCHES=(
+ "${FILESDIR}"/${PN}-5.7.1-fix-rocm-link-path.patch
+)
required_mem() {
if use test; then
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-03-08 19:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-03 12:08 [gentoo-commits] repo/gentoo:master commit in: sci-libs/rocFFT/, sci-libs/rocFFT/files/ Benda XU
-- strict thread matches above, loose matches on Subject: below --
2024-03-08 19:22 Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox