Fix DSA partial DP-TP mode log to use derived attn_tp_size (#39871)
Co-authored-by: Hun-ho Kim <hunho.kim@samsung.com>
This commit is contained in:
@@ -37,7 +37,7 @@ from sglang.srt.connector import ConnectorType
|
|||||||
from sglang.srt.environ import envs
|
from sglang.srt.environ import envs
|
||||||
from sglang.srt.hardware_backend.mlx.runtime import use_mlx
|
from sglang.srt.hardware_backend.mlx.runtime import use_mlx
|
||||||
from sglang.srt.model_executor.cuda_graph_config import Backend, Phase, with_phase
|
from sglang.srt.model_executor.cuda_graph_config import Backend, Phase, with_phase
|
||||||
from sglang.srt.runtime_context import get_platform
|
from sglang.srt.runtime_context import derive_attention_widths, get_platform
|
||||||
from sglang.srt.utils.common import (
|
from sglang.srt.utils.common import (
|
||||||
get_quantization_config,
|
get_quantization_config,
|
||||||
is_mps,
|
is_mps,
|
||||||
@@ -285,9 +285,15 @@ def handle_model_specific_adjustments(server_args: Any):
|
|||||||
else:
|
else:
|
||||||
# Pure TP and partial DP Attention mode is active for DSA, logging a warning
|
# Pure TP and partial DP Attention mode is active for DSA, logging a warning
|
||||||
if cfg.dp_size < cfg.tp_size:
|
if cfg.dp_size < cfg.tp_size:
|
||||||
|
_, attn_tp_size = derive_attention_widths(
|
||||||
|
tp_size=cfg.tp_size,
|
||||||
|
attn_cp_size=cfg.attn_cp_size,
|
||||||
|
dp_size=cfg.dp_size,
|
||||||
|
enable_dp_attention=cfg.enable_dp_attention,
|
||||||
|
)
|
||||||
logger.warning(
|
logger.warning(
|
||||||
f"DSA with TP mode is active, dp_size={cfg.dp_size}, tp_size={cfg.tp_size}, "
|
f"DSA with TP mode is active, dp_size={cfg.dp_size}, tp_size={cfg.tp_size}, "
|
||||||
f"attn_tp_size={cfg.tp_size}, attention weights will be sharded across {cfg.tp_size} ranks."
|
f"attn_tp_size={attn_tp_size}, attention weights will be sharded across {attn_tp_size} ranks."
|
||||||
)
|
)
|
||||||
|
|
||||||
# The DSA page-size selection moved to the override registry
|
# The DSA page-size selection moved to the override registry
|
||||||
|
|||||||
Reference in New Issue
Block a user