torch.istft should keep accepting real inputs in the future and not display a warning, because of ONNX #92204
Labels
module: fft
module: onnx
Related to torch.onnx
triaged
This issue has been looked at a team member, and triaged and prioritized into an appropriate module
馃殌 The feature, motivation and pitch
Right now when using torch.istft with float inputs (last dimension being [2]), the following warning is displayed:
UserWarning: istft will require a complex-valued input tensor in a future PyTorch release. Matching the output from stft with return_complex=True
https://github.com/pytorch/pytorch/blob/v1.13.1/aten/src/ATen/native/SpectralOps.cpp#L977-L981
However ONNX doesn't support (or support very badly) complex values. The ONNX STFT operator only output float values, with the last dimension being [2], and torch.stft with return_complex=True isn't supported when exporting to ONNX:
#92087
Therefore the future ONNX ISTFT operator is expected to take a float input with last dimension [2]. So torch.istft should remain compatible with that format in the future.
Alternatives
No response
Additional context
No response
cc @mruberry @peterbell10
The text was updated successfully, but these errors were encountered: