[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:
78 files changed
+437
-321
No files matched your search
@@ -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}"
|
||||
|
||||
Reference in new issue
Block a user