Skip to content

Studio (AMD iGPU): split an iGPU row's total into VRAM and shared memory - #13421

Merged
danielhanchen merged 4 commits into
mainfrom
studio-igpu-row-shared-split
Oct 13, 2026
Merged

danielhanchen merged 4 commits into
mainfrom
studio-igpu-row-shared-split

Conversation

@danielhanchen

@danielhanchen danielhanchen commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

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:

VRAM   Unknown / 17.9 GiB VRAM + 34.2 GiB shared

The iGPU's own row under GPU devices still reads its whole 36.2 GiB as VRAM. The pill beside it says VRAM (Unknown VRAM in the screenshot, 4% VRAM once #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. The Unknown used 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):

before after
iGPU row, under its name 4% VRAM 4%, with 2 GiB VRAM + 34.2 GiB shared on the line below
iGPU row, used / free / total unchanged unchanged
discrete card row 21% VRAM unchanged
Linux ROCm APU (unified, no carve-out reported) X% VRAM X%, with Shared with system RAM on the line below

The 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):

  • the iGPU row splits into 2 GiB VRAM + 34.2 GiB shared
  • the discrete card gets no split
  • card + iGPU rows add up to the tile's dedicated / shared split
  • a Linux ROCm APU (unified_memory without shared_memory) reads as shared, as the tile does
  • zero or missing totals give no split
  • the row in resources-tab.tsx drops VRAM from the pill and renders the split on its own line (beside the pill it truncated GPU 1, ROCM at 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 typecheck and npm run i18n:check:strict clean; 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 3075b73d1 and one from head 2d10282d9, driven by the same Playwright scene. This box has no AMD iGPU, so both installs were served the gpu block 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 device rows, merge base against head

Settings > System, merge base against head

merge base head
RX 9070 XT row GPU 0, ROCM 21% VRAM 3.28 GiB used 12.6 GiB free 15.9 GiB total identical
Radeon(TM) Graphics row GPU 1, ROCM 4% VRAM 1.5 GiB used 34.7 GiB free 36.2 GiB total GPU 1, ROCM 4% / 2 GiB VRAM + 34.2 GiB shared 1.5 GiB used 34.7 GiB free 36.2 GiB total
VRAM tile 4.78 GiB / 17.9 GiB VRAM + 34.2 GiB shared identical

The 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 base 070a0a59d against head bf019bf88:

Strix Halo row, merge base against head

merge base head
Radeon 8060S row GPU 0, ROCM 1% VRAM 0.89 GiB used 63.1 GiB free 64 GiB total GPU 0, ROCM 1% / Shared with system RAM 0.89 GiB used 63.1 GiB free 64 GiB total
VRAM tile 0.89 GiB / 0 GiB VRAM + 64 GiB shared identical

@danielhanchen danielhanchen self-assigned this Oct 12, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T05:24:21.449371Z bf019bf Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 4376d3b751

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Oct 12, 2026
danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Oct 12, 2026
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 2d10282d9c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Oct 13, 2026
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: bf019bf887

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Oct 13, 2026
@danielhanchen
danielhanchen merged commit 8a0e453 into main Oct 13, 2026
@danielhanchen
danielhanchen deleted the studio-igpu-row-shared-split branch October 13, 2026 06:08
danielhanchen added a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Oct 20, 2026
… 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.

![Settings > About GPU rows, before vs
after](https://raw.githubusercontent.com/danielhanchen/unsloth-staging-2/pr-media/pr/14317/pr14317_pair_00-35b82b22eaf5.png)

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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] AMD: on Windows, an iGPU next to a Radeon card shows inflated or Unknown VRAM

1 participant