Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
826bb40
fix(structured-output): preserve grammar bitmask source widths
voipmonitor Aug 12, 2026
b9eea38
[Bugfix] Stream Kimi K3 tool-call arguments incrementally
guptaishaan Jul 31, 2026
efbaa95
tools: preserve partial Kimi XTML close markers
voipmonitor Aug 17, 2026
9972d3c
fix(cache): preserve Mamba CoW after external hits
myshytf Aug 15, 2026
990a63d
test(cache): assert external-hit continuation precondition
myshytf Aug 15, 2026
3ebc896
Ignore Kimi tool calls after tools section close
voipmonitor Aug 17, 2026
c805ebd
fix(dspark): preserve draft graph capture contract
voipmonitor Aug 17, 2026
3938209
spec_decode: preserve DFlash-family checkpoint semantics
voipmonitor Aug 14, 2026
8f7f6c6
attention: execute replicated KV groups without DCP partitioning
voipmonitor Aug 14, 2026
f85d3d8
models: document DFlash rotary layout detection
voipmonitor Aug 14, 2026
04a6acf
[II] Keep Kimi K3 protocol markers out of streamed content
voipmonitor Aug 18, 2026
c09bed0
Fix invalid block handling for hybrid KV cache groups
jungjiyu Aug 2, 2026
6bafa63
test(scheduler): cover hybrid KV fail policy across 17 groups
voipmonitor Aug 18, 2026
3c296be
test(scheduler): preserve hybrid KV recovery edge cases
voipmonitor Aug 18, 2026
a18a86e
fix(structured-output): map compacted DSpark grammar rows
voipmonitor Aug 18, 2026
e7ffc38
test(dspark): define graph-tail mode in capture fixture
voipmonitor Aug 19, 2026
b115455
fix(structured-output): stop XGrammar batches at termination
voipmonitor Aug 20, 2026
5fe7989
fix(structured-output): validate speculative blocks before commit
voipmonitor Aug 15, 2026
fd0237e
test(structured-output): use prompt-aware reasoner contract
voipmonitor Aug 20, 2026
2e8535c
fix(dspark): declare compact-RoPE ownership context
voipmonitor Aug 20, 2026
d931e0d
fix(warmup): narrow enabled DSpark debug events
voipmonitor Aug 20, 2026
c27d117
[Model][Spec Decode] Tap the pre-norm AttnRes mixture as the Kimi K3 …
rchalamala Aug 14, 2026
0a00dac
test(kimi-k3): strengthen DFlash capture contracts
voipmonitor Aug 21, 2026
71964b3
Bound Kimi vision RoPE allocation to input grids
voipmonitor Aug 21, 2026
18d9e27
Bound Kimi projector transients per image
voipmonitor Aug 21, 2026
4f34748
[II] Let cache specs own DCP block-table geometry
voipmonitor Aug 21, 2026
edb1042
fix(mamba): resume prefix hits on checkpoint grid
voipmonitor Aug 21, 2026
832b1c9
fix(multimodal): gather uneven vision shards without TP padding
voipmonitor Aug 21, 2026
d19ef45
fix(kimi-k3): preserve final AttnRes block
voipmonitor Aug 22, 2026
7aa4d61
fix(attention): preserve aliased LSE during state merge
voipmonitor Aug 22, 2026
7671c66
fix(attention): align merge blocks to head groups
voipmonitor Aug 22, 2026
62bead5
fix(kimi-k3): bound chunked MLA output lifetime
voipmonitor Aug 21, 2026
f7180bc
[Bugfix][Mamba] Fix overlapping state copy race (#50729)
AndreasKaratzas Aug 17, 2026
4cfeb8a
Merge vLLM PR #414
voipmonitor Aug 22, 2026
bf5a9b2
Merge vLLM PR #295
voipmonitor Aug 22, 2026
e62cedb
Merge vLLM PR #294
voipmonitor Aug 22, 2026
6f78b5c
Merge vLLM PR #320
voipmonitor Aug 22, 2026
538ed2e
Merge vLLM PR #413
voipmonitor Aug 22, 2026
8b6e1de
Merge vLLM PR #422
voipmonitor Aug 22, 2026
799c2e7
Merge vLLM PR #310
voipmonitor Aug 22, 2026
bc3dd5a
Merge vLLM PR #415
voipmonitor Aug 22, 2026
afcbf4f
Merge vLLM PR #418
voipmonitor Aug 22, 2026
23e7093
Merge vLLM PR #419
voipmonitor Aug 22, 2026
f52fadc
Merge vLLM PR #459
voipmonitor Aug 22, 2026
94d3833
Merge vLLM PR #460
voipmonitor Aug 22, 2026
dc8f46d
Merge vLLM PR #463
voipmonitor Aug 22, 2026
3c9031e
Merge vLLM PR #464
voipmonitor Aug 22, 2026
7da8bd3
Merge vLLM PR #467
voipmonitor Aug 22, 2026
6ba940c
Merge vLLM PR #468
voipmonitor Aug 22, 2026
89b9db6
Merge vLLM PR #469
voipmonitor Aug 22, 2026
1c93ca0
Merge upstream vLLM PR #50729 backport
voipmonitor Aug 22, 2026
a653e74
feat(spec_decode): run the Kimi-K3 DSpark draft on a dedicated remote…
myshytf Aug 21, 2026
23f9f27
fix(spec_decode): allow scheduler-selected zero draft depth
myshytf Aug 22, 2026
f49f6c3
fix(cache): avoid target EAGLE drop for disaggregated DSpark
myshytf Aug 22, 2026
dbf86de
test(cache): cover DFlash target-cache policy
myshytf Aug 22, 2026
1bed2da
scheduler: skip speculative decoding when all scheduled requests need…
malaiwah Aug 19, 2026
27e71ca
fix: address CodeRabbit review — document lookahead reservation is ha…
malaiwah Aug 20, 2026
74ec7af
fix(comm): prewarm FlashInfer PCIe graph shapes
myshytf Aug 22, 2026
93917b3
feat(kquant): opt into W4A8 for coupled QSRT prefill
myshytf Aug 29, 2026
c7fd9c8
perf(mla): fuse K3 DCP verification queries
myshytf Sep 1, 2026
9d50524
[Attention][MLA] Fuse Kimi-K3 chunked-context K/V packing
zyongye Aug 11, 2026
ee429fb
[Bugfix][MLA] Cast the gathered latent for a bf16 Kimi-K3 kv_b_proj
zyongye Aug 11, 2026
865148a
[Kimi-K3][DCP] Publish prefill KV directly in MLA layout
GirasoleY Aug 14, 2026
96789b5
perf(mla): publish K3 prefill KV over PCIe
myshytf Sep 1, 2026
1ce3580
perf(mla): decouple context tiles and enable SM120 FA4
myshytf Sep 1, 2026
8a89a1d
perf(kimi): retain large context projection workspace
myshytf Sep 1, 2026
6da7e41
perf(dcp): rotate destinations in the PCIe peer KV gather
myshytf Sep 1, 2026
118a852
fix(kquant): return owned storage from the W4A8 prefill launch
myshytf Sep 2, 2026
444e101
fix(mla): bucket K3 verify plans, cover the local shard, own fp8 cont…
myshytf Sep 2, 2026
14c7b33
fix(kimi-k3): fall back from an unreserved projection workspace, guar…
myshytf Sep 2, 2026
c7f6282
Merge remote-tracking branch 'fork/feat/kimi-k3-w4a8-prefill-20260830…
myshytf Sep 2, 2026
73879ed
Merge branch 'agent/k3-prefill-sm120-20260901-pr' into agent/kimi-k3-…
myshytf Sep 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .buildkite/test_areas/distributed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ steps:

- label: Distributed Tests (8xH100)
key: distributed-tests-8xh100
timeout_in_minutes: 20
timeout_in_minutes: 30
device: h100
num_devices: 8
working_dir: "/vllm-workspace/tests"
Expand All @@ -194,13 +194,19 @@ steps:
- vllm/v1/engine/llm_engine.py
- vllm/v1/executor/uniproc_executor.py
- vllm/v1/worker/gpu_worker.py
- vllm/v1/attention/ops/dcp_utils.py
- vllm/model_executor/layers/attention/mla_attention.py
- vllm/model_executor/layers/attention/sparse_mla_attention.py
- csrc/libtorch_stable/attention/dcp_utils/
- tests/distributed/test_dcp_direct_a2a_lse_reduce.py
- tests/distributed/test_mnnvl_alltoall.py

commands:
# https://github.com/NVIDIA/nccl/issues/1838
- export NCCL_CUMEM_HOST_ENABLE=0
# test with torchrun tp=2 and dp=4 with ep
- torchrun --nproc-per-node=8 ../examples/features/torchrun/torchrun_dp_example_offline.py --tp-size=2 --pp-size=1 --dp-size=4 --enable-ep
- pytest -v -s distributed/test_dcp_direct_a2a_lse_reduce.py

- label: Distributed Tests (4xA100)
key: distributed-tests-4xa100
Expand Down
312 changes: 225 additions & 87 deletions csrc/libtorch_stable/attention/dcp_utils/dcp_direct_kv_gather.cu

Large diffs are not rendered by default.

47 changes: 35 additions & 12 deletions csrc/libtorch_stable/attention/merge_attn_states.cu
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,34 @@ __global__ void merge_attn_states_kernel(
const uint pack_size = 16 / sizeof(scalar_t);
const uint threads_per_head = head_size / pack_size;

const uint global_idx = blockIdx.x * NUM_THREADS + threadIdx.x;
const uint global_idx = blockIdx.x * blockDim.x + threadIdx.x;
const uint token_head_threads = num_tokens * num_heads * threads_per_head;

if (global_idx >= token_head_threads) return;

// global_idx -> token_idx + head_idx + pack_idx
// Derive indices before the block barrier so every thread reaches it.
const uint token_head_idx = global_idx / threads_per_head;
const uint pack_idx = global_idx % threads_per_head;

const uint token_idx = token_head_idx / num_heads;
const uint head_idx = token_head_idx % num_heads;

// A running chunked-attention LSE may be both prefix_lse and output_lse.
// The launcher aligns block boundaries to complete head groups, allowing
// every group to load its LSE values before any thread overwrites them.
__shared__ float shared_prefix_lse[NUM_THREADS];
__shared__ float shared_suffix_lse[NUM_THREADS];
const bool is_valid = global_idx < token_head_threads;
const uint group_idx = threadIdx.x / threads_per_head;

if (is_valid && pack_idx == 0 && token_idx < prefix_num_tokens) {
shared_prefix_lse[group_idx] =
prefix_lse[head_idx * prefix_lse_head_stride +
token_idx * prefix_lse_token_stride];
shared_suffix_lse[group_idx] =
suffix_lse[head_idx * suffix_lse_head_stride +
token_idx * suffix_lse_token_stride];
}
__syncthreads();
if (!is_valid) return;

const uint pack_offset = pack_idx * pack_size; // (0~15)*8, etc.
const uint src_head_offset = token_idx * num_heads * prefix_head_stride +
head_idx * prefix_head_stride;
Expand Down Expand Up @@ -95,11 +111,9 @@ __global__ void merge_attn_states_kernel(
return;
}

// For tokens within prefix range, merge prefix and suffix
float p_lse = prefix_lse[head_idx * prefix_lse_head_stride +
token_idx * prefix_lse_token_stride];
float s_lse = suffix_lse[head_idx * suffix_lse_head_stride +
token_idx * suffix_lse_token_stride];
// For tokens within prefix range, merge prefix and suffix.
float p_lse = shared_prefix_lse[group_idx];
float s_lse = shared_suffix_lse[group_idx];
p_lse = std::isinf(p_lse) ? -std::numeric_limits<float>::infinity() : p_lse;
s_lse = std::isinf(s_lse) ? -std::numeric_limits<float>::infinity() : s_lse;

Expand Down Expand Up @@ -307,10 +321,19 @@ void merge_attn_states_launcher(
// Process one pack elements per thread. for float, the
// pack_size is 4 for half/bf16, the pack_size is 8.
const uint threads_per_head = head_size / pack_size;
STD_TORCH_CHECK(
threads_per_head <= NUM_THREADS,
"headsize requires more threads than the merge kernel block supports: ",
head_size);
const uint total_threads = num_tokens * num_heads * threads_per_head;
// Keep each token-head group inside one block. This is required when
// output_lse aliases prefix_lse because the whole group must read the input
// LSE before its first thread writes the merged value.
const uint block_threads =
(NUM_THREADS / threads_per_head) * threads_per_head;

dim3 block(NUM_THREADS);
dim3 grid((total_threads + NUM_THREADS - 1) / NUM_THREADS);
dim3 block(block_threads);
dim3 grid((total_threads + block_threads - 1) / block_threads);

const torch::stable::accelerator::DeviceGuard device_guard(
prefix_output.get_device_index());
Expand Down
Loading
Loading