From 2771f79232c273bc2a57d23bf335dd81ccf6af28 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 5 Dec 2021 02:47:11 +0000 Subject: gentoo resync : 05.12.2021 --- sci-libs/hipFFT/Manifest | 7 ++ .../files/hipFFT-4.3.0-add-complex-header.patch | 11 ++++ .../hipFFT-4.3.0-gentoo-install-locations.patch | 42 ++++++++++++ .../files/hipFFT-4.3.0-remove-git-dependency.patch | 33 ++++++++++ sci-libs/hipFFT/hipFFT-4.3.0.ebuild | 75 ++++++++++++++++++++++ sci-libs/hipFFT/metadata.xml | 22 +++++++ 6 files changed, 190 insertions(+) create mode 100644 sci-libs/hipFFT/Manifest create mode 100644 sci-libs/hipFFT/files/hipFFT-4.3.0-add-complex-header.patch create mode 100644 sci-libs/hipFFT/files/hipFFT-4.3.0-gentoo-install-locations.patch create mode 100644 sci-libs/hipFFT/files/hipFFT-4.3.0-remove-git-dependency.patch create mode 100644 sci-libs/hipFFT/hipFFT-4.3.0.ebuild create mode 100644 sci-libs/hipFFT/metadata.xml (limited to 'sci-libs/hipFFT') diff --git a/sci-libs/hipFFT/Manifest b/sci-libs/hipFFT/Manifest new file mode 100644 index 000000000000..c3435c9eb91c --- /dev/null +++ b/sci-libs/hipFFT/Manifest @@ -0,0 +1,7 @@ +AUX hipFFT-4.3.0-add-complex-header.patch 381 BLAKE2B 962865d4dd1a38bbc4e70756d614c92a287029e5bd6d987e8adbabb4b33a83e616cc1156bfc5dc415124d25373e146178a99854972d957039654007d5d3d5122 SHA512 8dfda0eb470005b9ed4701dbf0a1022040ce6bc90f0e04ca16704083074047b5170396257c1aa8c5d0855c055e491249c63516f4f1ba7583d5214f39705433fa +AUX hipFFT-4.3.0-gentoo-install-locations.patch 1959 BLAKE2B 1f603bc411eda7aa7b999f3eb3c52822b27be51c2101562cd259d68856b019957c512add96f1c28ff0cb8ad58ab1911be3b97ffc9542758abae40f5e2e5b3d19 SHA512 4c358996e41750f938cb4997825aa00adbcda39b90bf0d3fbf180edecff57a1f7bf5d6c6e26c7b60274a1c1316858b911b69bf20e823a064d81fed498b3edf23 +AUX hipFFT-4.3.0-remove-git-dependency.patch 1505 BLAKE2B e98eb5b680ef2b5e45f85af8e93e25723dceebd6c849ca65ca132dab83a0eae7933c67affbf020a604c4773147907d40ccabe6cf2df6c92e213f5cab9a3e4736 SHA512 9d3c048d6f4242499d07d3c45baffc39f1766e3411d1e106ccdbae1325543d7df883531c0d2969b67805dd75bc505a63c3d3818ca5d141bbbcf8984f8d51a418 +DIST hipFFT-rocm-4.3.0.tar.gz 83355 BLAKE2B ee99b4cb685cbb846084d8a7c77982d75cf0d1597f9270260284bb26ae00702a31dd4d5ad9ae1885ab631c390f65c0f584f302be189701ba4f0dd9061b1bba5a SHA512 0d3100b054ff485eae06b13b8c568626b8e3a3286f36012c5a5f9bb4918e03c30c687a2714049bd797f6c3973f1730ad0936f02ad044cde1663c9c5750bbcf40 +DIST rocFFT-4.3.0.tar.gz 840748 BLAKE2B 236a5faa930751d35e501a9a32ecc8b4075448ef21a0ffb0bb7ec04f4ed1cb67b908aa153b5b424e0823d3e306cf375d7c01a77d687220ed79de6d374037e003 SHA512 765d41e4018a04a53e847c03de80eec830d3e8766187fb8cb493624afa2673175347c16e6eeeebd4ad7d88bb866e58f7e572708f22238723c710b98565a0cd3d +EBUILD hipFFT-4.3.0.ebuild 1885 BLAKE2B fd0653407acbeaaf3276535b64ddbc4ed33bebcf428b5de47561b583077e30da92314cdfa03a9f1ec1d488dbef38cadbb62087cc8181d8567b1df6aa4ae33c8f SHA512 0ebd42f6b2ae1e1719d227b96bc51023e2117751b6bf4e39ed44f46a81967d8fe9946abb4975eb7bcbad656ded7cbf5a1473e3ceb82ddb90b6546c0c2992b7cf +MISC metadata.xml 726 BLAKE2B 5471621c140d82a51f9226ae8de8600c08651ceb7a6808dd65362db6fc79595e578e7c5cbc628197b0ed37bc803cb7636e545a7b39b3d6791d02a8f804c372a3 SHA512 64ee4d42afdc5a770a7acf808205ada93d3685666158915cee48159dfa20ba0e06c9516c4ab3e1ea5c685631d017ce8f1418f0d8909516704591dcac83eb073c diff --git a/sci-libs/hipFFT/files/hipFFT-4.3.0-add-complex-header.patch b/sci-libs/hipFFT/files/hipFFT-4.3.0-add-complex-header.patch new file mode 100644 index 000000000000..200481788b95 --- /dev/null +++ b/sci-libs/hipFFT/files/hipFFT-4.3.0-add-complex-header.patch @@ -0,0 +1,11 @@ +diff --color -uprN orig/clients/rider/rider.cpp hipFFT-rocm-4.3.0/clients/rider/rider.cpp +--- orig/clients/rider/rider.cpp 2021-08-26 15:05:32.267279103 +0800 ++++ hipFFT-rocm-4.3.0/clients/rider/rider.cpp 2021-08-26 15:05:48.795279212 +0800 +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + #include + #include + diff --git a/sci-libs/hipFFT/files/hipFFT-4.3.0-gentoo-install-locations.patch b/sci-libs/hipFFT/files/hipFFT-4.3.0-gentoo-install-locations.patch new file mode 100644 index 000000000000..891774eb5a47 --- /dev/null +++ b/sci-libs/hipFFT/files/hipFFT-4.3.0-gentoo-install-locations.patch @@ -0,0 +1,42 @@ +diff --color -uprN orig/CMakeLists.txt hipFFT-rocm-4.3.0/CMakeLists.txt +--- orig/CMakeLists.txt 2021-08-26 14:38:31.051268348 +0800 ++++ hipFFT-rocm-4.3.0/CMakeLists.txt 2021-08-26 14:38:42.655268425 +0800 +@@ -143,7 +143,7 @@ endif( ) + add_subdirectory( library ) + + # force library install path to lib (CentOS 7 defaults to lib64) +-set(CMAKE_INSTALL_LIBDIR "lib" CACHE INTERNAL "Installation directory for libraries" FORCE) ++set(CMAKE_INSTALL_LIBDIR "lib64" CACHE INTERNAL "Installation directory for libraries" FORCE) + + # Build clients of the library + if( BUILD_CLIENTS ) +diff --color -uprN orig/library/CMakeLists.txt hipFFT-rocm-4.3.0/library/CMakeLists.txt +--- orig/library/CMakeLists.txt 2021-08-26 14:38:31.051268348 +0800 ++++ hipFFT-rocm-4.3.0/library/CMakeLists.txt 2021-08-26 14:39:21.919268686 +0800 +@@ -77,7 +77,7 @@ target_include_directories(hipfft + PUBLIC $ + $ + $ +- $ ++ $ + ) + + if(BUILD_WITH_LIB STREQUAL "CUDA") +@@ -112,13 +112,13 @@ if( ROCM_FOUND ) + rocm_install_targets( TARGETS hipfft + INCLUDE + ${CMAKE_SOURCE_DIR}/library/include +- ${CMAKE_BINARY_DIR}/include +- PREFIX hipfft ) ++ ${CMAKE_BINARY_DIR}/include ) ++ #PREFIX hipfft ) + rocm_export_targets( TARGETS hip::hipfft +- PREFIX hipfft ++ #PREFIX hipfft + DEPENDS PACKAGE hip + NAMESPACE hip:: ) +- rocm_install_symlink_subdir( hipfft ) ++ #rocm_install_symlink_subdir( hipfft ) + + + # During transition to standalone hipFFT repository, don't install diff --git a/sci-libs/hipFFT/files/hipFFT-4.3.0-remove-git-dependency.patch b/sci-libs/hipFFT/files/hipFFT-4.3.0-remove-git-dependency.patch new file mode 100644 index 000000000000..563da3085ab9 --- /dev/null +++ b/sci-libs/hipFFT/files/hipFFT-4.3.0-remove-git-dependency.patch @@ -0,0 +1,33 @@ +diff --color -uprN orig/cmake/dependencies.cmake hipFFT-rocm-4.3.0/cmake/dependencies.cmake +--- orig/cmake/dependencies.cmake 2021-08-26 14:48:57.867272506 +0800 ++++ hipFFT-rocm-4.3.0/cmake/dependencies.cmake 2021-08-26 14:51:02.571273334 +0800 +@@ -21,9 +21,6 @@ + # + # ############################################################################# + +-# Git +-find_package(Git REQUIRED) +- + # HIP + if(NOT BUILD_WITH_LIB STREQUAL "CUDA") + find_package(hip REQUIRED) +diff --color -uprN orig/CMakeLists.txt hipFFT-rocm-4.3.0/CMakeLists.txt +--- orig/CMakeLists.txt 2021-08-26 14:48:57.867272506 +0800 ++++ hipFFT-rocm-4.3.0/CMakeLists.txt 2021-08-26 14:49:15.247272622 +0800 +@@ -117,16 +117,6 @@ message(STATUS "BUILD_WITH_COMPILER = " + include(cmake/dependencies.cmake) + + if( BUILD_CLIENTS_TESTS ) +- if( GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git" ) +- message(STATUS "rocFFT submodule update") +- execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive +- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} +- RESULT_VARIABLE GIT_SUBMOD_RESULT) +- if( NOT GIT_SUBMOD_RESULT EQUAL "0" ) +- message(FATAL_ERROR "git submodule update --init --recursive failed with ${GIT_SUBMOD_RESULT}, please checkout submodules manually.") +- endif( ) +- endif( ) +- + if( NOT EXISTS "${PROJECT_SOURCE_DIR}/rocFFT/CMakeLists.txt" ) + message(FATAL_ERROR "The rocFFT submodule is not present! Please update git submodules and try again.") + endif( ) diff --git a/sci-libs/hipFFT/hipFFT-4.3.0.ebuild b/sci-libs/hipFFT/hipFFT-4.3.0.ebuild new file mode 100644 index 000000000000..5f7d3a95f58a --- /dev/null +++ b/sci-libs/hipFFT/hipFFT-4.3.0.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake flag-o-matic + +DESCRIPTION="CU / ROCM agnostic hip FFT implementation" +HOMEPAGE="https://github.com/ROCmSoftwarePlatform/hipFFT" +SRC_URI="https://github.com/ROCmSoftwarePlatform/hipFFT/archive/refs/tags/rocm-${PV}.tar.gz -> hipFFT-rocm-${PV}.tar.gz + test? ( https://github.com/ROCmSoftwarePlatform/rocFFT/archive/rocm-${PV}.tar.gz -> rocFFT-${PV}.tar.gz )" + +LICENSE="MIT" +KEYWORDS="~amd64" +IUSE="benchmark test" +SLOT="0/$(ver_cut 1-2)" + +RESTRICT="!test? ( test )" + +RDEPEND="dev-util/hip:${SLOT} + sci-libs/rocFFT:${SLOT}" +DEPEND="${RDEPEND}" +BDEPEND=" + test? ( + dev-cpp/gtest + dev-libs/boost +)" + +S="${WORKDIR}/hipFFT-rocm-${PV}" + +PATCHES=( + "${FILESDIR}/${PN}-4.3.0-gentoo-install-locations.patch" + "${FILESDIR}/${PN}-4.3.0-remove-git-dependency.patch" + "${FILESDIR}/${PN}-4.3.0-add-complex-header.patch" +) + +src_prepare() { + use test && rmdir rocFFT && ln -s ../rocFFT-rocm-${PV} rocFFT + eapply_user + cmake_src_prepare +} + +src_configure() { + # Grant access to the device + addwrite /dev/kfd + addpredict /dev/dri/ + + local mycmakeargs=( + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr" + -DCMAKE_INSTALL_INCLUDEDIR="include/hipfft" + -DCMAKE_SKIP_RPATH=ON + -DBUILD_CLIENTS_TESTS=$(usex test ON OFF) + -DBUILD_CLIENTS_RIDER=$(usex benchmark ON OFF) + ${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 hipfft-test" + LD_LIBRARY_PATH=${BUILD_DIR}/library ./hipfft-test || die +} + +src_install() { + cmake_src_install + if use benchmark; then + cd "${BUILD_DIR}/clients/staging" || die + dobin hipfft-rider + fi +} diff --git a/sci-libs/hipFFT/metadata.xml b/sci-libs/hipFFT/metadata.xml new file mode 100644 index 000000000000..7839d343e80f --- /dev/null +++ b/sci-libs/hipFFT/metadata.xml @@ -0,0 +1,22 @@ + + + + + sci@gentoo.org + Gentoo Science Project + + + gentoo@holzke.net + Wilfried Holzke + + + xgreenlandforwyy@gmail.com + Yiyang Wu + + + ROCmSoftwarePlatform/hipFFT + + + Build and install benchmark programs hipfft-rider. + + -- cgit v1.2.3