Skip to content

placement: BLOOMERY_KV_FLOOR plans Qwen3.8's experts at a KV floor; Room::fit past the card's bytes is refused by name - #1185

Merged
midagedev merged 1 commit into
mainfrom
ctxfloor-r12
Nov 8, 2026
Merged

midagedev merged 1 commit into
mainfrom
ctxfloor-r12

Conversation

@midagedev

Copy link
Copy Markdown
Owner

Qwen3.8가 KV floor(BLOOMERY_KV_FLOOR)에서 전문가를 펼쳐 256k에서 카드 전문가 9,497 → 11,627; room fit OOM은 이름 붙은 에러로.

What and why

The first two steps toward a context that grows on demand. Room::fit past the card's free bytes now ends in GpuError::NoRoom. The error names the store, the positions, the bytes asked, the page and the device's free bytes. Before, it was a raw driver OOM. BLOOMERY_KV_FLOOR plans Qwen3.8's expert spread at a KV floor below ctx_max. The rooms still reserve the range and rows at ctx_max, so the experts the cap's KV would take stay on the card until a sequence grows. Unset, the plan is the one made before the lever. cuMemGetInfo now has one owner (current_mem_info).

Release notes: Added — BLOOMERY_KV_FLOOR (Qwen3.8): plan the card's experts at a smaller context and keep the full context's room reserved; a fit past the card's memory is a named error.

Code shape

  • No second copy. cuMemGetInfo had copies in Gpu::mem_info and the xstream ring. The new code would have added two more, so all of them now call current_mem_info.
  • Model code holds only architecture facts. The floor is a PlanLevers term in the common planner. Qwen3.8's seat only parses it.
  • Dead code is gone.
  • No silent failure. A floor above the cap is PlacementError::KvFloor. A fit past the free bytes is NoRoom.
  • Comments state what is true now.
  • No relaxed gate. The unsafe ratchet came down (gpu 3098 → 3097).
  • fmt and clippy are clean (just remote-static origin/main: ok).

Duplication found or removed: crates/gpu/src/lib.rs Gpu::mem_info and crates/gpu/src/host/xstream.rs card_mem now call current_mem_info.

What I ran

  • Narrowed just affected (tools/narrow-scan.sh origin/main), fixture tier on the box: DONE total=216 red=0 tier=fixture skipped=1 wall=2396s deferred=270
  • Real tier, the gates the fixture tier defers: gate-placement, gate-q38-serve-rules, gate-gpu-gates-lib: DONE total=3 red=0 tier=real
  • FAIL-first: .mutants/ctxfloor-room-raw.patch → room::tests::hw_held_a_fit_past_the_free_bytes_is_refused_by_name ... FAILED, and every other hw_held_ test ok.
  • bloomery-serve-qwen38 --plan --place bp --ctx-size 262144 (A6000 + 3090): unset card_experts=9497 host_experts=7843; BLOOMERY_KV_FLOOR=4096 gives kv_floor=4096 card_experts=11627 host_experts=5713.

Hardware

Box: RTX A6000 + RTX 3090 (250 W cap).

🤖 Generated with Claude Code

https://claude.ai/code/session_01XgzWzhZmMb7Ec2SohqrR1A

…uError::NoRoom); BLOOMERY_KV_FLOOR plans Qwen3.8's expert spread at a KV floor below ctx_max (unset: the plan as before)

R1 and R2 of the context-growth plan. The rooms keep their range and rows at ctx_max. With the lever set, a sequence
that grows past the floor's bytes ends in the named NoRoom until the residency machine can free bytes (the next round).
At ctx 262144, place bp on the A6000 + 3090, the floor 4096 puts 11,627 experts on the card against 9,497 unset.
cuMemGetInfo has one owner (current_mem_info), which brings the gpu crate's unsafe blocks to 3097. The card-filling
refusal test runs alone (hw_held_). plan38's schema carries kv_floor.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01XgzWzhZmMb7Ec2SohqrR1A
@midagedev
midagedev merged commit 5e69920 into main Nov 8, 2026
4 checks passed
@github-actions github-actions Bot added gpu The card engine: crates/gpu*, crates/app host Host crates: qdot, threads, engram, engram-lab, runtime, sampler, levers, decision, vision, refset model The CPU engine and model files: crates/model, models, hf, gguf, tokenizer, jinja placement Placement planning: crates/placement labels Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gpu The card engine: crates/gpu*, crates/app host Host crates: qdot, threads, engram, engram-lab, runtime, sampler, levers, decision, vision, refset model The CPU engine and model files: crates/model, models, hf, gguf, tokenizer, jinja placement Placement planning: crates/placement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant