Package Details: python-torchaudio 2.0.1-1

Git Clone URL: https://aur.archlinux.org/python-torchaudio.git (read-only, click to copy)
Package Base: python-torchaudio
Description: Data manipulation and transformation for audio signal processing, powered by PyTorch
Upstream URL: https://github.com/pytorch/audio
Licenses: BSD
Conflicts: python-torchaudio-git
Submitter: HenryJia
Maintainer: HenryJia
Last Packager: HenryJia
Votes: 5
Popularity: 0.000349
First Submitted: 2020-08-27 18:23 (UTC)
Last Updated: 2023-03-18 21:41 (UTC)

Sources (6)

Latest Comments

1 2 3 Next › Last »

m2345 commented on 2023-03-24 04:01 (UTC)

Is it just me or this package does not support ffmpeg? I'm getting the following error:

from torchaudio.utils.ffmpeg_utils import get_input_devices

for k, v in get_input_devices().items():
    print(f"{k}: {v}")

RuntimeError: get_input_devices requires FFmpeg extension which is not available. Please refer to the stacktrace above for how to resolve this.

yan12125 commented on 2023-02-14 07:41 (UTC)

I don't use this package anymore - removing myself from co-maintainers.

yan12125 commented on 2022-07-04 03:21 (UTC)

Nice! Updated.

rien333 commented on 2022-07-03 15:22 (UTC)

export CUDACXX=/opt/cuda/bin/nvcc also works!

yan12125 commented on 2022-07-03 12:02 (UTC)

Nice! Could you also try this? It is kind of unusual to use CMAKE_CUDA_COMPILER as an environment variable instead of a CMake parameter.

export CUDACXX=/opt/cuda/bin/nvcc

are you able to build this package yourself outside of a clean chroot?

To be honest, I've never tried that. I always use chroots for non-trivial packages to avoid mysterious issues, and this package is far from a trivial one :)

rien333 commented on 2022-07-03 10:38 (UTC)

Jeez, I finally got this to build. This recent thread helped a bit.

  export CXX=/usr/bin/g++-11
  export CUDAHOSTCXX=$CXX
+  export CMAKE_CUDA_COMPILER=/opt/cuda/bin/nvcc

The last line of the diff is the only thing I had to add! Would you consider it adding to the PKGBUIKLD, at least until someone figures out what interveres with building outside of a clean chroot?

And btw, are you able to build this package yourself outside of a clean chroot?

rien333 commented on 2022-06-10 09:03 (UTC) (edited on 2022-06-10 09:03 (UTC) by rien333)

Thank you for your continued help! Unfortunately, it's just not as simple as not having /opt/cuda/bin/nvcc — community/cuda obviously installs this binary, and running /opt/cuda/bin/nvcc --version produces the same output as in your Cmake log.

In the end, I "fixed" this by building this package in a clean chroot. Not ideal, but maybe a proper solultion/answer will come around one day.

yan12125 commented on 2022-06-07 14:59 (UTC)

Not sure what's going on for you. Here are relevant logs for me:

$ grep -A 10 'Checking whether the CUDA compiler' /var/lib/archbuild/extra-x86_64/yan12125/build/python-torchaudio/src/audio/build/temp.linux-x86_64-3.10/CMakeFiles/CMakeOutput.log
Checking whether the CUDA compiler is NVIDIA using "" matched "nvcc: NVIDIA \(R\) Cuda compiler driver":
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Tue_May__3_18:49:52_PDT_2022
Cuda compilation tools, release 11.7, V11.7.64
Build cuda_11.7.r11.7/compiler.31294372_0
Compiling the CUDA compiler identification source file "CMakeCUDACompilerId.cu" succeeded.
Compiler: /opt/cuda/bin/nvcc
Build flags:
Id flags: --keep;--keep-dir;tmp;-ccbin=/usr/bin/g++-11;-gencode=arch=compute_52,code=sm_52;-gencode=arch=compute_60,code=sm_60;-gencode=arch=compute_62,code=sm_62;-gencode=arch=compute_70,code=sm_70;-gencode=arch=compute_72,code=sm_72;-gencode=arch=compute_75,code=sm_75;-gencode=arch=compute_80,code=sm_80;-gencode=arch=compute_86,code=sm_86;-gencode=arch=compute_86,code=sm_86 -v

$ grep -r CMAKE_CUDA_ARCH /var/lib/archbuild/extra-x86_64/yan12125/build/python-torchaudio/src/audio/build/temp.linux-x86_64-3.10
/var/lib/archbuild/extra-x86_64/yan12125/build/python-torchaudio/src/audio/build/temp.linux-x86_64-3.10/CMakeCache.txt:CMAKE_CUDA_ARCHITECTURES:UNINITIALIZED=52-real;60-real;62-real;70-real;72-real;75-real;80-real;86-real;86
/var/lib/archbuild/extra-x86_64/yan12125/build/python-torchaudio/src/audio/build/temp.linux-x86_64-3.10/CMakeFiles/3.23.2/CMakeCUDACompiler.cmake:set(CMAKE_CUDA_ARCHITECTURES_ALL "35;37;50;52;53;60;61;62;70;72;75;80;86;87")
/var/lib/archbuild/extra-x86_64/yan12125/build/python-torchaudio/src/audio/build/temp.linux-x86_64-3.10/CMakeFiles/3.23.2/CMakeCUDACompiler.cmake:set(CMAKE_CUDA_ARCHITECTURES_ALL_MAJOR "35;50;60;70;80")

I got Compiler: /opt/cuda/bin/nvcc but you have Compiler: CMAKE_CUDA_COMPILER-NOTFOUND. Maybe that program is somehow missing or broken for you?

rien333 commented on 2022-06-07 09:10 (UTC)

Still having the same sort of problems, a month later:

-- Caffe2: Protobuf version 3.20.1
-- Found CUDA: /opt/cuda (found version "11.7")
-- The CUDA compiler identification is unknown
CMake Error at /usr/share/cmake/Modules/CMakeDetermineCUDACompiler.cmake:633 (message):
  Failed to detect a default CUDA architecture.

  Compiler output:

Call Stack (most recent call first):
  /usr/lib64/cmake/Caffe2/public/cuda.cmake:41 (enable_language)
  /usr/lib64/cmake/Caffe2/Caffe2Config.cmake:88 (include)
  /usr/lib64/cmake/Torch/TorchConfig.cmake:68 (find_package)
  CMakeLists.txt:87 (find_package)

-- Configuring incomplete, errors occurred!
See also "/tmp/makepkg/python-torchaudio/src/audio/build/temp.linux-x86_64-3.10/CMakeFiles/CMakeOutput.log".
See also "/tmp/makepkg/python-torchaudio/src/audio/build/temp.linux-x86_64-3.10/CMakeFiles/CMakeError.log".

CMakeError.log contains the following:

Checking whether the CUDA compiler is NVIDIA using "" did not match "nvcc: NVIDIA \(R\) Cuda compiler driver":
Checking whether the CUDA compiler is Clang using "" did not match "(clang version)":
Compiling the CUDA compiler identification source file "CMakeCUDACompilerId.cu" failed.
Compiler: CMAKE_CUDA_COMPILER-NOTFOUND 
Build flags: 
Id flags:  -v

The output was:
No such file or directory


Compiling the CUDA compiler identification source file "CMakeCUDACompilerId.cu" failed.
Compiler: CMAKE_CUDA_COMPILER-NOTFOUND 
Build flags: 
Id flags:  -v

The output was:
No such file or directory

Note that cmake fails at CMakeDetermineCUDACompiler.cmake:633:

  if(NOT CMAKE_CUDA_COMPILER_ID STREQUAL "NVIDIA" OR _CUDA_CMP0104 STREQUAL "NEW")
    set(CMAKE_CUDA_ARCHITECTURES "${architectures_detected}" CACHE STRING "CUDA architectures")

    if(NOT CMAKE_CUDA_ARCHITECTURES)
      message(FATAL_ERROR "Failed to detect a default CUDA architecture.\n\nCompiler output:\n${CMAKE_CUDA_COMPILER_PRODUCED_OUTPUT}")
    endif()

What is the value of CMAKE_CUDA_ARCHITECTURES in your case? What should it be? (It's empty for me.)

Maybe worth another try with /usr/local/cuda

Forget about /usr/local/coda, that was just a temporary bug in how CUDA was packaged on Arch (see also my previous comment).

yan12125 commented on 2022-05-25 05:16 (UTC)

I switched to GCC 11 and it works with /opt/cuda. Maybe worth another try with /usr/local/cuda :)