* [gentoo-commits] proj/sci:master commit in: sci-libs/torchaudio/
@ 2025-01-10 18:37 Nowa Ammerlaan
0 siblings, 0 replies; only message in thread
From: Nowa Ammerlaan @ 2025-01-10 18:37 UTC (permalink / raw
To: gentoo-commits
commit: a6a9087f76632a3ffb552c7fc1d42d0f49da66c1
Author: uis <uis9936 <AT> gmail <DOT> com>
AuthorDate: Thu Jan 2 04:26:59 2025 +0000
Commit: Nowa Ammerlaan <nowa <AT> gentoo <DOT> org>
CommitDate: Fri Jan 10 18:36:08 2025 +0000
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=a6a9087f
sci-libs/torchaudio: add 2.4.1
Signed-off-by: uis <uis9936 <AT> gmail.com>
Signed-off-by: Nowa Ammerlaan <nowa <AT> gentoo.org>
sci-libs/torchaudio/metadata.xml | 11 ++++
sci-libs/torchaudio/torchaudio-2.4.1.ebuild | 80 +++++++++++++++++++++++++++++
2 files changed, 91 insertions(+)
diff --git a/sci-libs/torchaudio/metadata.xml b/sci-libs/torchaudio/metadata.xml
new file mode 100644
index 000000000..445ee5c8c
--- /dev/null
+++ b/sci-libs/torchaudio/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <use>
+ <flag name="rocm">Enable ROCm gpu computing support</flag>
+ <flag name="rnnt">Enable custom RNN-T loss function</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">pytorch/vision</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-libs/torchaudio/torchaudio-2.4.1.ebuild b/sci-libs/torchaudio/torchaudio-2.4.1.ebuild
new file mode 100644
index 000000000..6e1067764
--- /dev/null
+++ b/sci-libs/torchaudio/torchaudio-2.4.1.ebuild
@@ -0,0 +1,80 @@
+# Copyright 2020-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{11..12} )
+DISTUTILS_SINGLE_IMPL=1
+DISTUTILS_USE_PEP517=setuptools
+DISTUTILS_EXT=1
+ROCM_SKIP_GLOBALS=1
+inherit cuda distutils-r1 multiprocessing rocm optfeature
+
+DESCRIPTION="Data manipulation and transformation for audio signal processing"
+HOMEPAGE="https://github.com/pytorch/audio"
+SRC_URI="https://github.com/pytorch/audio/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/audio-${PV}"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="cuda rocm ffmpeg openmp +rnnt"
+REQUIRED_USE="?? ( cuda rocm )"
+
+DEPEND="
+ ffmpeg? ( <media-video/ffmpeg-7:= )
+ sci-libs/caffe2[cuda?,rocm?,openmp?]
+"
+RDEPEND="
+ ${DEPEND}
+ sci-libs/pytorch[${PYTHON_SINGLE_USEDEP}]
+"
+BDEPEND="
+ test? (
+ $(python_gen_cond_dep '
+ dev-python/expecttest[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/typing-extensions[${PYTHON_USEDEP}]
+ dev-python/parameterized[${PYTHON_USEDEP}]
+ dev-python/scipy[${PYTHON_USEDEP}]
+ dev-python/scikit-learn[${PYTHON_USEDEP}]
+ dev-python/soundfile[${PYTHON_USEDEP}]
+ ')
+ )
+"
+
+distutils_enable_tests pytest
+
+src_compile() {
+ export MAX_JOBS="$(makeopts_jobs)" # Let ninja respect MAKEOPTS
+
+ export USE_CUDA=$(usex cuda 1 0)
+ export USE_ROCM=$(usex rocm 1 0)
+ use rocm && addpredict /dev/kfd
+ export USE_OPENMP=$(usex openmp 1 0)
+ export USE_FFMPEG=$(usex ffmpeg 1 0)
+ export BUILD_SOX=0
+ export BUILD_RNNT=$(usex rnnt 1 0)
+ use ffmpeg && export FFMPEG_ROOT=${EPREFIX}/usr
+
+ distutils-r1_src_compile
+}
+
+EPYTEST_IGNORE=(
+ # librosa
+ test/torchaudio_unittest/prototype/hifi_gan/hifi_gan_cpu_test.py
+ test/torchaudio_unittest/prototype/hifi_gan/hifi_gan_gpu_test.py
+
+ # infinite test?
+ test/torchaudio_unittest/backend/dispatcher/ffmpeg/load_test.py
+)
+
+python_test() {
+ use rocm && check_amdgpu
+
+ epytest -p expecttest
+}
+
+pkg_postinst() {
+ optfeature "SoundFile I/O backend" dev-python/soundfile
+}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2025-01-10 18:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-10 18:37 [gentoo-commits] proj/sci:master commit in: sci-libs/torchaudio/ Nowa Ammerlaan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox