Guard invocation of cuda_version (#2952)
Summary: Currently, importing TorchAudio triggers a check of the CUDA version it was compiled with, which in turn calls `torch.ops.torchaudio.cuda_version()`. This function is available only if `libtorchaudio` is available; developers, however, may want to import TorchAudio regardless of its availability. To allow for such usage, this PR adds code that bypasses the check if `libtorchaudio` is not available. Pull Request resolved: https://github.com/pytorch/audio/pull/2952 Reviewed By: mthrok Differential Revision: D42336396 Pulled By: hwangjeff fbshipit-source-id: 465353cf46b218c0bcdf51ca5cf0b83c93185f39
Showing
Please register or sign in to comment