perf(gdn): dispatch exact causal-conv chunks - #127
Conversation
ac373b7 to
c3bb0f3
Compare
|
Operator triage: parking blocker named per protocol — this draft is CONFLICTING against main (the GDN/qwen3_5 files moved under it: the Kimi runner fold #122 landed config-side GDN-geometry synthesis and main took several Vulkan/device lanes). Since it touches SACRED-adjacent files (qwen3_5.cpp, gdn_attn, cuda_gdn.cu), the standing bar applies: rebase onto current main, re-run the qwen35/qwen27 paged-forward + GDN suites on the rebased tree, and mark ready — then it enters the normal mutation-review + land flow. Happy to do the record-file reconciliation at landing (keyed files = main wholesale + your rows) if you handle the code-side rebase. |
Make the row-PR provenance visible to GitHub's synthetic merge check without changing the measured tree. FOLLOWING_AGENTS_PROTOCOL Assisted-by: Codex:gpt-5.6-sol [Codex]
c3bb0f3 to
0f7efbb
Compare
Make the row-PR provenance visible to GitHub's synthetic merge check without changing the measured tree. FOLLOWING_AGENTS_PROTOCOL Assisted-by: Codex:gpt-5.6-sol [Codex]
0f7efbb to
ddefcb9
Compare
The at-a-glance row, the section heading and the closed-row table all called the benchmarked model Laguna-XS-2.1. The measured checkpoint is poolside/Laguna-S-2.1-NVFP4: 118B total / ~8B active MoE, 48 layers, 256 experts, ~67 GiB. The label came from the local checkpoint directory being named laguna-xs-nvfp4. Evidence that the two names are one benchmark: the same 37.55 -> 44.46 vs vLLM 43.10 pair appears in this file under "Laguna-XS NVFP4" and in the same document's row for "Laguna-S-2.1 MoE (LagunaForCausalLM, 118B/8B)", both dated 2026-08-04; and the NVFP4 arm spec pins the checkpoint at poolside/Laguna-S-2.1-NVFP4, ~67 GiB, with layers 1..47 MoE. The section now states the model geometry and says where the XS label came from, so it cannot drift back. The reproduce row keeps the real directory name with a note that it holds the S-2.1 checkpoint. Numbers, ratios and evidence anchors are unchanged; this is a naming correction only. FEATURES.md and README are untouched: they list "Laguna-S / Laguna-XS 2.1" as a model family, which is a separate question from which checkpoint was measured. No open issue or PR covers this (searched issues and PRs for laguna naming; open PRs are #127, #128, #140, #141, none related). FOLLOWING_AGENTS_PROTOCOL Assisted-by: Claude Code:claude-opus-5 [ClaudeCode]
Make the row-PR provenance visible to GitHub's synthetic merge check without changing the measured tree. FOLLOWING_AGENTS_PROTOCOL Assisted-by: Codex:gpt-5.6-sol [Codex]
ddefcb9 to
604a378
Compare
Build and upload exact causal-convolution work descriptors once per step, reuse them across GDN layers, and make the exact register-kernel mapping the default. Keep the production AsyncLLM benchmark path in the same checkpoint so the measured scheduler and kernel improvement is reproducible on current upstream/main. Row: row/KERNEL-SSM-MAMBA-EXACT-CHUNKS FOLLOWING_AGENTS_PROTOCOL Assisted-by: Codex:gpt-5.6-sol [Codex]
Canonicalize semantic consumer bodies without Python-version-only AST fields, and gate the representation under Python 3.12 and 3.13. FOLLOWING_AGENTS_PROTOCOL Assisted-by: Codex:gpt-5.6-sol [Codex]
Make the row-PR provenance visible to GitHub's synthetic merge check without changing the measured tree. FOLLOWING_AGENTS_PROTOCOL Assisted-by: Codex:gpt-5.6-sol [Codex]
Record the merged Gemma-4 MoE path as known merged-GEMM drift and close the stale embeddings claim after PR mudler#137 landed. FOLLOWING_AGENTS_PROTOCOL Assisted-by: Codex:gpt-5.6-sol [Codex]
604a378 to
32eb2f0
Compare
…re-push sandbox (#159) Two guards on main were RED and between them blocked every open external contributor PR (#127, #154, #155) and every push. Both premises were verified in the tree before changing anything. 1) check-device-leakage: src/vllm/v1/worker/gpu/runner.cpp named vt::DeviceType::kCUDA in the device-agnostic shared layer (DSR bucket 'kcuda' 1 > baseline 0). It came in with the QueueSupportsAsyncInputCombine rescope during the PR #140 fix round - ours, not the contributors'; richiejp reported it in #127's honest gaps. Fixed the way the guard's own message prescribes, mirroring the SupportsAuxStream precedent: ask the backend, not the device. New vt::Backend::SupportsAsyncSampledTokenReadback() (base false) answers whether the host may validly read the sampled token id back between steps; CPU overrides true (host and device memory are one allocation) and CUDA overrides true (the id is device-mirrored). The runner asks vt::TryGetBackend(queue.device.type), whose nullptr for a device absent from the build also subsumes the old #ifdef VLLM_CPP_CUDA guard. SEMANTICS UNCHANGED: CPU async-ON, CUDA async-ON, discrete non-CUDA (ROCm gfx1201) async-OFF - the "!"-token hazard stays closed. 2) .githooks/pre-push ran check-policy.py inside a PARTIAL export (README.md docs scripts .agents), but policy_contract.py:428 asserts AGENTS.md is a non-symlink regular file and resolves its Markdown links against that sandbox. AGENTS.md and its .env.example link were both missing, so the hook failed closed on content that is fine in the real tree - every push refused. EXPORT_PATHS is now a superset of what the CHECKERS read. Gates: check-device-leakage RED->GREEN (kcuda=0, DSR 32 == baseline 32); all four hook checkers OK in the reproduced sandbox; test_async_llm 8/8-347, test_engine_core 6/6-44, test_llm_engine 11/11-204 (CPU still resolves async-ON); clean -Werror CPU build; full 11-gate record battery green. FOLLOWING_AGENTS_PROTOCOL Assisted-by: Claude (Opus 5) via Claude Code
localai-bot
left a comment
There was a problem hiding this comment.
Approved. Verified on the merge result against current main, not just on the branch.
What I ran (merge of this branch into 1f3b7148, conflicts resolved):
- Every
scripts/check-*.py: green, includingdevice-leakage. - Clean CPU build: 1103/1103 targets.
ctest: 356/356. One failure under-j8(test_engine_core_proc) passes serially — the known parallel-starvation flake, not a regression from this change.
On the code: the exact (sequence, 8-token chunk) program list is the right mirror of upstream compute_causal_conv1d_metadata, and I like that the descriptor is optional on CausalConv1dArgs with the pair validated in vt::CausalConv1dFwd — CPU keeps its scalar reference and no other backend has to care. Default-ON with VT_CONV_EXACT_CHUNKS=0 as the same-binary rollback matches our parity-enabler policy exactly.
On the CI that was red: device-leakage was our blocker, not yours. runner.cpp named DeviceType::kCUDA in the device-agnostic layer — my own regression, which you flagged in the honest-gaps section of this PR. Fixed on main in #159 via a Backend::SupportsAsyncSampledTokenReadback capability, in the shape of SupportsAuxStream. Thanks for reporting it rather than working around it.
Conflicts were records-only and resolved per our rules: .agents/state.md and .agents/benchmark-record.md unioned as append-logs; scripts/merged-gemm-consistency-allowlist.txt had a gemma4_moe key added independently on both sides, kept as one entry.
Merge is prepared and green locally. It is queued behind a repo-wide agent-record break (.agents/policy-cutover points at a pre-squash SHA that never landed on main), which I have raised with mudler — nothing for you to do.
perf(gdn): dispatch exact causal-conv chunks Contributed by Richard Palethorpe <io@richiejp.com>; merged with --no-ff so the four authored commits land under their own authorship. Mirrors upstream compute_causal_conv1d_metadata: grid.y becomes a flattened list of (sequence, 8-token chunk) programs instead of a rectangular grid that either padded or ran sequences serially. The descriptor is optional on CausalConv1dArgs and validated as a pair in vt::CausalConv1dFwd; CUDA consumes it, CPU keeps its scalar reference. Default ON per the parity-enabler policy, with VT_CONV_EXACT_CHUNKS=0 as the same-binary rollback. Contributor measured 720.047 -> 234.607 ms (3.07x) on the causal-conv family, sm_120 Qwen3.5-4B c32, byte-identical output tokens. The branch's only red check was device-leakage, which was OUR blocker: runner.cpp named DeviceType::kCUDA in the device-agnostic layer. Fixed on main in #159. Verified on the merge result: every scripts/check-*.py green, clean CPU build 1103/1103, ctest 356/356 (test_engine_core_proc fails only under -j8 and passes serially, the known parallel-starvation flake). CI on the #165 landing branch also had build-test-cpu, build-test-vulkan and device-leakage green. Conflicts, three files, all records: .agents/state.md and .agents/benchmark-record.md unioned per the append-log rule; scripts/merged-gemm-consistency-allowlist.txt had a gemma4_moe key added independently on both sides, kept as one entry with main's text. FOLLOWING_AGENTS_PROTOCOL Assisted-by: Claude Opus 5 (1M context)
…-merge Merge #127 (richiejp): perf(gdn) dispatch exact causal-conv chunks
Row
KERNEL-SSM-MAMBA— exact causal-convolution chunk-dispatch sublever; one row per PR.Before starting
scripts/ready-for-helper.pyresult when applicable:.agents/kernel-matrix.md:156(KERNEL-SSM-MAMBA,INVENTORIED); feedsROAD-V1-C2-LOCAL-BF16. The scoped spike is.agents/specs/sm120-qwen35-conv-chunking-2026-08-07.md.src/vt/cuda/cuda_gdn.cu:702-819,include/vllm/v1/attention/backends/gdn_attn.h:33-43,tests/vt/test_ops_gdn.cpp, and pinned vLLMvllm/model_executor/layers/mamba/ops/causal_conv1d.py:15-28,71-79,123-124at555967922.What changed
Build exact
(sequence, 8-token chunk)causal-convolution descriptors once per engine step, upload them once, reuse them across GDN layers, and dispatch one register-kernel program per descriptor. Exact dispatch is default ON;VT_CONV_EXACT_CHUNKS=0restores the former whole-sequence mapping andVT_CONV_REG=0retains the tiled/scalar rollback. The PR also correctsvllm-benchto drive the productionAsyncLLMfrontend used to select and measure this kernel lever.Evidence
scripts/agent-preflight.shpasses: all record gates, mutation suites, live-row audit, and committed-range document checks green against canonicalupstream/mainf91a5917a.test_ops_gdn66/66 cases, 4300/4300 assertions; cached Qwen3.5-4B 3/3 cases, 1672/1672 assertions. Rollback/default production token files compare byte-for-byte.docs/STATUS.md,docs/BENCHMARKS.md, anddocs/FEATURES.mdupdated; complete repro and profiler evidence is indocs/bench-evidence/qwen35-4b-sm120-main-20260807.md.Speed claims
${GPU_LOCK}and they are recorded indocs/BENCHMARKS.mdwith the repro recipe.On the local RTX 5070 Ti / Qwen3.5-4B c32 workload, a clean-current-main same-binary Nsight Systems comparison reduces causal-conv GPU time from 720.216507 ms to 234.379395 ms (3.072866x) and improves the profiled enclosing run from 6587.66 to 6727.35 tok/s (+2.1205%), with byte-identical tokens. Three alternating unprofiled pairs measured +2.152% total/output throughput and improvements in TTFT, TPOT/ITL, and E2E latency. The sealed same-hardware vLLM throughput ratio becomes 1.021246x.
Honest gaps