[fix]missing prefix_lens_cpu init when p/d disaggregation (#11196)

This commit is contained in:
Hank Han
2025-10-04 04:39:59 +08:00
committed by GitHub
parent 546914fa2d
commit 3c3d6255d9

View File

@@ -523,11 +523,19 @@ class DecodePreallocQueue:
dtype=torch.int64,
device=self.token_to_kv_pool_allocator.device,
),
prefix_lens_cpu=torch.tensor(
[0],
dtype=torch.int64,
),
seq_lens=torch.tensor(
[num_tokens],
dtype=torch.int64,
device=self.token_to_kv_pool_allocator.device,
),
seq_lens_cpu=torch.tensor(
[num_tokens],
dtype=torch.int64,
),
last_loc=torch.tensor(
[-1],
dtype=torch.int64,