From 8d9ee6669e1e51b232c10a1868113042ddc55740 Mon Sep 17 00:00:00 2001 From: Shangming Cai Date: Wed, 25 Feb 2026 15:19:10 +0800 Subject: [PATCH] Fix comment for tp_rank calculation in dp_attention (#19306) --- python/sglang/srt/layers/dp_attention.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/sglang/srt/layers/dp_attention.py b/python/sglang/srt/layers/dp_attention.py index 5bf5aa0c8..7e9ea6bbd 100644 --- a/python/sglang/srt/layers/dp_attention.py +++ b/python/sglang/srt/layers/dp_attention.py @@ -238,7 +238,7 @@ def compute_dp_attention_world_info( attn_dp_rank = 0 else: # Rank layout is (dp, cp, tp) where tp is the fastest-changing dim: - # tp_rank = ((cp_rank * dp_size) + dp_rank) * attn_tp_size + attn_tp_rank + # tp_rank = (attn_dp_rank * attn_cp_size + attn_cp_rank) * attn_tp_size + attn_tp_rank attn_dp_rank = tp_rank // (attn_tp_size * attn_cp_size) return attn_tp_rank, attn_tp_size, attn_dp_rank