Repository navigation
D3D12.X: XCL_WINDOW_STATS logs each memory window's traffic - #3627
Royalflamejlh wants to merge 1 commit into
Conversation
|
Review (head 9a0ac0a, diff read, not a merge-check; draft, checks red):
Fine: off by default, each hook is one AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point. |
9a0ac0a to
4e2d288
Compare
|
Thanks. Fixed at 4e2d288: KB up counts the copies of a submitted upload ( AI use: Claude Code (Claude Opus 5.5) made the fixes and wrote this reply. |
|
Follow-up review (head 4e2d288, since 9a0ac0a, diff read, not a merge-check; draft):
New: none. AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point. |
|
merge-check Default ( Opt-in ( verdict: safe to merge |
4e2d288 to
4b7c148
Compare
|
Follow-up review (head 4b7c148, since 4e2d288, diff read, not a merge-check; checks red):
New: none. AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point. |
|
@Prime1997 could you take a look at this one for review and merge? My automated review notes are above, if any. |
4b7c148 to
2580976
Compare
|
Follow-up review of In short: This push reworks the PR's own commit:
The new end check also counts ranges that are inside the memory windows: ranges that cross between two adjacent sparse or view windows, and root views near a window's end, checked against an assumed 64 KiB. The smoke blocks name Medium
Checked and fine
Written by Claude Code (Claude Opus 5.5) and posted by Foniass without a human check of each point. |
An address the title gives the GPU outside every memory window is no GPU memory, and nothing said so: with 4 windows the title's GPU views lay outside them and the world's mesh programs read empty meshlet lists (xcl-dev#3565). With XCL_WINDOW_STATS=<seconds>, every that many seconds: - a line for each window: kind, range, bytes with memory on the GPU (tiles of a sparse or view window, the committed bytes of a coherent one), and since the line before the bytes uploaded into it, the pages the write watch found written, the bytes read back and the GPU-view tiles filled; - a line with the addresses given outside every window, by view_want::Path, and the pages written outside them. The first 8 addresses of each path outside every window are logged with their size and what lies there (a GPU view of the title's memory, a graphics reservation, plain memory, nothing committed). The counters are relaxed atomics where the uploads, read-backs, write-watch looks, mirror fills and view_want asks already happen; off, each is one load. Nothing is remapped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2580976 to
bdec29f
Compare
|
Right: the sparse windows hold one contiguous title reservation, and root views pass an assumed 64 KiB. Fixed at AI use: Claude Code (Claude Opus 5.5) made the changes and wrote this reply. |
|
Follow-up review of In short: This push fixes the window-crossing count from my last review. A range now counts as inside when its last byte lies in the same window or in the adjacent windows of the same kind that run on from it ( Checked and fine
Written by Claude Code (Claude Opus 5.5) and posted by Foniass without a human check of each point. |
(Edited: head
bdec29f9ftakes the second reviews:XCL_WINDOW_STATSuses the UMA region only once it exists,0is off, and an address range counts as outside when it runs past its run of adjacent windows of one kind (a root view, whose size is not known, is placed by its start). Onmain38ad22d.)An address the title gives the GPU outside every memory window is no GPU memory, and nothing said so (#3565: with 4 windows the title's GPU views lay outside them). With
XCL_WINDOW_STATS=<seconds>, every that many seconds XCL logs a line for each memory window and one for the addresses given to the GPU outside every window, by path; the first 8 of each path are logged with what lies there. Off by default; then each counter is one load. Nothing is remapped.What is in it
hle/d3d12x/window_stats.rs(new): per window its kind, range, bytes with memory on the GPU, and since the line before the bytes uploaded, the pages the write watch found written, the bytes read back and the GPU-view tiles filled; perview_want::Paththe addresses outside every window, the first 8 placed (a GPU view of the title's memory, a graphics reservation, plain memory, nothing committed). Relaxed atomics, a logging thread started fromhost.rs.sparse.rs(uploads, copy back, view tiles filled;mapped_by_window),title_textures.rs(pages the write watch found),view_want.rsandbind.rs(addresses outside every view window, root views).README.md: the switch.Tested
bdec29f9f: Under Wine on Mesa's CPU Vulkan driver, release, 1 run:window_stats5 passed, 0 failed;cargo test --lib -- window_stats file_reads write_log shader_mem console_heap eh::at the top of the stack (D3D12.X: XCL_SHADER_MEM_STATS writes a placement table per allocation #3642,f1ae90ebb): 62 passed, 0 failed.zero_seconds_is_offand the outside-range case oftraffic_adds_to_its_window_and_addresses_in_one_are_not_outsidefailed without the fix.5653fd69, with an earlier version of this PR's commit, before the second review's fixes):cargo test --workspace -- --test-threads=4, 2,931 passed, 0 failed, 51 ignored, 1 run; 28SKIPPEDlines (wave64 tests: no wave64 on this card; heap-window tests withoutXCL_HEAP_WINDOWS=1; no D3D12 debug layer). The stack's GPU tests (gpu_mem_stats_*, the writer and geometry-pass tests) ran and passed.x86_64-pc-windows-gnu, release. Tests under Wine on Mesa's CPU Vulkan driver (no card: the card was running a title).cargo check -p xcl --release --target x86_64-pc-windows-gnu, with and without--tests: no errors, no new warnings.cargo test -p xcl --release --target x86_64-pc-windows-gnu --lib -- --test-threads=8 window_stats view_want hle::d3d12x::bind sparse title_textures gpu::uma: 361 passed, 0 failed, 2 ignored; 3 GPU tests printedSKIPPED: no GPU. The new tests place addresses in the 16- and 4-window layouts and check the lines.XCL_SHADER_MEM_STATS(stacked after this), its lines and placement table showed a 1.34 GB GPU heap in a coherent window (system memory) that shaders read far more than the CPU wrote it; kernelx: XCL_COHERENT_HEAPS=sparse-wc puts write-combined GPU heaps in video memory #3619 moves that heap to video memory.Regression run
RTX 2070 SUPER 8 GB (driver 621.01), Ryzen 7 5700X3D, Windows 11 Pro 26200, release builds by
scripts/smoke.ps1, the same retail title for 60 s each.main:this PR's head:
Not tested
AI use
mainand made the title runs.