diff options
author | Patrick Lauer <patrick@gentoo.org> | 2024-11-09 21:06:19 +0000 |
---|---|---|
committer | Patrick Lauer <patrick@gentoo.org> | 2024-11-09 21:08:24 +0000 |
commit | 5dfd33faefc086e8c5b056f3591eec3c55642d5e (patch) | |
tree | 6d0a27c8e175835a4cc392c3edcc51c237f7688a /sci-libs/rocBLAS/rocBLAS-6.1.1-r1.ebuild | |
parent | dev-util/Tensile: Fix runtime behaviour (diff) | |
download | gentoo-5dfd33faefc086e8c5b056f3591eec3c55642d5e.tar.gz gentoo-5dfd33faefc086e8c5b056f3591eec3c55642d5e.tar.bz2 gentoo-5dfd33faefc086e8c5b056f3591eec3c55642d5e.zip |
sci-libs/rocBLAS: Restrict to llvm-18
Explodes violently with llvm-19
Signed-off-by: Patrick Lauer <patrick@gentoo.org>
Diffstat (limited to 'sci-libs/rocBLAS/rocBLAS-6.1.1-r1.ebuild')
-rw-r--r-- | sci-libs/rocBLAS/rocBLAS-6.1.1-r1.ebuild | 117 |
1 files changed, 117 insertions, 0 deletions
diff --git a/sci-libs/rocBLAS/rocBLAS-6.1.1-r1.ebuild b/sci-libs/rocBLAS/rocBLAS-6.1.1-r1.ebuild new file mode 100644 index 000000000000..a8f1f55aefba --- /dev/null +++ b/sci-libs/rocBLAS/rocBLAS-6.1.1-r1.ebuild @@ -0,0 +1,117 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DOCS_BUILDER="doxygen" +DOCS_DIR="docs/.doxygen" +DOCS_DEPEND="media-gfx/graphviz" +LLVM_COMPAT=( 18 ) +ROCM_VERSION=${PV} + +inherit cmake docs edo multiprocessing rocm llvm-r1 + +DESCRIPTION="AMD's library for BLAS on ROCm" +HOMEPAGE="https://github.com/ROCmSoftwarePlatform/rocBLAS" +SRC_URI="https://github.com/ROCmSoftwarePlatform/rocBLAS/archive/rocm-${PV}.tar.gz -> rocm-${P}.tar.gz" +S="${WORKDIR}/${PN}-rocm-${PV}" + +LICENSE="BSD" +SLOT="0/$(ver_cut 1-2)" +KEYWORDS="~amd64" +IUSE="benchmark test video_cards_amdgpu" +RESTRICT="!test? ( test )" +REQUIRED_USE="${ROCM_REQUIRED_USE}" + +BDEPEND=" + >=dev-build/rocm-cmake-5.3 + video_cards_amdgpu? ( + dev-util/Tensile:${SLOT} + ) + test? ( dev-cpp/gtest ) +" + +DEPEND=" + >=dev-cpp/msgpack-cxx-6.0.0 + =dev-util/hip-6* + test? ( + virtual/blas + dev-cpp/gtest + sys-libs/libomp + ) + benchmark? ( + virtual/blas + sys-libs/libomp + ) +" + +QA_FLAGS_IGNORED="/usr/lib64/rocblas/library/.*" + +PATCHES=( + "${FILESDIR}"/${PN}-5.4.2-cpp_lib_filesystem.patch + "${FILESDIR}"/${PN}-5.4.2-add-missing-header.patch + "${FILESDIR}"/${PN}-5.4.2-link-cblas.patch + "${FILESDIR}"/${PN}-6.0.2-expand-isa-compatibility.patch + ) + +src_prepare() { + cmake_src_prepare + sed -e "s:,-rpath=.*\":\":" -i clients/CMakeLists.txt || die +} + +src_configure() { + rocm_use_hipcc + + local mycmakeargs=( + -DCMAKE_SKIP_RPATH=ON + -DBUILD_FILE_REORG_BACKWARD_COMPATIBILITY=OFF + -DROCM_SYMLINK_LIBS=OFF + -DAMDGPU_TARGETS="$(get_amdgpu_flags)" + -DBUILD_WITH_TENSILE="$(usex video_cards_amdgpu)" + -DCMAKE_INSTALL_INCLUDEDIR="include/rocblas" + -DBUILD_CLIENTS_SAMPLES=OFF + -DBUILD_CLIENTS_TESTS="$(usex test)" + -DBUILD_CLIENTS_BENCHMARKS="$(usex benchmark)" + -DBUILD_WITH_PIP=OFF + ) + + if usex video_cards_amdgpu; then + mycmakeargs+=( + -DTensile_LOGIC="asm_full" + -DTensile_COMPILER="hipcc" + -DTensile_LIBRARY_FORMAT="msgpack" + -DTensile_CODE_OBJECT_VERSION="default" + -DTensile_ROOT="${EPREFIX}/usr/share/Tensile" + -DTensile_CPU_THREADS="$(makeopts_jobs)" + ) + fi + + cmake_src_configure +} + +src_compile() { + docs_compile + cmake_src_compile +} + +src_test() { + check_amdgpu + cd "${BUILD_DIR}"/clients/staging || die + export ROCBLAS_TEST_TIMEOUT=3600 ROCBLAS_TENSILE_LIBPATH="${BUILD_DIR}/Tensile/library" + export LD_LIBRARY_PATH="${BUILD_DIR}/clients:${BUILD_DIR}/library/src" + edob "./${PN,,}-test" +} + +src_install() { + cmake_src_install + + if use benchmark; then + cd "${BUILD_DIR}" || die + dolib.a clients/librocblas_fortran_client.a + dobin clients/staging/rocblas-bench + fi + + # Stop llvm-strip from removing .strtab section from *.hsaco files, + # otherwise rocclr/elf/elf.cpp complains with "failed: null sections(STRTAB)" and crashes + dostrip -x "/usr/$(get_libdir)/rocblas/library/" +} |