From 0b2bb2941b49b125d3c79e4ea5ba58b34efed753 Mon Sep 17 00:00:00 2001 From: Ivy Zhang <25222398+crazydemo@users.noreply.github.com> Date: Fri, 7 Aug 2026 15:19:42 +0800 Subject: [PATCH 1/2] use skip_less_mpi_world_size instead of skip_less_device Signed-off-by: Ivy Zhang <25222398+crazydemo@users.noreply.github.com> --- .../accuracy/test_disaggregated_serving.py | 24 ++++++++-------- .../defs/accuracy/test_llm_api_pytorch.py | 28 +++++++++---------- tests/integration/defs/test_e2e.py | 14 +++++----- 3 files changed, 33 insertions(+), 33 deletions(-) diff --git a/tests/integration/defs/accuracy/test_disaggregated_serving.py b/tests/integration/defs/accuracy/test_disaggregated_serving.py index 749ed07f50a0..d21727a3b31a 100644 --- a/tests/integration/defs/accuracy/test_disaggregated_serving.py +++ b/tests/integration/defs/accuracy/test_disaggregated_serving.py @@ -1127,7 +1127,7 @@ def test_gen_only_sync(self, transceiver_runtime): ) as llm: run_accuracy_test(llm, self.MODEL_NAME, ["GSM8K"]) - @pytest.mark.skip_less_device(8) + @pytest.mark.skip_less_mpi_world_size(8) @skip_pre_hopper def test_gen_only_spec_dec(self): ctx_server_config = {"disable_overlap_scheduler": True} @@ -1160,10 +1160,10 @@ def test_gen_only_spec_dec(self): tensor_parallel_size=4) as llm: run_accuracy_test(llm, self.MODEL_NAME, ["MMLU", "GSM8K"]) - @pytest.mark.skip_less_device(8) + @pytest.mark.skip_less_mpi_world_size(8) @parametrize_with_ids("overlap_scheduler", [True, False]) @parametrize_with_ids("mtp_nextn", [0, 2]) - @pytest.mark.skip_less_device(8) + @pytest.mark.skip_less_mpi_world_size(8) def test_auto_dtype(self, overlap_scheduler, mtp_nextn): ctx_server_config = {"disable_overlap_scheduler": True} gen_server_config = {"disable_overlap_scheduler": not overlap_scheduler} @@ -1202,7 +1202,7 @@ def test_auto_dtype(self, overlap_scheduler, mtp_nextn): run_accuracy_test(llm, self.MODEL_NAME, ["MMLU", "GSM8K"]) @skip_pre_blackwell - @pytest.mark.skip_less_device(8) + @pytest.mark.skip_less_mpi_world_size(8) @pytest.mark.parametrize("gen_pp,gen_tp,gen_cp,enable_attention_dp", [ (1, 2, 2, False), (1, 2, 2, True), @@ -1555,7 +1555,7 @@ class TestGPTOSS(LlmapiAccuracyTestHarness): MODEL_PATH = f"{llm_models_root()}/gpt_oss/gpt-oss-120b" - @pytest.mark.skip_less_device(8) + @pytest.mark.skip_less_mpi_world_size(8) @pytest.mark.parametrize("block_reuse", [False, True]) def test_auto_dtype(self, block_reuse, mocker): mocker.patch.object(GSM8K, "MAX_OUTPUT_LEN", 8192) @@ -1676,7 +1676,7 @@ class TestDeepSeekV32Exp(LlmapiAccuracyTestHarness): MODEL_NAME = "deepseek-ai/DeepSeek-V3.2-Exp" MODEL_PATH = f"{llm_models_root()}/DeepSeek-V3.2-Exp-FP4-v2" - @pytest.mark.skip_less_device(8) + @pytest.mark.skip_less_mpi_world_size(8) @pytest.mark.parametrize("overlap_scheduler", [False]) def test_auto_dtype(self, overlap_scheduler): cache_transceiver_config = { @@ -1924,7 +1924,7 @@ def test_chunked_prefill(self): self._test_chunked_prefill_helper(ctx_pp=1) @skip_pre_blackwell - @pytest.mark.skip_less_device(8) + @pytest.mark.skip_less_mpi_world_size(8) @pytest.mark.parametrize("gen_pp,gen_tp,gen_cp,enable_attention_dp", [ (1, 2, 2, False), (1, 2, 2, True), @@ -2131,7 +2131,7 @@ class TestKimiK25(LlmapiAccuracyTestHarness): MODEL_NAME = "moonshotai/Kimi-K2.5" MODEL_PATH = f"{llm_models_root()}/Kimi-K2.5-NVFP4" - @pytest.mark.skip_less_device(8) + @pytest.mark.skip_less_mpi_world_size(8) @pytest.mark.skip_less_device_memory(180000) def test_nvfp4(self): """Disaggregated GSM8K accuracy for Kimi-K2.5 (NVFP4). @@ -2272,7 +2272,7 @@ def _make_configs(self, use_py_transceiver: bool = False): } return ctx_server_config, gen_server_config, disaggregated_server_config - @pytest.mark.skip_less_device(8) + @pytest.mark.skip_less_mpi_world_size(8) @pytest.mark.parametrize( "mtp_nextn,block_reuse,use_py_transceiver", [ @@ -2302,7 +2302,7 @@ def test_auto_dtype(self, mtp_nextn, block_reuse, use_py_transceiver): self.MODEL_PATH) as llm: run_accuracy_test(llm, self.MODEL_NAME, ["GSM8K"]) - @pytest.mark.skip_less_device(8) + @pytest.mark.skip_less_mpi_world_size(8) def test_ctx_dp2_gen_tp4(self): ctx_cfg, gen_cfg, disagg_cfg = self._make_configs( use_py_transceiver=False) @@ -2386,7 +2386,7 @@ def _make_configs(self, use_py_transceiver: bool): } return ctx_server_config, gen_server_config, disaggregated_server_config - @pytest.mark.skip_less_device(8) + @pytest.mark.skip_less_mpi_world_size(8) @parametrize_with_ids("use_py_transceiver", [True, False]) def test_auto_dtype(self, use_py_transceiver, mocker): mocker.patch.object(GSM8K, "MAX_OUTPUT_LEN", 512) @@ -2403,7 +2403,7 @@ class TestGLM52NVFP4(LlmapiAccuracyTestHarness): MODEL_NAME = "zai-org/GLM-5.2" MODEL_PATH = f"{llm_models_root()}/GLM-5.2-NVFP4" - @pytest.mark.skip_less_device(8) + @pytest.mark.skip_less_mpi_world_size(8) @pytest.mark.parametrize("use_kv_cache_manager_v2", [False], ids=["cache_mgr_v1"]) def test_nvfp4_nixl(self, use_kv_cache_manager_v2): diff --git a/tests/integration/defs/accuracy/test_llm_api_pytorch.py b/tests/integration/defs/accuracy/test_llm_api_pytorch.py index 63f2b42ccd68..dd6b6d23bc26 100644 --- a/tests/integration/defs/accuracy/test_llm_api_pytorch.py +++ b/tests/integration/defs/accuracy/test_llm_api_pytorch.py @@ -3168,7 +3168,7 @@ def test_nvfp4_multi_gpus_chunked_prefill(self, tp_size, pp_size, ep_size, task.evaluate(llm) @skip_pre_blackwell - @pytest.mark.skip_less_device(8) + @pytest.mark.skip_less_mpi_world_size(8) def test_nvfp4_multi_gpus_corner_case(self): """Test the corner case of the NVFP4 model. @@ -3321,7 +3321,7 @@ def test_auto_dtype_tp2(self): @pytest.mark.timeout(14400) -@pytest.mark.skip_less_device(8) +@pytest.mark.skip_less_mpi_world_size(8) class TestDeepSeekV3(LlmapiAccuracyTestHarness): MODEL_NAME = "deepseek-ai/DeepSeek-V3-0324" MODEL_PATH = f"{llm_models_root()}/DeepSeek-V3-0324-FP4" @@ -3941,7 +3941,7 @@ def test_nvfp4_4gpus_online_eplb(self, moe_backend, mtp_nextn): @pytest.mark.timeout(14400) -@pytest.mark.skip_less_device(8) +@pytest.mark.skip_less_mpi_world_size(8) @pytest.mark.skip_less_device_memory(140000) @skip_pre_blackwell class TestDeepSeekV4Pro(LlmapiAccuracyTestHarness): @@ -4135,7 +4135,7 @@ def test_fp8_blockscale(self, tp_size, pp_size, ep_size, fp8kv, @pytest.mark.skip_less_device_memory(120000) @pytest.mark.parametrize("tp_size", [ pytest.param(4, marks=pytest.mark.skip_less_device(4)), - pytest.param(8, marks=pytest.mark.skip_less_device(8)), + pytest.param(8, marks=pytest.mark.skip_less_mpi_world_size(8)), ], ids=["4gpus", "8gpus"]) def test_nvfp4(self, tp_size): @@ -4160,7 +4160,7 @@ def test_nvfp4(self, tp_size): task.evaluate(llm) @skip_pre_blackwell - @pytest.mark.skip_less_device(8) + @pytest.mark.skip_less_mpi_world_size(8) @pytest.mark.skip_less_device_memory(183000) @pytest.mark.timeout(14400) @pytest.mark.filterwarnings( @@ -4242,7 +4242,7 @@ def test_nvfp4_longseq_trtllm_moe_stress(self, mocker): assert not all(tid == 0 for tid in token_ids) @skip_pre_blackwell - @pytest.mark.skip_less_device(8) + @pytest.mark.skip_less_mpi_world_size(8) @pytest.mark.skip_less_device_memory(183000) @pytest.mark.timeout(14400) @pytest.mark.filterwarnings( @@ -4875,7 +4875,7 @@ class TestQwen3_235B_A22B(LlmapiAccuracyTestHarness): MODEL_NAME = "Qwen3/Qwen3-235B-A22B" @skip_pre_hopper - @pytest.mark.skip_less_device(8) + @pytest.mark.skip_less_mpi_world_size(8) @pytest.mark.parametrize( "tp_size,pp_size,ep_size,attention_dp,cuda_graph,overlap_scheduler", [(8, 1, 8, False, True, True), (8, 1, 8, True, True, True)], @@ -4904,7 +4904,7 @@ def test_fp8(self, tp_size, pp_size, ep_size, attention_dp, cuda_graph, task.evaluate(llm) @skip_pre_hopper - @pytest.mark.skip_less_device(8) + @pytest.mark.skip_less_mpi_world_size(8) @pytest.mark.parametrize("tp_size,pp_size,ep_size,attention_dp,moe_backend", [(8, 1, 8, True, "DEEPGEMM"), (8, 1, 8, False, "DEEPGEMM"), @@ -7795,7 +7795,7 @@ class TestMiniMaxM3(LlmapiAccuracyTestHarness): MODEL_NAME = "MiniMaxAI/MiniMax-M3" MODEL_PATH = f"{llm_models_root()}/MiniMax-M3" - @pytest.mark.skip_less_device(8) + @pytest.mark.skip_less_mpi_world_size(8) @pytest.mark.skip_less_device_memory(140000) @parametrize_with_ids("tp_size,ep_size", [(8, 8)]) def test_auto_dtype(self, tp_size, ep_size): @@ -7922,7 +7922,7 @@ class TestGLM5FP8(LlmapiAccuracyTestHarness): MODEL_PATH = f"{llm_models_root()}/GLM-5-FP8" @parametrize_with_ids("tp_size,ep_size", [(8, 8)]) - @pytest.mark.skip_less_device(8) + @pytest.mark.skip_less_mpi_world_size(8) def test_8gpus(self, tp_size, ep_size): kv_cache_config = KvCacheConfig(free_gpu_memory_fraction=0.7) @@ -7949,7 +7949,7 @@ def test_8gpus(self, tp_size, ep_size): class TestGLM52(LlmapiAccuracyTestHarness): @skip_pre_blackwell - @pytest.mark.skip_less_device(8) + @pytest.mark.skip_less_mpi_world_size(8) @parametrize_with_ids("tp_size,ep_size", [(8, 8)]) def test_nvfp4(self, tp_size, ep_size): # GLM-5.2 reuses the DeepSeek-V3.2 path (MLA + DSA) with cross-layer @@ -7982,7 +7982,7 @@ def test_nvfp4(self, tp_size, ep_size): task.evaluate(llm) @skip_pre_blackwell - @pytest.mark.skip_less_device(8) + @pytest.mark.skip_less_mpi_world_size(8) @parametrize_with_ids("tp_size,ep_size", [(8, 8)]) def test_nvfp4_mtp_index_share(self, tp_size, ep_size): # Like test_nvfp4 but max_draft_len=3, exercising DSA indexer Top-K reuse @@ -8012,7 +8012,7 @@ def test_nvfp4_mtp_index_share(self, tp_size, ep_size): task.evaluate(llm) @skip_pre_blackwell - @pytest.mark.skip_less_device(8) + @pytest.mark.skip_less_mpi_world_size(8) @parametrize_with_ids("tp_size,ep_size", [(8, 8)]) def test_nvfp4_mtp_index_share_mtp_ar(self, tp_size, ep_size): # Acceptance-rate guard for max_draft_len=3 + index-share; counts accepted @@ -8093,7 +8093,7 @@ class TestStep3_7(LlmapiAccuracyTestHarness): # the text decoder path. The custom HF config requires trust_remote_code. MODEL_NAME = "stepfun-ai/Step-3.7-Flash" - @pytest.mark.skip_less_device(8) + @pytest.mark.skip_less_mpi_world_size(8) @pytest.mark.skip_less_device_memory(140000) @parametrize_with_ids("tp_size,ep_size", [(8, 8)]) def test_auto_dtype(self, tp_size, ep_size): diff --git a/tests/integration/defs/test_e2e.py b/tests/integration/defs/test_e2e.py index e8cf812b26cc..4ef2c596443a 100644 --- a/tests/integration/defs/test_e2e.py +++ b/tests/integration/defs/test_e2e.py @@ -1058,7 +1058,7 @@ def test_ptp_quickstart_advanced_bs1(llm_root, llm_venv): @pytest.mark.skip_less_device_memory(80000) -@pytest.mark.skip_less_device(8) +@pytest.mark.skip_less_mpi_world_size(8) @skip_pre_hopper @pytest.mark.parametrize("model_path", [ pytest.param('DeepSeek-V3', marks=skip_post_blackwell), @@ -1230,7 +1230,7 @@ def test_ptp_quickstart_advanced_deepseek_v3_lite_4gpus_adp_balance( @skip_post_blackwell @pytest.mark.skip_less_device_memory(110000) -@pytest.mark.skip_less_device(8) +@pytest.mark.skip_less_mpi_world_size(8) @pytest.mark.parametrize("model_name,model_path", [ pytest.param( 'DeepSeek-R1', 'DeepSeek-R1/DeepSeek-R1', marks=skip_pre_hopper), @@ -1259,7 +1259,7 @@ def test_ptp_quickstart_advanced_deepseek_r1_8gpus(llm_root, llm_venv, @pytest.mark.skip_less_device_memory(110000) -@pytest.mark.skip_less_device(8) +@pytest.mark.skip_less_mpi_world_size(8) @pytest.mark.parametrize("model_name,model_path", [ pytest.param( 'DeepSeek-R1', 'DeepSeek-R1/DeepSeek-R1', marks=skip_pre_hopper), @@ -1298,7 +1298,7 @@ def test_relaxed_acceptance_quickstart_advanced_deepseek_r1_8gpus( @skip_pre_ada @skip_post_blackwell @pytest.mark.skip_less_device_memory(80000) -@pytest.mark.skip_less_device(8) +@pytest.mark.skip_less_mpi_world_size(8) @pytest.mark.parametrize("model_name,model_path", [ pytest.param('DeepSeek-R1-W4AFP8', 'DeepSeek-R1/DeepSeek-R1-W4AFP8', @@ -1324,7 +1324,7 @@ def test_ptp_quickstart_advanced_deepseek_r1_w4afp8_8gpus( @skip_pre_blackwell @pytest.mark.skip_less_device_memory(140000) -@pytest.mark.skip_less_device(8) +@pytest.mark.skip_less_mpi_world_size(8) def test_deepseek_r1_mtp_bench(llm_root, llm_venv): """Test DeepSeek-R1 FP4 with MTP speculative decoding using BenchRunner. @@ -1454,7 +1454,7 @@ def test_ptp_quickstart_advanced_multi_gpus(llm_root, llm_venv, model_name, @pytest.mark.parametrize("cuda_graph", [False, True]) @pytest.mark.parametrize("tp_size, pp_size", [ pytest.param(2, 2, marks=pytest.mark.skip_less_device(4)), - pytest.param(2, 4, marks=pytest.mark.skip_less_device(8)), + pytest.param(2, 4, marks=pytest.mark.skip_less_mpi_world_size(8)), ]) @pytest.mark.parametrize("model_name,model_path", [ pytest.param('Llama3.3-70B-FP8', @@ -1485,7 +1485,7 @@ def test_ptp_quickstart_advanced_pp_enabled(llm_root, llm_venv, model_name, @skip_pre_hopper -@pytest.mark.skip_less_device(8) +@pytest.mark.skip_less_mpi_world_size(8) @pytest.mark.parametrize("cuda_graph", [False, True]) @pytest.mark.parametrize("model_name,model_path", [ ("Llama-4-Maverick-17B-128E-Instruct-FP8", From 1fdde22356e70a18c3c267c6cd10bfd0628c7e80 Mon Sep 17 00:00:00 2001 From: Ivy Zhang <25222398+crazydemo@users.noreply.github.com> Date: Fri, 7 Aug 2026 17:18:15 +0800 Subject: [PATCH 2/2] revert skip_less_mpi_world_size in test_disaggregated_serving.py launch_disaggregated_llm slices GPUs by local index, so disagg tests must stay on single-node stages and use skip_less_device instead of skip_less_mpi_world_size. Signed-off-by: Ivy Zhang <25222398+crazydemo@users.noreply.github.com> --- .../accuracy/test_disaggregated_serving.py | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/integration/defs/accuracy/test_disaggregated_serving.py b/tests/integration/defs/accuracy/test_disaggregated_serving.py index d21727a3b31a..749ed07f50a0 100644 --- a/tests/integration/defs/accuracy/test_disaggregated_serving.py +++ b/tests/integration/defs/accuracy/test_disaggregated_serving.py @@ -1127,7 +1127,7 @@ def test_gen_only_sync(self, transceiver_runtime): ) as llm: run_accuracy_test(llm, self.MODEL_NAME, ["GSM8K"]) - @pytest.mark.skip_less_mpi_world_size(8) + @pytest.mark.skip_less_device(8) @skip_pre_hopper def test_gen_only_spec_dec(self): ctx_server_config = {"disable_overlap_scheduler": True} @@ -1160,10 +1160,10 @@ def test_gen_only_spec_dec(self): tensor_parallel_size=4) as llm: run_accuracy_test(llm, self.MODEL_NAME, ["MMLU", "GSM8K"]) - @pytest.mark.skip_less_mpi_world_size(8) + @pytest.mark.skip_less_device(8) @parametrize_with_ids("overlap_scheduler", [True, False]) @parametrize_with_ids("mtp_nextn", [0, 2]) - @pytest.mark.skip_less_mpi_world_size(8) + @pytest.mark.skip_less_device(8) def test_auto_dtype(self, overlap_scheduler, mtp_nextn): ctx_server_config = {"disable_overlap_scheduler": True} gen_server_config = {"disable_overlap_scheduler": not overlap_scheduler} @@ -1202,7 +1202,7 @@ def test_auto_dtype(self, overlap_scheduler, mtp_nextn): run_accuracy_test(llm, self.MODEL_NAME, ["MMLU", "GSM8K"]) @skip_pre_blackwell - @pytest.mark.skip_less_mpi_world_size(8) + @pytest.mark.skip_less_device(8) @pytest.mark.parametrize("gen_pp,gen_tp,gen_cp,enable_attention_dp", [ (1, 2, 2, False), (1, 2, 2, True), @@ -1555,7 +1555,7 @@ class TestGPTOSS(LlmapiAccuracyTestHarness): MODEL_PATH = f"{llm_models_root()}/gpt_oss/gpt-oss-120b" - @pytest.mark.skip_less_mpi_world_size(8) + @pytest.mark.skip_less_device(8) @pytest.mark.parametrize("block_reuse", [False, True]) def test_auto_dtype(self, block_reuse, mocker): mocker.patch.object(GSM8K, "MAX_OUTPUT_LEN", 8192) @@ -1676,7 +1676,7 @@ class TestDeepSeekV32Exp(LlmapiAccuracyTestHarness): MODEL_NAME = "deepseek-ai/DeepSeek-V3.2-Exp" MODEL_PATH = f"{llm_models_root()}/DeepSeek-V3.2-Exp-FP4-v2" - @pytest.mark.skip_less_mpi_world_size(8) + @pytest.mark.skip_less_device(8) @pytest.mark.parametrize("overlap_scheduler", [False]) def test_auto_dtype(self, overlap_scheduler): cache_transceiver_config = { @@ -1924,7 +1924,7 @@ def test_chunked_prefill(self): self._test_chunked_prefill_helper(ctx_pp=1) @skip_pre_blackwell - @pytest.mark.skip_less_mpi_world_size(8) + @pytest.mark.skip_less_device(8) @pytest.mark.parametrize("gen_pp,gen_tp,gen_cp,enable_attention_dp", [ (1, 2, 2, False), (1, 2, 2, True), @@ -2131,7 +2131,7 @@ class TestKimiK25(LlmapiAccuracyTestHarness): MODEL_NAME = "moonshotai/Kimi-K2.5" MODEL_PATH = f"{llm_models_root()}/Kimi-K2.5-NVFP4" - @pytest.mark.skip_less_mpi_world_size(8) + @pytest.mark.skip_less_device(8) @pytest.mark.skip_less_device_memory(180000) def test_nvfp4(self): """Disaggregated GSM8K accuracy for Kimi-K2.5 (NVFP4). @@ -2272,7 +2272,7 @@ def _make_configs(self, use_py_transceiver: bool = False): } return ctx_server_config, gen_server_config, disaggregated_server_config - @pytest.mark.skip_less_mpi_world_size(8) + @pytest.mark.skip_less_device(8) @pytest.mark.parametrize( "mtp_nextn,block_reuse,use_py_transceiver", [ @@ -2302,7 +2302,7 @@ def test_auto_dtype(self, mtp_nextn, block_reuse, use_py_transceiver): self.MODEL_PATH) as llm: run_accuracy_test(llm, self.MODEL_NAME, ["GSM8K"]) - @pytest.mark.skip_less_mpi_world_size(8) + @pytest.mark.skip_less_device(8) def test_ctx_dp2_gen_tp4(self): ctx_cfg, gen_cfg, disagg_cfg = self._make_configs( use_py_transceiver=False) @@ -2386,7 +2386,7 @@ def _make_configs(self, use_py_transceiver: bool): } return ctx_server_config, gen_server_config, disaggregated_server_config - @pytest.mark.skip_less_mpi_world_size(8) + @pytest.mark.skip_less_device(8) @parametrize_with_ids("use_py_transceiver", [True, False]) def test_auto_dtype(self, use_py_transceiver, mocker): mocker.patch.object(GSM8K, "MAX_OUTPUT_LEN", 512) @@ -2403,7 +2403,7 @@ class TestGLM52NVFP4(LlmapiAccuracyTestHarness): MODEL_NAME = "zai-org/GLM-5.2" MODEL_PATH = f"{llm_models_root()}/GLM-5.2-NVFP4" - @pytest.mark.skip_less_mpi_world_size(8) + @pytest.mark.skip_less_device(8) @pytest.mark.parametrize("use_kv_cache_manager_v2", [False], ids=["cache_mgr_v1"]) def test_nvfp4_nixl(self, use_kv_cache_manager_v2):