[Model] Fix adaptation test fixture so the capacity cap does not bind
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 <liuhongsheng4@huawei.com>
This commit is contained in:
1 parent
27f9726a6a
commit
b78db6036a
1 file changed
+3
-1
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user