Fix IMA with flashinfer + spec + topk & Add radix attention test cases for eagle (#13740)
This commit is contained in:
@@ -183,6 +183,25 @@ class EagleVerifyInput(SpecInput, EagleVerifyInputV2Mixin):
|
||||
kv_indices,
|
||||
req_to_token.size(1),
|
||||
)
|
||||
mask_numel = (
|
||||
paged_kernel_lens_sum * self.draft_token_num
|
||||
+ (self.draft_token_num**2) * batch_size
|
||||
)
|
||||
if self.custom_mask.numel() < mask_numel:
|
||||
# FIXME(attn): temporary fix for custom mask padding with cuda graph
|
||||
self.custom_mask = torch.cat(
|
||||
[
|
||||
self.custom_mask,
|
||||
torch.full(
|
||||
(mask_numel - self.custom_mask.numel(),),
|
||||
True,
|
||||
dtype=torch.bool,
|
||||
device=device,
|
||||
),
|
||||
],
|
||||
dim=0,
|
||||
)
|
||||
|
||||
return kv_indices, cum_kv_seq_len, qo_indptr, self.custom_mask
|
||||
|
||||
def verify(
|
||||
|
||||
Reference in New Issue
Block a user