blob: 8b583cb22096ddacc7eeae3fa41977edf412f2ef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
ROCM_VERSION=${PV}
inherit cmake edo rocm flag-o-matic
DESCRIPTION="ROCm Communication Collectives Library (RCCL)"
HOMEPAGE="https://github.com/ROCm/rccl"
SRC_URI="https://github.com/ROCm/rccl/archive/rocm-${PV}.tar.gz -> rccl-${PV}.tar.gz"
S="${WORKDIR}/rccl-rocm-${PV}"
LICENSE="BSD"
SLOT="0/$(ver_cut 1-2)"
KEYWORDS="~amd64"
IUSE="test"
RDEPEND="
=dev-util/hip-6*
dev-util/rocm-smi:${SLOT}"
DEPEND="${RDEPEND}
sys-libs/binutils-libs"
BDEPEND="
>=dev-build/cmake-3.22
>=dev-build/rocm-cmake-5.7.1
dev-util/hipify-clang:${SLOT}
test? ( dev-cpp/gtest )"
RESTRICT="!test? ( test )"
PATCHES=(
"${FILESDIR}/${PN}-6.0.2-fix-version-check.patch"
)
src_prepare() {
cmake_src_prepare
# https://reviews.llvm.org/D69582 - clang does not support parallel jobs
sed 's/-parallel-jobs=[0-9][0-9]//g' -i CMakeLists.txt || die
# https://github.com/ROCm/rccl/issues/958 - fix AMDGPU_TARGETS
sed '/set(AMDGPU_TARGETS/s/ FORCE//' -i CMakeLists.txt || die
# complete fix-version-check patch
sed "s/@rocm_version@/${PV}/" -i CMakeLists.txt || die
}
src_configure() {
rocm_use_hipcc
# https://github.com/llvm/llvm-project/issues/71711 - fix issue of clang
append-ldflags -Wl,-z,noexecstack
local mycmakeargs=(
-DCMAKE_SKIP_RPATH=ON
-DAMDGPU_TARGETS="$(get_amdgpu_flags)"
-DBUILD_TESTS=$(usex test ON OFF)
-DROCM_SYMLINK_LIBS=OFF
-Wno-dev
)
cmake_src_configure
}
src_test() {
check_amdgpu
cd "${BUILD_DIR}" || die
LD_LIBRARY_PATH="${BUILD_DIR}" edob test/rccl-UnitTests
}
|