From 2fc217df4d3056aa6e428ee4b3d5226d77601285 Mon Sep 17 00:00:00 2001 From: Xiaoyu Zhang <1182563586@qq.com> Date: Sat, 16 May 2026 22:05:02 +0800 Subject: [PATCH] [codex] Split diffusion quant CI coverage (#24599) Co-authored-by: Codex --- .../multimodal_gen/test/server/gpu_cases.py | 15 +++++++++++---- .../test/server/test_server_b200.py | 6 +++--- .../test/server/testcase_configs.py | 4 ++-- .../ci/utils/diffusion/diffusion_case_parser.py | 2 ++ 4 files changed, 18 insertions(+), 9 deletions(-) diff --git a/python/sglang/multimodal_gen/test/server/gpu_cases.py b/python/sglang/multimodal_gen/test/server/gpu_cases.py index 39fb54b53..7ac8274d9 100644 --- a/python/sglang/multimodal_gen/test/server/gpu_cases.py +++ b/python/sglang/multimodal_gen/test/server/gpu_cases.py @@ -405,11 +405,14 @@ if not current_platform.is_hip(): ) ) # Skip all ModelOpt tests on AMD: FP8 requires torch._scaled_mm (HIPBLAS_STATUS_NOT_SUPPORTED -# on ROCm), NVFP4 requires flashinfer or sgl_kernel FP4 kernels (CUDA-only) +# on ROCm), NVFP4 requires flashinfer or sgl_kernel FP4 kernels (CUDA-only). +# Run FP8 cases on the regular H100 1-GPU CI shard and keep only B200-only +# quantization coverage in the B200 suite. if current_platform.is_hip(): - ONE_GPU_MODELOPT_CASES = [] + ONE_GPU_MODELOPT_FP8_CASES = [] + ONE_GPU_MODELOPT_NVFP4_CASES = [] else: - ONE_GPU_MODELOPT_CASES = [ + ONE_GPU_MODELOPT_FP8_CASES = [ _make_modelopt_ci_case( "flux1_modelopt_fp8_t2i", model_path=DEFAULT_FLUX_1_DEV_MODEL_NAME_FOR_TEST, @@ -457,6 +460,8 @@ else: sampling_params=MODELOPT_TI2I_CI_sampling_params, extras=["--transformer-path", MODELOPT_QWEN_IMAGE_EDIT_FP8_TRANSFORMER], ), + ] + ONE_GPU_MODELOPT_NVFP4_CASES = [ _make_modelopt_ci_case( "flux1_modelopt_nvfp4_t2i", model_path=DEFAULT_FLUX_1_DEV_MODEL_NAME_FOR_TEST, @@ -483,6 +488,8 @@ else: ), ] +ONE_GPU_B200_CASES = ONE_GPU_MODELOPT_NVFP4_CASES + TWO_GPU_CASES = [ DiffusionTestCase( "wan2_2_i2v_a14b_2gpu", @@ -727,5 +734,5 @@ if not current_platform.is_hip(): ) ) -ONE_GPU_CASES += ONE_GPU_MODELOPT_CASES +ONE_GPU_CASES += ONE_GPU_MODELOPT_FP8_CASES TWO_GPU_CASES = _with_default_num_gpus(TWO_GPU_CASES, 2) diff --git a/python/sglang/multimodal_gen/test/server/test_server_b200.py b/python/sglang/multimodal_gen/test/server/test_server_b200.py index 3f8d60027..59ce35af9 100644 --- a/python/sglang/multimodal_gen/test/server/test_server_b200.py +++ b/python/sglang/multimodal_gen/test/server/test_server_b200.py @@ -7,7 +7,7 @@ from __future__ import annotations import pytest from sglang.multimodal_gen.runtime.utils.logging_utils import init_logger -from sglang.multimodal_gen.test.server.gpu_cases import ONE_GPU_MODELOPT_CASES +from sglang.multimodal_gen.test.server.gpu_cases import ONE_GPU_B200_CASES from sglang.multimodal_gen.test.server.test_server_common import ( # noqa: F401 DiffusionServerBase, diffusion_server, @@ -18,9 +18,9 @@ logger = init_logger(__name__) class TestDiffusionServerOneGpuB200(DiffusionServerBase): - """B200-targeted CI tests for 1-GPU ModelOpt diffusion cases.""" + """B200-targeted CI tests for 1-GPU Blackwell-only diffusion cases.""" - @pytest.fixture(params=ONE_GPU_MODELOPT_CASES, ids=lambda c: c.id) + @pytest.fixture(params=ONE_GPU_B200_CASES, ids=lambda c: c.id) def case(self, request) -> DiffusionTestCase: """Provide a DiffusionTestCase for each 1-GPU B200 test.""" return request.param diff --git a/python/sglang/multimodal_gen/test/server/testcase_configs.py b/python/sglang/multimodal_gen/test/server/testcase_configs.py index a140b3003..401f8a633 100644 --- a/python/sglang/multimodal_gen/test/server/testcase_configs.py +++ b/python/sglang/multimodal_gen/test/server/testcase_configs.py @@ -5,12 +5,12 @@ Usage: pytest python/sglang/multimodal_gen/test/server/test_server_1_gpu.py # for a single testcase, look for the name of the testcase in ONE_GPU_CASES, -# ONE_GPU_MODELOPT_CASES, or TWO_GPU_CASES +# ONE_GPU_MODELOPT_FP8_CASES, ONE_GPU_B200_CASES, or TWO_GPU_CASES pytest python/sglang/multimodal_gen/test/server/test_server_1_gpu.py -k qwen_image_t2i To add a new testcase: -1. add your testcase with case-id: `my_new_test_case_id` to `ONE_GPU_CASES`, `ONE_GPU_MODELOPT_CASES`, or `TWO_GPU_CASES` +1. add your testcase with case-id: `my_new_test_case_id` to `ONE_GPU_CASES`, `ONE_GPU_MODELOPT_FP8_CASES`, `ONE_GPU_B200_CASES`, or `TWO_GPU_CASES` 2. run `SGLANG_GEN_BASELINE=1 pytest -s python/sglang/multimodal_gen/test/server/ -k my_new_test_case_id` 3. insert or override the corresponding scenario in `scenarios` section of perf_baselines.json with the output baseline of step-2 diff --git a/scripts/ci/utils/diffusion/diffusion_case_parser.py b/scripts/ci/utils/diffusion/diffusion_case_parser.py index 1393e7daa..ef7ce822b 100755 --- a/scripts/ci/utils/diffusion/diffusion_case_parser.py +++ b/scripts/ci/utils/diffusion/diffusion_case_parser.py @@ -26,7 +26,9 @@ CASE_LIST_TO_SUITE = { "ONE_GPU_CASES_A": "1-gpu", "ONE_GPU_CASES_B": "1-gpu", "ONE_GPU_CASES_C": "1-gpu-b200", + "ONE_GPU_MODELOPT_FP8_CASES": "1-gpu", "ONE_GPU_MODELOPT_CASES": "1-gpu-b200", + "ONE_GPU_B200_CASES": "1-gpu-b200", "TWO_GPU_CASES": "2-gpu", "TWO_GPU_CASES_A": "2-gpu", "TWO_GPU_CASES_B": "2-gpu",