Skip to content

Add a standalone cuda-oxide fused residual RMSNorm kernel #2832

Closed

Description

@inureyes

Problem / Background

We need one reusable inference kernel with a numerical oracle before spending effort on MLX scheduling integration. Depends on #2831 and its successful target-execution gate.

Design: feasibility review, added in #2835. Reference semantics: src/lib/mlxcelverse/kernels/fused_norm.cpp and src/lib/mlxcel-core/src/fused_norm_parity_tests.rs.

Proposed Solution

Implement standalone fused residual-add + RMSNorm in the isolated oxide package. Start with f32, then f16/bf16 activations and supported weight dtypes. Keep MLX types and headers outside the package; consume the artifact/ABI contract from #2831.

Acceptance Criteria

  • Return both normalized output and rounded residual sum; preserve rounding before squaring, f32 accumulation, epsilon, and weight-bias 0/1 semantics.
  • Freeze per-dtype tolerances before measurement, using existing parity budgets as the starting point; compare deterministic fixtures against the existing fused CUDA and graph references.
  • Exercise small/odd/tail widths and representative widths 1024/4096/8192, one and multiple rows, mixed weight dtypes, and NaN/Inf policy. Reject invalid shapes and unsupported layouts explicitly; do not silently narrow the accepted contract.
  • Save machine-readable results with dtype, shape, error metrics, artifact identity, and executed case counts. Run actual GB10 tests under gpu-lock; no-GPU skips are not acceptance.
  • Add a standalone warm/cold benchmark with synchronized timing boundaries and reusable fixtures; correctness is required, speedup is not required for closure.

No MLX runtime integration, attention, quantized matmul, or new inference engine. Record compiler/dtype blockers rather than substituting weaker semantics or claiming unrun coverage.

Activity

  1. added
    status:blocked
    type:enhancement
    priority:medium
    area:core
    platform:linux
    on Nov 2, 2026
  2. added
    status:ready
    and removed
    status:blocked
    on Nov 3, 2026
  3. added a commit that references this issue on Nov 15, 2026
    ac506ba
  4. added this to the 0.9 milestone on Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:coreplatform:linuxpriority:mediumstatus:readytype:enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions