[NPU] Diffusion CI Ground Truth Generation (NPU) (#24630)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Elizaveta Martirosian <you@example.com>
Co-authored-by: Elizaveta Martirosian <elizaveta.martirosian@gmail.com>
Co-authored-by: ronnie_zheng <zl19940307@163.com>
This commit is contained in:
Elizaveta Martirosian
2026-06-04 00:14:37 +03:00
committed by GitHub
co-authored by github-actions[bot] Elizaveta Martirosian Elizaveta Martirosian ronnie_zheng
parent e485ad6ac1
commit c670609ac5
12 changed files with 551 additions and 610 deletions
@@ -38,6 +38,12 @@ def _load_partitioning_helpers():
PartitionItem, partition_items_by_lpt = _load_partitioning_helpers()
SUITE_OUTPUT_NAMES = {"1-gpu": "1gpu", "2-gpu": "2gpu", "1-gpu-b200": "b200"}
USE_NPU_CONFIGS = os.getenv("USE_NPU_CONFIGS", "0").lower() in ("1", "true")
if USE_NPU_CONFIGS:
SUITE_OUTPUT_NAMES = {"1-npu": "1npu", "2-npu": "2npu"}
DEFAULT_STANDALONE_EST_TIME_SECONDS = 300.0
@@ -261,7 +267,13 @@ def main():
print(f"Error: Run suite not found: {run_suite_path}")
sys.exit(1)
try:
case_config_path = resolve_case_config_path(repo_root, run_suite_path)
if USE_NPU_CONFIGS:
case_config_path = (
repo_root
/ "python/sglang/multimodal_gen/test/server/ascend/testcase_configs_npu.py"
)
else:
case_config_path = resolve_case_config_path(repo_root, run_suite_path)
except (RuntimeError, FileNotFoundError) as exc:
print(f"Error: {exc}")
sys.exit(1)
@@ -16,6 +16,7 @@ Usage:
import ast
import json
import os
from dataclasses import dataclass
from pathlib import Path
from typing import Dict, List, Optional
@@ -44,6 +45,17 @@ STARTUP_OVERHEAD_SECONDS = 120.0
BASELINE_REL_PATH = "python/sglang/multimodal_gen/test/server/perf_baselines.json"
RUN_SUITE_REL_PATH = "python/sglang/multimodal_gen/test/run_suite.py"
USE_NPU_CONFIGS = os.getenv("USE_NPU_CONFIGS", "0").lower() in ("1", "true")
if USE_NPU_CONFIGS:
BASELINE_REL_PATH = (
"python/sglang/multimodal_gen/test/server/perf_baselines_npu.json"
)
CASE_LIST_TO_SUITE = {
"ONE_NPU_CASES": "1-npu",
"TWO_NPU_CASES": "2-npu",
}
@dataclass
class DiffusionCaseInfo: