-
Notifications
You must be signed in to change notification settings - Fork 86
Implement aten.stft #2645
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Implement aten.stft #2645
Conversation
@microsoft-github-policy-service agree |
pytorch/pytorch#147052 (comment)
I think this PR’s implementation already uses result = op.STFT(signal, frame_step_const, window, frame_length_const, onesided=onesided) So I don’t think an decay to |
Hi! pytorch/pytorch#147052 (comment)
Could you elaborate a bit on this comment at your convenience? (If you think this simplification is necessary.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements the aten::stft
(Short-Time Fourier Transform) operator to resolve issue #147052. The implementation includes handling for various optional parameters like hop_length, win_length, window, normalized, onesided, and return_complex.
Key changes:
- Added STFT operator implementation with helper functions for batch dimension handling, window centering, and FFT normalization
- Registered the operator in test data with appropriate tolerance settings and xfail for float16 dtype
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
onnxscript/function_libs/torch_lib/ops/core.py | Implements aten_stft and five helper functions for STFT processing |
tests/function_libs/torch_lib/ops_test_data.py | Registers the new operator in test suite with tolerance and xfail configuration |
Fixed pytorch/pytorch#147052