Commit 77bd4d3
MAINT: speed up istft by using col2im (the original python code used … (#42826)
Summary:
Fixes #42213
The [original python code](https://github.com/pytorch/audio/blob/v0.5.0/torchaudio/functional.py#L178) from `torchaudio` was converted to a native function, but used `eye` to allocate a Tensor and was much slower.
Using `at::col2im` (which is the equivalent of `torch.nn.functional.fold`) solved the slowdown.
Pull Request resolved: #42826
Reviewed By: smessmer
Differential Revision: D23043673
Pulled By: mthrok
fbshipit-source-id: 3f5d0779a87379b002340ea19c9ae5042a43e94e1 parent 4665f3f commit 77bd4d3
1 file changed
+15
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
367 | 367 | | |
368 | 368 | | |
369 | 369 | | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | | - | |
374 | | - | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
375 | 377 | | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | | - | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
380 | 386 | | |
381 | 387 | | |
382 | 388 | | |
| |||
0 commit comments