Repository navigation
Studio (AMD iGPU): split an iGPU row's total into VRAM and shared memory - #13421
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…d-split # Conflicts: # studio/backend/core/inference/video.py
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
… About, not the system RAM it can borrow (unslothai#14317) Settings > About listed a Windows ROCm iGPU as `AMD Radeon(TM) Graphics · 36 GiB`. Only about 2 GiB of that is the iGPU's own memory. The rest is system RAM it can borrow, and every GPU can borrow system RAM, so listing it on that row makes the iGPU read like a 36 GiB card next to the 32 GiB R9700s. ## Fix - `/api/system/hardware` now passes `shared_memory`, `unified_memory` and `shared_memory_host_backed_gb` on each `gpus` row. - About shows the iGPU's own memory and marks it: `AMD Radeon(TM) Graphics · 2 GiB (integrated)`. The split uses the same `deviceSharedMemorySplitGb` as Settings > System. - An integrated GPU with no separate VRAM (NVIDIA GB10 / Jetson, where the whole total is host memory) keeps its total, e.g. `120 GiB (integrated)`. - Discrete cards and responses from older backends are unchanged. - New `settings.about.gpuIntegrated` string, translated in all 14 locales. - Bundle budget raised by this change: 474 B raw / 97 B transfer against `e326020`. ## Tests (measured at `c36c64e`, Windows 11, Node 24.15.0) - New `about-igpu-shared-memory.test.ts` uses the real rows from a 2x R9700 + Ryzen 9 9950X iGPU host (iGPU: 36.23 GiB total, 34.26 GiB host-backed). It checks the 2 GiB iGPU row, the discrete cards, the no-carve-out total, the older-row fallback, and that the route forwards the fields. It fails on main. - Related suites pass 22/22, backend `test_export_capability` and `test_system_vulkan_gpu_info` pass 32, and `tsc -b` is clean. I haven't taken a screenshot of the tab, and I haven't seen an Intel iGPU row. The backend has no shared-memory flag for XPU, so an Intel iGPU still shows its plain total. Related: unslothai#14039 (iGPU left out of the Train page total), unslothai#14040 (Live monitor VRAM), unslothai#13421. ## Before / after Settings > About on two isolated Studio installs (merge base `4b8447f` vs head), both fed the same `/api/system/hardware` GPU rows from the 2x R9700 + Ryzen 9 9950X iGPU host above. The iGPU row goes from `36 GiB` to `2 GiB (integrated)`; the discrete R9700 rows are unchanged.  On a real Strix Halo (Radeon 8060S, Windows 11, gfx1151) the backend reports 76.79 GiB total with 76.46 GiB host-backed: About reads `77 GiB` at the merge base and `0.3 GiB (integrated)` at the head. --------- Co-authored-by: Daniel Han <[email protected]>
Fixes #8942
What is wrong
On a Windows PC with an AMD graphics card and an AMD CPU with built-in graphics, Settings > System already splits the VRAM tile correctly since #9247:
The iGPU's own row under GPU devices still reads its whole 36.2 GiB as VRAM. The pill beside it says
VRAM(Unknown VRAMin the screenshot,4% VRAMonce #11871 fills in the used figure), and nothing on the row says that 34.2 GiB of that is system RAM. The reporter's screenshot on #8942 (RX 9070 XT + Radeon(TM) Graphics) shows exactly that. TheUnknownused figure on the same row was fixed separately by #11871.The fix
The row now uses the same split the tile uses (
gpuMemoryTotalsGb, applied to that one device):4% VRAM4%, with2 GiB VRAM + 34.2 GiB sharedon the line below21% VRAMX% VRAMX%, withShared with system RAMon the line belowThe total on the right stays 36.2 GiB, since that is what the iGPU can actually allocate; the row now says what it is made of. Rows for discrete cards and Vulkan iGPUs (which #11305 already shows as estimated availability) render as before. Display only: nothing about model fit, budgets or the backend changes, and the strings reused are the tile's own (
vramWithShared,sharedWithSystemRam), already translated in every locale.Tests
tests/resources-device-row-shared-split.test.ts, built from the #8942 readings (15.9 GiB card, iGPU 36.2 GiB total with 34.2 GiB host-backed):unified_memorywithoutshared_memory) reads as shared, as the tile doesresources-tab.tsxdropsVRAMfrom the pill and renders the split on its own line (beside the pill it truncatedGPU 1, ROCMat the dialog's width)Full frontend suite: 11761 / 11762 pass; the one failure (
account-permissions.test.ts, sandbox popup) is a load flake that passes alone on both main and this branch.npm run typecheckandnpm run i18n:check:strictclean; eslint on the touched files reports only the two errors already on main.What it looks like
Two isolated Studio installs, one built from the merge base
3075b73d1and one from head2d10282d9, driven by the same Playwright scene. This box has no AMD iGPU, so both installs were served thegpublock from #8942 (RX 9070 XT 15.9 GiB, Radeon(TM) Graphics 36.2 GiB with 34.2 GiB host-backed, used figures filled in as #11871 now does) by replacing only that block of/api/system; everything else is each install's own live reading.GPU 0, ROCM21% VRAM3.28 GiB used12.6 GiB free15.9 GiB totalGPU 1, ROCM4% VRAM1.5 GiB used34.7 GiB free36.2 GiB totalGPU 1, ROCM4%/2 GiB VRAM + 34.2 GiB shared1.5 GiB used34.7 GiB free36.2 GiB total4.78 GiB / 17.9 GiB VRAM + 34.2 GiB sharedThe Linux ROCm APU cell, with the reading the Strix Halo gfx1151 runner really reported for #11366 (
memory_total_gb 64.0,shared_memory false,unified_memory true) replayed the same way, merge base070a0a59dagainst headbf019bf88:GPU 0, ROCM1% VRAM0.89 GiB used63.1 GiB free64 GiB totalGPU 0, ROCM1%/Shared with system RAM0.89 GiB used63.1 GiB free64 GiB total0.89 GiB / 0 GiB VRAM + 64 GiB shared