diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 46 |
1 files changed, 29 insertions, 17 deletions
@@ -1,33 +1,45 @@ -# Maintainer: Christos Tsirigotis <tsirif \at/ gmail \dot/ com> -# Date: 2017-01-17 +# Maintainer: Scott Cheng <aur@chengscott.io> +# Contributor: Christos Tsirigotis <tsirif \at/ gmail \dot/ com> pkgname=nccl-git -_pkgname='nccl' -pkgver=1.3.0.1.r13.2a974f5 +_name="${pkgname%%-git}" +pkgver=2.21.5.1.r0.ab2b89c pkgrel=1 -pkgdesc="NVIDIA CUDA optimized primitives for collective multi-GPU communication" -arch=('i686' 'x86_64') -url="https://github.com/NVIDIA/nccl.git" +pkgdesc='Library for NVIDIA multi-GPU and multi-node collective communication primitives' +arch=('x86_64') +url='https://github.com/NVIDIA/nccl.git' license=('BSD') -depends=('cuda>=7.0') -makedepends=('git' 'make') -optdepends=('openmpi: To use `ncclCommInitRank` in multi-process applications') +depends=('glibc' 'gcc-libs') +makedepends=('git' 'cuda') +optdepends=('openmpi: Use NCCL with MPI') provides=('nccl') conflicts=('nccl') source=("git+https://github.com/NVIDIA/nccl.git") md5sums=('SKIP') pkgver() { - cd "${srcdir}/${_pkgname}" - printf "%s" "$(git describe --long --tags | sed 's/\([^-]*-\)g/r\1/;s/-/./g;s/^.//')" + git -C "${_name}" describe --long --tags --abbrev=7 | sed 's/\([^-]*-\)g/r\1/;s/-/./g;s/^.//' } build() { - cd "${srcdir}/${_pkgname}" - make CUDA_HOME=/opt/cuda all + cd "${_name}" + export NVCC_GENCODE="-gencode=arch=compute_70,code=sm_70 \ + -gencode=arch=compute_75,code=sm_75 \ + -gencode=arch=compute_80,code=sm_80 \ + -gencode=arch=compute_86,code=sm_86 \ + -gencode=arch=compute_89,code=sm_89 \ + -gencode=arch=compute_90,code=sm_90 \ + -gencode=arch=compute_90,code=compute_90" + + export CXXFLAGS+=" -ffat-lto-objects" + make -j CXX=/opt/cuda/bin/g++ CUDA_HOME=/opt/cuda PREFIX=/usr src.build } + package() { - cd "${srcdir}/${_pkgname}" - make CUDA_HOME=/opt/cuda PREFIX=${pkgdir}/opt/cuda install - install -D -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE" + cd "${_name}" + make PREFIX="${pkgdir}"/usr install + + # fix permission on static lib + chmod 644 "${pkgdir}"/usr/lib/libnccl_static.a + install -Dm644 LICENSE.txt "${pkgdir}/usr/share/licenses/${_name}/LICENSE" } |