Skip to content

README: document XCL_UMA_MB - #3567

Draft
romeawayfromhome-rgb wants to merge 1 commit into
xcl-dev:mainfrom
romeawayfromhome-rgb:docs/uma-mb-readme-03
Draft

romeawayfromhome-rgb wants to merge 1 commit into
xcl-dev:mainfrom
romeawayfromhome-rgb:docs/uma-mb-readme-03

Conversation

@romeawayfromhome-rgb

Copy link
Copy Markdown

Documents XCL_UMA_MB, which the README did not mention. README-only change. No issue.

What is in it

  • README.md: one new bullet under "Switches for how a title runs", after the XCL_RAM_MB bullet, stating that XCL_UMA_MB sets the size of the title's unified (GPU-visible) memory in MiB, overrides uma_mb in xcl.toml for that run, falls back to the config value when unset (2048, or 4095 with advanced title memory), keeps 2048 when the value is not a number, and is split into 4 GiB windows above 4095.

Tested

  • Verified against the code at main 493dbd3: crates/xcl/src/config.rs documents uma_mb as unified memory in MiB (0 = 4095 for advanced title memory, else 2048; above 4095 split into 4 GiB windows) and states "XCL_UMA_MB overrides"; crates/xcl/src/host.rs sets XCL_UMA_MB from the config only when the variable is unset, so the environment value wins; get() in crates/xcl/src/gpu/uma.rs parses the variable as a number and falls back to 2048 otherwise. Confirmed the variable had no mention in README.md at that commit and searched PRs and issues for a duplicate; none found.

Regression run
main: n/a (docs-only)
PR: n/a (docs-only)

Not tested

  • No local build or test run; README-only change. Windows build, cargo test --workspace, the GPU suite, and any retail title were not run.

AI use

  • AI-assisted (Muse Spark): read the code, checked for duplicate PRs, and prepared this docs change. No test results were produced by the tool.

@github-actions github-actions Bot added the area:docs-ci Documentation, scripts, workflows, repo governance label Dec 1, 2026
@Foniass

Foniass commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Review (head 5dc5e1c, diff read, not a merge-check; draft):

  • On the normal path XCL_UMA_MB does not set the unified-memory size. get() (gpu/uma.rs ~1226) calls Uma::for_runtime_with((mb << 20).max(coherent), coherent), and coherent_window_sizes (~74) sizes the committed window as size.min(coherent.max(RUNTIME_COMMITTED_CAP)). Since coherent_hint_for (~1068-1088) never returns less than 512 MiB unless XCL_COHERENT_MB asks for less, the result is always the coherent hint whatever XCL_UMA_MB says. The size actually comes from XCL_COHERENT_MB or the title's recorded need (README: document XCL_COHERENT_MB #3285 documents that variable).
  • "Above 4095 the memory is split into 4 GiB windows" is only true for the fallback. In the default layout max_coherent_windows (~57-63) returns 1 and coherent_window_sizes clamps the total to MAX_SIZE; the split happens only in Uma::new (~245), reached only when reserve_runtime finds no aligned slot (~318). The line copies the doc comment at config.rs ~27-29, which is out of date.

Fine: the parsing (parse::<usize>(), falling back to 2048), the precedence over uma_mb (host.rs ~86) and the config defaults (config.rs ~113-114) are described correctly.

AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:docs-ci Documentation, scripts, workflows, repo governance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants