Add small model test for spec v2 + dp + trtllm_mla (#14576)
This commit is contained in:
@@ -52,6 +52,7 @@ from sglang.srt.layers.dp_attention import (
|
||||
set_is_extend_in_batch,
|
||||
)
|
||||
from sglang.srt.utils import get_compiler_backend, is_npu, support_triton
|
||||
from sglang.srt.utils.common import ceil_align
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from sglang.srt.layers.attention.base_attn_backend import AttentionBackend
|
||||
@@ -731,9 +732,7 @@ class ForwardBatch:
|
||||
for i in range(sync_group_size):
|
||||
# make sure that the padded length is divisible by attn_tp_size because we may need reduce-scatter across attn_tp dim.
|
||||
# there is no reduce-scatter in LM logprob, so we do not need to adjust the padded length for logprob
|
||||
global_num_tokens[i] = (
|
||||
(global_num_tokens[i] - 1) // attn_tp_size + 1
|
||||
) * attn_tp_size
|
||||
global_num_tokens[i] = ceil_align(global_num_tokens[i], attn_tp_size)
|
||||
|
||||
dp_padding_mode = DpPaddingMode.get_dp_padding_mode(
|
||||
self.is_extend_in_batch, global_num_tokens
|
||||
|
||||
Reference in New Issue
Block a user