interplane.Get Omega
Read in your language

CUDApp

CUDA++: AIEN’s GPU machine-code toolchain, runtime and driver client for NVIDIA GPUs without the CUDA toolkit. Hardware coverage and driver replacement limits are explicit.

Brought by drakestapleton

Define numerical contracts for native kernels and whole-token decode

Open · #16 · open 2026-10-22 17:08 UTC

Imported from GitHub aien-dev/CUDApp#16, by drakestapleton

drakestapleton wrote on 2026-10-22 17:08 UTC

Problem

src/omega_gpu_decode_graph.h explicitly documents RMSNorm and SwiGLU differences from the host-glue path. Simulator correctness, deterministic replay, bitwise equivalence and model quality are distinct claims. Extend #13 without duplicating its existing same-input chip repeatability gate.

Scope and dependencies

Define per-operation contracts consumed by the optimization experiments. Reuse #9's math references and #13's determinism checks.

Acceptance

  • Document exact integer/bitwise modes, tolerance-based floating-point modes, reduction ordering, NaN/Inf/subnormal/tie behavior and supported precision/scaling boundaries.
  • Validate current graph stages and end-to-end logits/tokens against explicit references; include multi-turn and supported-context cases.
  • Distinguish within-implementation repeatability from equality to a different implementation.
  • Add adversarial and boundary cases plus mutants for changed scale, expert omission, wrong rounding and wrong tie selection.
  • Define model-quality acceptance before enabling transformations that change arithmetic or representation; no imported paper tolerance becomes the default without justification.
  • Expose the selected contract in benchmark receipts.

Evidence and closure

Review baseline: 232332422bfdc31c8918085b50f13c1e18ab702e; re-inspect the current tree and reuse existing work before editing. Coordinate with #5 and #6 and the serving/chip-window owner; host work can proceed independently of hardware scheduling. This issue does not authorize interrupting the live motor or switching kernel drivers.

Publish exact source/pin SHAs, build and binary hashes, commands, exit codes, hardware/driver identity, raw logs and relevant negative controls under evidence/. Separate host, simulator and GB10 results. Hardware acceptance needs a real coordinated GB10 run on the final integrated artifact. Keep CUDA userspace dependencies out of the deployed runtime. Do not close on a branch push, simulator-only hardware result or PR merge alone. Experimental issues may close with a reproducible negative result and explicit decision; do not claim an optimization shipped unless its integration gates pass.

CUDA-LEARN integration addendum

Contracts for generated kernels and training-path consistency

Existing work is on roadmap/16-numerical-contracts at 2da3fa1b2392bcab593bbb5f71a36b04a6d289b1, including src/omega_gpu_numerical_contract.h. Its comparator explicitly accepts finite nonempty arrays; do not imply NaN/Inf coverage from this implementation. Preserve and port useful behavior/tests to seeded .om under #52 and aien-dev/omega-mv#599.

The generated-task work #53 must freeze the reference, arithmetic mode and tolerances before candidate search. Each contract distinguishes bitwise equality to a selected reference, repeatability of one implementation, bounded FP error, real-algebraic equivalence, model-level quality and rollout/update consistency. None substitutes for another. If a mode excludes nonfinite inputs or unsupported scale ranges, refusal is part of its contract.

Require recorded accumulation/reduction order, FMA/approximation policy, signed-zero, subnormal, masking and tie rules where applicable. Treat dtype/layout/tensor-core changes as contract-relevant. Validate exact integer modes independently, not through a tolerance comparator.

#55 contributes tested determinism only. #56 must retain finite-precision obligations even if a real-algebraic witness is proved. #60 requires exact matching of native policy snapshots and probability processing before log-probability reuse; close logits under a tolerance do not satisfy that bitwise gate.

Add expected-failure cases for an empty/skipped-output kernel that would otherwise pass permissive tolerances, changed scale/rounding, unsupported nonfinite values and a wrong policy snapshot. Use the current numerical owner and trace format; do not create a competing numeric authority.

No comments.

Sign in to comment