You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Part of WS1 — Full Batch-Invariant Forward Chain (epic: #)
Why
Pointwise ops (activations, residual adds, scaling) and RoPE are usually assumed "safe" because they have no cross-element reduction — but that assumption needs to be verified, not trusted. A stray fused reduction, a dtype downcast at the wrong point, or a position-dependent RoPE precision issue can quietly reintroduce drift between the residual stream of batch=1 and batch=N.
Scope
Audit every elementwise op and RoPE on the forward path and confirm they are genuine pass-throughs with respect to batch configuration.
Enumerate the pointwise ops in the standard-Transformer forward path (activation, residual add, scaling, bias add, mask fill, dtype casts) and confirm none performs a batch-shape-dependent reduction.
Confirm RoPE produces identical rotated Q/K for a given position regardless of batch size, position in batch, or padding (cos/sin precompute and application order fixed; table-lookup vs inline documented if both exist).
Rewriting ops that already pass — this is an audit; failed ops must be fixed here or linked to a blocking fix issue before this issue closes.
RMSNorm, matmul, attention, logprob (covered by their own issues).
FP8.
Acceptance criteria
A short written audit lists each elementwise op + RoPE and its invariance verdict (pass / needs-fix).
RoPE output is bitwise-identical for a fixed position across all batch configs in the sweep.
Any op found to reintroduce drift is fixed here or linked to a blocking fix issue with a minimal repro against the harness; this audit does not close while known drift remains unresolved.
Mostly verification rather than new kernels — but the RoPE precision/order check is the one with real risk; treat it as the priority within this issue.
Padding-related position drift can silently corrupt attention; pay special attention to position ids.
Part of WS1 — Full Batch-Invariant Forward Chain (epic: #)
Why
Pointwise ops (activations, residual adds, scaling) and RoPE are usually assumed "safe" because they have no cross-element reduction — but that assumption needs to be verified, not trusted. A stray fused reduction, a dtype downcast at the wrong point, or a position-dependent RoPE precision issue can quietly reintroduce drift between the residual stream of batch=1 and batch=N.
Scope
Audit every elementwise op and RoPE on the forward path and confirm they are genuine pass-throughs with respect to batch configuration.
Out of scope
Acceptance criteria
Notes
Planned PRs