From 070fde72bf3b77d34bc6b46019c3f1e10122f44c Mon Sep 17 00:00:00 2001 From: Baizhou Zhang Date: Wed, 5 Aug 2026 16:07:14 -0700 Subject: [PATCH] [CI] Remove some unneeded CP tests (#33763) --- .../cp/test_glm52_cp_index_share.py | 63 -------- .../cp/test_gqa_prefill_cp_legacy.py | 136 ------------------ test/registered/cp/test_mimo_cp.py | 80 ----------- 3 files changed, 279 deletions(-) delete mode 100644 test/registered/cp/test_glm52_cp_index_share.py delete mode 100644 test/registered/cp/test_gqa_prefill_cp_legacy.py delete mode 100644 test/registered/cp/test_mimo_cp.py diff --git a/test/registered/cp/test_glm52_cp_index_share.py b/test/registered/cp/test_glm52_cp_index_share.py deleted file mode 100644 index b64a1d764..000000000 --- a/test/registered/cp/test_glm52_cp_index_share.py +++ /dev/null @@ -1,63 +0,0 @@ -import unittest - -from sglang.srt.utils import kill_process_tree -from sglang.test.ci.ci_register import register_cuda_ci -from sglang.test.kits.eval_accuracy_kit import GSM8KMixin -from sglang.test.test_utils import ( - DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH, - DEFAULT_URL_FOR_TEST, - CustomTestCase, - popen_launch_server, -) - -register_cuda_ci(est_time=400, stage="extra-b", runner_config="4-gpu-b200") - -GLM52_NVFP4_MODEL_PATH = "nvidia/GLM-5.2-NVFP4" - - -class TestGLM52CPInterleave(GSM8KMixin, CustomTestCase): - gsm8k_accuracy_thres = 0.935 - gsm8k_num_examples = 500 - gsm8k_num_threads = 32 - gsm8k_num_shots = 20 - gsm8k_accept_length_thres = 3 - - @classmethod - def setUpClass(cls): - cls.model = GLM52_NVFP4_MODEL_PATH - cls.base_url = DEFAULT_URL_FOR_TEST - cls.process = popen_launch_server( - cls.model, - cls.base_url, - timeout=DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH, - other_args=[ - "--tp", - "4", - "--attn-cp-size", - "4", - "--enable-prefill-cp", - "--cp-strategy", - "interleave", - "--speculative-algorithm", - "EAGLE", - "--speculative-num-steps", - "3", - "--speculative-eagle-topk", - "1", - "--speculative-num-draft-tokens", - "4", - "--mem-frac", - "0.85", - "--model-loader-extra-config", - '{"enable_multithread_load": true, "num_threads": 64}', - ], - ) - - @classmethod - def tearDownClass(cls): - if hasattr(cls, "process") and cls.process: - kill_process_tree(cls.process.pid) - - -if __name__ == "__main__": - unittest.main() diff --git a/test/registered/cp/test_gqa_prefill_cp_legacy.py b/test/registered/cp/test_gqa_prefill_cp_legacy.py deleted file mode 100644 index 7b97da77f..000000000 --- a/test/registered/cp/test_gqa_prefill_cp_legacy.py +++ /dev/null @@ -1,136 +0,0 @@ -import unittest -from types import SimpleNamespace - -from sglang.test.ci.ci_register import register_cuda_ci -from sglang.test.run_eval import run_eval -from sglang.test.test_utils import ( - DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH, - DEFAULT_URL_FOR_TEST, - CustomTestCase, - kill_process_tree, - popen_launch_server, -) - -register_cuda_ci(est_time=260, stage="extra-b", runner_config="4-gpu-h100") - -GQA_MODEL_PATH = "Qwen/Qwen3-30B-A3B-FP8" - -GSM8K_BASELINE_ACCURACY = 0.93 - - -class TestGQACP2TP2EP2(CustomTestCase): - @classmethod - def setUpClass(cls): - cls.model = GQA_MODEL_PATH - cls.base_url = DEFAULT_URL_FOR_TEST - cls.process = popen_launch_server( - cls.model, - cls.base_url, - timeout=DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH, - other_args=[ - "--tp-size", - "4", - "--moe-dp-size", - "2", - "--ep-size", - "2", - "--attn-cp-size", - "2", - "--enable-prefill-context-parallel", - "--cuda-graph-max-bs-decode", - "32", - "--max-running-requests", - "32", - "--trust-remote-code", - "--disable-piecewise-cuda-graph", - "--model-loader-extra-config", - '{"enable_multithread_load": true, "num_threads": 64}', - ], - env={"SGLANG_ENABLE_CP_V2": "0"}, - ) - - @classmethod - def tearDownClass(cls): - if hasattr(cls, "process") and cls.process: - kill_process_tree(cls.process.pid) - - def test_gsm8k(self): - args = SimpleNamespace( - model=self.model, - eval_name="gsm8k", - num_shots=5, - num_examples=200, - max_tokens=16000, - num_threads=128, - repeat=1, - temperature=0.6, - top_p=0.95, - top_k=20, - base_url=self.base_url, - host="http://127.0.0.1", - port=int(self.base_url.split(":")[-1]), - ) - metrics = run_eval(args) - print(f"{metrics=}") - self.assertGreaterEqual(metrics["score"], GSM8K_BASELINE_ACCURACY) - - -class TestGQACPTP2CP2EP4(CustomTestCase): - @classmethod - def setUpClass(cls): - cls.model = GQA_MODEL_PATH - cls.base_url = DEFAULT_URL_FOR_TEST - cls.process = popen_launch_server( - cls.model, - cls.base_url, - timeout=DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH, - other_args=[ - "--tp-size", - "4", - "--moe-dp-size", - "1", - "--ep-size", - "4", - "--attn-cp-size", - "2", - "--enable-prefill-context-parallel", - "--cuda-graph-max-bs-decode", - "32", - "--max-running-requests", - "32", - "--trust-remote-code", - "--disable-piecewise-cuda-graph", - "--model-loader-extra-config", - '{"enable_multithread_load": true, "num_threads": 64}', - ], - env={"SGLANG_ENABLE_CP_V2": "0"}, - ) - - @classmethod - def tearDownClass(cls): - if hasattr(cls, "process") and cls.process: - kill_process_tree(cls.process.pid) - - def test_gsm8k(self): - args = SimpleNamespace( - model=self.model, - eval_name="gsm8k", - num_shots=5, - num_examples=200, - max_tokens=16000, - num_threads=128, - repeat=1, - temperature=0.6, - top_p=0.95, - top_k=20, - base_url=self.base_url, - host="http://127.0.0.1", - port=int(self.base_url.split(":")[-1]), - ) - metrics = run_eval(args) - print(f"{metrics=}") - self.assertGreaterEqual(metrics["score"], GSM8K_BASELINE_ACCURACY) - - -if __name__ == "__main__": - unittest.main() diff --git a/test/registered/cp/test_mimo_cp.py b/test/registered/cp/test_mimo_cp.py deleted file mode 100644 index b311a9ba1..000000000 --- a/test/registered/cp/test_mimo_cp.py +++ /dev/null @@ -1,80 +0,0 @@ -import unittest -from types import SimpleNamespace - -from sglang.test.ci.ci_register import register_cuda_ci -from sglang.test.run_eval import run_eval -from sglang.test.test_utils import ( - DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH, - DEFAULT_URL_FOR_TEST, - CustomTestCase, - kill_process_tree, - popen_launch_server, -) - -register_cuda_ci(est_time=500, suite="nightly-8-gpu-b200", nightly=True) - -MIMO_V2_MODEL_PATH = "XiaomiMiMo/MiMo-V2.5" -GSM8K_BASELINE_ACCURACY = 0.93 - - -class TestMiMoV2ContextParallel(CustomTestCase): - @classmethod - def setUpClass(cls): - cls.model = MIMO_V2_MODEL_PATH - cls.base_url = DEFAULT_URL_FOR_TEST - cls.process = popen_launch_server( - cls.model, - cls.base_url, - timeout=DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH, - other_args=[ - "--trust-remote-code", - "--language-only", - "--tp", - "8", - "--attn-cp-size", - "2", - "--attention-backend", - "fa4", - "--enable-prefill-cp", - "--cp-strategy", - "zigzag", - "--moe-runner-backend", - "flashinfer_trtllm", - "--moe-dense-tp-size", - "1", - "--mem-fraction-static", - "0.8", - "--chunked-prefill-size", - "8192", - ], - ) - - @classmethod - def tearDownClass(cls): - if hasattr(cls, "process") and cls.process: - kill_process_tree(cls.process.pid) - - def test_gsm8k(self): - metrics = run_eval( - SimpleNamespace( - model=self.model, - eval_name="gsm8k", - api="chat", - num_shots=5, - num_examples=200, - max_tokens=4096, - num_threads=8, - repeat=1, - temperature=0.0, - top_p=1.0, - base_url=self.base_url, - host="http://127.0.0.1", - port=int(self.base_url.split(":")[-1]), - ) - ) - print(f"{metrics=}") - self.assertGreaterEqual(metrics["score"], GSM8K_BASELINE_ACCURACY) - - -if __name__ == "__main__": - unittest.main()