blob: 934afc2e1409cbbb59f3f8193be107c9bf0b2765 (
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
|
# Maintainer: Leo Mao <leomaoyw at gmail dot com>
pkgname=python-cupy
_pkgname=cupy
pkgver=13.3.0
_cccl_commit=3ef9dd9642da2d4e0b3ff77e445e73d7aabd4687
_dlpack_commit=365b823cedb281cd0240ca601aba9b78771f91a3
_jitify_commit=1a0ca0e837405506f3b8f7883bacb71c20d86d96
pkgrel=1
pkgdesc="NumPy-like API accelerated with CUDA"
url="https://cupy.dev"
arch=('x86_64')
license=('MIT')
depends=('cuda' 'python-fastrlock' 'python-numpy')
makedepends=('cython0' 'nccl' 'python-setuptools')
optdepends=('libcutensor' 'nccl')
source=("https://github.com/cupy/cupy/archive/v$pkgver.tar.gz"
"https://github.com/NVIDIA/cccl/archive/$_cccl_commit.tar.gz"
"https://github.com/dmlc/dlpack/archive/$_dlpack_commit.tar.gz"
"https://github.com/NVIDIA/jitify/archive/$_jitify_commit.tar.gz")
md5sums=('9360aa672722d7a76d9e091b69f301a3'
'17c7f9635569aac243be498275ba71ba'
'4fbb2aeba1e0ef8d7e094deb811630df'
'0fb2589c81179e752d9bc45be72ed992')
prepare() {
cd "$srcdir/$_pkgname-$pkgver"
rm -rf third_party/{cccl,dlpack,jitify}
ln -srfT "$srcdir/cccl-$_cccl_commit" third_party/cccl
ln -srfT "$srcdir/dlpack-$_dlpack_commit" third_party/dlpack
ln -srfT "$srcdir/jitify-$_jitify_commit" third_party/jitify
}
build() {
cd "$srcdir/$_pkgname-$pkgver"
export LDFLAGS+=' -L/opt/cuda/targets/x86_64-linux/lib/stubs'
CUDA_PATH=/opt/cuda python setup.py build
}
package() {
cd "$srcdir/$_pkgname-$pkgver"
export LDFLAGS+=' -L/opt/cuda/targets/x86_64-linux/lib/stubs'
python setup.py install --skip-build --prefix=/usr --root="$pkgdir" --optimize=1
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
|