Skip to content

feat(frontend): emit per-region hbm_sizes alongside hbm_addrs#60

Merged
booth-algo merged 1 commit into
mainfrom
feat/emit-hbm-sizes
Jun 4, 2026
Merged

feat(frontend): emit per-region hbm_sizes alongside hbm_addrs#60
booth-algo merged 1 commit into
mainfrom
feat/emit-hbm-sizes

Conversation

@booth-algo

Copy link
Copy Markdown
Collaborator

The decoder and vision compile results already return hbm_addrs (region name → HBM base offset). This adds a parallel hbm_sizes map (name → byte size, read straight off each InputVar.hbm_size) so downstream tooling can size every persistent HBM region — including the K_stored_* / V_stored_* KV stores, which tensor_layouts omits because it only covers input tensors — without recomputing the MXFP8 padding.

It is an additive result key built in the same loop that already constructs hbm_addrs, at both emission sites (decoder and vision encoder). No existing field changes, so existing consumers are unaffected.

Consumed by the simulator's new weight-manifest generator to build kind-tagged capacity-model manifests (weight / KV / activation regions). Without it the generator still works but falls back to tensor_layouts + address-deltas for sizing, which cannot size KV stores exactly.

Expose each HBM region's authoritative byte size (inp.hbm_size) as a
parallel name->bytes map in the decoder and vision compile results.
Downstream tooling (the simulator's weight-manifest generator) can then
size weight / KV / activation regions - including KV stores, which
tensor_layouts omits - without recomputing the MXFP8 padding. Additive
result key; back-compatible with existing consumers.
@booth-algo booth-algo merged commit bd91d46 into main Jun 4, 2026
3 checks passed
@booth-algo booth-algo deleted the feat/emit-hbm-sizes branch June 4, 2026 15:42
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