Conversation
Assisted-by: OpenAI Codex Signed-off-by: Summer Yang <girasoleyang@gmail.com>
Signed-off-by: Summer Yang <girasoleyang@gmail.com>
GirasoleY
force-pushed
the
review/glm52-pcp-fused-norm-rope
branch
from
August 21, 2026 01:33
5647ce6 to
b2e2996
Compare
Contributor
|
This pull request has merge conflicts that must be resolved before it can be |
Reduce fused PCP dispatch and combine overhead. Reuse the first indexer reduction barrier while keeping reduction results in a dedicated shared slot, and cap the q=2048 static-E4M3 dispatch specializations at 32 registers on CUDA 12.9 and newer. Remove unused KV and K-pe output materialization while preserving BF16 rounding, restrict the system fence to the NVLS writer warp, and process four independent cache rows per combine CTA. Update the op schema, callers, and distributed NVLS correctness coverage accordingly. Signed-off-by: Summer Yang <girasoleyang@gmail.com>
GirasoleY
force-pushed
the
review/glm52-pcp-fused-norm-rope
branch
from
August 21, 2026 22:46
94582a5 to
21575ef
Compare
LucasWilkinson
added a commit
to LucasWilkinson/vllm
that referenced
this pull request
Sep 8, 2026
…/RoPE merge The vllm-project#53173 merge moved the index_k_out allocation into the has_indexer branch only; layers without an indexer (skip_topk) hit UnboundLocalError in fused_norm_rope.
This branch has not been deployed
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.
Summary
Fuse PCP Q/K preparation, cache quantization, and NVLS publication into one dispatch kernel plus one combine kernel for prefill, mixed, and decode batches.
Dispatch
It launches one 256-thread CTA per local token and performs:
k_pe.For static E4M3, the fixed transport row is:
For
fp8_ds_mla, the fixed transport row is:Full workspace
Combine
The second kernel reads the received rank-major rows and scatters them into each rank's local paged caches:
Scope and limitations
2 * num_ubatches * PCP_world_size * max_local_tokens * packed_row_bytes.Performance
GLM-5.2 PCP8 on one 8×B300 node, TP1/PCP8/EP8, BF16 activations, static E4M3 KV cache, a 32K batched-token limit, and a 32K long-prefill threshold.
Default portable PCP pipeline (historical stage profile):
kv_call-gatherk_peall-gatherFinal fused NVLS pipeline (latest two-run mean):
Controlled current-stack full-forward A/B from the Kineto
execute_context_1(32768)_generation_0(0)GPU annotation:Each value is the arithmetic mean of two fresh-process runs. The portable baseline and pre-optimization fused path were measured in one current-stack ABBA; the final fused kernel was then measured in a second ABBA against that fused control. All runs used the same B300 node, model snapshot, source tree, eager-mode configuration, exact 32K input, warmup, and profiler procedure. The second ABBA measured the slowest-rank fused forward at 345.069 ms before these cache-overhead changes and 344.109 ms after them (−0.960 ms, −0.28%). "Default portable PCP" means the Triton fused norm/RoPE + PCP gather + cache-insert path.
Relationship to existing work
main.vllm/v1/attention/ops/pcp.py; this branch is ported onto that layout.This PR uses a different design from #52863/#49517: NVLS multicast into transient symmetric staging followed by a receiver-local paged-cache combine. It keeps cache tensors, allocation, and ownership ordinary and receiver-local, supports PCP2/4/8, and integrates with the common DeepSeek-V3.2 PCP path.