Skip to content

Commit 6bc9b2a

Browse files
committed
sci-libs/torchaudio: add 2.4.1
1 parent ac434a8 commit 6bc9b2a

2 files changed

Lines changed: 71 additions & 0 deletions

File tree

sci-libs/torchaudio/Manifest

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
DIST torchaudio-2.4.1.tar.gz 4503000 BLAKE2B 85ae91bb564996f95c9116802058968dff191d4771becbb859987afd3b78189980b31281c5c49088fe91a72a02170dafe865f8bbb4168af6aeafe42f4029c09b SHA512 84c196a19bedefd39c7c1bc690705e317aaba9e16aa52a71dfa5688faf50ffa1985008c59007939ad7096c7900c5450659efb12e0a393c4545fe4bd31f294b11
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Copyright 2020-2024 Gentoo Authors
2+
# Distributed under the terms of the GNU General Public License v2
3+
4+
EAPI=8
5+
6+
PYTHON_COMPAT=( python3_{11..12} )
7+
DISTUTILS_SINGLE_IMPL=1
8+
DISTUTILS_USE_PEP517=setuptools
9+
DISTUTILS_EXT=1
10+
ROCM_SKIP_GLOBALS=1
11+
inherit cuda distutils-r1 multiprocessing rocm
12+
13+
DESCRIPTION="Data manipulation and transformation for audio signal processing"
14+
HOMEPAGE="https://github.com/pytorch/audio"
15+
SRC_URI="https://github.com/pytorch/audio/archive/v${PV}.tar.gz -> ${P}.tar.gz"
16+
S="${WORKDIR}/audio-${PV}"
17+
18+
LICENSE="BSD"
19+
SLOT="0"
20+
KEYWORDS="~amd64"
21+
IUSE="cuda rocm ffmpeg +soundfile openmp +rnnt"
22+
REQUIRED_USE="?? ( cuda rocm )"
23+
RESTRICT="!test? ( test )"
24+
25+
DEPEND="
26+
ffmpeg? ( media-video/ffmpeg:= )
27+
sci-libs/caffe2[cuda?,rocm?,openmp?]
28+
sci-libs/pytorch[${PYTHON_SINGLE_USEDEP}]
29+
"
30+
RDEPEND="
31+
${DEPEND}
32+
$(python_gen_cond_dep '
33+
soundfile? ( dev-python/soundfile[${PYTHON_USEDEP}] )
34+
')
35+
"
36+
BDEPEND="
37+
test? (
38+
$(python_gen_cond_dep '
39+
dev-python/expecttest[${PYTHON_USEDEP}]
40+
dev-python/numpy[${PYTHON_USEDEP}]
41+
dev-python/typing-extensions[${PYTHON_USEDEP}]
42+
dev-python/parameterized[${PYTHON_USEDEP}]
43+
dev-python/scipy[${PYTHON_USEDEP}]
44+
dev-python/scikit-learn[${PYTHON_USEDEP}]
45+
')
46+
)
47+
"
48+
49+
distutils_enable_tests pytest
50+
51+
src_compile() {
52+
export MAX_JOBS="$(makeopts_jobs)" # Let ninja respect MAKEOPTS
53+
54+
export USE_CUDA=$(usex cuda 1 0)
55+
export USE_ROCM=$(usex rocm 1 0)
56+
use rocm && addpredict /dev/kfd
57+
export USE_OPENMP=$(usex openmp 1 0)
58+
export USE_FFMPEG=$(usex ffmpeg 1 0)
59+
export BUILD_SOX=0
60+
export BUILD_RNNT=$(usex rnnt 1 0)
61+
use ffmpeg && export FFMPEG_ROOT=${EPREFIX}/usr
62+
63+
distutils-r1_src_compile
64+
}
65+
66+
python_test() {
67+
use rocm && check_amdgpu
68+
69+
epytest -p expecttest
70+
}

0 commit comments

Comments
 (0)