onnxruntime
1441b36d - [WebGPU] Add MRotaryEmbedding support (#31976)

Commit
5 days ago
[WebGPU] Add MRotaryEmbedding support (#31976) ## Description Add WebGPU Execution Provider support for the Microsoft-domain MRotaryEmbedding contrib op introduced for CPU and CUDA in #31728. The WebGPU kernel: - supports rank-3 BSNH and rank-4 BNSH inputs - supports sectioned and interleaved mRoPE layouts - supports interleaved and non-interleaved rotary pairing - supports float and float16 data, scaling, and partial rotary dimensions - preserves non-rotary tail values and invalid/out-of-range position IDs - validates full int64 position IDs by reading both u32 storage words - implements the shader as a parameterized WGSL template The operator tests now explicitly exercise WebGPU and extend the formerly CUDA-only negative-attribute, out-of-bounds position ID, and empty-input cases to both GPU providers. ## Testing - Release WebGPU build of onnxruntime_provider_test - onnxruntime_provider_test.exe --gtest_filter="ContribOpMRotaryEmbeddingTest.*" (9 tests passed) - WGSL template generation across the WebGPU source tree (52 templates generated) - lintrunner on all changed C++, header, test, and WGSL template files - git diff --check ## Notes The standalone WGSL template Python suite has two pre-existing golden-file mismatches for core subgroup-matrix templates. That smoke test scans core/providers/webgpu only; this PR adds its template under contrib_ops/webgpu and does not affect those mismatches.
Author
Parents
Loading