Commit 829e446
Fix AMD APU unified memory VRAM detection using VIS_VRAM
On AMD APUs with unified memory architecture (e.g., AMD Ryzen AI MAX /
Strix Halo, GC 12.0.0), both amdsmi_get_gpu_vram_usage and
rsmi_dev_memory_total_get(RSMI_MEM_TYPE_VRAM) return only the BIOS
carveout (~512 MiB) instead of the actual usable unified memory.
VIS_VRAM (RSMI_MEM_TYPE_VIS_VRAM=2) correctly reports the full system
memory on APUs because all system memory is CPU-visible. Add the
constant to pyrocmsmi and use max(VRAM, VIS_VRAM) in both detection
paths so APUs report the correct memory capacity.
Co-authored-by: Readon <3614708+Readon@users.noreply.github.com>1 parent 70e060f commit 829e446
2 files changed
Lines changed: 25 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
182 | 192 | | |
183 | 193 | | |
184 | 194 | | |
| |||
189 | 199 | | |
190 | 200 | | |
191 | 201 | | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
192 | 212 | | |
193 | 213 | | |
194 | 214 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
65 | 70 | | |
66 | 71 | | |
67 | 72 | | |
| |||
0 commit comments