[js/webgpu] Add DFT operator#29454
Open
nicholascelestin wants to merge 2 commits into
Open
Conversation
Author
|
@microsoft-github-policy-service agree |
Author
|
@guschmue , know this might take a bit, but was hoping a maintainer could kick off the CI checks, so we've got a place to start? |
Author
|
@qjia7, just pinging to try and unblock this, since it currently has no reviewers and CI hasn't run yet. |
Contributor
|
Thanks for the contribution. Could you also add the WebGPU implementation under the WebGPU provider directory? JSEP will be deprecated soon and replaced by the WASM + WebGPU architecture. |
Author
This good? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Implements the
DFToperator (opset 17–20) for the WebGPU (JSEP) execution provider: a batched shared-memory mixed-radix (2/3/4/5) Stockham FFT, with an O(N^2) direct-DFT fallback for non-5-smooth lengths. Handles real/complex input, forward/inverse (1/N-normalized), one-sided RFFT and one-sided-inverse IRFFT, and the opset-20dft_length/axistensor inputs — matching the semantics of the CPU kernel incore/providers/cpu/signal/dft.cc.Motivation and Context
The WebGPU EP had no DFT/FFT kernel, so spectral and audio-preprocessing models fall back to a slow path (#20997). This adds it to the JSEP EP. The op test suite was extended to cover the WebGPU backend; I also verified the kernel against ORT's CPU DFT on real WebGPU across the forward, inverse, RFFT, and IRFFT paths. As with other
onnxruntime-webop PRs, CI is the source of truth for the full web build.Closes #20997