[codex] Split diffusion quant CI coverage (#24599)

Co-authored-by: Codex <codex@example.com>
This commit is contained in:
Xiaoyu Zhang
2026-05-16 22:05:02 +08:00
committed by GitHub
co-authored by Codex
parent 596b45b373
commit 2fc217df4d
4 changed files with 18 additions and 9 deletions
@@ -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 # 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(): if current_platform.is_hip():
ONE_GPU_MODELOPT_CASES = [] ONE_GPU_MODELOPT_FP8_CASES = []
ONE_GPU_MODELOPT_NVFP4_CASES = []
else: else:
ONE_GPU_MODELOPT_CASES = [ ONE_GPU_MODELOPT_FP8_CASES = [
_make_modelopt_ci_case( _make_modelopt_ci_case(
"flux1_modelopt_fp8_t2i", "flux1_modelopt_fp8_t2i",
model_path=DEFAULT_FLUX_1_DEV_MODEL_NAME_FOR_TEST, model_path=DEFAULT_FLUX_1_DEV_MODEL_NAME_FOR_TEST,
@@ -457,6 +460,8 @@ else:
sampling_params=MODELOPT_TI2I_CI_sampling_params, sampling_params=MODELOPT_TI2I_CI_sampling_params,
extras=["--transformer-path", MODELOPT_QWEN_IMAGE_EDIT_FP8_TRANSFORMER], extras=["--transformer-path", MODELOPT_QWEN_IMAGE_EDIT_FP8_TRANSFORMER],
), ),
]
ONE_GPU_MODELOPT_NVFP4_CASES = [
_make_modelopt_ci_case( _make_modelopt_ci_case(
"flux1_modelopt_nvfp4_t2i", "flux1_modelopt_nvfp4_t2i",
model_path=DEFAULT_FLUX_1_DEV_MODEL_NAME_FOR_TEST, 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 = [ TWO_GPU_CASES = [
DiffusionTestCase( DiffusionTestCase(
"wan2_2_i2v_a14b_2gpu", "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) TWO_GPU_CASES = _with_default_num_gpus(TWO_GPU_CASES, 2)
@@ -7,7 +7,7 @@ from __future__ import annotations
import pytest import pytest
from sglang.multimodal_gen.runtime.utils.logging_utils import init_logger 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 from sglang.multimodal_gen.test.server.test_server_common import ( # noqa: F401
DiffusionServerBase, DiffusionServerBase,
diffusion_server, diffusion_server,
@@ -18,9 +18,9 @@ logger = init_logger(__name__)
class TestDiffusionServerOneGpuB200(DiffusionServerBase): 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: def case(self, request) -> DiffusionTestCase:
"""Provide a DiffusionTestCase for each 1-GPU B200 test.""" """Provide a DiffusionTestCase for each 1-GPU B200 test."""
return request.param return request.param
@@ -5,12 +5,12 @@ Usage:
pytest python/sglang/multimodal_gen/test/server/test_server_1_gpu.py 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, # 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 pytest python/sglang/multimodal_gen/test/server/test_server_1_gpu.py -k qwen_image_t2i
To add a new testcase: 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` 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 3. insert or override the corresponding scenario in `scenarios` section of perf_baselines.json with the output baseline of step-2
@@ -26,7 +26,9 @@ CASE_LIST_TO_SUITE = {
"ONE_GPU_CASES_A": "1-gpu", "ONE_GPU_CASES_A": "1-gpu",
"ONE_GPU_CASES_B": "1-gpu", "ONE_GPU_CASES_B": "1-gpu",
"ONE_GPU_CASES_C": "1-gpu-b200", "ONE_GPU_CASES_C": "1-gpu-b200",
"ONE_GPU_MODELOPT_FP8_CASES": "1-gpu",
"ONE_GPU_MODELOPT_CASES": "1-gpu-b200", "ONE_GPU_MODELOPT_CASES": "1-gpu-b200",
"ONE_GPU_B200_CASES": "1-gpu-b200",
"TWO_GPU_CASES": "2-gpu", "TWO_GPU_CASES": "2-gpu",
"TWO_GPU_CASES_A": "2-gpu", "TWO_GPU_CASES_A": "2-gpu",
"TWO_GPU_CASES_B": "2-gpu", "TWO_GPU_CASES_B": "2-gpu",