From 04c6ec11316bd7c2f6ef7b2405b162f27edb48a1 Mon Sep 17 00:00:00 2001 From: uis Date: Thu, 2 Jan 2025 07:15:15 +0300 Subject: [PATCH 1/6] dev-python/soundfile: add 0.12.1 Signed-off-by: uis --- dev-python/soundfile/Manifest | 1 + dev-python/soundfile/soundfile-0.12.1.ebuild | 31 ++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 dev-python/soundfile/Manifest create mode 100644 dev-python/soundfile/soundfile-0.12.1.ebuild diff --git a/dev-python/soundfile/Manifest b/dev-python/soundfile/Manifest new file mode 100644 index 00000000000..9451fccc642 --- /dev/null +++ b/dev-python/soundfile/Manifest @@ -0,0 +1 @@ +DIST soundfile-0.12.1.gh.tar.gz 38409 BLAKE2B b6428f2d904c6cd5123e54c22c0a6313e419ca0c19f645efc1efb81c0b9fa8c6317e9490de2634700a1857b3185798035380ef31aeec41ef517b52b10d8ca398 SHA512 91bac4ffee849c9d322494fa411f027571282ce5ea0fbd7dd41f54afa3ef3d86d8aeb674e2a33ac50abb5828de3694863ee7c40fda38860c678260dd614f607b diff --git a/dev-python/soundfile/soundfile-0.12.1.ebuild b/dev-python/soundfile/soundfile-0.12.1.ebuild new file mode 100644 index 00000000000..9e77ed61f8e --- /dev/null +++ b/dev-python/soundfile/soundfile-0.12.1.ebuild @@ -0,0 +1,31 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( pypy3 python3_{10..13} ) + +inherit distutils-r1 + +DESCRIPTION="SoundFile is an audio library based on libsndfile, CFFI, and NumPy" +HOMEPAGE="https://github.com/bastibe/python-soundfile/" +SRC_URI=" + https://github.com/bastibe/python-soundfile/archive/${PV}.tar.gz + -> ${P}.gh.tar.gz +" +S="${WORKDIR}/python-soundfile-${PV}" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64" + +RDEPEND=" + media-libs/libsndfile + dev-python/numpy[${PYTHON_USEDEP}] + $(python_gen_cond_dep ' + >=dev-python/cffi-1.0.0[${PYTHON_USEDEP}] + ' 'python*') +" + +distutils_enable_tests pytest From 320fae826ddc485737b245cf63d0bfa88856fb7f Mon Sep 17 00:00:00 2001 From: uis Date: Thu, 2 Jan 2025 17:21:26 +0300 Subject: [PATCH 2/6] dev-python/expecttest: add 0.3.0 Signed-off-by: uis --- dev-python/expecttest/Manifest | 1 + dev-python/expecttest/expecttest-0.3.0.ebuild | 28 +++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 dev-python/expecttest/Manifest create mode 100644 dev-python/expecttest/expecttest-0.3.0.ebuild diff --git a/dev-python/expecttest/Manifest b/dev-python/expecttest/Manifest new file mode 100644 index 00000000000..3b5dd113626 --- /dev/null +++ b/dev-python/expecttest/Manifest @@ -0,0 +1 @@ +DIST expecttest-0.3.0.gh.tar.gz 16627 BLAKE2B 02a8c41b996dc16d77c711cf023ee18cd97b6a2bb5bd13e80a6c195b18cf8b795a2b71d62b281d62da897d21b61a868f41af17746e849ec3c0f676c13bf7261a SHA512 3627255e9bfd2e2df9cff8026de8d3bf4997a50fc838c09b147b8becbf35f64b97da19e3606b239df4ee2e68018497aa44fef2f02d2cb980ec1d4e38e83f6d50 diff --git a/dev-python/expecttest/expecttest-0.3.0.ebuild b/dev-python/expecttest/expecttest-0.3.0.ebuild new file mode 100644 index 00000000000..832ce943eb9 --- /dev/null +++ b/dev-python/expecttest/expecttest-0.3.0.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=poetry +PYTHON_COMPAT=( python3_{11..12} ) + +inherit distutils-r1 + +DESCRIPTION="This library implements expect tests (also known as \"golden\" tests)" +HOMEPAGE="https://github.com/pytorch/expecttest" +SRC_URI=" + https://github.com/pytorch/expecttest/archive/v${PV}.tar.gz + -> ${P}.gh.tar.gz +" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" + +RDEPEND=" + >=dev-python/flake8-7.0.0[${PYTHON_USEDEP}] + >=dev-python/hypothesis-6.0.0[${PYTHON_USEDEP}] + >=dev-python/mypy-0.910.0[${PYTHON_USEDEP}] +" + +distutils_enable_tests pytest From 2ed1e23b7d3db17f3de5dd6dade3695c8a3e17bc Mon Sep 17 00:00:00 2001 From: uis Date: Thu, 2 Jan 2025 07:26:59 +0300 Subject: [PATCH 3/6] sci-libs/torchaudio: add 2.4.1 Signed-off-by: uis --- sci-libs/torchaudio/Manifest | 1 + sci-libs/torchaudio/metadata.xml | 11 ++++ sci-libs/torchaudio/torchaudio-2.4.1.ebuild | 71 +++++++++++++++++++++ 3 files changed, 83 insertions(+) create mode 100644 sci-libs/torchaudio/Manifest create mode 100644 sci-libs/torchaudio/metadata.xml create mode 100644 sci-libs/torchaudio/torchaudio-2.4.1.ebuild diff --git a/sci-libs/torchaudio/Manifest b/sci-libs/torchaudio/Manifest new file mode 100644 index 00000000000..0059647a605 --- /dev/null +++ b/sci-libs/torchaudio/Manifest @@ -0,0 +1 @@ +DIST torchaudio-2.4.1.tar.gz 4503000 BLAKE2B 85ae91bb564996f95c9116802058968dff191d4771becbb859987afd3b78189980b31281c5c49088fe91a72a02170dafe865f8bbb4168af6aeafe42f4029c09b SHA512 84c196a19bedefd39c7c1bc690705e317aaba9e16aa52a71dfa5688faf50ffa1985008c59007939ad7096c7900c5450659efb12e0a393c4545fe4bd31f294b11 diff --git a/sci-libs/torchaudio/metadata.xml b/sci-libs/torchaudio/metadata.xml new file mode 100644 index 00000000000..445ee5c8c44 --- /dev/null +++ b/sci-libs/torchaudio/metadata.xml @@ -0,0 +1,11 @@ + + + + + Enable ROCm gpu computing support + Enable custom RNN-T loss function + + + pytorch/vision + + 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 00000000000..dae78df2471 --- /dev/null +++ b/sci-libs/torchaudio/torchaudio-2.4.1.ebuild @@ -0,0 +1,71 @@ +# 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:= ) + sci-libs/caffe2[cuda?,rocm?,openmp?] + sci-libs/pytorch[${PYTHON_SINGLE_USEDEP}] +" +RDEPEND=" + ${DEPEND} +" +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 +} + +python_test() { + use rocm && check_amdgpu + + epytest -p expecttest +} + +pkg_postinst() { + optfeature "SoundFile I/O backend" dev-python/soundfile +} From cdc651b7fe270f894ccd8c931f5b20ec820558c2 Mon Sep 17 00:00:00 2001 From: uis Date: Thu, 2 Jan 2025 18:48:53 +0300 Subject: [PATCH 4/6] sci-libs/torchaudio: make sci-libs/pytorch runtime-only dependency Signed-off-by: uis --- sci-libs/torchaudio/torchaudio-2.4.1.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sci-libs/torchaudio/torchaudio-2.4.1.ebuild b/sci-libs/torchaudio/torchaudio-2.4.1.ebuild index dae78df2471..0c1055d973f 100644 --- a/sci-libs/torchaudio/torchaudio-2.4.1.ebuild +++ b/sci-libs/torchaudio/torchaudio-2.4.1.ebuild @@ -24,10 +24,10 @@ REQUIRED_USE="?? ( cuda rocm )" DEPEND=" ffmpeg? ( media-video/ffmpeg:= ) sci-libs/caffe2[cuda?,rocm?,openmp?] - sci-libs/pytorch[${PYTHON_SINGLE_USEDEP}] " RDEPEND=" ${DEPEND} + sci-libs/pytorch[${PYTHON_SINGLE_USEDEP}] " BDEPEND=" test? ( From 6f5780dbe3d02bfa7186bac1be1e3fd8551d51cf Mon Sep 17 00:00:00 2001 From: uis Date: Sat, 4 Jan 2025 22:55:12 +0300 Subject: [PATCH 5/6] sci-libs/torchaudio: disable currently broken tests Signed-off-by: uis --- sci-libs/torchaudio/torchaudio-2.4.1.ebuild | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sci-libs/torchaudio/torchaudio-2.4.1.ebuild b/sci-libs/torchaudio/torchaudio-2.4.1.ebuild index 0c1055d973f..846db859fa8 100644 --- a/sci-libs/torchaudio/torchaudio-2.4.1.ebuild +++ b/sci-libs/torchaudio/torchaudio-2.4.1.ebuild @@ -60,6 +60,15 @@ src_compile() { 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 From 00579a31afa18fa341bf247f427eb72d9e9b1d91 Mon Sep 17 00:00:00 2001 From: uis Date: Sun, 5 Jan 2025 16:38:51 +0300 Subject: [PATCH 6/6] sci-libs/torchaudio: require --- sci-libs/torchaudio/torchaudio-2.4.1.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sci-libs/torchaudio/torchaudio-2.4.1.ebuild b/sci-libs/torchaudio/torchaudio-2.4.1.ebuild index 846db859fa8..6e1067764d4 100644 --- a/sci-libs/torchaudio/torchaudio-2.4.1.ebuild +++ b/sci-libs/torchaudio/torchaudio-2.4.1.ebuild @@ -22,7 +22,7 @@ IUSE="cuda rocm ffmpeg openmp +rnnt" REQUIRED_USE="?? ( cuda rocm )" DEPEND=" - ffmpeg? ( media-video/ffmpeg:= ) + ffmpeg? (