Skip to content

kv_budget: charge the load delta when the baseline free exceeds total (APU GTT) - #351

Merged
AzeezIsh merged 3 commits into
mainfrom
fix/hip-kv-budget-baseline-gtt
Nov 12, 2026
Merged

AzeezIsh merged 3 commits into
mainfrom
fix/hip-kv-budget-baseline-gtt

Conversation

@AzeezIsh

Copy link
Copy Markdown
Contributor

Problem

On the DevLab Strix Halo runner (100 GB total), hipMemGetInfo reports a baseline free of about 122.6 GB, which is above total. scales_disagree only compared free-now with total. After a big model loads, free-now drops back under total, so the baseline-to-free-now delta was judged implausible and Atlas fell back to total − free_now. That undercounts its own memory by about 20 GB. KV was then oversized, and Ripple at util 0.90/0.95 and Flash-Next at 0.92 OOMed mid-run.

Fix

A baseline above total also counts as scales disagreeing, so Atlas charges the real delta. Regression test: baseline_above_total_charges_the_delta_even_when_free_now_fits.

Verification (runner)

  • Ripple AR at util 0.90: Atlas-own 86.2 GB, 3.5 GB KV (11.4k tokens). It boots and serves at 3.6 tok/s, pp 154 (42980761254); before the fix this config OOMed.
  • Ripple DFlash2 at 0.90 and Flash-Next at 0.92 now refuse cleanly at boot ("No memory left for KV cache") instead of OOMing.
  • Flash-Next at util 0.95 (43113665154): serves; probe, json_schema, tools, no-tool and join pass. /v1/score fails on main too ("QSA host layer state is not AttnLayerState"), not this change.
  • Boxes where total is accurate (framework, 128 GB) never have a baseline above total, so they are unaffected.

Note: on the runner, Flash-Next now needs util ≈0.95 (the old 0.76 only booted because of the undercount).

🤖 Generated with Claude Code

AzeezIsh and others added 3 commits November 11, 2026 02:36
…es disagree

DevLab runner, Ripple-65B (run 42977170558): baseline free 122.6 GB on a 100 GB
GTT total; after 83 GB of weights + layer construction free-now reads 36.1, back
under total, so the free > total guard (a00ecd7) never fired. total - free_now
charged 63.9 GB pre-KV, the correct 86.5 GB delta was called implausible, and the
25.8 GB pool OOMed at 98.9 GiB used. Same cause as the runner's Flash-Next OOM at
GPU_UTIL 0.92 (pre-KV 69.5 GB vs framework's 89.2). Devices whose baseline fits
their total are sized exactly as before; regression test with the runner's numbers.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… only switches to the delta when it fits)

zero_and_absent_measures_fall_back_to_raw_used pins baseline 140 on a 121.7
total with free-now 14.9: the 125.1 delta exceeds total, so it must stay
Implausible and charge raw used. The runner cases (Ripple delta 86.2, Flash-
Next ~92 on 100) still take the delta.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@AzeezIsh
AzeezIsh merged commit f3f700a into main Nov 12, 2026
22 of 27 checks passed
AzeezIsh pushed a commit that referenced this pull request Nov 12, 2026
…-f341)

Campaign against frozen main f3f700a (#343 strict-spec batching + #350/#351
kv_budget/dflash follow-ups). Ten required gates run on two exclusive GB10
boxes; records split b4ee (echolp, ttft x2, ssm, decode-floor, concurrency,
vision, video) / f341 (bfcl-subset, agentic-webserver).

video-fidelity FAILS its gate floor: backend-parity leg — mp4 (32f/8fps)
samples to 16 groups/928 tok while the zero-delay gif fixture lands at 4
groups/244 tok; deterministic divergence between the ffmpeg subprocess and
in-process gif decoders on this tree. Record committed is the earlier
ffmpeg-absent run (7/13 legs, 6 skipped); the full-ffmpeg rerun scored
12/13 and wrote no record because the run ended Failed.

Required manual fixes this campaign needed: libssl-dev + ffmpeg on the
gate boxes, soundfile in the bfcl venv, and a serve-override restoring the
bfcl recipe's shell-quoted default_chat_template_kwargs as raw JSON.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant