onnxruntime
c7873286 - Add exact normalization and rotary CUDA operator modes (#33469)

Commit
9 days ago
Add exact normalization and rotary CUDA operator modes (#33469) ## Summary - Add opt-in explicit FP32 arithmetic and packed input slicing for BranchwiseRMSNorm. - Add versioned RotaryEmbedding exact arithmetic while retaining existing default dispatch. - Keep RMS-chain regression coverage with this PR, independent of tensor fusions. ## Review follow-up - Honor deterministic CUDA sessions by using the existing fixed-order column reduction instead of the single-row floating-point atomic reduction. Default dispatch remains unchanged. The schema documents that deterministic summation may round differently from the default path or deterministic ReduceMean. - Add CUDA exact-mode branch-scale parity coverage for distinct `(C, H)` and flattened `(C * H)` scales over multiple outer rows, covering FP32, FP16, and BF16 input and scale storage. - Add a width-8192 single-row deterministic-session regression with a numerical reference, repeated bitwise comparison, and widened-output checks. - Prevent GroupQueryAttentionFusion from removing either RotaryEmbedding node when `use_fp32_arithmetic` is requested. Add a version-2 graph-transformer regression for query-only, key-only, both-exact, and ordinary fusion. - Regenerate the affected contrib and kernel documentation using the official renderers with source-derived metadata, including version-2 availability/history, optional widened outputs, type constraints, and CPU/CUDA/DML registrations. Full native `--gen_doc validate` remains a CI check. ## Clean main-based replacement Supersedes https://github.com/microsoft/onnxruntime/pull/33459. Reconstructed directly on `main` (`28225b8583474cf6a6e7f97222227ae668f80e8b`), without the old divergent feature-branch history. This PR targets `main` directly and has no dependency on another operator PR. Family documentation is bundled here; the separate old documentation PR #33465 is retired. ## Validation - Used the `qwen-flash` Conda environment. - Ran `lintrunner -a` before committing, followed by a passing check-only run on the full PR delta and `git diff --check`. - Per request, the review follow-up does **not** rebuild ORT/GenAI or execute the new native/GPU tests. Their execution and full generated-documentation validation are left to CI. - The original branch was previously checked with schema syntax checks and affected CUDA/host/test translation-unit compilation (SM90); this historical compile evidence does not validate the new review follow-up. - The previous head's React Native Android failure was an npm `ETIMEDOUT` downloading `supports-color`, not a source compilation failure. CUDA builds succeeded, but CUDA test jobs were canceled. The new push starts fresh CI; no claim that all pipelines are green. - Full main-based model/GPU requalification remains outstanding; keeping this PR in draft. - No benchmark/profiling/evaluation scripts or local task metadata are included.
Author
Parents
Loading