From add278b9601ff9e4af091c91c851ee46a185be8f Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 10 Sep 2024 12:30:41 +0100 Subject: gentoo auto-resync : 10:09:2024 - 12:30:41 --- sci-libs/hipBLASLt/Manifest | 5 +- .../files/hipBLASLt-6.1.1-fix-libcxx.patch | 57 ++++++++++ .../hipBLASLt/files/hipBLASLt-6.1.1-no-arch.patch | 5 +- sci-libs/hipBLASLt/hipBLASLt-6.1.1-r1.ebuild | 123 +++++++++++++++++++++ sci-libs/hipBLASLt/hipBLASLt-6.1.1.ebuild | 120 -------------------- 5 files changed, 186 insertions(+), 124 deletions(-) create mode 100644 sci-libs/hipBLASLt/files/hipBLASLt-6.1.1-fix-libcxx.patch create mode 100644 sci-libs/hipBLASLt/hipBLASLt-6.1.1-r1.ebuild delete mode 100644 sci-libs/hipBLASLt/hipBLASLt-6.1.1.ebuild (limited to 'sci-libs/hipBLASLt') diff --git a/sci-libs/hipBLASLt/Manifest b/sci-libs/hipBLASLt/Manifest index 23aeb5897dba..76c27c7af0a5 100644 --- a/sci-libs/hipBLASLt/Manifest +++ b/sci-libs/hipBLASLt/Manifest @@ -1,8 +1,9 @@ AUX hipBLASLt-6.1.1-clang-19.patch 341 BLAKE2B 7e486930db9a406e3665eb4d276c0df4790018ce4f8f6f7a72bd986da61a0ccfc6619ea0de6a2a488cb1ee64f92470aaa337b4590a5be0044be0bf9a014bad25 SHA512 894596742720d947fb25fd3332c34efbb5cc2fdc790c29919e0d65df85d2add6f1ac2a6c7b8f4796428bc69197af0f6227132a6711f3106e9a7b84f285ecfa83 +AUX hipBLASLt-6.1.1-fix-libcxx.patch 2165 BLAKE2B 59b8e635bb9211453c3b18e960f3b773e62d30ec1c3a2cfc158feceb8042c0383d5b1deb6c133fda09504e2c633b934ec60f04a07a8372ec7d72eea6d60ef0ce SHA512 ae7763385b80cd475aa10a23ba4aa156d500cd7dfca0607a8b55f2b4c26bbfa5cf1a03fc15a5d74be91ebb3510fbc4e577a05003b55bc109c3fdf835f0f017f0 AUX hipBLASLt-6.1.1-fix-msgpack-dependency.patch 1094 BLAKE2B 9606ba01ead2aefd52ec2d2f424c735d361ffab67fc1bc2a6800cd81a34ae7e8d3a189fa79ef84f2caf4d6186687d6eddd8083ca8a912beaa0bce0ae72ad0393 SHA512 8b1b383611a88d9af6be546b985d4d460be830c370ec149eb7c4ae56dfedb57583ea463470029d099a779161f8b582637cf62ec0fbbd3617023002cc903cf82c AUX hipBLASLt-6.1.1-gentoopath.patch 724 BLAKE2B ac3acc8c444de7a8072337cadb3c9976d94cd019a1ecf51a18a4ccd59500efd4de798f710738c818f495dd018d0c8885e8754fede2d308a50c355f2a39236370 SHA512 59358f5d0c22d9188cf4e70215c0e42415831b0e804709f1c97d42fce15049edb3e58320c252b413b016490ed72fc27ab59660880fe71e4226bace0808529b32 -AUX hipBLASLt-6.1.1-no-arch.patch 1967 BLAKE2B d73ede48e0254a99df1b632437a4d820d1f639600bdda216d38c74dca38e6234a3ef4dd8bdc3a1e0450cfd64e07c9c2806f5378ec1097be0e130f6f6b5c4b934 SHA512 a4aae7c3117821e72ce63b72b2017eedb414046c9e0f52c2cb16c8a6c7aa84efcd1960adfe85dd89f3a247c8f7bccc7a586e36d494c6e9bc1a8fbd39f6febe87 +AUX hipBLASLt-6.1.1-no-arch.patch 2082 BLAKE2B c71e2c112c24f0c82170852f7fe5381e99e13501656e3519cd8438fe0ae369c95b16b9f4339d2ff0dc42eaf4f4a8cbdbac57c0b72856a9db6bd5344cf3fa8548 SHA512 a758ba61f52080ecae8be8e879a9e56a71b672b7fa1514573f4498520113d40fd1fb323baeeba28a4239e2a66dced478430a2c556510c4d70d8a0d4b2add2386 AUX hipBLASLt-6.1.1-no-git.patch 365 BLAKE2B 47b7f23a4ce0919cfd6d2d1a946d98822db912571d908c82d35d734ea2bfee15a1e537f50e8fb2ada474e819274654462b26f97fcb5dc010354df9f6ba30c377 SHA512 a44aa357bdc035ffcfe4d30fb81db205dfcfd28c00543a4c55f7f61f5a90ae228bcfce71be2f4290e842f60f534287b2f25a4cd2a27369ddbbaf1e0d1171a7d5 DIST hipBLASLt-6.1.1.tar.gz 78448557 BLAKE2B 08ac9ce45d7d1e4384a36939af22f65589ed87e25b4db77f5f7ff5fbe65b8070e9c55fbb09db3b7bd49be98981dc8bf939e646ea27571bf1d1ccfa52a50b0f92 SHA512 1aa3a1cb8e9c7f653db66909b38be065b7386b97d4bd6b52ecc6c2bf72c6cdfabde6f12ebc6016b5fa195f979359af875eda8d54ea6772329312cb357bc2ebc5 -EBUILD hipBLASLt-6.1.1.ebuild 3260 BLAKE2B c22ce042c79793e78b9e91bea880ec853d6faa6cda427393729f39ba8fd9af491454da04cfd6330c85cb6bf7b8bd1034c7dac120d2dba1d1be0956c56d40b761 SHA512 f640b0c0db0089627341f102b87c23b892874cd90d49d89b3257234c65105db2c377c835b8e2876d3034401112303a7f17d025f7a268c410a948f9cb38b77814 +EBUILD hipBLASLt-6.1.1-r1.ebuild 3311 BLAKE2B ca125cd335e79d204cfbab86bfb9a1a7313fbb25af68fc71beb0a3ee94ada2475639e5e5b2b766aca46b014d9771d2529edc2f551e7cb55abf162dbda58a050f SHA512 14a459eac3bce051a35fd0a4c4d99c9352e63fa79c9e77b03ffc6dce00d005c145bd64c2cde6826001fd9d1ae231fc4bc3d9b8f08f567fe7682da05f6f39f6ab MISC metadata.xml 416 BLAKE2B 72248e12cd10654326a6685df0e03c508d413d2728d8e687eb8ad3d8dc928e518e3ba21df1ee774282c45363f61eed98b47b862cab2354d743ca530047084281 SHA512 02acf2d17f2c56f09c599fcde965bd5ceb07c335d7c2b4fd57a06a6b1a591a250d22de7a002f299cc99cacd1fd72f183adf51fc1b9ebff1338c6d83450da9c3b diff --git a/sci-libs/hipBLASLt/files/hipBLASLt-6.1.1-fix-libcxx.patch b/sci-libs/hipBLASLt/files/hipBLASLt-6.1.1-fix-libcxx.patch new file mode 100644 index 000000000000..32aa65127e84 --- /dev/null +++ b/sci-libs/hipBLASLt/files/hipBLASLt-6.1.1-fix-libcxx.patch @@ -0,0 +1,57 @@ +# libc++ issue: https://github.com/llvm/llvm-project/issues/98734 +diff --git a/library/src/amd_detail/rocblaslt/src/rocblaslt_mat.cpp b/library/src/amd_detail/rocblaslt/src/rocblaslt_mat.cpp +index 82cc81f..94e62d4 100644 +--- a/library/src/amd_detail/rocblaslt/src/rocblaslt_mat.cpp ++++ b/library/src/amd_detail/rocblaslt/src/rocblaslt_mat.cpp +@@ -28,6 +28,7 @@ + #include "handle.h" + #include "rocblaslt_mat_utils.hpp" + #include "tensile_host.hpp" ++#include + + #include + +@@ -602,7 +603,7 @@ rocblaslt_status + std::vector ldc_vec, batch_stride_c_vec, num_batches_c_vec; + std::vector ldd_vec, batch_stride_d_vec, num_batches_d_vec; + std::vector lde_vec, batch_stride_e_vec, num_batches_e_vec; +- std::vector alpha_1(matmul_descr.size()); ++ std::vector> alpha_1(matmul_descr.size()); + + std::vector gradient_vec; + +@@ -692,10 +693,10 @@ rocblaslt_status + return validArgs; + + const void* alphaTmp = nullptr; +- memset(alpha_1[i], 0, sizeof(int8_t) * 16); ++ memset(alpha_1[i].data(), 0, sizeof(int8_t) * 16); + if(scaleAlphaVec) + { +- setTo1(compute_type, (void*)alpha_1[i], &alphaTmp); ++ setTo1(compute_type, (void*)alpha_1[i].data(), &alphaTmp); + } + else + { +@@ -867,7 +868,7 @@ rocblaslt_status + std::vector lde_vec, batch_stride_e_vec, num_batches_e_vec; + std::vector gradient_vec; + +- std::vector alpha_1(m.size()); ++ std::vector> alpha_1(m.size()); + + for(int i = 0; i < m.size(); i++) + { +@@ -924,10 +925,10 @@ rocblaslt_status + return validArgs; + + const void* alphaTmp = nullptr; +- memset(alpha_1[i], 0, sizeof(int8_t) * 16); ++ memset(alpha_1[i].data(), 0, sizeof(int8_t) * 16); + if(scaleAlphaVec) + { +- setTo1(compute_type, (void*)alpha_1[i], &alphaTmp); ++ setTo1(compute_type, (void*)alpha_1[i].data(), &alphaTmp); + } + else + { diff --git a/sci-libs/hipBLASLt/files/hipBLASLt-6.1.1-no-arch.patch b/sci-libs/hipBLASLt/files/hipBLASLt-6.1.1-no-arch.patch index 6bd608c94d0e..7f1e61d2dc0f 100644 --- a/sci-libs/hipBLASLt/files/hipBLASLt-6.1.1-no-arch.patch +++ b/sci-libs/hipBLASLt/files/hipBLASLt-6.1.1-no-arch.patch @@ -37,7 +37,7 @@ Related upstream bug: https://github.com/ROCm/hipBLASLt/issues/535 else() --- a/library/src/amd_detail/rocblaslt/src/CMakeLists.txt +++ b/library/src/amd_detail/rocblaslt/src/CMakeLists.txt -@@ -100,7 +100,16 @@ if( BUILD_WITH_TENSILE ) +@@ -100,7 +100,17 @@ if( BUILD_WITH_TENSILE ) set( Tensile_INC ${CMAKE_CURRENT_SOURCE_DIR}/src/amd_detail/rocblaslt/src/Tensile ) @@ -45,7 +45,8 @@ Related upstream bug: https://github.com/ROCm/hipBLASLt/issues/535 + set_target_properties( TensileHost PROPERTIES POSITION_INDEPENDENT_CODE ON ) + set( Tensile_SRC -+ src/amd_detail/rocblaslt/src/tensile_host.cpp ++ ${CMAKE_CURRENT_SOURCE_DIR}/src/amd_detail/rocblaslt/src/tensile_host.cpp ++ ${PROJECT_SOURCE_DIR}/tensilelite/Tensile/Source/lib/source/msgpack/MessagePack.cpp + ) + + set( Tensile_INC diff --git a/sci-libs/hipBLASLt/hipBLASLt-6.1.1-r1.ebuild b/sci-libs/hipBLASLt/hipBLASLt-6.1.1-r1.ebuild new file mode 100644 index 000000000000..574f185be5d7 --- /dev/null +++ b/sci-libs/hipBLASLt/hipBLASLt-6.1.1-r1.ebuild @@ -0,0 +1,123 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ROCM_SKIP_GLOBALS=1 +PYTHON_COMPAT=( python3_{10..13} ) + +# gfx941 and gfx942 assembly uses directives of LLVM >= 18.1.0 +LLVM_COMPAT=( 18 ) + +inherit cmake python-any-r1 llvm-r1 prefix rocm +DESCRIPTION="General matrix-matrix operations library for AMD Instinct accelerators" +HOMEPAGE="https://github.com/ROCm/hipBLASLt" +SRC_URI="https://github.com/ROCm/hipBLASLt/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/hipBLASLt-rocm-${PV}" + +LICENSE="MIT" +SLOT="0/$(ver_cut 1-2)" +KEYWORDS="~amd64" + +SUPPORTED_GPUS=( gfx90a gfx940 gfx941 gfx942 ) +IUSE_TARGETS=( "${SUPPORTED_GPUS[@]/#/amdgpu_targets_}" ) +IUSE="${IUSE_TARGETS[@]/#/+} test" +RESTRICT="!test? ( test )" + +RDEPEND=" + dev-util/hip + dev-cpp/msgpack-cxx + sci-libs/hipBLAS:${SLOT} +" + +DEPEND="${RDEPEND}" +BDEPEND=" + dev-build/rocm-cmake + $(python_gen_any_dep ' + dev-python/msgpack[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] + dev-python/joblib[${PYTHON_USEDEP}] + ') + $(llvm_gen_dep 'sys-devel/clang:${LLVM_SLOT}') + test? ( + dev-cpp/gtest + ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-6.1.1-fix-msgpack-dependency.patch + "${FILESDIR}"/${PN}-6.1.1-no-arch.patch + "${FILESDIR}"/${PN}-6.1.1-no-git.patch + "${FILESDIR}"/${PN}-6.1.1-clang-19.patch + "${FILESDIR}"/${PN}-6.1.1-fix-libcxx.patch +) + +python_check_deps() { + python_has_version "dev-python/msgpack[${PYTHON_USEDEP}]" && + python_has_version "dev-python/pyyaml[${PYTHON_USEDEP}]" && + python_has_version "dev-python/joblib[${PYTHON_USEDEP}]" +} + +pkg_setup() { + python-any-r1_pkg_setup +} + +pkg_pretend() { + if [[ "${AMDGPU_TARGETS[@]}" = "" ]]; then + ewarn "hipBLASLt supports only few GPUs: ${SUPPORTED_GPUS[@]}," + ewarn "but none of them were defined in AMDGPU_TARGETS USE_EXPAND variable." + ewarn + ewarn "Library will continue to be built in \"dummy\" mode," + ewarn "serving as a non-functional placeholder for end-user applications." + fi +} + +src_prepare() { + sed -e "s,\@LLVM_PATH\@,$(get_llvm_prefix),g" \ + "${FILESDIR}"/${PN}-6.1.1-gentoopath.patch > "${S}"/gentoopath.patch || die + eapply $(prefixify_ro "${S}"/gentoopath.patch) + + local shebangs=($(grep -rl "#!/usr/bin/env python3" tensilelite/Tensile || die)) + python_fix_shebang -q ${shebangs[*]} + + cmake_src_prepare +} + +src_configure() { + rocm_use_hipcc + + local targets="$(get_amdgpu_flags)" + local build_with_tensile=$([ "${AMDGPU_TARGETS[@]}" = "" ] && echo OFF || echo ON ) + + local mycmakeargs=( + -DROCM_SYMLINK_LIBS=OFF + -DBUILD_WITH_TENSILE="${build_with_tensile}" + -DAMDGPU_TARGETS="${targets}" + -DBUILD_CLIENTS_TESTS=$(usex test ON OFF) + ) + + use test && mycmakeargs+=( -DBUILD_FORTRAN_CLIENTS=ON ) + + cmake_src_configure +} + +src_compile() { + local -x ROCM_PATH="${EPREFIX}/usr" + # set PYTHONPATH to load Tensile from virtualenv, not the system-wide one + local -x PYTHONPATH="${S}_build/virtualenv/lib/${EPYTHON}/site-packages" + local -x TENSILE_ROCM_ASSEMBLER_PATH="$(get_llvm_prefix)/bin/clang++" + cmake_src_compile +} + +src_install() { + cmake_src_install + + # 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)/hipblaslt/library/ +} + +src_test() { + check_amdgpu + cmake_src_test -j1 +} diff --git a/sci-libs/hipBLASLt/hipBLASLt-6.1.1.ebuild b/sci-libs/hipBLASLt/hipBLASLt-6.1.1.ebuild deleted file mode 100644 index cf2ad2ac5382..000000000000 --- a/sci-libs/hipBLASLt/hipBLASLt-6.1.1.ebuild +++ /dev/null @@ -1,120 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -ROCM_SKIP_GLOBALS=1 -PYTHON_COMPAT=( python3_{10..13} ) - -# gfx941 and gfx942 assembly uses directives of LLVM >= 18.1.0 -LLVM_COMPAT=( 18 ) - -inherit cmake python-any-r1 llvm-r1 prefix rocm -DESCRIPTION="General matrix-matrix operations library for AMD Instinct accelerators" -HOMEPAGE="https://github.com/ROCm/hipBLASLt" -SRC_URI="https://github.com/ROCm/hipBLASLt/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz" -S="${WORKDIR}/hipBLASLt-rocm-${PV}" - -LICENSE="MIT" -SLOT="0/$(ver_cut 1-2)" -KEYWORDS="~amd64" - -SUPPORTED_GPUS=( gfx90a gfx940 gfx941 gfx942 ) -IUSE_TARGETS=( "${SUPPORTED_GPUS[@]/#/amdgpu_targets_}" ) -IUSE="${IUSE_TARGETS[@]/#/+} test" -RESTRICT="!test? ( test )" - -RDEPEND=" - dev-util/hip - dev-cpp/msgpack-cxx - sci-libs/hipBLAS:${SLOT} -" - -DEPEND="${RDEPEND}" -BDEPEND=" - dev-build/rocm-cmake - $(python_gen_any_dep ' - dev-python/msgpack[${PYTHON_USEDEP}] - dev-python/pyyaml[${PYTHON_USEDEP}] - dev-python/joblib[${PYTHON_USEDEP}] - ') - $(llvm_gen_dep 'sys-devel/clang:${LLVM_SLOT}') - test? ( - dev-cpp/gtest - ) -" - -PATCHES=( - "${FILESDIR}"/${PN}-6.1.1-fix-msgpack-dependency.patch - "${FILESDIR}"/${PN}-6.1.1-no-arch.patch - "${FILESDIR}"/${PN}-6.1.1-no-git.patch - "${FILESDIR}"/${PN}-6.1.1-clang-19.patch -) - -python_check_deps() { - python_has_version "dev-python/msgpack[${PYTHON_USEDEP}]" && - python_has_version "dev-python/pyyaml[${PYTHON_USEDEP}]" && - python_has_version "dev-python/joblib[${PYTHON_USEDEP}]" -} - -pkg_setup() { - python-any-r1_pkg_setup -} - -pkg_pretend() { - if [[ "${AMDGPU_TARGETS[@]}" = "" ]]; then - ewarn "hipBLASLt supports only few GPUs: ${SUPPORTED_GPUS[@]}," - ewarn "but none of them were defined in AMDGPU_TARGETS USE_EXPAND variable." - ewarn - ewarn "Library will continue to be built in \"dummy\" mode," - ewarn "serving as a non-functional placeholder for end-user applications." - fi -} - -src_prepare() { - sed -e "s,\@LLVM_PATH\@,$(get_llvm_prefix),g" \ - "${FILESDIR}"/${PN}-6.1.1-gentoopath.patch > "${S}"/gentoopath.patch || die - eapply $(prefixify_ro "${S}"/gentoopath.patch) - - local shebangs=($(grep -rl "#!/usr/bin/env python3" tensilelite/Tensile || die)) - python_fix_shebang -q ${shebangs[*]} - - cmake_src_prepare -} - -src_configure() { - local targets="$(get_amdgpu_flags)" - local build_with_tensile=$([ "${AMDGPU_TARGETS[@]}" = "" ] && echo OFF || echo ON ) - - local mycmakeargs=( - -DROCM_SYMLINK_LIBS=OFF - -DBUILD_WITH_TENSILE="${build_with_tensile}" - -DAMDGPU_TARGETS="${targets}" - -DBUILD_CLIENTS_TESTS=$(usex test ON OFF) - ) - - use test && mycmakeargs+=( -DBUILD_FORTRAN_CLIENTS=ON ) - - CXX=hipcc cmake_src_configure -} - -src_compile() { - local -x ROCM_PATH="${EPREFIX}/usr" - # set PYTHONPATH to load Tensile from virtualenv, not the system-wide one - local -x PYTHONPATH="${S}_build/virtualenv/lib/${EPYTHON}/site-packages" - local -x TENSILE_ROCM_ASSEMBLER_PATH="$(get_llvm_prefix)/bin/clang++" - cmake_src_compile -} - -src_install() { - cmake_src_install - - # 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)/hipblaslt/library/ -} - -src_test() { - check_amdgpu - cmake_src_test -j1 -} -- cgit v1.2.3