Repository navigation
fix(xla): refresh the plamo2 prefill goldens for the shifted-add scan - #3471
Conversation
PR #3434 replaced the reduce_window cumsum in the Mamba2 SSD scan with a shifted-add prefix sum and regenerated the nemotron_h and falcon_h1 goldens, but the plamo2 fixture from #3449 was frozen before that change landed. Main has failed `registered_fixtures_are_byte_exact` and `emit_all_reproduces_registered_goldens` since db3a231. Re-frozen with MLXCEL_FREEZE_GOLDENS=1. Only plamo2 prefill.mlir and prefill_logits.mlir change, and only by the expected substitution (6 reduce_window ops become shifted pad, slice and add), the same pattern as nemotron_h in #3434. All mlxcel-xla lib tests pass (585) and the structural gate of validate_arch.sh passes on metal.
CUDA GB10 execution of Plamo2 on the shifted-add scan, main
|
| gate | result | before (#3449 record) |
|---|---|---|
xla_plamo2 original-checkpoint oracle |
40/40 tokens | 40/40 |
xla_plamo2 hybrid synthetic parity |
single-sequence exact, worst ragged 1.03e-5 | 1.0e-5 |
xla_plamo2 2048-window probe |
inclusive mask, worst 5.4e-6 (minus 2.9e-6, plus 2.8e-6) | 5.4e-6 |
validate_arch.sh --batch 4 --requests 8 --maxcap 24 --oracle |
structural, token-exact and serve reference-exact PASS (170 tokens) | exit 0 |
No divergence. ROCm hip is still unverified for Plamo2, as before.
Plamo2 on ROCm
|
| gate | result |
|---|---|
plamo2_original_checkpoint_oracle_tokens |
40/40 oracle tokens match |
plamo2_synthetic_parity |
single-sequence tokens exact; worst ragged logit delta 1.037e-5 |
plamo2_window_probe |
window matches the inclusive mask (worst 5.454e-6), window_minus the exclusive mask (worst 3.695e-6), window_plus the plus mask (worst 2.716e-6) |
scripts/xla/validate_arch.sh --model <plamo-2-1b> --device hip --batch 4 --requests 8 --maxcap 24 --oracle spike/openxla/plamo2_reference/oracle.json: exit 0.
| gate | result |
|---|---|
| structural (byte-exact) | PASS |
token-exact single-seq (xla_oracle_check) |
PASS: 40 reference tokens |
serve reference-exact (xla_batch_bench, B=4, N=8) |
PASS: 8 requests, 170 tokens |
The ROCm numbers sit next to the GB10 CUDA ones in spike/openxla/FINDINGS_plamo2.md, with the ragged delta slightly higher (1.037e-5 vs 1.0e-5). That file still says "ROCm hip is not verified here", so it can be updated.
One observation outside the gates: the serve bench measured 7.29 tok/s batched against a 20.08 tok/s sequential baseline (0.4x) on this host.
Main has been red in
mlxcel-xlasince #3434 (db3a231):registered_fixtures_are_byte_exactandemit_all_reproduces_registered_goldensfail onplamo2/prefill.mlir. #3434 replaced thereduce_windowcumsum in the Mamba2 SSD scan with a shifted-add prefix sum and regenerated the nemotron_h and falcon_h1 goldens, but the plamo2 fixture added by #3449 was frozen against the old scan.This re-freezes the registered goldens with
MLXCEL_FREEZE_GOLDENS=1. Onlyplamo2/prefill.mlirandplamo2/prefill_logits.mlirchange, and the op counts differ only by the expected substitution: 6reduce_windowops are replaced by shiftedpad,sliceandadd, the same pattern as the nemotron_h regeneration in #3434. No emitter code changes.Validation
cargo test -p mlxcel-xla --lib: 585 passed, 0 failed (2 failed on main).scripts/xla/validate_arch.sh --model models/plamo-2-1b --device metal: structural gate passes. The execution tier could not run on this host because the checkpoint shipstokenizer.jsonlonly and the trajectory dump readstokenizer.json, the same limit feat(xla): add Plamo2 hybrid support #3449 recorded. The scan change itself was validated in fix(xla): replace the reduce_window cumsum in the Mamba2 SSD scan #3434.