mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-04 07:18:50 +00:00
#6711: the HIP backend sized the expert arena from the card's total memory minus what this engine holds. Other programs also hold VRAM (3 GB on the reporter's R9700 with 29 GB free), so the single arena allocation failed "out of memory" before any model line. The budget is now also bounded by the free VRAM at that point (the trunk is already in it), and when the one contiguous allocation still fails on a discrete card the coldest GPU-planned experts move to the RAM or SSD tier in 5% steps and it is tried again. #6748: on Windows the HIP backend had no cap on the RAM experts at all, and the CUDA backend read only the free RAM. Pinned and private memory is charged to the commit limit, which can be smaller (16.2 GiB of RAM free, 9.3 GiB of commit left: "host malloc failed for layer 16"). Both now use min(free RAM, commit left) through platform::host_ram_budget (commit.hpp), tested in host_limits_test. Not run on a Windows card; the HIP change is compile-checked on boxia (gfx1100 + gfx1031).