dasLLAMA vulkan: the resident plan's auto-arm headroom follows the platform - the 2 GiB floor where no OS reports room (Linux), the WDDM share on Windows - so the Qwen3.6-35B-A3B arms unpinned on a 16 GB Linux card; the tier names a driver without the four-wide decode; the Linux RTX 5080 scaling pass ledgered - #3990
Conversation
…S answers: the larger of 2 GiB and 27% of the tier's cap stays the WDDM share on Windows (the demotion collapse the constant's comment measures), and elsewhere the 2 GiB floor stands alone (`plan_headroom`) - the OS room query is the Windows memory manager's, so on Linux it never answers, and the share alone declined the Qwen3.6-35B-A3B UD-IQ2_XXS on a 16 GB RTX 5080 whose floor arms it at a reduced context (a reviewer's reading: 10406 MB usable against 11167 of weights unpinned, armed at ctx 102754 under DASLLAMA_GPU_VRAM_MB=14000, 3659.95 / 144.91 against 1471.53 / 68.46 declined); a decline taken with no OS answer names the headroom it stood on and DASLLAMA_GPU_VRAM_MB as the pin that reads no room; the residency companion's headroom paragraph and the environment table's row say so, the declines file pins both arms of the headroom and the plan's wiring; the Vulkan ledger's item 44 records that the driver admits K-quant planes only off a repacked load (the same reviewer's note: the CPU chains' predicate at the driver's four admission sites, where the device gather reads either layout - a device-side predicate, proven on a box whose backend does not repack) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…V_cooperative_matrix_decode_vector`: every cm2 tile then runs the scalar decode arm, and a MoE prefill window reads about a third longer than on a driver with the four-wide arm (the Qwen3.6-35B-A3B's 512-row window 160 ms with the twin against 237 without on the RTX 5060 Ti; the NVIDIA Linux 580 branch lists `_matrix`, `_matrix2` and `_vector` but not the decode-vector extension, the Windows 616 branch has it) - the GEMM companion's class-pipeline section carries the cost beside the fallback it already names; the Vulkan ledger's item 45 records the scaling pass on a rented Linux RTX 5080 against the 5060 Ti (llama.cpp b10660 1.88x / 2.06x across the two cards, ours 1.12x / 1.30x): the twin off on Linux, the deltanet scan, the shared expert's k5/k6 tiles, the router's fixed grid and the routed tiles' single-workgroup schedule pieces flat on the wider card, decode on a per-dispatch floor of about five microseconds over some six hundred dispatches per token while the GEMV probe itself scales with the bandwidth (410 -> 881 GB/s), each lever named for its own slice Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Approval recommended
The behavior change is well-contained, tests cover the new headroom rules, and the remaining feedback is limited to minor documentation wording.
Pull request overview
This PR adjusts dasLLAMA’s Vulkan resident-driver auto-arming behavior so that when the OS does not report per-process VRAM “room” (notably on Linux), the plan uses a fixed 2 GiB headroom floor instead of a WDDM-oriented percentage share; Windows retains the WDDM share behavior. It also improves diagnosability for performance regressions when the driver lacks the cooperative-matrix decode-vector extension.
Changes:
- Introduces
plan_headroom(budget, wddm)and updatesplan_room/ resident decline messaging to reflect platform-specific headroom and theDASLLAMA_GPU_VRAM_MBpin behavior. - Adds a Vulkan-tier init warning when
VK_NV_cooperative_matrix_decode_vectoris not reported (cm2 decode falls back to scalar path). - Updates tests and documentation/architecture notes to match the new headroom rules and observed driver capability behavior.
File summaries
| File | Description |
|---|---|
| modules/dasLLAMA/dasllama/dasllama_gpu_resident.das | Adds platform-sensitive headroom helper and updates plan/decline messaging for “no OS room” cases. |
| modules/dasLLAMA/tests/test_gpu_serving_declines.das | Expands test_plan_room coverage to assert the new plan_headroom behavior and platform wiring. |
| modules/dasLLAMA/dasllama/dasllama_vulkan_common.das | Logs a warning when cm2 decode-vector is requested but not supported by the driver. |
| modules/dasLLAMA/ENVIRONMENT.md | Clarifies semantics of DASLLAMA_GPU_VRAM_MB w.r.t. pinning/headroom/OS room queries. |
| modules/dasLLAMA/ARCHITECTURE_GPU_VULKAN_RESIDENCY.md | Updates residency-plan architecture doc to match the revised headroom policy and decline messaging. |
| modules/dasLLAMA/ARCHITECTURE_GPU_VULKAN_GEMM.md | Documents decode-vector fallback cost and the new init-time warning. |
| modules/dasLLAMA/followup_vulkan.md | Adds follow-up ledger items describing K-quant admission coupling and scaling diagnosis notes. |
Review details
- Files reviewed: 7/7 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…directory - the item carries every figure it cites, and a path outside the tree is one no reader can follow Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
There was a problem hiding this comment.
🔵 Needs a closer look
The new runtime warning message hardcodes specific driver version claims that are likely to become stale and should be made version-agnostic.
Review details
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
modules/dasLLAMA/dasllama/dasllama_vulkan_common.das:1273
- The new device-init warning hardcodes specific driver branches/versions ("Linux 580" vs "Windows 616"). That’s likely to become stale quickly and may mislead users on other drivers; the actionable part is the missing extension and the expected perf impact. Consider making the message version-agnostic and (optionally) pointing to the env knob being requested.
- Files reviewed: 7/7 changed files
- Comments generated: 0 new
- Review effort level: Lite
…rms beside ours on the 5060 Ti: llama.cpp runs the scalar arm on Linux too (it strips the decode-vector ops when the driver lacks the extension) at a 32-deep expert-tile k step where its four-wide arm runs 64, and arm- and k-step-matched the two engines read the same whole model (the Qwen3.6-35B-A3B UD-IQ2_XXS pp512 2049 against 2080; its four-wide 2828.9 against our twin 2995.8; its scalar at k step 32 2385-2393), so its Linux edge on this axis is the 32-deep step (1.15x for it) and the tiles alone stay 1.2-1.3x behind at either matched arm - the item names the k step and the decode body's pair form as the levers in that order; a reference built with a glslc that does not know `GL_NV_cooperative_matrix_decode_vector` (Vulkan SDK 1.4.350) keeps the 64-deep step over a scalar decode and under-reads llama.cpp by 27% with `NV_coopmat2` in its banner where the four-wide build says `NV_coopmat2v`, which the bring-up document's reference section now states; the device-init warning names the missing extension and its cost without naming driver branches (a review note), and the GEMM companion's class-pipeline section points at the item for which drivers list it Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
There was a problem hiding this comment.
🟡 Changes recommended
The new warning/docs describe the scalar decode slowdown as “about a third” despite the PR’s own cited measurements indicating ~1.5× (~48%) longer, which makes the user-facing messaging inconsistent.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 8/8 changed files
- Comments generated: 2
- Review effort level: Lite
…w gained (a pinned cap takes no headroom and reads no OS room): the table is rendered from the `[EnvConfig]` declarations and the registry test compares the two, so the row edited by hand alone read stale on the extended-checks lane; the generator's output now matches the checked-in file byte for byte and `test_env_registry.das` reads 14 of 14 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Approval recommended
The changes are scoped, test-backed, and align code/docs around platform-specific VRAM headroom behavior, with only minor doc wording nits noted.
Review details
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
modules/dasLLAMA/ARCHITECTURE_GPU_VULKAN_GEMM.md:151
- The parenthetical compares two window times but the second value (“237”) is missing its unit, which makes the sentence ambiguous to read/scans as a typo.
- Files reviewed: 9/9 changed files
- Comments generated: 0 new
- Review effort level: Lite
…: a MoE prefill window runs about half again as long without the four-wide arm (160 ms against 237 on the RTX 5060 Ti's 35B window, 1.48x), where the device-init warning and the GEMM companion's class-pipeline section said "about a third" - the twin's share of the longer window, not the scalar arm's cost over the shorter one (a review note) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Approval recommended
The behavior change is narrowly scoped, is covered by targeted tests, and the associated diagnostics/documentation updates are consistent with the implementation.
Review details
- Files reviewed: 9/9 changed files
- Comments generated: 0 new
- Review effort level: Lite
Behavior change: on a box where no OS reports video-memory room (Linux), the whole-model resident driver's auto arm keeps the 2 GiB floor as its headroom instead of the larger of 2 GiB and 27% of the tier's cap; Windows keeps the share.
Why. The review of #3988 ran the branch on a Linux RTX 5080: unpinned, the driver declined the Qwen3.6-35B-A3B UD-IQ2_XXS ("needs 16464 MB of 10406 MB (weights alone 11167 MB)") and the per-op rails served at 2.5x lower rates, while
DASLLAMA_GPU_VRAM_MB=14000armed it whole. The room query the plan reads is the Windows memory manager's, so on Linux it never answers and the plan took a headroom sized for a WDDM demotion collapse that Linux does not have.What changes.
plan_headroom(budget, wddm): the WDDM share on Windows, the 2 GiB floor elsewhere;plan_roomcalls it with the platform. A decline taken with no OS answer names the headroom it stood on andDASLLAMA_GPU_VRAM_MBas the pin that reads no room.VK_NV_cooperative_matrix_decode_vector: the cm2 tiles then run the scalar decode arm, and a MoE prefill window runs about half again as long (160 ms with the four-wide arm against 237 without, the 5060 Ti's 35B window).followup_vulkan.mditems 44 and 45: the driver's K-quant admission riding the CPU repack flag (the review's second note), and the scaling diagnosis below.Observable behavior. On a rented Linux RTX 5080 (driver 580.173, 8 vCPU), the 35B unpinned: declined on master (per-op rails 648.4 / 25.4) -> armed at ctx 44159 with this branch, pp512 3361.1 +- 41.6 / tg128 139.8 +- 0.1, the same rate as pinned at 14000 MB (armed at ctx 102754: 3356.2 / 140.1). On Windows nothing moves:
plan_headroom(16 GiB, true)is still 27%.Where to look.
plan_headroom/plan_roomindasllama_gpu_resident.das; the device-init warning indasllama_vulkan_common.das;test_plan_roomintests/test_gpu_serving_declines.daspins both arms and the plan's wiring.Validation, the Linux rows, the scaling diagnosis
Validation
tests/test_gpu_serving_declines.das17 of 17 (the plan-room cell asserts the WDDM arm at 27% of 16 GiB, the floor winning on a 4 GiB cap, the off-WDDM 2 GiB, and the plan taking this platform's headroom). Lint clean on both rails; the review-md gate OK.Same-box rows (the pod,
-t 8, debug-jit)The reviewer's 32-core box read 3660 / 145 for our pinned row and 5083.8 / 140.3 for llama.cpp b10660 built from source; the host accounts for the difference.
Scaling 5060 Ti (Windows 616.56) -> 5080 (Linux 580.173); bandwidth 448 -> 960 GB/s, 36 -> 84 SMs
DASLLAMA_GPU_PROF=1Three causes, from the per-role profile (ledger item 45 carries every role):
VK_NV_cooperative_matrix_decode_vector(it lists_matrix,_matrix2,_vector), so every cm2 tile runs the scalar arm - and so do llama.cpp's there, at a 32-deep expert-tile k step where its four-wide arm runs 64. Same box, same source (b10660), the 5060 Ti's 35B pp512: llama.cpp four-wide 2828.9, scalar at k step 32 2385-2393, scalar at k step 64 2080; ours twin 2995.8, scalar at k step 64 2049. Arm- and k-step-matched the two engines read the same, so on this axis llama.cpp's Linux edge is its 32-deep k step (1.15x for it), and the tiles alone stay 1.2-1.3x behind at either matched arm (its scalar decode is written for the driver's two-wide commoning: a pair's shared work once, the element selected last). A local llama.cpp reference built with a glslc that does not know the extension (Vulkan SDK 1.4.350) runs the scalar arm at k step 64 by default and under-reads the reference by 27% - its banner saysNV_coopmat2, the four-wide build'sNV_coopmat2v(the bring-up document's reference section now says so). Arm-matched, the expert tiles scale 1.80 to 1.90x; the probe reads 0.71 ms per iq2xxs gate/up plane on the 5080 no-twin against 0.73 twin-on / 1.33 twin-off on the 5060 Ti.The pod's card ran 2910-2925 MHz at 250-263 W of a 307 W limit under load. Host over GPU time on the pod: 176 us per token.
Not done