okami.mom/strata
git clone https://git.nkp.pet/okami.mom/strata
46ea3947e
main
1"""G16 (Q4-P8, 2026-11-08): a Windows Strix Halo config with no picture reader (or pictures off) has no --vram-reserve-mib, and the engine then applies its 2Windows floor of 2560 MiB, which on the shared pool only moves memory from the expert cache into the RAM budget's page-locked complement: UD-Q4_K_XL never 3started (the prompt path's own buffers found 0 MiB). Setup writes the engine's own default, 700, on every single-card Windows Strix Halo config that has no other reserve; every other cell is pinned by the golden files. 4 5python -m pytest tests/snapshot/test_strix_reserve.py -q 6""" 7 8from __future__import annotations 9 10import sys 11import unittest 12from pathlib import Path 13 14ROOT = Path (__file__ ).resolve ().parents [2 ] 15if str (ROOT )not in sys .path : 16sys .path .insert (0 ,str (ROOT )) 17 18from tests .snapshot .driver import drive # noqa: E402 19 20 21def reserve (record :dict ): 22args = record ["config_file" ]["args" ] 23return args [args .index ("--vram-reserve-mib" )+ 1 ]if "--vram-reserve-mib" in args else None 24 25 26class StrixReserve (unittest .TestCase ): 27def test_every_single_card_strix_set_without_pictures_gets_the_engines_own_700 (self ): 28# one rule for every size: the big expert set that hung (UD-Q4_K_XL, 77 GB) and the small ones (UD-IQ4_XS-v31 59.5 GB, IQ3_S 50.3 GB) 29for model in ("ud_q4_k_xl" ,"ud_iq4_xs_v31" ,"iq3_s" ): 30with self .subTest (model = model ): 31rec = drive ("strix_halo_win" ,model ,"setup" ) 32self .assertEqual (rec ["inputs" ]["vision" ],"none" ) 33self .assertEqual (reserve (rec ),"700" ) 34self .assertEqual (rec ["config_file" ]["args" ].count ("--vram-reserve-mib" ),1 ) 35self .assertIn ("700" ,rec ["engine" ]["argv" ]) 36 37 38if __name__ == "__main__" : 39unittest .main ()