From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3E89315808B for ; Sun, 27 Mar 2022 03:13:03 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1A020E0894; Sun, 27 Mar 2022 03:13:02 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 12C60E0882 for ; Sun, 27 Mar 2022 03:13:01 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 026083432DA for ; Sun, 27 Mar 2022 03:13:00 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9130633F for ; Sun, 27 Mar 2022 03:12:58 +0000 (UTC) From: "Benda XU" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Benda XU" Message-ID: <1648350771.83c4bf0776b5e64867f547284ca794254dab36f7.heroxbd@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/rocFFT/files/, sci-libs/rocFFT/ X-VCS-Repository: repo/gentoo X-VCS-Files: sci-libs/rocFFT/Manifest sci-libs/rocFFT/files/rocFFT-5.0.2-add-math-header.patch sci-libs/rocFFT/files/rocFFT-5.0.2-unbundle-sqlite.patch sci-libs/rocFFT/metadata.xml sci-libs/rocFFT/rocFFT-5.0.2.ebuild X-VCS-Directories: sci-libs/rocFFT/files/ sci-libs/rocFFT/ X-VCS-Committer: heroxbd X-VCS-Committer-Name: Benda XU X-VCS-Revision: 83c4bf0776b5e64867f547284ca794254dab36f7 X-VCS-Branch: master Date: Sun, 27 Mar 2022 03:12:58 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: ee830676-199a-4d05-9589-f091bd095c70 X-Archives-Hash: cb33dd53f1c631bbc2ab70d10bee6b41 commit: 83c4bf0776b5e64867f547284ca794254dab36f7 Author: YiyangWu gmail com> AuthorDate: Wed Mar 23 14:22:16 2022 +0000 Commit: Benda XU gentoo org> CommitDate: Sun Mar 27 03:12:51 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=83c4bf07 sci-libs/rocFFT: bump version to 5.0.2 Enable benchmark and perfscript USE flags. Closes: https://github.com/gentoo/gentoo/pull/24726 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Yiyang Wu gmail.com> Signed-off-by: Benda Xu gentoo.org> sci-libs/rocFFT/Manifest | 1 + .../files/rocFFT-5.0.2-add-math-header.patch | 12 ++ .../files/rocFFT-5.0.2-unbundle-sqlite.patch | 54 ++++++++ sci-libs/rocFFT/metadata.xml | 4 + sci-libs/rocFFT/rocFFT-5.0.2.ebuild | 148 +++++++++++++++++++++ 5 files changed, 219 insertions(+) diff --git a/sci-libs/rocFFT/Manifest b/sci-libs/rocFFT/Manifest index 8757f213cfe1..a6b401c669d5 100644 --- a/sci-libs/rocFFT/Manifest +++ b/sci-libs/rocFFT/Manifest @@ -1,2 +1,3 @@ DIST rocFFT-4.0.0.tar.gz 772176 BLAKE2B f08db9487449e707ba814a66d23992f68c140017a38f72ee45b3b224fc3e46abd40b976aef645f4432601265b38cff8939456981c686360eba135349b5d28fb5 SHA512 db9a6b49162dfb7924aa5f5dc8d42c92a5a741e03c3c0b4ece2cfb72de7506a345f3d28d31a3d7755cfe78078c448c9f952ca671e472335a4301de8702916176 DIST rocFFT-4.3.0.tar.gz 840748 BLAKE2B 236a5faa930751d35e501a9a32ecc8b4075448ef21a0ffb0bb7ec04f4ed1cb67b908aa153b5b424e0823d3e306cf375d7c01a77d687220ed79de6d374037e003 SHA512 765d41e4018a04a53e847c03de80eec830d3e8766187fb8cb493624afa2673175347c16e6eeeebd4ad7d88bb866e58f7e572708f22238723c710b98565a0cd3d +DIST rocFFT-5.0.2.tar.gz 837508 BLAKE2B b74d0c6edd7b232f775bffefbca829d88d9d7cd9108c27a0698f45d7fe2760d40463bcda8c710e923874b3bbfb1e83e0fe8622db4dfa28afb29392b3e135e9a5 SHA512 d6810a92a10a27dbcac8a04e8fcd56c7fa198f208da626d8938d5ff28b6ab8b89a058c7a56b5666464165e8f6bd7c4c031a94315625a3613eb02a9b8eccd9eb9 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 new file mode 100644 index 000000000000..1a35126f1d8c --- /dev/null +++ b/sci-libs/rocFFT/files/rocFFT-5.0.2-add-math-header.patch @@ -0,0 +1,12 @@ +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 + + // Base class for stockham kernels. Subclasses are responsible for + // different tiling types. diff --git a/sci-libs/rocFFT/files/rocFFT-5.0.2-unbundle-sqlite.patch b/sci-libs/rocFFT/files/rocFFT-5.0.2-unbundle-sqlite.patch new file mode 100644 index 000000000000..4da2b2092906 --- /dev/null +++ b/sci-libs/rocFFT/files/rocFFT-5.0.2-unbundle-sqlite.patch @@ -0,0 +1,54 @@ +Disable rocFFT fetching SQLite3 and link to system libsqlite.so +--- rocFFT-rocm-5.0.2/library/src/CMakeLists.txt ++++ rocFFT-rocm-5.0.2/library/src/CMakeLists.txt +@@ -134,31 +134,7 @@ 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 ) +- +-# embed SQLite +-FetchContent_Declare(sqlite_local +- URL https://sqlite.org/2021/sqlite-amalgamation-3360000.zip +- URL_HASH SHA256=999826fe4c871f18919fdb8ed7ec9dd8217180854dd1fe21eea96aed36186729 +-) +-FetchContent_MakeAvailable(sqlite_local) +-add_library( sqlite3 STATIC ${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 +-) ++find_package( SQLite3 REQUIRED ) + + set_property( + SOURCE rtc.cpp +@@ -170,7 +146,7 @@ prepend_path( ".." rocfft_headers_public + add_library( rocfft ${rocfft_source} ${relative_rocfft_headers_public} ) + add_library( roc::rocfft ALIAS rocfft ) + +-target_link_libraries( rocfft PRIVATE stockham_gen sqlite3 ) ++target_link_libraries( rocfft PRIVATE stockham_gen ${SQLite3_LIBRARIES} ) + if( NOT WIN32 ) + target_link_libraries( rocfft PRIVATE -lstdc++fs ) + endif() +@@ -203,7 +179,7 @@ endif() + target_include_directories( rocfft + PRIVATE $ + $ +- ${sqlite_local_SOURCE_DIR} ++ ${SQLite3_LIBRARIES} + PUBLIC $ + $ + $ diff --git a/sci-libs/rocFFT/metadata.xml b/sci-libs/rocFFT/metadata.xml index 3274277df8c4..825327b204eb 100644 --- a/sci-libs/rocFFT/metadata.xml +++ b/sci-libs/rocFFT/metadata.xml @@ -16,4 +16,8 @@ ROCmSoftwarePlatform/rocFFT + + Build and install [dyna-]rocfft-rider. + Install rocfft-perf performance visualization suite. + diff --git a/sci-libs/rocFFT/rocFFT-5.0.2.ebuild b/sci-libs/rocFFT/rocFFT-5.0.2.ebuild new file mode 100644 index 000000000000..8d0cb72d3ed8 --- /dev/null +++ b/sci-libs/rocFFT/rocFFT-5.0.2.ebuild @@ -0,0 +1,148 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..10} ) + +inherit cmake check-reqs multiprocessing python-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: 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:${SLOT} + ${PYTHON_DEPS}" + +BDEPEND=" + test? ( dev-cpp/gtest dev-libs/boost + >=sci-libs/fftw-3 + >=dev-util/cmake-3.22 + dev-util/rocm-cmake:${SLOT} +)" + +CHECKREQS_DISK_BUILD="7G" + +IUSE="benchmark perfscripts test" +REQUIRED_USE="perfscripts? ( benchmark ) ${PYTHON_REQUIRED_USE}" + +RESTRICT="!test? ( test )" + +S="${WORKDIR}/rocFFT-rocm-${PV}" + +PATCHES=( + "${FILESDIR}/${PN}-4.2.0-add-functional-header.patch" + "${FILESDIR}/${PN}-5.0.2-unbundle-sqlite.patch" + "${FILESDIR}/${PN}-5.0.2-add-math-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 "/