Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

torch.istft should keep accepting real inputs in the future and not display a warning, because of ONNX #92204

Closed
divideconcept opened this issue Jan 14, 2023 · 2 comments
Assignees
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

Comments

@divideconcept
Copy link
Contributor

divideconcept commented Jan 14, 2023

馃殌 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

@lezcano lezcano added module: onnx Related to torch.onnx triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module module: fft labels Jan 15, 2023
@justinchuby
Copy link
Collaborator

We will be trying to gain support for new onnx ops that deal with complex numbers instead.

@justinchuby
Copy link
Collaborator

onnx/onnx#4785

@justinchuby justinchuby closed this as not planned Won't fix, can't repro, duplicate, stale May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

3 participants