mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
sci-libs/rocSPARSE: add 7.2.0
Signed-off-by: Sv. Lockal <lockalsash@gmail.com> Part-of: https://github.com/gentoo/gentoo/pull/45826 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
@@ -26,3 +26,4 @@ DIST rocSPARSE_scircuit.tar.gz 8635362 BLAKE2B 3f1d6e35a6a774664bd653dd466fa3c07
|
||||
DIST rocSPARSE_shipsec1.tar.gz 22175245 BLAKE2B f1d34482b8c3d3ee48033097d7d6f9b648e3c396a5ab2379efdc7de218adec519a235e2e94904f85a4f24c8d4ff15af096ca089379e00db47519023f64b85c16 SHA512 e027097e74f8ffc058339855b1c38cab52c68b661058318b429487e7188e11e907f6734894f9c71d1e38d262986525fba8d0f165bc0a1b4632d7e25be8db4f17
|
||||
DIST rocSPARSE_sme3Dc.tar.gz 42483568 BLAKE2B f0d16b58f6ea28e67727637697a812a0b10d524c73aeb82f702411b9ebaea3670780e762ed0701aae80c6829e950233f74555523ef2d6c5740b007c7a65c03d4 SHA512 c5a0be2db919a45310a73ea1dd96d0d30168135f887a8c5c3d7ca11e2c3d12ea7d1331be20968d0135bd18da4ef2b043db68eeb7567b6f0f8daf782b87083c3a
|
||||
DIST rocSPARSE_webbase-1M.tar.gz 11360460 BLAKE2B 01b1d06adb5fb32fa402ed888d25a7e52a34779b078fc2e21c60e688d03579bb4ca8694f5ee4a824f7859952d55590a1fd9449dc80d6fe894d7b662b918882d4 SHA512 6401a965b8f6dd5392879956fde3c94f77fe1801a4a43428c03b6d639031575c647eab47b1babe53f4ecc2c3b8fc183e8339536b78dcd0d94ce62bfedd87c161
|
||||
DIST rocsparse-7.2.0.tar.gz 1731214 BLAKE2B 37f9b44d5195314c3bcf2f74f70d8caaad2ecf6cc092d0a6c009e835392cfc9f20b5de05e99388cfa17df67193b65039bc0887bfe9f14ae6f7b3a977963f7fdc SHA512 ba33e7f3440699dbfe45d80f1ca35df28103f5b6099f1e46f4488409775a2743f6db2f0daa9e3a85defe83374654e52499d881b694a7638311663d805d5438d0
|
||||
|
||||
129
sci-libs/rocSPARSE/rocSPARSE-7.2.0.ebuild
Normal file
129
sci-libs/rocSPARSE/rocSPARSE-7.2.0.ebuild
Normal file
@@ -0,0 +1,129 @@
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10..14} )
|
||||
ROCM_VERSION=${PV}
|
||||
|
||||
inherit cmake edo flag-o-matic python-any-r1 toolchain-funcs rocm
|
||||
|
||||
DESCRIPTION="Basic Linear Algebra Subroutines for sparse computation"
|
||||
HOMEPAGE="https://github.com/ROCm/rocm-libraries/tree/develop/projects/rocsparse"
|
||||
|
||||
SRC_URI="https://github.com/ROCm/rocm-libraries/releases/download/rocm-${PV}/rocsparse.tar.gz -> rocsparse-${PV}.tar.gz
|
||||
test? (
|
||||
http://sparse-files.engr.tamu.edu/MM/SNAP/amazon0312.tar.gz -> ${PN}_amazon0312.tar.gz
|
||||
http://sparse-files.engr.tamu.edu/MM/Muite/Chebyshev4.tar.gz -> ${PN}_Chebyshev4.tar.gz
|
||||
http://sparse-files.engr.tamu.edu/MM/FEMLAB/sme3Dc.tar.gz -> ${PN}_sme3Dc.tar.gz
|
||||
http://sparse-files.engr.tamu.edu/MM/Williams/webbase-1M.tar.gz -> ${PN}_webbase-1M.tar.gz
|
||||
http://sparse-files.engr.tamu.edu/MM/Bova/rma10.tar.gz -> ${PN}_rma10.tar.gz
|
||||
http://sparse-files.engr.tamu.edu/MM/JGD_BIBD/bibd_22_8.tar.gz -> ${PN}_bibd_22_8.tar.gz
|
||||
http://sparse-files.engr.tamu.edu/MM/Williams/mac_econ_fwd500.tar.gz -> ${PN}_mac_econ_fwd500.tar.gz
|
||||
http://sparse-files.engr.tamu.edu/MM/Williams/mc2depi.tar.gz -> ${PN}_mc2depi.tar.gz
|
||||
http://sparse-files.engr.tamu.edu/MM/Hamm/scircuit.tar.gz -> ${PN}_scircuit.tar.gz
|
||||
http://sparse-files.engr.tamu.edu/MM/Sandia/ASIC_320k.tar.gz -> ${PN}_ASIC_320k.tar.gz
|
||||
http://sparse-files.engr.tamu.edu/MM/GHS_psdef/bmwcra_1.tar.gz -> ${PN}_bmwcra_1.tar.gz
|
||||
http://sparse-files.engr.tamu.edu/MM/HB/nos1.tar.gz -> ${PN}_nos1.tar.gz
|
||||
http://sparse-files.engr.tamu.edu/MM/HB/nos2.tar.gz -> ${PN}_nos2.tar.gz
|
||||
http://sparse-files.engr.tamu.edu/MM/HB/nos3.tar.gz -> ${PN}_nos3.tar.gz
|
||||
http://sparse-files.engr.tamu.edu/MM/HB/nos4.tar.gz -> ${PN}_nos4.tar.gz
|
||||
http://sparse-files.engr.tamu.edu/MM/HB/nos5.tar.gz -> ${PN}_nos5.tar.gz
|
||||
http://sparse-files.engr.tamu.edu/MM/HB/nos6.tar.gz -> ${PN}_nos6.tar.gz
|
||||
http://sparse-files.engr.tamu.edu/MM/HB/nos7.tar.gz -> ${PN}_nos7.tar.gz
|
||||
http://sparse-files.engr.tamu.edu/MM/DNVS/shipsec1.tar.gz -> ${PN}_shipsec1.tar.gz
|
||||
http://sparse-files.engr.tamu.edu/MM/Cote/mplate.tar.gz -> ${PN}_mplate.tar.gz
|
||||
http://sparse-files.engr.tamu.edu/MM/Bai/qc2534.tar.gz -> ${PN}_qc2534.tar.gz
|
||||
http://sparse-files.engr.tamu.edu/MM/Chevron/Chevron2.tar.gz -> ${PN}_Chevron2.tar.gz
|
||||
http://sparse-files.engr.tamu.edu/MM/Chevron/Chevron3.tar.gz -> ${PN}_Chevron3.tar.gz
|
||||
http://sparse-files.engr.tamu.edu/MM/Chevron/Chevron4.tar.gz -> ${PN}_Chevron4.tar.gz
|
||||
)"
|
||||
|
||||
S="${WORKDIR}/rocsparse"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0/$(ver_cut 1-2)"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="benchmark test"
|
||||
REQUIRED_USE="${ROCM_REQUIRED_USE}"
|
||||
|
||||
RDEPEND="
|
||||
dev-util/hip:${SLOT}
|
||||
sci-libs/rocPRIM:${SLOT}
|
||||
sci-libs/rocBLAS:${SLOT}
|
||||
dev-util/roctracer:${SLOT}
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
BDEPEND="test? (
|
||||
dev-cpp/gtest
|
||||
>=dev-build/cmake-3.22
|
||||
$(python_gen_any_dep "dev-python/pyyaml[\${PYTHON_USEDEP}]")
|
||||
)
|
||||
"
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
python_check_deps() {
|
||||
if use test; then
|
||||
python_has_version "dev-python/pyyaml[${PYTHON_USEDEP}]"
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# If BUILD_WITH_ROCBLAS is ON, make rocblas required (with any version)
|
||||
# Bug: https://github.com/ROCm/rocm-libraries/issues/2074
|
||||
sed -e "/find_package(rocblas / s/ 4.1.0 QUIET/ REQUIRED/" -i CMakeLists.txt || die
|
||||
|
||||
cmake_src_prepare
|
||||
|
||||
# Test need download data from https://sparse-files.engr.tamu.edu (or other mirror site), check MD5,
|
||||
# unpack and convert them into csr format
|
||||
# This process is handled default by ${S}/cmake/ClientMatrices.cmake, but should be the responsibility of portage.
|
||||
if use test; then
|
||||
mkdir -p "${BUILD_DIR}"/clients/matrices
|
||||
# compile and use the mtx2csr converter. Do not use any optimization flags, because it causes error!
|
||||
edo $(tc-getCXX) deps/convert.cpp -o deps/convert
|
||||
find "${WORKDIR}" -maxdepth 2 -regextype egrep -regex ".*/(.*)/\1\.mtx" -print0 |
|
||||
while IFS= read -r -d '' mtxfile; do
|
||||
destination=${BUILD_DIR}/clients/matrices/$(basename -s '.mtx' "${mtxfile}").csr
|
||||
ebegin "Converting ${mtxfile} to ${destination}"
|
||||
deps/convert "${mtxfile}" "${destination}"
|
||||
eend $?
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
rocm_use_clang
|
||||
|
||||
# tons of warnings in tests
|
||||
append-cxxflags -Wno-explicit-specialization-storage-class
|
||||
|
||||
local mycmakeargs=(
|
||||
-DCMAKE_SKIP_RPATH=ON
|
||||
-DGPU_TARGETS="$(get_amdgpu_flags)"
|
||||
-DBUILD_CLIENTS_SAMPLES=OFF
|
||||
-DBUILD_CLIENTS_TESTS=$(usex test ON OFF)
|
||||
-DBUILD_CLIENTS_BENCHMARKS=$(usex benchmark ON OFF)
|
||||
-DBUILD_WITH_ROCBLAS=ON
|
||||
)
|
||||
|
||||
use test && mycmakeargs+=( -DPython3_EXECUTABLE=${PYTHON} )
|
||||
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_test() {
|
||||
check_amdgpu
|
||||
cd "${BUILD_DIR}/clients/staging" || die
|
||||
LD_LIBRARY_PATH="${BUILD_DIR}/library" edob ./rocsparse-test
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake_src_install
|
||||
|
||||
if use benchmark; then
|
||||
cd "${BUILD_DIR}" || die
|
||||
dobin clients/staging/rocsparse-bench
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user