From b78db6036a870e1a3abfa51ffa256d14bc5a9492 Mon Sep 17 00:00:00 2001 From: hsliuustc0106 Date: Wed, 26 Aug 2026 13:12:55 +0800 Subject: [PATCH] [Model] Fix adaptation test fixture so the capacity cap does not bind MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The fixture reported device capacity 100, making the 25% cap 25 — below the learned budget of 37 — so the post-adaptation checks released again and the test failed. Raise the fixture capacity to 400 so the cap stays above the learned budget and the test isolates peak adaptation; verified against the real suite on the L20X validation host (15 passed). Signed-off-by: hsliuustc0106 --- tests/diffusion/offloader/test_module_residency.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/diffusion/offloader/test_module_residency.py b/tests/diffusion/offloader/test_module_residency.py index 8f58e62dd..f1cd59c96 100644 --- a/tests/diffusion/offloader/test_module_residency.py +++ b/tests/diffusion/offloader/test_module_residency.py @@ -305,7 +305,9 @@ def test_allocator_cache_budget_adapts_to_observed_peak(monkeypatch, patched_run monkeypatch.setattr( residency_module.current_omni_platform, "get_device_memory", - lambda _device: (telemetry["free"], 100), + # Capacity 400 keeps the 25% cap (100) above the learned budget so + # this test isolates the peak-adaptation behavior from the cap. + lambda _device: (telemetry["free"], 400), ) retention = BoundedAllocatorCache(torch.device("cpu")) retention.grow_retention_budget(10)