[CI/Build] Share nightly CUDA YAML between H100/L4 and B200 (#7028)

Signed-off-by: wangyu <410167048@qq.com>
Signed-off-by: [Your Name] [Your Email]
Signed-off-by: [Your Name] <your.email@example.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: amy-why-3459 <wuhaiyan17@huawei.com>
This commit is contained in:
authored and GitHub committed 2026-09-14 14:27:10 +08:00
1 parent 58adeec05f
commit 64903b8e30
78 files changed
+437 -321

No files matched your search

@@ -1,5 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
# SPDX-FileCopyrightText: Copyright contributors to the vLLM-Omni project
"""Tests for CFG (Classifier-Free Guidance) parallel functionality.
CPU tests mock the CFG process group and validate mixin logic without GPUs.
@@ -32,8 +32,8 @@ from vllm_omni.diffusion.distributed.parallel_state import (
)
from vllm_omni.platforms import current_omni_platform
_L4_TWO_GPU = hardware_marks(res={"cuda": "L4"}, num_cards=2)
_L4_THREE_GPU = hardware_marks(res={"cuda": "L4"}, num_cards=3)
_L4_TWO_GPU = hardware_marks(res={"cuda": ["L4", "B200"]}, num_cards=2)
_L4_THREE_GPU = hardware_marks(res={"cuda": ["L4", "B200"]}, num_cards=3)
def _set_random_seeds(seed: int) -> None:
@@ -1009,7 +1009,7 @@ def _run_multi_branch_gpu_parity(
@pytest.mark.full_model
@pytest.mark.diffusion
@pytest.mark.parallel
@hardware_test(res={"cuda": "L4"}, num_cards=2)
@hardware_test(res={"cuda": ["L4", "B200"]}, num_cards=2)
@pytest.mark.parametrize("batch_size", [2])
@pytest.mark.parametrize("cfg_normalize", [False, True])
@pytest.mark.parametrize("extra_kwargs", [None, {"step_i": 1}])
+3 -3
View File
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
# SPDX-FileCopyrightText: Copyright contributors to the vLLM-Omni project
"""Tests for SeqAllToAll4D, SeqAllToAll5D, and RingComm communication primitives.
CPU tests use gloo on CPU tensors (no GPU). Nightly parity tests run the same
@@ -24,8 +24,8 @@ from vllm_omni.diffusion.distributed.parallel_state import (
)
from vllm_omni.platforms import current_omni_platform
_L4_TWO_GPU = hardware_marks(res={"cuda": "L4"}, num_cards=2)
_L4_FOUR_GPU = hardware_marks(res={"cuda": "L4"}, num_cards=4)
_L4_TWO_GPU = hardware_marks(res={"cuda": ["L4", "B200"]}, num_cards=2)
_L4_FOUR_GPU = hardware_marks(res={"cuda": ["L4", "B200"]}, num_cards=4)
DeviceKind = Literal["cpu", "cuda"]
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
# SPDX-FileCopyrightText: Copyright contributors to the vLLM-Omni project
"""
System test for Expert Parallel (EP).
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
# SPDX-FileCopyrightText: Copyright contributors to the vLLM-Omni project
"""FLUX.2-dev VAE patch-parallel correctness tests.
@@ -31,9 +31,9 @@ from vllm_omni.diffusion.distributed.parallel_state import (
from vllm_omni.diffusion.distributed.pipeline_parallel import AsyncLatents, PipelineParallelMixin
from vllm_omni.platforms import current_omni_platform
_L4_TWO_GPU = hardware_marks(res={"cuda": "L4"}, num_cards=2)
_L4_THREE_GPU = hardware_marks(res={"cuda": "L4"}, num_cards=3)
_L4_FOUR_GPU = hardware_marks(res={"cuda": "L4"}, num_cards=4)
_L4_TWO_GPU = hardware_marks(res={"cuda": ["L4", "B200"]}, num_cards=2)
_L4_THREE_GPU = hardware_marks(res={"cuda": ["L4", "B200"]}, num_cards=3)
_L4_FOUR_GPU = hardware_marks(res={"cuda": ["L4", "B200"]}, num_cards=4)
DeviceKind = Literal["cpu", "cuda"]
_UNIT_MARKS = [pytest.mark.core_model, pytest.mark.diffusion, pytest.mark.cpu]
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
# SPDX-FileCopyrightText: Copyright contributors to the vLLM-Omni project
"""Real multi-process numeric equivalence gate for SANA-Video sequence parallel.
Runs the native transformer directly (no pipeline, no topology validation) with
@@ -273,7 +273,7 @@ def _baseline_worker(
@pytest.mark.full_model
@pytest.mark.diffusion
@pytest.mark.parallel
@hardware_test(res={"cuda": "L4"}, num_cards=2)
@hardware_test(res={"cuda": ["L4", "B200"]}, num_cards=2)
@pytest.mark.parametrize("task", ["t2v", "i2v"])
@pytest.mark.parametrize("num_frames", [21, 5])
def test_sp2_matches_sp1_fp32(task: str, num_frames: int) -> None:
@@ -290,7 +290,7 @@ def test_sp2_matches_sp1_fp32(task: str, num_frames: int) -> None:
@pytest.mark.full_model
@pytest.mark.diffusion
@pytest.mark.parallel
@hardware_test(res={"cuda": "L4"}, num_cards=4)
@hardware_test(res={"cuda": ["L4", "B200"]}, num_cards=4)
@pytest.mark.parametrize("task", ["t2v", "i2v"])
@pytest.mark.parametrize("num_frames", [21, 5])
def test_sp4_matches_sp1_fp32(task: str, num_frames: int) -> None:
@@ -307,7 +307,7 @@ def test_sp4_matches_sp1_fp32(task: str, num_frames: int) -> None:
@pytest.mark.full_model
@pytest.mark.diffusion
@pytest.mark.parallel
@hardware_test(res={"cuda": "L4"}, num_cards=4)
@hardware_test(res={"cuda": ["L4", "B200"]}, num_cards=4)
def test_sp2_cfg2_matches_sp1_fp32() -> None:
"""Four processes: CFG branches with distinct inputs each run their own SP
group; catches CFG/SP group crossover and deadlocks."""
@@ -324,7 +324,7 @@ def test_sp2_cfg2_matches_sp1_fp32() -> None:
@pytest.mark.full_model
@pytest.mark.diffusion
@pytest.mark.parallel
@hardware_test(res={"cuda": "L4"}, num_cards=4)
@hardware_test(res={"cuda": ["L4", "B200"]}, num_cards=4)
def test_tp2_sp2_matches_sp1_fp32() -> None:
"""Four processes: TP shards heads and channels while SP shards frames; the
combined mesh must still reproduce the serial output."""
@@ -342,7 +342,7 @@ def test_tp2_sp2_matches_sp1_fp32() -> None:
@pytest.mark.full_model
@pytest.mark.diffusion
@pytest.mark.parallel
@hardware_test(res={"cuda": "L4"}, num_cards=2)
@hardware_test(res={"cuda": ["L4", "B200"]}, num_cards=2)
def test_sp2_bf16_drift_informational() -> None:
"""Records the bf16 reduction-reorder drift magnitude; the load-bearing
numeric gate is the fp32 suite above."""
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
# SPDX-FileCopyrightText: Copyright contributors to the vLLM-Omni project
"""
System test for Sequence Parallel (SP) backends: Ulysses and Ring attention.
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
# SPDX-FileCopyrightText: Copyright contributors to the vLLM-Omni project
"""VAE patch-parallel decode parity tests for diffusion models.
@@ -145,7 +145,7 @@ def _run_generate(
@pytest.mark.full_model
@pytest.mark.diffusion
@pytest.mark.parallel
@hardware_test(res={"cuda": "H100"}, num_cards={"cuda": 4})
@hardware_test(res={"cuda": ["H100", "B200"]}, num_cards={"cuda": 4})
@pytest.mark.parametrize("model_case", MODEL_CASES)
def test_vae_patch_parallel_tp2(model_case: dict[str, Any], tmp_path: Path):
if current_omni_platform.is_npu():
@@ -1,3 +1,6 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM-Omni project
import os
from types import SimpleNamespace
@@ -538,7 +541,7 @@ def _spatial_shard_decode_worker(rank: int, split_dim: str, return_dict, master_
@pytest.mark.full_model
@pytest.mark.diffusion
@pytest.mark.parallel
@hardware_test(res={"cuda": "H100"}, num_cards=_SPATIAL_SHARD_WORLD_SIZE)
@hardware_test(res={"cuda": ["H100", "B200"]}, num_cards=_SPATIAL_SHARD_WORLD_SIZE)
@pytest.mark.parametrize("split_dim", ["height", "width"])
def test_spatial_shard_decode_matches_reference(split_dim: str):
manager = mp.get_context("spawn").Manager()
@@ -175,7 +175,7 @@ def _generate_joint_output(omni, config: QualityTestConfig):
pytest.param(
_QUALITY_CONFIG,
id=_QUALITY_CONFIG.id,
marks=hardware_marks(res={"cuda": _QUALITY_CONFIG.gpu}, num_cards=2),
marks=hardware_marks(res={"cuda": ["H100", "B200"]}, num_cards=2),
)
],
)
@@ -9,7 +9,7 @@ import pytest
import torch
from vllm.distributed.parallel_state import cleanup_dist_env_and_memory
from tests.helpers.mark import hardware_test
from tests.helpers.mark import hardware_marks, hardware_test
from tests.helpers.monitor import DeviceMemoryMonitor
from tests.helpers.runtime import OmniRunner
from vllm_omni.inputs.data import OmniDiffusionSamplingParams
@@ -27,7 +27,10 @@ MODELS: dict[str, dict[str, int | None]] = {**AUDIO_MODEL, **IMAGE_MODELS}
MODEL_MARKS = {
"riverclouds/qwen_image_random": pytest.mark.core_model,
"stabilityai/stable-audio-open-1.0": pytest.mark.full_model,
"stabilityai/stable-audio-open-1.0": [
pytest.mark.full_model,
*hardware_marks(res={"cuda": ["L4", "B200"], "rocm": "MI325"}),
],
}
_GATED_MODELS = {"stabilityai/stable-audio-open-1.0"}
@@ -12,7 +12,7 @@ import pytest
import torch
from vllm.distributed.parallel_state import cleanup_dist_env_and_memory
from tests.helpers.mark import hardware_test
from tests.helpers.mark import hardware_marks
from tests.helpers.monitor import DeviceMemoryMonitor
from tests.helpers.runtime import OmniRunner
from vllm_omni.inputs.data import OmniDiffusionSamplingParams
@@ -34,8 +34,14 @@ IMAGE_VIDEO_MODELS: dict[str, dict[str, int | None]] = {
MODELS: dict[str, dict[str, int | None]] = {**AUDIO_MODEL, **IMAGE_VIDEO_MODELS}
MODEL_MARKS = {
"riverclouds/qwen_image_random": pytest.mark.core_model,
"stabilityai/stable-audio-open-1.0": pytest.mark.full_model,
"riverclouds/qwen_image_random": [
pytest.mark.core_model,
*hardware_marks(res={"cuda": "L4", "rocm": "MI325"}),
],
"stabilityai/stable-audio-open-1.0": [
pytest.mark.full_model,
*hardware_marks(res={"cuda": ["L4", "B200"], "rocm": "MI325"}),
],
}
AUDIO_MODEL_PARAMS: dict[str, dict[str, Any]] = {
@@ -309,7 +315,6 @@ def test_stable_audio_requires_both_outputs(audio_no_offload, audio_offload, mes
@pytest.mark.diffusion
@hardware_test(res={"cuda": "L4", "rocm": "MI325"})
@pytest.mark.parametrize(
"model_name",
[pytest.param(name, marks=MODEL_MARKS[name]) for name in MODELS],
@@ -109,7 +109,7 @@ def _generate_single_stage_image(
return images, peak_mem
@hardware_test(res={"cuda": "L4"})
@hardware_test(res={"cuda": ["L4", "B200"]})
@pytest.mark.full_model
@pytest.mark.diffusion
@pytest.mark.parametrize("model", [Z_IMAGE_CONFIG, FLUX_CONFIG], ids=["Z-Image-Turbo", "FLUX.2-klein"])
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
# SPDX-FileCopyrightText: Copyright contributors to the vLLM-Omni project
"""
End-to-end tests for the unified quantization framework (PR #1764).
@@ -270,7 +270,7 @@ def _generate_bagel_image(
# ─── Single-stage diffusion model tests ──────────────────────────────────────
@hardware_test(res={"cuda": "L4"})
@hardware_test(res={"cuda": ["L4", "B200"]})
def test_single_stage_zimage_fp8():
"""Z-Image-Turbo with FP8 generates valid images."""
images, _ = _generate_single_stage_image(
@@ -281,7 +281,7 @@ def test_single_stage_zimage_fp8():
images[0].save("test_zimage_fp8.png")
@hardware_test(res={"cuda": "L4"})
@hardware_test(res={"cuda": ["L4", "B200"]})
def test_single_stage_zimage_fp8_uses_less_memory():
"""FP8 should use less peak memory than BF16 for Z-Image-Turbo."""
_, mem_bf16 = _generate_single_stage_image(
@@ -300,7 +300,7 @@ def test_single_stage_zimage_fp8_uses_less_memory():
assert mem_fp8 < mem_bf16, f"FP8 ({mem_fp8:.2f} GiB) should use less memory than BF16 ({mem_bf16:.2f} GiB)"
@hardware_test(res={"cuda": "L4", "xpu": "B60"})
@hardware_test(res={"cuda": ["L4", "B200"], "xpu": "B60"})
@pytest.mark.advanced_model
def test_single_stage_qwen_image_fp8():
"""Qwen-Image (random weights) with FP8 generates valid images."""
@@ -316,7 +316,7 @@ def test_single_stage_qwen_image_fp8():
images[0].save("test_qwen_image_fp8.png")
@hardware_test(res={"cuda": "H100"})
@hardware_test(res={"cuda": ["H100", "B200"]})
@pytest.mark.skip(reason="This model is not authorized on Hugging Face Hub yet")
def test_single_stage_flux_fp8():
"""FLUX.1-dev with FP8 generates valid images."""
@@ -331,7 +331,7 @@ def test_single_stage_flux_fp8():
images[0].save("test_flux_fp8.png")
@hardware_test(res={"cuda": "H100"})
@hardware_test(res={"cuda": ["H100", "B200"]})
@pytest.mark.skip(reason="This model is not authorized on Hugging Face Hub yet")
def test_single_stage_flux_fp8_uses_less_memory():
"""FP8 should use less peak memory than BF16 for FLUX.1-dev."""
@@ -357,7 +357,7 @@ def test_single_stage_flux_fp8_uses_less_memory():
assert mem_fp8 < mem_bf16, f"FP8 ({mem_fp8:.2f} GiB) should use less memory than BF16 ({mem_bf16:.2f} GiB)"
@hardware_test(res={"cuda": "H100"})
@hardware_test(res={"cuda": ["H100", "B200"]})
def test_single_stage_ltx2_fp8_uses_less_memory():
"""FP8 should use less peak memory than BF16 for LTX-2."""
_, mem_bf16 = _generate_single_stage_video(
@@ -379,7 +379,7 @@ def test_single_stage_ltx2_fp8_uses_less_memory():
# ─── Multi-stage model tests (BAGEL) ─────────────────────────────────────────
@hardware_test(res={"cuda": "H100"})
@hardware_test(res={"cuda": ["H100", "B200"]})
def test_bagel_fp8_generates_image():
"""BAGEL with diffusion-stage FP8 generates a valid image.
@@ -392,7 +392,7 @@ def test_bagel_fp8_generates_image():
image.save("test_bagel_fp8.png")
@hardware_test(res={"cuda": "H100"})
@hardware_test(res={"cuda": ["H100", "B200"]})
def test_bagel_bf16_generates_image():
"""BAGEL without quantization generates a valid image (baseline)."""
image, _ = _generate_bagel_image(diffusion_quantization_config=None)
@@ -402,7 +402,7 @@ def test_bagel_bf16_generates_image():
# ─── Quantization config routing tests ────────────────────────────────────────
@hardware_test(res={"cuda": "L4"})
@hardware_test(res={"cuda": ["L4", "B200"]})
def test_quantization_key_maps_to_quantization_config():
"""The old 'quantization' kwarg should map to 'quantization_config'
in OmniDiffusionConfig.from_kwargs for backwards compatibility."""
@@ -413,7 +413,7 @@ def test_quantization_key_maps_to_quantization_config():
assert config.quantization_config.get_name() == "fp8"
@hardware_test(res={"cuda": "L4"})
@hardware_test(res={"cuda": ["L4", "B200"]})
def test_quantization_config_key_takes_priority():
"""When both 'quantization' and 'quantization_config' are set,
'quantization_config' takes priority."""
@@ -428,7 +428,7 @@ def test_quantization_config_key_takes_priority():
assert config.quantization_config.activation_scheme == "static"
@hardware_test(res={"cuda": "L4"})
@hardware_test(res={"cuda": ["L4", "B200"]})
def test_single_stage_quantization_config_key():
"""Single-stage model using quantization_config (dict) key generates images."""
images, _ = _generate_single_stage_image(
@@ -45,6 +45,7 @@ import pytest
import torch
from PIL import Image
from tests.e2e.accuracy.helpers import resolve_device_threshold
from tests.helpers.mark import hardware_marks
_REPO_ROOT = Path(__file__).resolve().parents[3]
@@ -70,7 +71,7 @@ class QualityTestConfig:
id: str # pytest ID, e.g. "fp8_z_image"
task: str # "t2i" or "t2v"
prompt: str # generation prompt
max_lpips: float # fail threshold — higher = more lenient
max_lpips: float | dict[str, float] # threshold, or {"H100": 0.15, "B200": 0.17}
model: str | None = None # HF model name
quantization: str | dict[str, object] | None = None # quantization method/config, e.g. "fp8"
baseline_model: str | None = None # explicit BF16/local baseline path
@@ -80,7 +81,6 @@ class QualityTestConfig:
num_inference_steps: int = 20 # keep low for CI speed
num_frames: int = 5 # only for t2v
seed: int = 42
gpu: str = "H100" # minimum GPU requirement
negative_prompt: str | None = ""
guidance_scale: float | None = None
sigmas: list[float] | None = None
@@ -190,7 +190,7 @@ QUALITY_CONFIGS = [
quantization={"text_encoder": "fp8", "transformer": None, "vae": None},
task="t2i",
prompt="a cup of coffee on a wooden table, morning light",
max_lpips=0.15,
max_lpips={"H100": 0.15, "B200": 0.17},
num_inference_steps=10,
enable_cpu_offload=True,
height=1024,
@@ -528,7 +528,7 @@ def test_ltx_quality_gate_uses_official_eager_defaults(monkeypatch):
assert captured.sampling.guidance_scale is None
_marks = hardware_marks(res={"cuda": "H100"})
_marks = hardware_marks(res={"cuda": ["H100", "B200"]})
_OUTPUT_DIR = Path(os.environ["VLLM_OMNI_QUALITY_OUTPUT_DIR"]) if "VLLM_OMNI_QUALITY_OUTPUT_DIR" in os.environ else None
@@ -588,8 +588,9 @@ def test_quantization_quality(config: QualityTestConfig):
# --- Similarity metrics ---
lpips_score = _compute_lpips(baseline_out, quant_out, config.task)
psnr_score, mae_score = _compute_psnr_and_mae(baseline_out, quant_out, config.task)
assert lpips_score <= config.max_lpips, (
f"LPIPS {lpips_score:.4f} exceeds threshold {config.max_lpips} "
gpu_key, max_lpips = resolve_device_threshold(config.max_lpips, label=f"{config.id} max_lpips")
assert lpips_score <= max_lpips, (
f"LPIPS {lpips_score:.4f} exceeds threshold {max_lpips} ({gpu_key}) "
f"for {config.quantization_ref() or 'pre-quantized checkpoint'} on {config.quantized_ref()}"
)
@@ -601,12 +602,12 @@ def test_quantization_quality(config: QualityTestConfig):
print(f" Baseline: {config.baseline_ref()}")
print(f" Quantized: {config.quantized_ref()}")
print(f" Method: {config.quantization_ref() or 'pre-quantized checkpoint'}")
print(f" LPIPS: {lpips_score:.4f} (threshold: {config.max_lpips})")
print(f" LPIPS: {lpips_score:.4f} (threshold: {max_lpips}, gpu: {gpu_key})")
print(f" PSNR: {psnr_score:.4f} dB (higher is better)")
print(f" MAE: {mae_score:.6f} (lower is better)")
print(f" BF16 memory: {bl_mem:.2f} GiB")
print(f" Quant memory: {qt_mem:.2f} GiB ({mem_reduction:.0f}% reduction)")
print(f" Result: {'PASS' if lpips_score <= config.max_lpips else 'FAIL'}")
print(f" Result: {'PASS' if lpips_score <= max_lpips else 'FAIL'}")
print(f"{'=' * 60}\n")
assert np.isfinite(psnr_score) or np.isinf(psnr_score), f"PSNR is invalid for {config.id}: {psnr_score}"