fix(hardware_ai): a 24GB card read as 4GB, because AdapterRAM is 32 bits
The last knowingly-false line in the inference report. `Win32_VideoController.AdapterRAM` is a 32-bit field, so the RTX 3090 Ti in this machine reports 4293918720 — just under 4GiB — for a card with 24GB. Divided by 2^30 that is 4.0, and the report said "Insufficient VRAM for ML training" about a card with more VRAM than most machines have RAM. Every card above 4GB is misreported the same way, so the larger the card the more wrong the answer. That is the opposite of a safe failure: the machines best suited to the workload are the ones told they cannot run it. `HardwareInformation.qwMemorySize` in the display-adapter class key is a REG_QWORD holding the real figure — 25757220864 on this host — and needs no elevation. The 32-bit `HardwareInformation.MemorySize` sits beside it carrying the same wrong number as WMI, which is a useful confirmation that the overflow is in the field width rather than in the query. Adapters with no `qwMemorySize` keep `gpu_vram_gb` at its default rather than falling back to the overflowed value. A caller that cannot find its adapter has not learnt the card has 4GB; it has learnt nothing, and a confident 4.0 is what caused this. The value is rounded to whole GiB, which is a real fix and not cosmetic. A card sold as 24GB reports 23.988 GiB — twelve mebibytes short, because the driver reserves some — and every threshold downstream is written `>= 24.0`, `>= 16.0`, `>= 8.0`. Unrounded, a card of exactly the threshold size fails it: this one missed `>= 24.0` by 0.012, and an 8GB card misses `>= 8.0` the same way. VRAM is provisioned in whole GiB. After: ML training 65 to 100, "Insufficient VRAM for ML training" replaced by "24GB VRAM for large models", performance tier High to Ultra (67 to 83). The whole report is now consistent with the hardware: Workstation, no bottlenecks, no upgrade recommendations, headroom Ample, cpu_year 2024. One imprecision left, in a heuristic table rather than a reader: the RTX 3090 Ti is dated 2020 because it matches the RTX 30 series rule, and the Ti shipped in 2022. Verified: fmt, clippy, both cross-target checks, 12 hardware_ai unit tests. Registry values checked independently against `Get-PhysicalDisk` and the class key before wiring. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A
Adam Erickson committed
7607401160b8d51e0e8430f7d22adc0940a59fe9
Parent: a584dd0