Repository navigation
Bump cuda-oxide to b099f64 - #60
Conversation
Bring the cuda-oxide b099f64 bump up to date with #47, #53, #54, #55, #57, and #59, giving every launch site those merges added the same unsafe-launcher treatment the bump requires. Conflict resolution: - gpu/ops/src/main.rs: took main's file wholesale (its check_moe_routing was restructured around the split/merge router wgrad kernels and the bit-identity determinism assert) and re-applied the bump's mechanical transformation on top -- per-check outer `unsafe` blocks with SAFETY comments, the two inline wraps in check_group_split_join, the `[ops]` progress lines, and the relaxed rmsnorm dw fast-vs-naive tolerance. check_moe_scatter_dy_case and check_moe_tie_routing already launch inside `unsafe`, so they were left alone. - gpu/model/src/lib.rs: main's semantics won everywhere they collided -- bf16-master `copy_device_region` refreshes instead of the retired convert-on-sync, `adamw_bf16_master_packed_grad` for the lm-head, packed expert panels in the SwiGLU forward, and `muon_apply_bf16` closing muon_step_raw inside the bump's function-level unsafe block. - gpu/tensor-gpu/src/main.rs: took main's rewritten check_adamw_master. - SPEC.md: kept both decision-log rows; main's bf16-masters row keeps 23 and the cuda-oxide pin moves to 24. - modal_app.py: kept main's dump_ptx (sm_100a pin plus every .ptx emitted) alongside the bump's baseline-toolchain install in compare_profile. Newly unsafe-wrapped launch sites from main's six merges: - gpu/model/src/lib.rs: GpuLinear::backward_into and GpuGroupedLinear::backward_into weight-gradient quantizes, ExpertPanel:: fill_zero, the SwiGLU forward panel match, and the fp32 oracle paths in expert_linear_forward / expert_linear_backward. - gpu/tensor-gpu/src/lib.rs: GpuBf16Tensor::widen_into and ::adamw_step. - gpu/tensor-gpu/src/main.rs: both arms of check_adamw_master's run closure. The gemm transpose_probe bin, flash-attn's function_profile, and the ExpertPanel upload paths needed no change: the probe already launches inside `unsafe`, and the other two are host-side.
Two containers on the merged branch measure 576.68 and 572.73 ms at the §13.9 shape, per-span spread <=0.71 ms on a 44 ms span. The pre-merge branch's 648.1 ms is not reproducible: it was that branch's missing-merge state plus container luck, not the codegen backend. The residual against main's recorded 552.80 ms is +21 ms (+3.9%) and splits cleanly. `optimizer.experts.sync_compute` (5.52 -> 7.11, +29%) and `optimizer.lm_head.sync_w_t` (0.242 -> 0.306, +26%) are the only spans in the step that move more than a few percent, and both are `transpose_bf16_pairs` -- about 1.7 ms of the 21, which #58 largely deletes. Everything else sits at a uniform +3% across memory-bound AdamW and compute-bound tcgen05 alike, and the flash kernel benches -- the one measurement comparable across the pin -- come back at their recorded values (persistent 1.929 ms / 227.1 TFLOP/s vs 1.937 / 226; ptxas budgets identical, persistent forward still 206 regs). No same-container A/B is possible across this pin: the baseline's own v0.2.1 CLI emits a gemm.ptx the B200 refuses to JIT (DriverError 218). Gates on the merged branch (B200): vecadd, ops, tensor-gpu, gemm (including the transposed M256 case), flash-attn flash (parity + budgets), and all 14 model gates including checkpoint v5 resume and v4 rejection. The model suite's first run missed the aligned-MoE overfit gate at 0.0515 against a 0.05 threshold and the rerun landed at 0.000033 -- that gate's known knife-edge, not a merge artifact.
|
Brought the branch up to date with main ( The 648 ms question is retired. Two containers on the merged branch: 576.68 / 572.73 ms (span spread ≤0.7%). The original 648.1 was the pre-merge branch state plus container luck, not the new backend. Residual vs main's 552.80: +3.9%, which decomposes as (a) a uniform +3% across all spans including memory-bound ones — container epoch signature, corroborated by flash benches returning byte-identical recorded numbers (persistent 206 regs, 1.929 ms / 227.1 TFLOP/s) — and (b) one real regression: |
Summary
b099f64c1a32869b74be99f4f88242fb68655b51stmatrixsupport with a localptx_asm!shim and harden rounded kernel launches against out-of-bounds accessesValidation
cargo test --workspace --all-targetscargo fmt --all -- --checkvecadd,tensor-gpu,ops,gemm,flash-attn, andmodel648.0966 ms(645.7602 mskernels)The same-container pre-bump profile could not reach measurement: after installing the matching historical cuda-oxide CLI, the v0.2.1
gemm.ptxfails B200 JIT withDriverError(218). The candidate profile and all correctness gates are green. Compute Sanitizer also reports this B200 as unsupported with the available toolkit/driver.Closes #56