perf(draft): pack dynamic-convolution projections across lanes - #657
Closed
Graffioh wants to merge 20 commits into
Closed
perf(draft): pack dynamic-convolution projections across lanes#657Graffioh wants to merge 20 commits into
Graffioh wants to merge 20 commits into
Conversation
Restore the paged-attention C ABI through a separate tree entry point. Reject unsupported GDN variants, initialize root-only chain trees, and size draft metadata from graph capacity.
Keep GDN journals inside the result buffer, restore the 10-source tensor layout, validate every tree destination before mutation, and allow selector widths that use the CPU top-k fallback.
Validate singleton selector vocabularies and token IDs before codebook gathers. Reject unsupported GDN output layouts on Vulkan, and use overflow-safe ceil division in paged attention.
Preserve paged-KV allocation order across rollback and destroy draft graphs before park frees their weights. Reject invalid GDN replay layouts and malformed SWA metadata. Exercise both grouped and scalar GDN dispatch paths.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on #656. Review the top commit,
00ba24f1; the diff collapses to this mechanism after #656 merges.Summary
The production change is 25 additions and 6 removals in one file. It retains no legacy multilane runtime path.
R9700 fixed-C A/B/A
Qwen3.8 27B IQ4_XS target, Q8 DFlash2 width 8, Q8 KV, HumanEval raw code prompts, ten fixed-width waves, 256 forced output tokens, temperature 0. Normal runs provide latency and goodput; matched ROCprof runs provide dispatch and device-time evidence.
The mean minimum A/B/A draft-compute improvement at C2-C4 is 4.39%. Complete output digests match at C1-C4, all 300 requests return 256 tokens, and captures report zero dropped records.
Against the A/A2 bracket mean, end-to-end goodput improves by 0.79%, 0.23%, 0.43%, and 0.47% at C1-C4. Those are marginal system gains. The keep decision rests on the small production diff plus two separately measured effects: materially lower draft compute and ten fewer speculative dispatches per added lane.
The launch accounting is exact per added lane: ten Q8 coefficient-input quantize launches and ten coefficient MMQ launches disappear, while ten packing concat launches are added. Fixed-C elementwise device time rises by 0.88%, 1.36%, and 1.56% at C2-C4, but coefficient GEMM time falls enough for the draft phase to win. TTFT is mixed and is not a justification for this change.
Strix Halo
The same normal A/B/A protocol passes output parity, fixed-token accounting, capture integrity, and lower-C drain accounting. Its timing is performance-inconclusive: the unchanged C1 path moves by 8.65% against the bracket mean and A/A2 draft drift reaches 15.47%. It is retained as correctness and harness evidence, not as support for the performance decision.
Verification
test_inference_profiletest_observabilitytest_qwen35_roctxtest_seq_engine_contract(15 checks)git diff --checkThe device-resident selector handoff and the R9700 target MMQ C2-to-C3 cliff remain separate follow-ups.