[CP V1 Deprecation 4/5] Canonicalize prefill CP API names (#36229)
This commit is contained in:
@@ -181,7 +181,7 @@ for _mod, _fn in [
|
||||
("dsa.transform_index", "transform_index_page_table_prefill"),
|
||||
("dsa.transform_index", "transform_index_page_table_decode"),
|
||||
("dsa.transform_index", "prepare_trtllm_nope_sparse_metadata"),
|
||||
("dsa.cp_split", "dsa_cp_round_robin_split_q_seqs_kernel"),
|
||||
("dsa.cp_split", "dsa_cp_interleave_q_seqs_kernel"),
|
||||
("dsv4.fp4_indexer", "quantize_fp4_indexer_tensor"),
|
||||
("dsv4.fp4_indexer", "store_fp4_index_k_cache"),
|
||||
("dsv4.rms_normalize_hip", "rms_normalize_triton"),
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""Round-robin CP q-sequence split kernel for DSA prefill.
|
||||
"""Interleave CP q-sequence split kernel for DSA prefill.
|
||||
|
||||
Migrated from ``sglang.srt.layers.attention.dsa.utils`` (RFC #29630, Phase 2.5).
|
||||
"""
|
||||
@@ -8,7 +8,7 @@ import triton.language as tl
|
||||
|
||||
|
||||
@triton.jit
|
||||
def dsa_cp_round_robin_split_q_seqs_kernel(
|
||||
def dsa_cp_interleave_q_seqs_kernel(
|
||||
in_seqs_ptr,
|
||||
out_seqs_ptr,
|
||||
bs_idx_ptr,
|
||||
|
||||
@@ -106,7 +106,7 @@ def _init_compressed_attn_metadata_triton(
|
||||
Optional[torch.Tensor],
|
||||
]:
|
||||
bs = seq_lens.shape[0]
|
||||
# CP-v2 may add padding rows to the attention metadata, but those rows have
|
||||
# CP may add padding rows to the attention metadata, but those rows have
|
||||
# no cache-write locations. Keep the write buffers unpadded and mask those
|
||||
# rows in the kernel.
|
||||
num_write_tokens = raw_out_loc.shape[0]
|
||||
|
||||
@@ -15,7 +15,7 @@ from sglang.srt.distributed.device_communicators.pynccl_allocator import (
|
||||
)
|
||||
from sglang.srt.distributed.parallel_state import get_tp_group
|
||||
from sglang.srt.environ import envs
|
||||
from sglang.srt.layers.attention.dsa.utils import is_dsa_prefill_cp_round_robin_split
|
||||
from sglang.srt.layers.attention.dsa.utils import is_dsa_prefill_cp_interleave
|
||||
from sglang.srt.layers.dp_attention import is_allocation_symmetric
|
||||
from sglang.srt.layers.utils.common import strict_contiguous
|
||||
from sglang.srt.utils.common import is_gfx1250_supported
|
||||
@@ -1240,7 +1240,7 @@ def mhc_post(
|
||||
post_layer_mix: torch.Tensor,
|
||||
comb_res_mix: torch.Tensor,
|
||||
) -> torch.Tensor:
|
||||
if is_dsa_prefill_cp_round_robin_split():
|
||||
if is_dsa_prefill_cp_interleave():
|
||||
x = strict_contiguous(x)
|
||||
residual = strict_contiguous(residual)
|
||||
post_layer_mix = strict_contiguous(post_layer_mix)
|
||||
|
||||
Reference in New Issue
Block a user