From 8faa2d6731812fbcfe3a7f906333f92988882ad3 Mon Sep 17 00:00:00 2001 From: hanwlax Date: Mon, 21 Sep 2026 16:56:35 +0800 Subject: [PATCH] [NPU][Diffusion] Disable loading latency checks in Ascend fixtures (#40544) --- .../multimodal_gen/test/server/ascend/conftest.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/python/sglang/multimodal_gen/test/server/ascend/conftest.py b/python/sglang/multimodal_gen/test/server/ascend/conftest.py index 0e0afd054..58a87694e 100644 --- a/python/sglang/multimodal_gen/test/server/ascend/conftest.py +++ b/python/sglang/multimodal_gen/test/server/ascend/conftest.py @@ -1,4 +1,7 @@ -"""Ascend NPU conftest: evict stale model page cache before each test case. +"""Ascend NPU fixtures for performance validation and model page cache. + +NPU performance guards cover inference latency, not model loading latency. +Loading times are still collected and reported by the shared test harness. Memory-capped CI runners (e.g. a 128 GiB cgroup on the 4-NPU A3 pool) count reclaimable page cache from previously loaded models in cgroup @@ -24,6 +27,16 @@ _CGROUP_V2_CURRENT = "/sys/fs/cgroup/memory.current" _CGROUP_V1_USAGE = "/sys/fs/cgroup/memory/memory.usage_in_bytes" +@pytest.fixture(autouse=True) +def _disable_load_latency_validation(monkeypatch): + """Disable loading-latency comparisons only for tests in this directory.""" + from sglang.multimodal_gen.test.server.test_server_utils import PerformanceValidator + + monkeypatch.setattr( + PerformanceValidator, "validate_load", lambda self, summary: None + ) + + def _read_cgroup_memory_current() -> str: """Best-effort read of the container's cgroup memory usage in bytes.""" for path in (_CGROUP_V2_CURRENT, _CGROUP_V1_USAGE):