diff options
author | Chih-Hsuan Yen | 2022-05-25 13:14:45 +0800 |
---|---|---|
committer | Chih-Hsuan Yen | 2022-05-25 13:14:45 +0800 |
commit | ca0778e75788e00ea6be3cbcde08eabe79619321 (patch) | |
tree | f1a0f9a2b68b579de7f6721c837f11dec7f33069 | |
parent | 7281798208c92e1cdbf7866d3114813929c22fd8 (diff) | |
download | aur-ca0778e75788e00ea6be3cbcde08eabe79619321.tar.gz |
allow this to build with CUDA
See discussions starting from
https://aur.archlinux.org/packages/python-torchaudio#comment-864651
-rw-r--r-- | .SRCINFO | 1 | ||||
-rw-r--r-- | PKGBUILD | 14 |
2 files changed, 11 insertions, 4 deletions
@@ -10,6 +10,7 @@ pkgbase = python-torchaudio makedepends = python-setuptools makedepends = cmake makedepends = ninja + makedepends = gcc11 depends = python depends = python-pytorch optdepends = python-kaldi-io @@ -11,14 +11,11 @@ url="https://github.com/pytorch/audio" license=('BSD') depends=('python' 'python-pytorch') optdepends=('python-kaldi-io') -makedepends=('git' 'python-setuptools' 'cmake' 'ninja') +makedepends=('git' 'python-setuptools' 'cmake' 'ninja' 'gcc11') conflicts=('python-torchaudio-git') source=("git+$url#tag=v${pkgver}") sha512sums=('SKIP') -# Temporarily disable CUDA as it does not build with GCC 12 -export USE_CUDA=0 - prepare() { cd "$srcdir/${_pkgname}" # Use sourceforge url to fetch zlib @@ -28,6 +25,15 @@ prepare() { build() { cd "$srcdir/${_pkgname}" + + # Allow this to build with CUDA, which is not compatible with GCC 12 yet + export CC=/usr/bin/gcc-11 + export CXX=/usr/bin/g++-11 + export CUDAHOSTCXX=$CXX + # Follow architectures used by pytorch + # https://github.com/archlinux/svntogit-community/blob/packages/python-pytorch/trunk/PKGBUILD + export TORCH_CUDA_ARCH_LIST="5.2;6.0;6.2;7.0;7.2;7.5;8.0;8.6;8.6+PTX" + CUDA_HOME=/opt/cuda/ BUILD_SOX=1 python setup.py build } |