diff options
author | Benda Xu <heroxbd@gentoo.org> | 2022-05-02 15:58:23 +0800 |
---|---|---|
committer | Benda Xu <heroxbd@gentoo.org> | 2022-05-02 16:24:41 +0800 |
commit | 284e771bd39b4709afddcc3dd666f5f8665c3754 (patch) | |
tree | 935c39f13c9d6feefa778f67cccf87612ede09c2 /sci-libs/rocRAND/rocRAND-4.3.0-r1.ebuild | |
parent | dev-python/libvirt-python: Stabilize 8.2.0 x86, #841884 (diff) | |
download | gentoo-284e771bd39b4709afddcc3dd666f5f8665c3754.tar.gz gentoo-284e771bd39b4709afddcc3dd666f5f8665c3754.tar.bz2 gentoo-284e771bd39b4709afddcc3dd666f5f8665c3754.zip |
sci-libs/hipCUB: loosen the dependency on dev-util/hip
sci-libs/hipSPARSE:
sci-libs/rocPRIM:
sci-libs/rocRAND:
sci-libs/rocSOLVER:
sci-libs/rocSPARSE: same
The possibility is pointed out by Cory Bloor:
You can probably build the versions of rocBLAS and rocSOLVER tagged at
rocm-5.1.1 with the HIP stack from ROCm 4.3.1. Just be sure to rebuild
all the {roc,hip}{BLAS,SOLVER} libraries at the new tag, since they
all use private (unstable) APIs provided by rocBLAS.
The sci-libs/* ROCm packages should be aligned with sci-libs/rocBLAS,
while the other dev-*/* ROCm packages should be aligned with
dev-util/hip.
Credit: Cory Bloor
Suggested-by: Yiyang Wu <xgreenlandforwyy@gmail.com>
Closes: https://bugs.gentoo.org/838394
Closes: https://bugs.gentoo.org/841982
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Benda Xu <heroxbd@gentoo.org>
Diffstat (limited to 'sci-libs/rocRAND/rocRAND-4.3.0-r1.ebuild')
-rw-r--r-- | sci-libs/rocRAND/rocRAND-4.3.0-r1.ebuild | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/sci-libs/rocRAND/rocRAND-4.3.0-r1.ebuild b/sci-libs/rocRAND/rocRAND-4.3.0-r1.ebuild new file mode 100644 index 000000000000..074ee2912a97 --- /dev/null +++ b/sci-libs/rocRAND/rocRAND-4.3.0-r1.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake + +DESCRIPTION="Generate pseudo-random and quasi-random numbers" +HOMEPAGE="https://github.com/ROCmSoftwarePlatform/rocRAND" +SRC_URI="https://github.com/ROCmSoftwarePlatform/rocRAND/archive/rocm-${PV}.tar.gz -> rocRAND-${PV}.tar.gz" + +LICENSE="MIT" +KEYWORDS="~amd64" +SLOT="0/$(ver_cut 1-2)" +IUSE="benchmark test" +RESTRICT="!test? ( test )" + +RDEPEND="dev-util/hip" +DEPEND="${RDEPEND} +>=dev-util/rocm-cmake-${PV}" +BDEPEND="test? ( dev-cpp/gtest )" + +S="${WORKDIR}/rocRAND-rocm-${PV}" + +src_prepare() { + sed -r -e "s:(hip|roc)rand/lib:\${CMAKE_INSTALL_LIBDIR}:" \ + -e "s:(hip|roc)rand/include:include/\1rand:" \ + -e "/INSTALL_RPATH/d" -i library/CMakeLists.txt || die + + # remove GIT dependency + sed -e "/find_package(Git/,+4d" -i cmake/Dependencies.cmake || die + + eapply_user + cmake_src_prepare +} + +src_configure() { + # Grant access to the device + addwrite /dev/kfd + addpredict /dev/dri/ + + # Compiler to use + export CXX=hipcc + + local mycmakeargs=( + -DBUILD_TEST=$(usex test ON OFF) + -DBUILD_BENCHMARK=$(usex benchmark ON OFF) + -DCMAKE_SKIP_RPATH=TRUE + ${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 + # do not rerun cmake and the build process in src_install + sed '/RERUN/,+1d' -i "${BUILD_DIR}"/build.ninja || die +} + +src_test() { + # Grant access to the device + addwrite /dev/kfd + addwrite /dev/dri/ + cmake_src_test +} + +src_install() { + cmake_src_install + + if use benchmark; then + cd "${BUILD_DIR}"/benchmark + dobin benchmark_rocrand_* + fi +} |