Repository navigation
perf(qwen38): batch draft projections across lanes for concurrency - #651
Conversation
c136c86 to
98896bf
Compare
9608985 to
fae03e7
Compare
21b3aef to
e272492
Compare
There was a problem hiding this comment.
1 issue found across 64 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="server/test/test_batched_gdn.cpp">
<violation number="1" location="server/test/test_batched_gdn.cpp:73">
P2: In test_cpu_gdn_support_matrix the active op is built with n_tokens=2 yet active_slots has only 1 element. GGML construction asserts the active-slot ids tensor matches n_tokens*n_seqs (as run_gdn does with n_seqs for n_tokens==1, and as the sibling tree/tree_persist helpers assert), so on the --cpu path this GGML_ASSERT aborts the test instead of printing the support-matrix result. Size active_slots to n_tokens.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
8ba84d3 to
f74d1c9
Compare
There was a problem hiding this comment.
1 issue found across 5 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="server/test/test_draft_swa_multilane.cpp">
<violation number="1" location="server/test/test_draft_swa_multilane.cpp:139">
P3: When `draft_kv_init_batched` returns false for a real failure (e.g. `mem_buf` cache allocation fails), this combined condition prints "batched init allocated a single-lane graph", which misdirects debugging. Split the init-failure case from the graph-allocation checks and give each its own message.</violation>
</file>
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
|
Fixed the inherited NVIDIA CI failure in 6ab5d01b. The workflow still requested the pre-rename target test_gdn_transition_journal, while f74d1c9 renamed the CMake target to test_gdn_replay_log. Both the RTX 3090 and DGX failures on the previous #651 head stopped at that missing target. #659 has been refreshed by merging this new #651 head while preserving all measured follow-up commits. |
There was a problem hiding this comment.
1 issue found across 1 file (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name=".github/workflows/ci.yml">
<violation number="1" location=".github/workflows/ci.yml:216">
P2: The build target rename here is incomplete: the "Run concurrent-serving kernel tests" step in this same job still filters ctest with `gdn_transition_journal_preflight$`, but server/CMakeLists.txt now registers the tests as `gdn_replay_log`, `gdn_replay_log_gallocr`, and `gdn_replay_log_preflight`. The stale filter matches no registered test, so the new gdn replay-log coverage is silently dropped from the NVIDIA gpu-tests run (the other alternatives still match, so `--no-tests=error` does not catch it). Update the `-R` regex to the renamed test name so the preflight test actually executes.</violation>
</file>
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
6b21192 to
7aa0245
Compare
Add fixed-width DFlash2 concurrent decoding for Qwen3.8 and batch the shared dense draft projections across active lanes. Keep convolution, cache updates, RoPE, masks, and attention lane-local. Preserve transactional state promotion and fixed-chain validation through C6.
7aa0245 to
e6465dc
Compare
Stack
This PR is restacked on the current #642 head at
f45f874e, followed by two #651 commits:Summary
SWA layers: 5/5 (window=2048).The previous path ran each lane's dense draft backbone in a separate graph. The packed path combines projection columns and removes repeated MMQ launches without sharing lane state.
Projection A/B
This matched A/B isolates the unchanged #651 projection patch against its #642 parent. Warm medians exclude the first speculative round; each run generated a fixed 64-token output.
C1 is neutral. C2 and C3 reduce complete-round latency by 4.3% to 6.8%. The R9700 C3 rocprof trace reduced MMQ launches from 336 to 196 (-41.7%) and MMQ device time from 11.938 ms to 6.103 ms (-48.9%).
Lucebox versus llama.cpp: generic-prompt concurrency baseline
This initial matrix was measured before the restack, on Lucebox #651 at
67c15f3eand llama.cpp PR #27342 atf7aadef0. It is retained here as a historical, artifact-pinned baseline; the follow-up matrix below uses the blog-aligned UD-IQ4_XS target and the checked-in HumanEval-style prompts.The workload was synthetic engineering prose, not ordinary multi-turn chat: disjoint prompts of 250, 350, 450, or 550 words asked for a structured engineering analysis. Each cell used a fresh server, a same-concurrency 8-token warm-up, five measured repetitions, temperature 0, and exactly 256 generated tokens per request with EOS ignored. C1 through C4 used five server slots, 4,096-token per-request context, paged full attention, Q4_0 K/V cache, full GPU offload, no context shift, and disabled prefix/prompt/context-checkpoint caches. The GPUs ran sequentially. Aggregate throughput is total generated tokens divided by case wall time; ranges are the minimum and maximum of the five repetitions.
Radeon AI PRO R9700 (gfx1201)
Ryzen AI Max+ 395 / Strix Halo (gfx1151)
All 80 measured cases completed: 200/200 requests, with audit checks passing for output length, distinct prompt slices, GPU identity, model/draft identity, full offload, cache disablement, and required runtime markers. C5 was excluded from publication and C6 was not scheduled.
Artifact identity:
4e44edf892af6d57506fcd9eeaf5d0628f8737cfdce89652cb9d9bff82808eaebb727abc583498aa4deea8b3cd0c34c2d96553954cbff25b5f7bdd469f0f1306c18e800daedc59ca68fd13b6a856d795746af6d399a9279ac6a277d1d422f87eLucebox versus llama.cpp: HumanEval-style code prompts
This follow-up matches the workload used in the Qwen3.8 R9700 blog more closely. It uses the ten checked-in HumanEval-style prompts from
server/scripts/bench_he.py, with disjoint prompt slices at each level: prompt 0 for C1, prompts 1–2 for C2, prompts 3–5 for C3, and prompts 6–9 for C4. Each cell used a fresh server, a same-concurrency 8-token warm-up, temperature 0, EOS honored after Lucebox's configured 8-token minimum, a 256-token cap, and two measured repetitions.Both runtimes used five server slots, 4,096 tokens of per-request context, full GPU offload, no context shift, Q8_0 K/V cache, and disabled prompt/context-checkpoint caches. Lucebox used fixed DFlash2 width 8 and the packed draft backbone; llama.cpp used
draft-dflashwithn_max=7. The GPUs ran sequentially. Aggregate throughput is total output tokens divided by cell wall time; ranges are the two observed repetitions. The reported ratio is the median of paired per-repetition ratios. With two repetitions, the tabulated median is the midpoint of two observations and should be read as a limited estimate rather than a robust distribution.The Lucebox server retained
DFLASH_MIN_TOKENS=8; llama.cpp had no equivalent minimum-output floor. This can change a completion that would otherwise stop before eight tokens, so it is a protocol asymmetry. Every stable Lucebox completion ended at 19 tokens or more, but the retained logs do not contain a floor-trigger counter that proves whether the constraint activated.The exact Lucebox build is #651 at
8ba84d3d, whose parent is the current #642 headf45f874e. The comparator is llama.cpp PR #27342 atf7aadef0.Radeon AI PRO R9700 (gfx1201)
All 20 paired prompt executions had the same completion-token count and stop reason across the two runtimes, and all eight runtime/concurrency groups were repeat-stable. Output text hashes were runtime-specific rather than byte-identical.
Ryzen AI Max+ 395 / Strix Halo (gfx1151)
Only C1 is a valid paired speed comparison on Strix Halo. At C2 through C4, llama.cpp became repeat-unstable and stopped identical prompts at different output lengths—for example, one C2 prompt produced 7 tokens in repetition 1 and 137 in repetition 2, versus Lucebox's stable 97 tokens. Lucebox remained repeat-stable at every concurrency. The C2–C4 raw goodput values are retained as diagnostic evidence, but ratios are intentionally omitted because the runtimes did not perform equal output work.
Across both GPUs, all 32 cases and 80 requests completed. On R9700, each runtime produced 3,014 measured completion tokens with 20/20 stop/count parity. On Strix Halo, Lucebox produced 3,014 tokens while llama.cpp produced 2,123, with 8/20 stop/count parity. C5 and C6 were not run.
Artifact identity:
unsloth/Qwen3.8-27B-GGUF/Qwen3.8-27B-UD-IQ4_XS.gguf40fac4050e940397dbf13087afd50f4734a11805bf9d65ef8ddd7483470e6199bb727abc583498aa4deea8b3cd0c34c2d96553954cbff25b5f7bdd469f0f1306c18e800daedc59ca68fd13b6a856d795746af6d399a9279ac6a277d1d422f87eVerification
git range-diffreports the perf(qwen38): batch draft projections across lanes for concurrency #651 performance commit patch-equivalent across the current feat(qwen38): batch DFlash2 decode for Qwen3.8-27B concurrency #642 restack.f45f874eas its exact parent.dflash_server,test_gdn_replay_log, andtest_server_unitin Release mode forgfx1151;gfx1201with the project HIP Phase-2 path enabled.git diff --check.The generic and HumanEval-style concurrency matrices are reported here on #651. #654 adds sampled concurrent speculation and needs a separate restack onto this updated #651 head.