summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c05619719517df3dcb8aa33fa35b4f7fece6268f (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
# Maintainer: Daniel Bershatsky <bepshatsky@yandex.ru>
pkgname=cutlass
pkgver=3.2.2
pkgrel=1
pkgdesc='CUDA Templates for Linear Algebra Subroutines'
arch=('x86_64')
url='https://github.com/NVIDIA/cutlass'
license=('Apache')
groups=()
depends=('cuda' 'cudnn')
makedepends=('cmake' 'git')
optdepends=()
source=("$pkgname-$pkgver.tar.gz::https://github.com/NVIDIA/$pkgname/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('aaa9719eb806b168695b34893faf4854bb6bc9e09f63f2d36772aaf35a8516e5')

prepare() {
    export CUTLASS_NVCC_ARCHS=7.0,7.5,8.0,8.6,8.9,9.0
    export CUDACXX=/opt/cuda/bin/nvcc
}

build() {
    cmake -S $pkgname-$pkgver -B $pkgname-$pkgver/build \
        -DCUTLASS_ENABLE_CUBLAS=ON \
        -DCUTLASS_ENABLE_CUDNN=ON \
        -DCUTLASS_ENABLE_EXAMPLES=OFF \
        -DCUTLASS_INSTALL_TESTS=OFF \
        -DCUTLASS_UNITY_BUILD_ENABLED=ON
    cmake --build $pkgname-$pkgver/build -j 48
}

package() {
    cmake --install $srcdir/$pkgname-$pkgver/build --prefix $pkgdir/usr
    install -Dm644 \
        $srcdir/$pkgname-$pkgver/LICENSE.txt \
        $pkgdir/usr/share/licenses/$pkgname/LICENSE
    rm -rfv $pkgdir/usr/test
}