archrelease: copy trunk to community-any
[ArchLinux/community.git] / rccl / trunk / PKGBUILD
blob62baca0f302f7afb872dea4fa73bff1b4ee509c5
1 # Maintainer: Torsten Keßler <tpkessler at archlinux dot org>
2 # Contriubtor: Markus Näther <naetherm@informatik.uni-freiburg.de>
3 # Contributor: acxz <akashpatel2008 at yahoo dot com>
5 pkgname=rccl
6 pkgver=5.5.0
7 pkgrel=1
8 pkgdesc="ROCm Communication Collectives Library"
9 arch=('x86_64')
10 url='https://rccl.readthedocs.io/en/rocm-5.5.0/'
11 license=('custom')
12 depends=('hip' 'rocm-smi-lib')
13 makedepends=('rocm-cmake' 'hipify-clang' 'python')
14 _git='https://github.com/ROCmSoftwarePlatform/rccl'
15 source=("$pkgname-$pkgver.tar.gz::$_git/archive/rocm-$pkgver.tar.gz")
16 sha256sums=('be2964b408741d046bcd606d339a233d1d1deac7b841647ec53d6d62d71452ba')
17 options=(!lto)
18 _dirname="$(basename $_git)-$(basename ${source[0]} .tar.gz)"
20 build() {
21   # Compile source code for supported GPU archs in parallel
22   export HIPCC_COMPILE_FLAGS_APPEND="-parallel-jobs=$(nproc)"
23   export HIPCC_LINK_FLAGS_APPEND="-parallel-jobs=$(nproc)"
24   # -fcf-protection is not supported by HIP, see
25   # https://docs.amd.com/bundle/ROCm-Compiler-Reference-Guide-v5.5/page/Compiler_Options_and_Features.html#d2e2018
26   CXXFLAGS="${CXXFLAGS} -fcf-protection=none" \
27   cmake \
28     -Wno-dev \
29     -B build \
30     -S "$_dirname" \
31     -DCMAKE_BUILD_TYPE=None \
32     -DCMAKE_CXX_COMPILER=/opt/rocm/hip/bin/hipcc \
33     -DCMAKE_INSTALL_PREFIX=/opt/rocm
34   cmake --build build
37 package() {
38   DESTDIR="$pkgdir" cmake --install build
40   echo "/opt/rocm/$pkgname/lib" > "$pkgname.conf"
41   install -Dm644 "$pkgname.conf" "$pkgdir/etc/ld.so.conf.d/$pkgname.conf"
43   install -Dm644 "$srcdir/$_dirname/LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"