Skip to content

Performance drop after switch to torch istft #834

@apeguero1

Description

@apeguero1

🐛 Bug

There seems to be a significant performance drop after switching from using the torchaudio istft to torch istft (which itself was migrated from torchaudio).

istft switch from torchaudio to torch here #523
migration here #34827

I made a corresponding issue in pytorch #42213
(wasn't quite sure where the issue should be)

To Reproduce

pip install torchaudio==1.6.0

import torch
import torchaudio
import time
n_fft = 2**15
x = torch.rand(size=[1, n_fft//2 + 1, 10, 2])
start = time.time()
y = torchaudio.functional.istft(x,n_fft) # deprecated so it calls istft from torch
end = time.time()
print(end - start)

pip install torchaudio==0.5.1

import torch
import torchaudio
import time
n_fft = 2**15
x = torch.rand(size=[1, n_fft//2 + 1, 10, 2])
start = time.time()
y = torchaudio.functional.istft(x,n_fft)
end = time.time()
print(end - start)

Expected behavior

I would expect similar timings between:

torchaudio.functional.istft in torchaudio==1.6.0
and
torchaudio.functional.istft in torchaudio==0.5.1

Environment running torchaudio==1.6.0

PyTorch version: 1.6.0
Is debug build: No
CUDA used to build PyTorch: 10.2

OS: Ubuntu 18.04.3 LTS
GCC version: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
CMake version: version 3.12.0

Python version: 3.6
Is CUDA available: No
CUDA runtime version: 10.1.243
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: /usr/lib/x86_64-linux-gnu/libcudnn.so.7.6.5

Versions of relevant libraries:
[pip3] numpy==1.18.5
[pip3] torch==1.6.0
[pip3] torchaudio==0.6.0
[pip3] torchsummary==1.5.1
[pip3] torchtext==0.3.1
[pip3] torchvision==0.6.1+cu101
[conda] Could not collect

Environment running torchaudio==0.5.1

PyTorch version: 1.5.1+cu101
Is debug build: No
CUDA used to build PyTorch: 10.1

OS: Ubuntu 18.04.3 LTS
GCC version: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
CMake version: version 3.12.0

Python version: 3.6
Is CUDA available: No
CUDA runtime version: 10.1.243
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: /usr/lib/x86_64-linux-gnu/libcudnn.so.7.6.5

Versions of relevant libraries:
[pip3] numpy==1.18.5
[pip3] torch==1.5.1+cu101
[pip3] torchaudio==0.5.1
[pip3] torchsummary==1.5.1
[pip3] torchtext==0.3.1
[pip3] torchvision==0.6.1+cu101
[conda] Could not collect

Additional context

Both environments are from google colab

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions