From 21791e7023a31028a68dce04a9a0bd78faadd96f Mon Sep 17 00:00:00 2001 From: Mohammad Miadh Angkad <176301910+mmangkad@users.noreply.github.com> Date: Sat, 17 Oct 2026 04:40:03 +0800 Subject: [PATCH] [CI] [NVIDIA] DSv4.1-Flash: Split GB300 accuracy test into one file per config (#44696) Co-authored-by: Mohammad Angkad --- .../sglang/test/dsv41_flash_common.py | 89 ++----------------- ...seek_v41_flash_gb300_bounded_replay_bcg.py | 38 ++++++++ .../test_deepseek_v41_flash_gb300_dp4ep4.py | 34 +++++++ .../test_deepseek_v41_flash_gb300_tp4ep4.py | 23 +++++ ...seek_v41_flash_gb300_trtllm_bounded_bcg.py | 39 ++++++++ 5 files changed, 143 insertions(+), 80 deletions(-) rename test/registered/e2e/models/test_deepseek_v41_flash_gb300.py => python/sglang/test/dsv41_flash_common.py (54%) create mode 100644 test/registered/e2e/models/test_deepseek_v41_flash_gb300_bounded_replay_bcg.py create mode 100644 test/registered/e2e/models/test_deepseek_v41_flash_gb300_dp4ep4.py create mode 100644 test/registered/e2e/models/test_deepseek_v41_flash_gb300_tp4ep4.py create mode 100644 test/registered/e2e/models/test_deepseek_v41_flash_gb300_trtllm_bounded_bcg.py diff --git a/test/registered/e2e/models/test_deepseek_v41_flash_gb300.py b/python/sglang/test/dsv41_flash_common.py similarity index 54% rename from test/registered/e2e/models/test_deepseek_v41_flash_gb300.py rename to python/sglang/test/dsv41_flash_common.py index d12bbb3a18..1548258608 100644 --- a/test/registered/e2e/models/test_deepseek_v41_flash_gb300.py +++ b/python/sglang/test/dsv41_flash_common.py @@ -1,30 +1,25 @@ -"""DeepSeek-V4.1-Flash accuracy with DSPARK on four GB300 GPUs. +"""Shared DeepSeek-V4.1-Flash + DSPARK accuracy recipe for the GB300 tests. -Run GSM8K and MMMU-Pro in TP4+EP4 and DP-attention4 + EP4 configurations, -plus decoder SWA bounded replay inside breakable prefill graphs with the -default and TRT-LLM attention backends. -The DP+EP recipe is intentionally exercised rather than skipped: startup or -accuracy failures must be visible in CI while this path is being validated. +Each server configuration lives in its own file under +``test/registered/e2e/models/test_deepseek_v41_flash_gb300_*.py`` so the +configurations partition independently across GB300 runners. """ -import unittest - import requests 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, _run_accuracy_eval from sglang.test.test_utils import ( DEFAULT_URL_FOR_TEST, - CustomTestCase, popen_launch_server, try_cached_model, ) -register_cuda_ci(est_time=2400, stage="base-c", runner_config="4-gpu-gb300") - MODEL = "deepseek-ai/DeepSeek-V4.1-Flash" +# Tensor-parallel attention and expert-parallel MoE, without DP attention. +TP4_EP4_ARGS = ["--attn-dp-size", "1", "--ep-size", "4"] + class DSV41FlashAccuracyMixin(GSM8KMixin): # Use the zero-shot chat evaluator, not the legacy five-shot completion path. @@ -36,7 +31,7 @@ class DSV41FlashAccuracyMixin(GSM8KMixin): mmmu_pro_score_threshold = 0.75 mmmu_pro_num_examples = 200 mmmu_pro_num_threads = 64 - # Bound long reasoning responses consistently across all three CI recipes. + # Bound long reasoning responses consistently across all CI recipes. mmmu_pro_max_tokens = 32768 mmmu_pro_load_preset_from_model_id = MODEL @@ -72,6 +67,7 @@ class DSV41FlashAccuracyMixin(GSM8KMixin): "auto", "--tool-call-parser", "auto", + "--disable-flashinfer-autotune", *cls.parallel_args, *cls.graph_args, ], @@ -107,70 +103,3 @@ class DSV41FlashAccuracyMixin(GSM8KMixin): max_tokens=self.mmmu_pro_max_tokens, ) self.assert_dspark_accepts_draft_tokens() - - -class TestDSV41FlashTP4EP4DSpark(DSV41FlashAccuracyMixin, CustomTestCase): - """Tensor-parallel attention and expert-parallel MoE, without DP attention.""" - - parallel_args = ["--attn-dp-size", "1", "--ep-size", "4"] - - -class TestDSV41FlashDP4EP4DSpark(DSV41FlashAccuracyMixin, CustomTestCase): - """DP attention and EP MoE using the built-in gather/reduce path. - - DSPARK with DP attention does not support the DeepEP backend. - """ - - parallel_args = [ - "--attn-dp-size", - "4", - "--ep-size", - "4", - "--enable-dp-lm-head", - "--moe-a2a-backend", - "none", - ] - - -class TestDSV41FlashTP4EP4DSparkBoundedReplayBCG(TestDSV41FlashTP4EP4DSpark): - """Exercise bounded late-layer replay inside the breakable prefill graph.""" - - # Leave memory for the prefill graph pool. With 32 requests, the tail - # capacity is 4096 rows, below the largest 8192-token capture shape. - mem_fraction_static = "0.7" - max_running_requests = "32" - graph_args = [ - "--enable-decoder-swa-bounded-replay", - "--cuda-graph-backend-prefill", - "breakable", - "--cuda-graph-max-bs-prefill", - "8192", - "--chunked-prefill-size", - "8192", - ] - - -class TestDSV41FlashTrtllmBoundedBCG(DSV41FlashAccuracyMixin, CustomTestCase): - """TRT-LLM varlen attention through the full and bounded-tail graph breaks.""" - - parallel_args = [ - "--attn-dp-size", - "1", - "--ep-size", - "4", - "--dsv4-attn-backend", - "trtllm", - "--enable-decoder-swa-bounded-replay", - "--cuda-graph-backend-prefill", - "breakable", - "--cuda-graph-max-bs-prefill", - "4096", - "--cuda-graph-max-seq-len-prefill", - "16384", - "--chunked-prefill-size", - "4096", - ] - - -if __name__ == "__main__": - unittest.main() diff --git a/test/registered/e2e/models/test_deepseek_v41_flash_gb300_bounded_replay_bcg.py b/test/registered/e2e/models/test_deepseek_v41_flash_gb300_bounded_replay_bcg.py new file mode 100644 index 0000000000..6635676bf7 --- /dev/null +++ b/test/registered/e2e/models/test_deepseek_v41_flash_gb300_bounded_replay_bcg.py @@ -0,0 +1,38 @@ +"""DeepSeek-V4.1-Flash + DSPARK accuracy on four GB300 GPUs: bounded replay BCG. + +TP4 + EP4 with decoder SWA bounded replay inside breakable prefill graphs, +using the default attention backend. +""" + +import unittest + +from sglang.test.ci.ci_register import register_cuda_ci +from sglang.test.dsv41_flash_common import TP4_EP4_ARGS, DSV41FlashAccuracyMixin +from sglang.test.test_utils import CustomTestCase + +register_cuda_ci(est_time=600, stage="base-c", runner_config="4-gpu-gb300") + + +class TestDSV41FlashTP4EP4DSparkBoundedReplayBCG( + DSV41FlashAccuracyMixin, CustomTestCase +): + """Exercise bounded late-layer replay inside the breakable prefill graph.""" + + parallel_args = TP4_EP4_ARGS + # Leave memory for the prefill graph pool. With 32 requests, the tail + # capacity is 4096 rows, below the largest 8192-token capture shape. + mem_fraction_static = "0.7" + max_running_requests = "32" + graph_args = [ + "--enable-decoder-swa-bounded-replay", + "--cuda-graph-backend-prefill", + "breakable", + "--cuda-graph-max-bs-prefill", + "8192", + "--chunked-prefill-size", + "8192", + ] + + +if __name__ == "__main__": + unittest.main() diff --git a/test/registered/e2e/models/test_deepseek_v41_flash_gb300_dp4ep4.py b/test/registered/e2e/models/test_deepseek_v41_flash_gb300_dp4ep4.py new file mode 100644 index 0000000000..ad82a647a7 --- /dev/null +++ b/test/registered/e2e/models/test_deepseek_v41_flash_gb300_dp4ep4.py @@ -0,0 +1,34 @@ +"""DeepSeek-V4.1-Flash + DSPARK accuracy on four GB300 GPUs: DP-attention4 + EP4. + +The DP+EP recipe is intentionally exercised rather than skipped: startup or +accuracy failures must be visible in CI while this path is being validated. +""" + +import unittest + +from sglang.test.ci.ci_register import register_cuda_ci +from sglang.test.dsv41_flash_common import DSV41FlashAccuracyMixin +from sglang.test.test_utils import CustomTestCase + +register_cuda_ci(est_time=600, stage="base-c", runner_config="4-gpu-gb300") + + +class TestDSV41FlashDP4EP4DSpark(DSV41FlashAccuracyMixin, CustomTestCase): + """DP attention and EP MoE using the built-in gather/reduce path. + + DSPARK with DP attention does not support the DeepEP backend. + """ + + parallel_args = [ + "--attn-dp-size", + "4", + "--ep-size", + "4", + "--enable-dp-lm-head", + "--moe-a2a-backend", + "none", + ] + + +if __name__ == "__main__": + unittest.main() diff --git a/test/registered/e2e/models/test_deepseek_v41_flash_gb300_tp4ep4.py b/test/registered/e2e/models/test_deepseek_v41_flash_gb300_tp4ep4.py new file mode 100644 index 0000000000..f9426bda6f --- /dev/null +++ b/test/registered/e2e/models/test_deepseek_v41_flash_gb300_tp4ep4.py @@ -0,0 +1,23 @@ +"""DeepSeek-V4.1-Flash + DSPARK accuracy on four GB300 GPUs: TP4 + EP4. + +GSM8K and MMMU-Pro with tensor-parallel attention and expert-parallel MoE, +without DP attention. +""" + +import unittest + +from sglang.test.ci.ci_register import register_cuda_ci +from sglang.test.dsv41_flash_common import TP4_EP4_ARGS, DSV41FlashAccuracyMixin +from sglang.test.test_utils import CustomTestCase + +register_cuda_ci(est_time=600, stage="base-c", runner_config="4-gpu-gb300") + + +class TestDSV41FlashTP4EP4DSpark(DSV41FlashAccuracyMixin, CustomTestCase): + """Tensor-parallel attention and expert-parallel MoE, without DP attention.""" + + parallel_args = TP4_EP4_ARGS + + +if __name__ == "__main__": + unittest.main() diff --git a/test/registered/e2e/models/test_deepseek_v41_flash_gb300_trtllm_bounded_bcg.py b/test/registered/e2e/models/test_deepseek_v41_flash_gb300_trtllm_bounded_bcg.py new file mode 100644 index 0000000000..3279cea5d3 --- /dev/null +++ b/test/registered/e2e/models/test_deepseek_v41_flash_gb300_trtllm_bounded_bcg.py @@ -0,0 +1,39 @@ +"""DeepSeek-V4.1-Flash + DSPARK accuracy on four GB300 GPUs: TRT-LLM bounded BCG. + +TP4 + EP4 with TRT-LLM varlen attention and decoder SWA bounded replay inside +breakable prefill graphs. +""" + +import unittest + +from sglang.test.ci.ci_register import register_cuda_ci +from sglang.test.dsv41_flash_common import DSV41FlashAccuracyMixin +from sglang.test.test_utils import CustomTestCase + +register_cuda_ci(est_time=600, stage="base-c", runner_config="4-gpu-gb300") + + +class TestDSV41FlashTrtllmBoundedBCG(DSV41FlashAccuracyMixin, CustomTestCase): + """TRT-LLM varlen attention through the full and bounded-tail graph breaks.""" + + parallel_args = [ + "--attn-dp-size", + "1", + "--ep-size", + "4", + "--dsv4-attn-backend", + "trtllm", + "--enable-decoder-swa-bounded-replay", + "--cuda-graph-backend-prefill", + "breakable", + "--cuda-graph-max-bs-prefill", + "4096", + "--cuda-graph-max-seq-len-prefill", + "16384", + "--chunked-prefill-size", + "4096", + ] + + +if __name__ == "__main__": + unittest.main()