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 A373815823F for ; Sun, 19 Nov 2023 16:32:40 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AA95B2BC02E; Sun, 19 Nov 2023 16:32:39 +0000 (UTC) Received: from smtp.gentoo.org (smtp.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)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8FC312BC02E for ; Sun, 19 Nov 2023 16:32:39 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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 C52A0335D2B for ; Sun, 19 Nov 2023 16:32:38 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id EE3BD139E for ; Sun, 19 Nov 2023 16:32:36 +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: <1700411536.908cf70bee0e7cc186580e2d58bb17bb2b0ee0dc.heroxbd@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/rocRAND/files/, sci-libs/rocRAND/ X-VCS-Repository: repo/gentoo X-VCS-Files: sci-libs/rocRAND/Manifest sci-libs/rocRAND/files/rocRAND-5.7.1_fix_generator_alignment.patch sci-libs/rocRAND/rocRAND-5.7.1.ebuild X-VCS-Directories: sci-libs/rocRAND/ sci-libs/rocRAND/files/ X-VCS-Committer: heroxbd X-VCS-Committer-Name: Benda XU X-VCS-Revision: 908cf70bee0e7cc186580e2d58bb17bb2b0ee0dc X-VCS-Branch: master Date: Sun, 19 Nov 2023 16:32:36 +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: e78079e2-21e5-434c-a983-ba6749ea8eff X-Archives-Hash: 266e5aa642b4eb8a7665fced53264e14 commit: 908cf70bee0e7cc186580e2d58bb17bb2b0ee0dc Author: Sv. Lockal gmail com> AuthorDate: Wed Oct 18 19:03:41 2023 +0000 Commit: Benda XU gentoo org> CommitDate: Sun Nov 19 16:32:16 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=908cf70b sci-libs/rocRAND: add 5.7.1 and fix_generator_alignements.patch Bug: https://github.com/gentoo/gentoo/pull/33400 Signed-off-by: Sv. Lockal gmail.com> Signed-off-by: Benda Xu gentoo.org> sci-libs/rocRAND/Manifest | 1 + .../rocRAND-5.7.1_fix_generator_alignment.patch | 16 ++++++ sci-libs/rocRAND/rocRAND-5.7.1.ebuild | 67 ++++++++++++++++++++++ 3 files changed, 84 insertions(+) diff --git a/sci-libs/rocRAND/Manifest b/sci-libs/rocRAND/Manifest index e49a7db31d6a..9c1124f37a03 100644 --- a/sci-libs/rocRAND/Manifest +++ b/sci-libs/rocRAND/Manifest @@ -1,3 +1,4 @@ DIST hipRAND-de941a7eb9ede2a862d719cd3ca23234a3692d07.tar.gz 80820 BLAKE2B f2894187455cf1da70c486e9efc336a01dc53589c56afe994858b2344c1e74e8d35260f70ad9cd80c5da1103dd9e98da6f5f2bf8e1ddf97023effc8a434a76ce SHA512 cdc70799ddca456c37c2a65875b98acff74800aa2b4f28d77b27c38c32428dd5edb2837bf88bfb6fcc32bdae7f2b27f1b547831bad98101b04959b7ba6b74a85 DIST rocRAND-5.1.3.tar.gz 11729425 BLAKE2B f61aaedb7b72ceba3868a2069c93db1e2cd88a7a0188a9d5a33f520af3b42235c0dca62495460fd5e7abbca5fe7acc01acfdc90e53ae9a6e45128df5da472f49 SHA512 12859e52b79e40fcd1fb97d0915c191bbbc24e31e00aac4dbeecb625f9978a00ece3d7a42d0f9d37516031c1fbeb66e14dcd476ea83fe32fb13e0dd5c3964a28 DIST rocRAND-5.6.0.tar.gz 23189913 BLAKE2B 2418a90c323f483d1f92630df7134bc060b9052f580259924e79680a7ec37857574973dda69dc3c28fdd5b88a5fc1d29757ed637fcde0730c53b9a5f09668aba SHA512 cccd26a6b80a7705644803a85dad3a43de3f4e2f73f964f2b5aa410f71d3782b68d6cc1ad60b7f7be5193a94098ed3fa25cad30c3acbc141522cdd738d3328a5 +DIST rocRAND-5.7.1.tar.gz 23189653 BLAKE2B c70ab6f3b718c2430394f63b93bee15fa72daae704883fdb203b98b0dc4763b46bc27886af64c48bf4ebe8da9b919158b8cd346f70f9b76bf0492ce3b2c1e20e SHA512 4d74bce9fbd3cb45e3f057d38df747270c6986fea7ad524f7a88109b6a53a4ea5dcd60d4bbf2364888501e9444245fb6898bb79fccad0e37b61e819e8c4ed863 diff --git a/sci-libs/rocRAND/files/rocRAND-5.7.1_fix_generator_alignment.patch b/sci-libs/rocRAND/files/rocRAND-5.7.1_fix_generator_alignment.patch new file mode 100644 index 000000000000..84b58266220c --- /dev/null +++ b/sci-libs/rocRAND/files/rocRAND-5.7.1_fix_generator_alignment.patch @@ -0,0 +1,16 @@ +Fix crashes due to unaligned allocations in heap with new of structs when AVX2 or AVX512 is used. +This patch takes the simplest approach just shifts responsibility to the standard. +Similar approach in Eigen is named defined as: EIGEN_HAS_CXX17_OVERALIGN. + +Upstream bug: https://github.com/ROCmSoftwarePlatform/rocRAND/issues/403 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -119,7 +119,7 @@ endif() + option(DISABLE_WERROR "Disable building with Werror" ON) + + # Build CXX flags +-set(CMAKE_CXX_STANDARD 11) ++set(CMAKE_CXX_STANDARD 17) + set(CMAKE_CXX_STANDARD_REQUIRED ON) + set(CMAKE_CXX_EXTENSIONS OFF) + if(DISABLE_WERROR) diff --git a/sci-libs/rocRAND/rocRAND-5.7.1.ebuild b/sci-libs/rocRAND/rocRAND-5.7.1.ebuild new file mode 100644 index 000000000000..f2fc17ed6222 --- /dev/null +++ b/sci-libs/rocRAND/rocRAND-5.7.1.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ROCM_VERSION=${PV} + +inherit cmake rocm + +DESCRIPTION="Generate pseudo-random and quasi-random numbers" +HOMEPAGE="https://github.com/ROCmSoftwarePlatform/rocRAND" +SRC_URI="https://github.com/ROCmSoftwarePlatform/${PN}/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +KEYWORDS="~amd64" +SLOT="0/$(ver_cut 1-2)" +IUSE="benchmark test" +REQUIRED_USE="${ROCM_REQUIRED_USE}" + +RESTRICT="!test? ( test )" + +PATCHES=( + "${FILESDIR}"/${PN}-5.4.2_stdint-gcc13.patch + "${FILESDIR}"/${PN}-5.7.1_fix_generator_alignment.patch +) + +RDEPEND="dev-util/hip" +DEPEND="${RDEPEND} +dev-util/rocm-cmake +test? ( dev-cpp/gtest )" +BDEPEND="dev-util/rocm-cmake +>=dev-util/cmake-3.22" + +S="${WORKDIR}/rocRAND-rocm-${PV}" + +src_configure() { + addpredict /dev/kfd + addpredict /dev/dri/ + + local mycmakeargs=( + -DCMAKE_SKIP_RPATH=ON + -DAMDGPU_TARGETS="$(get_amdgpu_flags)" + -DBUILD_HIPRAND=OFF + -DBUILD_FILE_REORG_BACKWARD_COMPATIBILITY=OFF + -DROCM_SYMLINK_LIBS=OFF + -DBUILD_TEST=$(usex test ON OFF) + -DBUILD_BENCHMARK=$(usex benchmark ON OFF) + ) + + CXX=hipcc cmake_src_configure +} + +src_test() { + check_amdgpu + export LD_LIBRARY_PATH="${BUILD_DIR}/library" + # uses HMM to fit tests to default <512M iGPU VRAM + MAKEOPTS="-j1" ROCRAND_USE_HMM="1" cmake_src_test +} + +src_install() { + cmake_src_install + + if use benchmark; then + cd "${BUILD_DIR}"/benchmark + dobin benchmark_rocrand_* + fi +}