Skip to content

[js/webgpu] Add DFT operator#29454

Open
nicholascelestin wants to merge 2 commits into
microsoft:mainfrom
nicholascelestin:js-webgpu-dft
Open

[js/webgpu] Add DFT operator#29454
nicholascelestin wants to merge 2 commits into
microsoft:mainfrom
nicholascelestin:js-webgpu-dft

Conversation

@nicholascelestin

Copy link
Copy Markdown

Description

Implements the DFT operator (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-20 dft_length/axis tensor inputs — matching the semantics of the CPU kernel in core/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-web op PRs, CI is the source of truth for the full web build.

Closes #20997

@nicholascelestin

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

@nicholascelestin

Copy link
Copy Markdown
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?

@nicholascelestin

Copy link
Copy Markdown
Author

@qjia7, just pinging to try and unblock this, since it currently has no reviewers and CI hasn't run yet.

@qjia7

qjia7 commented Jul 10, 2026

Copy link
Copy Markdown
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.

@nicholascelestin

Copy link
Copy Markdown
Author

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.

This good?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] DFT/STFT WebGPU op support (web/js)

2 participants