[NPU][Diffusion] Disable loading latency checks in Ascend fixtures (#40544)
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user