diff --git a/python/sglang/srt/weight_cache/ipc_loader.py b/python/sglang/srt/weight_cache/ipc_loader.py index b9ee9b6e0f..ef5a09bec0 100644 --- a/python/sglang/srt/weight_cache/ipc_loader.py +++ b/python/sglang/srt/weight_cache/ipc_loader.py @@ -501,8 +501,6 @@ class IpcModelLoader(BaseModelLoader): try: # Build engine's config fingerprint - from sglang.srt.layers.dp_attention import get_moe_cp_size - parallel = get_parallel() tp_size = parallel.tp_size tp_rank = parallel.tp_rank @@ -511,7 +509,9 @@ class IpcModelLoader(BaseModelLoader): pp_rank = parallel.pp_rank ep_size = parallel.moe_ep_size - moe_dp_size = get_moe_cp_size() + # The configured width, as the daemon states it: the MoE + # communicator is wider when it aliases attention CP. + moe_dp_size = parallel.moe_dp_size moe_dp_rank = parallel.moe_dp_rank moe_ep_rank = parallel.moe_ep_rank diff --git a/test/registered/model_loading/test_weight_cache_daemon.py b/test/registered/model_loading/test_weight_cache_daemon.py index 1592d29690..22dbe4726a 100644 --- a/test/registered/model_loading/test_weight_cache_daemon.py +++ b/test/registered/model_loading/test_weight_cache_daemon.py @@ -29,7 +29,7 @@ DEFAULT_MODEL = "Qwen/Qwen3-0.6B" # IPC handoff is exercised on every PR. Since the CI runner executes the whole # file per suite, TestWeightCacheDaemonTP2 self-skips when fewer than 2 GPUs are # visible (i.e. on the 1-gpu runner). -register_cuda_ci(est_time=313, stage="extra-a", runner_config="2-gpu-large") +register_cuda_ci(est_time=440, stage="extra-a", runner_config="2-gpu-large") register_cuda_ci(est_time=68, stage="base-b", runner_config="1-gpu-small") # Capture the client server's logs so test_loaded_via_ipc can assert the IPC @@ -382,5 +382,27 @@ class TestWeightCacheDaemonQwen3MoeEP(TestWeightCacheDaemonTP2): server_args = daemon_args[:] +class TestWeightCacheDaemonQwen3MoeAttnCP(TestWeightCacheDaemonTP2): + """Qwen3 MoE with attention CP wider than MoE-DP. + + The MoE-DP communicator aliases the attention-CP group here, so it is wider + than the configured `moe_dp_size`; the engine and the daemon must still + state the same width in the config fingerprint. + """ + + model_override = DEFAULT_TARGET_MODEL_EAGLE_DP_ATTN + daemon_args = [ + "--attn-cp-size", + "2", + "--enable-prefill-cp", + "--cp-strategy", + "zigzag", + "--cuda-graph-backend-prefill=disabled", + "--random-seed", + "42", + ] + server_args = daemon_args[:] + + if __name__ == "__main__": unittest.main()