D3D12.X: XCL_UMA_DRIVER=mixed keeps part of the coherent window in VRAM (nvidia-dev) #3005
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!3005
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3005"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Kalmarv on GitHub · 2026-11-27 11:50 UTC · original
Kalmarv:nvd-p3a-mixed→nvidia-dev· +906 −14 · 9 files · 4 commits · draftStacked on #3004; only the top two commits (
dbaa3b24,b3d63124) belong here. Part of #2688. The same change as the first part of #2938 onmain.With
XCL_UMA_DRIVER=mixed:<start_mb>:<size_mb>[,...]the coherent window becomes several driver heaps instead of one CUSTOM heap: each listed range aGPU_UPLOADheap (video memory the CPU writes through the BAR) and the rest CUSTOM write-back L0 heaps. Each segment's CPU mapping lands at its place in the window (every slot reserved first, the rest of the address space groomed as the single-heap remake does), and one reserved buffer over the window maps its 64 KiB tiles onto the segments' heaps, so shaders and placed resources still see one window. Off unless the switch is set; it applies to the first coherent window only.Measured share, on
main(RTX 5070 Ti 16 GB, Series X profile, timed runs alone; #2938): one CUSTOM heap 11.99 fps against the mixed window 24.15 fps over 187-229 s in the world, everything else equal (2.01x); the window'sGPU_UPLOADpart cut PCIe traffic by about two thirds. Onnvidia-devour team's world runs (16 GB card) all usedXCL_UMA_DRIVER=mixed:1536:1792; with it the next commits (#3007) took the world from ~1.8 to 5.1 fps, so it is the base of that work.What is in it
uma_driver.rs:mixed:parsing (parse_mixed,decide),build_segments,remake_window,remake_mixed, andread_vram_bytes(theGPU_UPLOADsegments read on the COPY queue into a readback buffer: CPU reads through the BAR ran at 12-84 MiB/s).GPU_UPLOADsegments are not write-watched;Uma::watch_regionslists only the watched ones (gpu/uma.rs).real.rs:UMA_HEAPSkeeps each window's segments,uma_heap_forpicks the one a placed resource falls in.title_textures.rs:with_title_bytesreadsGPU_UPLOADsegments throughread_vram_bytes.mixed_ranges_parse_in_order,mixed_segments_cover_the_window, the GPU testmixed_window_keeps_its_bytes_and_the_gpu_sees_every_segment.GPU_UPLOADheaps and for a console buffer across two segments are the next PR (#3006).Tested
XCL_DXC_DIR.cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4onb3d63124(withCARGO_PROFILE_DEV_DEBUG=0: no debug info, for disk space): 1831 passed, 8 failed, 48 ignored. The same command onnvidia-deva5e2d851: 1822 passed, 10 failed, 48 ignored.a5e2d851as well:console_ms_in_as_slot_and_ms_with_as_are_refused_cleanly,hle::d3d12x::texture_upload::tests::gpu_parts_of_a_texture_go_up_and_the_rest_stays,hle::d3d12x::texture_upload::tests::pieces_hold_the_texels_of_their_levels,split_compute_prefers_the_offline_whole_pipeline,two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs.SKIPPED: 8 no wave64; 1 f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's)); 1 f16 arithmetic, wave64: no wave64; 1 const_mask, wave64: no wave64; 1 f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's)); 1 f16 packed, wave64: no wave64; 1 f32 arithmetic, wave64: no wave64; 1 integer arithmetic, wave64: no wave64; 1 f64, wave64: no wave64; 1 mask_ff0_flbit, wave64: no wave64; 1 f32 compares, wave64: no wave64; 1 integer carries, wave64: no wave64; 1 f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's)); 1 f32 conversions, wave64: no wave64; 1 f32 rounding, wave64: no wave64; 1 f32 transcendentals, wave64: no wave64; 1 f32 three-source, wave64: no wave64; 1 no heap windows (opt-in: XCL_HEAP_WINDOWS=1); 1 no heap windows.Regression run
150 s runs, same title, same env (
XCL_HEAP_WINDOWS=1 XCL_DIRECT_DXIL=all XCL_DIRECT_SPLIT_INSTRUCTIONS=0 XCL_PSO_JOURNAL=0 XCL_DRED=1 XCL_GPU_WAIT_TIMEOUT_MS=120000, DXC 1.9), no switch of this PR set. Themainrun from a hard-link copy of our team branch's DXIL cache; the base and head runs from hard-link copies of one cache warmed onnvidia-deva5e2d851(on this branch the title starts after about 75-90 s of startup shader preparation, so 60 s would end inside it).A commit of
main(b49be183, the last one before the shader preparation screen of #2555):The base,
nvidia-deva5e2d851:This PR's head:
Not tested
mixed:1536:1792. Cards with less than 16 GB. The remake reserves the process's other free stretches so the driver maps each segment at its place; a thread that frees 64 MB or more of address space during it can let a segment map elsewhere, which stops the process. Not seen in title runs; the switch is opt-in.AI use
nvidia-dev, wrote the tests, ran the suite and the regression runs, and wrote this description.🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.