diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index d1398b7aa8..936dee63e9 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -14,7 +14,7 @@ jobs: strategy: matrix: python-version: ["3.11"] - cuda-version: ["12.8"] + cuda-version: ["13.0"] ffmpeg-version: ["8"] fail-fast: false uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main diff --git a/.github/workflows/unittest-linux-gpu.yml b/.github/workflows/unittest-linux-gpu.yml index efa515b064..62ea8f6692 100644 --- a/.github/workflows/unittest-linux-gpu.yml +++ b/.github/workflows/unittest-linux-gpu.yml @@ -14,7 +14,7 @@ jobs: strategy: matrix: python-version: ["3.11"] - cuda-version: ["12.8"] + cuda-version: ["13.0"] ffmpeg-version: ["7"] fail-fast: false uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main diff --git a/README.md b/README.md index af2b021606..a9085907f7 100644 --- a/README.md +++ b/README.md @@ -7,16 +7,23 @@ torchaudio: an audio library for PyTorch ![TorchAudio Logo](docs/source/_static/img/logo.png) +> [!IMPORTANT] +> **TorchAudio 2.11 works with `torch` 2.11 and with every future `torch` +> release (2.12, 2.13, etc.).** It is the latest release, and it is the only +> one you need: there is nothing to upgrade in TorchAudio when you upgrade +> `torch`, and installing TorchAudio does not pin `torch` to a specific +> version. + > [!NOTE] -> **We have transitioned TorchAudio into a -> maintenance phase. This process removed some user-facing -> features. These features were deprecated from TorchAudio 2.8 and removed in 2.9. -> Our main goals were to reduce redundancies with the rest of the -> PyTorch ecosystem, make it easier to maintain, and create a version of -> TorchAudio that is more tightly scoped to its strengths: processing audio -> data for ML. Please see -> [our community message](https://github.com/pytorch/audio/issues/3902) -> for more details.** +> We have transitioned TorchAudio into a maintenance phase. This migration +> process removed some user-facing features. These features were deprecated +> from TorchAudio 2.8 and removed in 2.9. +> Our main goals were to reduce redundancies with the rest of the +> PyTorch ecosystem, make it easier to maintain, and create a version of +> TorchAudio that is more tightly scoped to its strengths: processing audio +> data for ML. Please see +> [our community message](https://github.com/pytorch/audio/issues/3902) +> for more details. The aim of torchaudio is to apply [PyTorch](https://github.com/pytorch/pytorch) to the audio domain. By supporting PyTorch, torchaudio follows the same philosophy @@ -38,7 +45,16 @@ to use and feel like a natural extension. Installation ------------ -Please refer to https://pytorch.org/audio/main/installation.html for installation and build process of TorchAudio. +```bash +pip install torchaudio +``` + +TorchAudio 2.11 requires `torch` 2.11 or newer, including all future releases. +It does not pin `torch` to a specific version. + +Please refer to https://pytorch.org/audio/main/installation.html for the full +installation and build instructions, and for the compatibility matrix of older +releases. API Reference diff --git a/docs/source/build.jetson.rst b/docs/source/build.jetson.rst index 68cbc461d8..8625baea7a 100644 --- a/docs/source/build.jetson.rst +++ b/docs/source/build.jetson.rst @@ -123,14 +123,7 @@ Verify the installation by checking the version and CUDA device accessibility. pip install ninja -2. Install dependencies -~~~~~~~~~~~~~~~~~~~~~~~ - -.. code-block:: - - sudo apt install libavformat-dev libavcodec-dev libavutil-dev libavdevice-dev libavfilter-dev - -3. Build TorchAudio +2. Build TorchAudio ~~~~~~~~~~~~~~~~~~~ .. code-block:: @@ -139,7 +132,7 @@ Verify the installation by checking the version and CUDA device accessibility. cd audio USE_CUDA=1 pip install -v -e . --no-use-pep517 -4. Check the installation +3. Check the installation ~~~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: @@ -150,8 +143,4 @@ Verify the installation by checking the version and CUDA device accessibility. .. code-block:: - 2.0.0a0+2ead941 - --prefix=/usr --extra-version=0ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/aarch64-linux-gnu --incdir=/usr/include/aarch64-linux-gnu --arch=arm64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared - -.. image:: https://download.pytorch.org/torchaudio/doc-assets/jetson-verify-build.png - :width: 360px + 2.11.0a0+2ead941 diff --git a/docs/source/installation.rst b/docs/source/installation.rst index 115b977cd1..f4704def21 100644 --- a/docs/source/installation.rst +++ b/docs/source/installation.rst @@ -1,32 +1,40 @@ Installing pre-built binaries ============================= -``torchaudio`` has binary distributions for PyPI (``pip``) and Anaconda (``conda``). +``torchaudio`` has binary distributions on PyPI: -Please refer to https://pytorch.org/get-started/locally/ for the details. +.. code-block:: -.. note:: + pip install torchaudio - Each ``torchaudio`` package is compiled against specific version of ``torch``. - Please refer to the following table and install the correct pair of ``torch`` and ``torchaudio``. +To install a specific variant (CUDA, ROCm, nightly, ...), please refer to +https://pytorch.org/get-started/locally/. -.. note:: +.. important:: - Starting ``0.10``, torchaudio has CPU-only and CUDA-enabled binary distributions, - each of which requires a corresponding PyTorch distribution. + **TorchAudio 2.11 works with PyTorch 2.11 and with every future PyTorch + release (2.12, 2.13, ...).** Dependencies ------------ * `PyTorch `_ - Please refer to the compatibility matrix bellow for supported PyTorch versions. + 2.11 or newer for TorchAudio 2.11. For older TorchAudio releases, please + refer to the :ref:`compatibility matrix ` below. .. _optional_dependencies: Optional Dependencies ~~~~~~~~~~~~~~~~~~~~~ +* `torchcodec `__ + + Required by :func:`torchaudio.load` and :func:`torchaudio.save`, which are + thin wrappers around TorchCodec's ``AudioDecoder`` and ``AudioEncoder``. + We recommend using those TorchCodec classes directly. Installation + instructions are at + https://github.com/pytorch/torchcodec#installing-torchcodec. * `sentencepiece `__ @@ -37,16 +45,15 @@ Optional Dependencies Required for performing text-to-speech with :ref:`Tacotron2`. - +.. _compatibility_matrix: Compatibility Matrix -------------------- -The official binary distributions of TorchAudio contain extension modules -which are written in C++ and linked against specific versions of PyTorch. - -TorchAudio and PyTorch from different releases cannot be used together. -Please refer to the following table for the matching versions. +TorchAudio 2.11 is built against PyTorch's stable ABI and therefore supports +PyTorch 2.11 and all later versions. Earlier TorchAudio releases contain +extension modules linked against a single PyTorch version, and cannot be mixed +with a different PyTorch release. .. list-table:: :header-rows: 1 @@ -54,6 +61,27 @@ Please refer to the following table for the matching versions. * - ``PyTorch`` - ``TorchAudio`` - ``Python`` + * - ``2.11`` **and above** + - ``2.11.0`` + - ``>=3.10``, ``<=3.14`` + * - ``2.10`` + - ``2.10.0`` + - ``>=3.10``, ``<=3.14`` + * - ``2.9.1`` + - ``2.9.1`` + - ``>=3.10``, ``<=3.14`` + * - ``2.9`` + - ``2.9.0`` + - ``>=3.10``, ``<=3.14`` + * - ``2.8`` + - ``2.8.0`` + - ``>=3.9``, ``<=3.13`` + * - ``2.7.1`` + - ``2.7.1`` + - ``>=3.9``, ``<=3.13`` + * - ``2.7`` + - ``2.7.0`` + - ``>=3.9``, ``<=3.13`` * - ``2.6`` - ``2.6.0`` - ``>=3.9``, ``<=3.13`` diff --git a/examples/tutorials/tacotron2_pipeline_tutorial.py b/examples/tutorials/tacotron2_pipeline_tutorial.py index f52c73bf73..db9ed5798f 100644 --- a/examples/tutorials/tacotron2_pipeline_tutorial.py +++ b/examples/tutorials/tacotron2_pipeline_tutorial.py @@ -276,11 +276,14 @@ def plot(waveforms, spec, sample_rate): # Workaround to load model mapped on GPU # https://stackoverflow.com/a/61840832 +# trust_repo=True is needed for non-interactive environments: torch.hub otherwise +# prompts on stdin for repos outside its trusted-owner list, which hangs forever. waveglow = torch.hub.load( "NVIDIA/DeepLearningExamples:torchhub", "nvidia_waveglow", model_math="fp32", pretrained=False, + trust_repo=True, ) checkpoint = torch.hub.load_state_dict_from_url( "https://api.ngc.nvidia.com/v2/models/nvidia/waveglowpyt_fp32/versions/1/files/nvidia_waveglowpyt_fp32_20190306.pth", # noqa: E501 diff --git a/requirements.txt b/requirements.txt index cecc6c3a2a..bfc3a9ea37 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,6 +2,6 @@ torch # Optional runtime dependencies -SoundFile +torchcodec # For build and test-time dependencies please refer to CONTRIBUTING.md