1. 05 May, 2023 1 commit
    • moto's avatar
      Fix MKL issue on Intel mac build (#3307) · 3e897ca7
      moto authored
      Summary:
      * Remove MKL and NumPy from Conda build env
      * Remove `caffe2::mkl` dependency from `torch_cpu`, which introduced unnecessary and undesided dependency on Intel mac.
      
      TorchAudio does not use BLAS libraries directly, thus all the mentions to MKL should be removed from the codebase.
      However, this was causing an issue on Intel mac. It turned out that `torch_cpu` target is pulling `caffe2::mkl` dependency, and the linker on macOS keeps library dependency even if no symbol from that library is used. This stray mkl dependency should be fixed on core side, but also we can modify the target temporarily and remove them.
      
      Also we don't need NumPy on build/run time, so that is removed as well.
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/3307
      
      Reviewed By: atalman
      
      Differential Revision: D45606944
      
      Pulled By: mthrok
      
      fbshipit-source-id: 853411ccbbca31796b808a2b052b4cfa564718cd
      3e897ca7
  2. 29 Dec, 2022 1 commit
  3. 21 Dec, 2022 1 commit
    • moto's avatar
      Extract libsox integration from libtorchaudio (#2929) · 1706a72f
      moto authored
      Summary:
      This commit makes the following changes to the C++ library organization
      - Move sox-related feature implementations from `libtorchaudio` to `libtorchaudio_sox`.
      - Remove C++ implementation of `is_sox_available` and `is_ffmpeg_available` as it is now sufficient to check the existence of `libtorchaudio_sox` and `libtorchaudio_ffmpeg` to check the availability. This makes `libtorchaudio_sox` and `libtorchaudio_ffmpeg` independent from `libtorchaudio`.
      - Move PyBind11-based bindings (`_torchaudio_sox`, `_torchaudio_ffmpeg`) into `torchaudio.lib` so that the built library structure is less cluttered.
      
      Background:
      Originally, when the `libsox` was the only C++ extension and `libtorchaudio` was supposed to contain all the C++ code.
      The things are different now. We have a bunch of C++ extensions and we need to make the code/build structure more modular.
      
      The new `libtorchaudio_sox` contains the implementations and `_torchaudio_sox` contains the PyBin11-based bindings.
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/2929
      
      Reviewed By: hwangjeff
      
      Differential Revision: D42159594
      
      Pulled By: mthrok
      
      fbshipit-source-id: 1a0fbca9e4143137f6363fc001b2378ce6029aa7
      1706a72f
  4. 28 Jul, 2022 1 commit
  5. 01 Apr, 2022 1 commit
    • moto's avatar
      Put CONDA_PREFIX second priority of ffmpeg search path (#2312) · 6a418a89
      moto authored
      Summary:
      Change the cmake logic to search CONDA_PREFIX before falling back
      to the other default paths and system paths.
      
      1. FFMPEG_ROOT
      2. CONDA_PREFIX
      3. Other locations (Package managers and system paths)
      
      For users with regular conda installation, ffmpeg from conda should
      be picked automatically.
      If anyone wants to specify the ffmpeg, then can set FFMPEG_ROOT
      variable to the location of desired installation.
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/2312
      
      Reviewed By: hwangjeff
      
      Differential Revision: D35317383
      
      Pulled By: mthrok
      
      fbshipit-source-id: 52aef8f3f7f0f8f1eaf7a89a2d1ccfb6265e2c50
      6a418a89
  6. 15 Feb, 2022 1 commit
    • moto's avatar
      Improve ffmpeg library discovery (#2204) · 963905e4
      moto authored
      Summary:
      This commit fixes the issue with ffmpeg discovery at build time.
      The original implementation had issues like.
      
      1. Wrong usage of FindFFMPEG, which caused mixture of ffmpeg libraries from system directory and user directory.
      2. The optional `FFMPEG_ROOT` variable was not set within cmake.
      
      The issue 1 is problematic when a user does not have a permission to
      modify the environment. For example, an old version of ffmpeg, which is
      installed in a directory managed by the system (such as `/usr/local/lib`),
      then there is no way to specify a path in which user installs a supported version
      of ffmpeg.
      
      This commit changes the behavior by first searching the library
      in `FFMPEG_ROOT` environment variables, then
      resorting to the original behavior of searching the custom paths with
      system default path.
      
      Also this commirt removes support for `libavresample`, which is deprecated in
      ffmpeg 4 and removed in ffmpeg 5.
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/2204
      
      Reviewed By: carolineechen
      
      Differential Revision: D34225769
      
      Pulled By: mthrok
      
      fbshipit-source-id: 95b0bfaaef31e2e69e6df29f789010f48a48210b
      963905e4
  7. 05 Jan, 2022 1 commit
    • moto's avatar
      Update ffmpeg discovery logic (#2124) · d8a65450
      moto authored
      Summary:
      Update ffmpeg discovery logic
      
      Previously the build process used pkg-config to locate
      an installation of ffmpeg, which does not work well Windows/CentOS.
      
      This commit update the discovery process to use the custom
      FindFFMPEG.cmake adopted from Kitware/VTK repository with addition of
      conda environment.
      
       The custom discovery logic can support Windows and CentOS.
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/2124
      
      Reviewed By: carolineechen
      
      Differential Revision: D33429564
      
      Pulled By: mthrok
      
      fbshipit-source-id: 6cb50c1d8c58f51e0f3f3af5c5b541aa3a699bba
      d8a65450
  8. 04 Jan, 2022 1 commit
    • moto's avatar
      Adopt FindFFMPEG.cmake (#2125) · 6a470649
      moto authored
      Summary:
      Preparation for updating the build process of ffmpeg-related feature
      to support Windows.
      
      Checking-in FindFFMPEG.cmake from Kitware/VTK repo without modification
      so that later it's easy to follow our modification on it with git tool.
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/2125
      
      Reviewed By: carolineechen
      
      Differential Revision: D33405408
      
      Pulled By: mthrok
      
      fbshipit-source-id: 5faea8940d2dfcf0b2f647eda3754f713d21fcd1
      6a470649
  9. 02 Apr, 2021 1 commit