DXC: compute programs are linked with their memory accessors (window switches no longer dominate DXC time) #174
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!174
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/174/head"
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?
@gefydev on GitHub · 2026-11-23 18:55 UTC · original
gefydev:mem-accessor-cost→main· +547 −47 · 5 files · 2 commits · merged 2026-11-25 23:01 UTCLane L6 of the compile-time handoff (DXC cost). Draft. About −14 % DXC time on retail compute programs (measured below); the tests pass on AMD (RX 7800 XT, comment below). #187 has landed and removes the window switch itself (windows from the descriptor heap, VS / PS too, and much faster on its own synthetic CS), but only with
XCL_HEAP_WINDOWS=1: that is opt-in, so the switch form is still the default and this PR serves it, and the programs #187 rebuilds in the switch form when the driver refuses the heap form. A program in the heap form has no switch accessors, andlinked_formleaves it alone.Rebased onto
main2898511(two commits). It conflicted withmainindxc.rsand at the end oftests.rs. Indxc.rs,mainadded a special case forE_OUTOFMEMORYinside the code that this PR moved intooutput(): it is kept there. Intests.rs, where this PR conflicted at every rebase because every merged change adds its tests at the end, the three tests of this PR now live in their own file,link_tests.rs, next toheap_window_tests.rs, with the two small helpers they need (gpu_ready,on_gpu). #2346 landed before that: the windows aregloballycoherentonly when the program needs it, solinked_programs_keep_their_declarationsnow runs a program with a GLC load and one without, in wave32 and wave64, and checks that linking keeps either. Inemit.rs,main'smem_accessors(windows, heap)and its out-of-rangedefault(reads 0, stores dropped) are kept:mem_methods()now also returns what each method does outside the windows,loadx4_switchandmethod_switchwrite the same switch textmainwrites, andlinked_formasks formem_accessors(w, None). The accessor text for the switch form is still byte-identical tomain's.What is slow
With several memory windows every
memaccess is a call to an accessor that switches between the windows. DXC inlines it when it compiles, before it optimises, so a program gets one switch per access, and DXC's time grows much faster than their number. HANDOFF (956a476) measured it at about double DXC + driver time on one large CS; #172 measured about 26 % of DXC time on its 1-in-100 pack sample. The first table below is the worst case, programs made of memory accesses only; the second is real ones.What is in it
emit::linked_formturns such a program into two DXIL libraries: the program, with its accessors only declared, and the accessors. DXC cannot inline a declaration.dxc::compile_linkedcompiles both and links them withIDxcLinker, which inlines the accessors after the program was optimised. The compiled accessor library is kept, and compiled once per key even when several programs ask for it together (kept_once, the second commit).cs_*(which is also what MS and GS programs run as), only with 2–4 windows, only from 100 places that use an accessor. VS and PS are unchanged.LinkGate, the second commit): a DXC before 1.8 refuses[WaveSize]on a library entry and would otherwise fail the same way for every program. The README says the linker needs DXC 1.8 or newer.XCL_LINK_MEM=0turns it off. It shares the DXIL cache, so compare with anotherXCL_DXIL_CACHE.The HLSL the translator emits is unchanged (the accessor text is byte-identical to
mainfor 2, 3 and 4 windows), so cache keys do not change: programs already in a DXIL cache stay as they were compiled.Measured, synthetic worst case
GTX 1650 (driver 32.0.16.2124, 32-lane waves), Ryzen 5 1600, 16 GB RAM, ~13.5 GB commit free, Windows 11 26300, DXC 1.9.2602.17, debug build.
bench_memory_window_accessors(ignored test, in this PR): synthetic split-wave64 CS, 3 rounds, the forms one after the other in every round, a different program each time so that the driver cannot answer from its cache. Medians:main)main)dispatch_timedgives).Measured on a retail pack
GTX 1650 machine above (16 GB RAM), release build, one binary,
XCL_LINK_MEM=0/1. Cold--precompile --only cs --limit 22300(143 compute programs, 4 windows, split wave64), 4 DXC threads, a new empty cache for every run, order off-on, on-off, off-on:XCL_LINK_MEM=0--pipelines, one at a time, in two runs). Driver time off / on was not compared.Tried and dropped
[noinline]accessors in the program itself: the same DXC gain and a smaller DXIL, but NVIDIA keeps them as calls and the dispatch is 4.5–6× slower. (DXC's validator also takes only scalars in such functions.)noinline.Tested
gpu_linked_memory_accessors: one program with 1–4 dword loads and stores, scalar loads, 32- and 64-bit atomics, in two windows, odd and even lanes in different ones. Registers and memory are the same whole and linked, and loads match what is in memory.linked_programs_keep_their_declarations: wave size (32 and 64), thread count, the windows' registers,globallycoherent(resource properties) and the number of functions are those of the whole program.956a476:cargo test --workspace: 538 lib tests pass, 0 fail, 2 SKIPPED (no wave64); other suites pass. The same with the threshold at 0, so that everycs_*program with windows is linked: 538 pass, 0 fail.6ccfd1d(GTX 1650,CARGO_BUILD_JOBS=2):cargo build --workspace, thencargo test --workspace --no-fail-fast -- --test-threads=4: 1366 passed, 3 failed, 47 ignored. 28 SKIPPED, none on a path this PR changes: 21 wave64 cases (no wave64 on this GPU), 3 per-lane f16 cases the per-lane form refuses, 1 "no heap windows", 3 for the D3D12 debug layer not being installed. The 3 failures aretitle_textures::tests::placed_title_textures_share_vram_and_preserve_pixels(#718, which fails now and then) and the two tests its panic leaves on a poisoned lock (transitions_apply_when_their_list_is_submittedandvram::tests::d32s8_targets_take_their_own_size_of_video_memory). The same three fail with the same command on a clean checkout ofmain2898511, and all three pass alone on one thread: nothing to do with DXC or this PR. It includes the PR's two tests (gpu_linked_memory_accessors,linked_programs_keep_their_declarations) and the four tests of the second commit (accessor_library_tests).kept_once).Regression run
The pair below is for the current head,
6ccfd1d, and was made and reported by @throny (comment):scripts/smoke.ps1, 60 s, release builds, the same title for both,main2898511(the base of this head) first and then the head, on an NVIDIA GeForce RTX 4080 (driver 610.88, Intel i9-12900K, 64 GB, Windows 11 Pro 26300, DXC 1.9.2602.17). The blocks are exactly as the script printed them.main:
PR:
Other runs of this change, so that nothing is left out:
d466910(the same two commits on an oldermain),main22b6222against it: 1,527 against 1,567 frames, 14,073 against 14,048 MB.main(72b59b5), the same head6ccfd1d: 14,010 MB againstmain's 9,225 MB. He reports thatmainitself got lighter in between (the shared stand-ins,625a0f3and after), not this PR, and that a rebase onto currentmainshould bring the head down with it. I have not rebased again, so as not to change the head that has the pair; I will rebase if the maintainers ask for it.6ccfd1dagainst its basemain2898511(comment): 1,483 against 1,488 frames, no device removal, no crash, peak commit 13,687 against 11,934 MB (114.7 %), inside the 125 % of the check; and the 6 tests withlinkin their names pass (1 ignored, the bench). An earlier run of his on the previous headd466910against an oldermain(50a9fde) had shown a peak commit of 15,958 / 16,910 MB against 11,951 MB (133 % / 141 %); the run on the current head and its own base does not repeat it, and I do not know what made the difference.ddb9350, before several rebases) againstmainafc5ee8: 913 frames and 11,707 MB against 904 and 11,655 MB.6ccfd1d: @throny, RTX 4080: 1369 passed, 0 failed, 47 ignored (26 SKIPPED lines). Ond466910: @throny 1281 / 0 / 47; @oni-swr, RX 7800 XT: 1280 passed, 1 failed (fuzz_validate_and_gpu_1, which fails the same way onmain, #2115), 47 ignored.Not tested
main. @thiagocalile ran the smoke pair on an RX 6600 (see above). No AMD timings of the DXC change itself, and no world load on AMD.956a476); they were not repeated onb9fdc89or6ccfd1d.LinkGate), not through a failing link.Gate A passed at 2026-11-23 18:21 UTC on main
956a476; Gate B passed at 18:54 UTC on main956a476. PRs read: #113, #123, #138, #139, #162, #166, #172: none changes how accessors are compiled. The tests use synthetic programs only; no game material is in this PR.AI use
main2898511:b9fdc89and6ccfd1d), resolved the conflicts, wrote the second commit (the review fixes and their tests), moved the tests of this PR tolink_tests.rs, ran the suite, and updated this description.@TheHoracio on GitHub · 2026-11-23 19:32 UTC · original
AMD run, as asked under "Not tested": RDNA3 Radeon RX 7800 XT (16 GB, native 64-lane waves,
amdxc64), driver 32.0.32015.7029, Windows 11 Pro 10.0.26300, Rust 1.100.0x86_64-pc-windows-msvc, DXC 1.9.2602.17, debug build, PR head328cf29.cargo test --workspace --no-fail-fastSKIPPEDXCL_SPLIT_WAVE64=1 cargo test -p xcl --lib gpu::gpu_linked_memory_accessorsandlinked_programs_keep_their_declarationspass natively (64-lane) and split. No driver crash, no TDR or device removal.gpu_wave64_ps_whole_wave_reductions. It fails the same way onmain956a476on RDNA2/RDNA3 and is fixed by #155. It is unrelated to this PR.bench_memory_window_accessorsor a retail pack, so there are no AMD timings here.@Foniass on GitHub · 2026-11-23 19:33 UTC · original
Retail-pack measurement, as asked under "Not tested": about −15 % DXC time on a 1-in-100 sample, 0 errors.
Machine: Ryzen 7 7800X3D (16 threads), 32 GB RAM, ~17 GB commit free, RTX 5070 Ti (driver 32.0.16.2114, 32-lane waves), Windows 11 26300, DXC 1.9.2602.17, release build. Measured at
8bca7cb; the PR head328cf29has the same tree.Method:
retail_translation_surveyon a retail title's shader pack withXCL_SURVEY_EVERY=100,XCL_SURVEY_DXC=1,XCL_SURVEY_WINDOWS=4, two seeds. One binary, withXCL_LINK_MEM=0and without, runs interleaved, nothing else running. The numbers are the total DXC time the test prints (4 threads).XCL_LINK_MEM=0Not measured: the split wave64 form (the survey translates the native 64-lane form), the driver's pipeline time, DXC's peak memory, and the GPU tests on this card.
No game material: timings and counts only. Measured with an AI assistant (Claude Code).
@mastrr9 on GitHub · 2026-11-23 20:27 UTC · original
Independent Windows + RTX 5080 GPU verification of
328cf2963(merge-base956a476bf) on NVIDIA GeForce RTX 5080 (Blackwell desktop, driver617.42, D3D12 SM 6.6 + mesh shaders, 32-wide waves, Windows 11, Ryzen 7 9800X3D, Rust1.100.0, DXC1.9.2602.17, noXCL_SAMPLE_*, no game files):Build & Tests
cargo build --workspace && cargo test --workspace -- --test-threads=4: 573 passed, 0 failed, 39 ignored (git diff --checkclean; 2 expectedno wave64skips).gpu_linked_memory_accessorsandlinked_programs_keep_their_declarations.Code check
IDxcLinkersplit for multi-window compute shaders (>= 100memory accesses) with cachedaccessorslibrary, fallback tocompile_whole, andXCL_LINK_MEM=0escape hatch looks clean.ResourceDescriptorHeap); if #187 lands first with heap windows on by default, this still helps theXCL_HEAP_WINDOWS=0fallback path after a small rebase inemit.rs::mem_accessors. No bugs found.(AI-assisted)
@Kalmarv on GitHub · 2026-11-23 20:58 UTC · original
AI-assisted review (Claude Code). Windows 11 (10.0.26200), Ryzen 9 9950X, RTX 5070 Ti (NVIDIA 610.74, 32-lane waves), Rust 1.99.0 MSVC, debug build. Synthetic programs only, no game files.
Tested
328cf29(one commit directly onmain956a476, so the PR head is the merge result), withmainas the control.With the Windows SDK's DXC, the linked path never works. The README names the Windows SDK as the DXC source. The newest SDK, 10.0.26100, ships
dxcompiler.dll1.7.2308.16. That version rejects[WaveSize]on a library entry:error: attribute WaveSize only valid on entry point function, in either attribute order (checked with the SDK'sdxc.exe -T lib_6_6on a 5-line file). Every compute program the translator emits has[WaveSize], so with the SDK DXC:mainto 1.6 s with this PR.gpu_linked_memory_accessorsandlinked_programs_keep_their_declarationsfail (2/2, same error). With DXC 1.9.2602.17 they pass (2/2).DXC 1.8.2505 and 1.9.2602 (GitHub releases) accept it. Everyone who measured above used 1.9.2602.17, so nobody has run the SDK case yet.
Suggestions:
IDxcVersionInfo) and skip linking below 1.8.Measured with DXC 1.9.2602.17. I used xcl-pso's synthetic E/F bench from #156 (a copy in my tree; translated compute programs, one creator, fresh seeds so the driver hasn't seen them). DXC time is with 2 compiles at a time. The driver column is the first
CreateComputePipelineState(median of 2).mainmainThe DXC columns are from a CPU-only run with 4 programs. The driver run's own DXC times agree (C 2.9–3.0 → 1.6 s, D 4.7–4.9 → 2.0–2.1 s).
XCL_LINK_MEM=0on the PR binary gives the same DXIL sizes asmainin every shape, and DXC times within this run's noise (D 5.3–6.0 vs 5.0–5.4 s; the other shapes within 0.4 s).Related, and bigger than this PR on NVIDIA. The same
mainbinary was run with the SDK DXC and with DXC 1.9 (fresh seeds, same session):DXC 1.9 emits DXIL half the size or less, and the 5070 Ti's driver then compiles it 1.4–2.2× faster. DXC's own time goes up for a whole compile. Linking (this PR) takes that back for windowed programs. The driver times in #156's synthetic table were taken with the SDK DXC.
Not tested:
@ryosen0 on GitHub · 2026-11-23 21:06 UTC · original
A data point for the SDK-DXC boundary, measured on this machine (Ryzen 7 9800X3D, RTX 3060 Ti, Windows 11):
10.0.26100.0installed here shipsdxcompiler.dll1.8.2502.11, not 1.7.2308.16 (dxc.exe --version:dxcompiler.dll: 1.8 - 1.8.2502.11). So "SDK 26100" is not one fixed DXC version - the revision of the SDK matters.dxc.exe,lib_6_6accepts[WaveSize(64)]and[WaveSize(32)]on a[shader("compute")]entry placed before[shader](the order the translator emits, e.g.emit.rs[WaveSize(64)] [numthreads(64, 1, 1)]): both compile, exit 0, valid DXIL out. The 5-line repro from the review was not run against this revision.maincheckout yet, so this is only the attribute-acceptance half of the finding, not a linked-path run.Suggests the version check / README note would be more precise as "DXC >= 1.8" rather than "SDK DXC fails": a 26100 SDK with 1.8.2502 passes the attribute probe here.
@Kalmarv on GitHub · 2026-11-23 21:15 UTC · original
A follow-up to the review above, on how this fits with #187 and on the driver's part for access-dense programs.
With #187. The two merge with one conflict, in
emit.rs::mem_accessors(keep this PR'smem_methods()split and put #187's heap branch at the top ofmem_accessors(windows, heap);linked_formthen callsmem_accessors(w, None)).linked_formlooks for the switch accessors' text and finds none in a heap-window program, so that program is compiled whole once and nothing is done twice. With #187 on, this PR serves the programs still in the switch form:XCL_HEAP_WINDOWS=0, no shared heap, and the pipelines #187 rebuilds in the switch form when the driver refuses the heap form (603f546).Driver time when accesses are dense. The review's shapes had a memory access every 8 rounds. With a load and a store every round (split wave64, 1000 rounds, an exec-masked block every 4 rounds, 2 never-seen programs per row):
So the PR does what it says for DXC, and on such programs the driver's part, which it leaves as it is, is the larger one by far.
In your own bench with a heap form added (1600 accesses, 2 rounds): DXC 1.0 s (1 window) / 11.0 s (whole) / 1.6 s (linked) / 1.2 s (heap), and GPU time for 2048 groups 0.237 / 0.273 / 0.271 / 0.243 ms.
Tested
main956a476+ this PR at328cf29+ #187 at8c0346d, merged locally, plus local ignored benches (not pushed). Synthetic programs only, no game files.Not tested
AI use: Claude Code, Claude Fable 5.2.
@einfachama on GitHub · 2026-11-24 11:46 UTC · original
Test report for #174 with a retail title, since Not tested says no title has been run with it: head
328cf2963183235085efa4fab0bd0ced779a9293merged ontomain64b3f35(clean merge, local merge commit1aa4315). No regression at my retail title's first menu, and the retail-sample tests pass. (Sincemainf9e5ee9the PR conflicts withmaininemit.rs, so these results are for the merge onto64b3f35only.)Tested
NVIDIA GeForce RTX 4060 8 GB (Ada, 32-lane waves), driver 621.24; Ryzen 7 5800X; 32 GB RAM; Windows 11 Pro 26300; Rust 1.100.0 MSVC; DXC 1.9.2602.17 (SDK 10.0.26100); debug for the tests, release for the title runs.
cargo test --workspace -- --test-threads=4: 703 passed, 0 failed, 42 ignored (main64b3f35: 701 / 0 / 41). SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware. The PR'sgpu_linked_memory_accessorsandlinked_programs_keep_their_declarationspass.With
XCL_SAMPLE_RPF,XCL_SAMPLE_DLLSandXCL_SAMPLE_BVH4(my title's files, read in place),--no-fail-fast:gpu_pso_e2e7/7,console_dlls_e2e13/13,rpf_e2e2/2. The lib had 3 failures:placed_title_textures_share_vram_and_preserve_pixels("cubemap extra_pages must be reused at same va") and the two tests on its poisoned lock. That is #718;main64b3f35failed the same way in 1 of 2 runs with the same samples, so it is not this PR.My retail title at its first menu,
scripts/smoke.ps1 -Seconds 60, unattended (XCL_NETWORK=0), interleaved withmain64b3f35built the same way:main(frames, peak commit)No crash and no device removal in any run. The 512 MB rows are runs that started with ~15.3 GB of system commit free, where
uma.rskeeps the title's GPU heaps out of the coherent window. Both commits drop to about the same level there (the PR at 90–92 % ofmainin the interleaved pairs), so they're comparable with each other but not with the rows for the learned window.In these runs the title builds 1 translated compute pipeline at the menu. The PR's binary translated its programs itself (the translation cache is keyed by the XCL binary). Their DXIL came from the cache: 460 hits, 0 compilations in the runs whose report I kept.
xcl-smokeblocks (learned window),mainand this PR merged onto it:Not tested
XCL_FRAME_DUMPis avoided on NVIDIA because of #499). Presents and draws per 2 s were the same asmain's (60 / ~720 in the learned-window runs).956a476.AI use
@gefydev on GitHub · 2026-11-25 13:54 UTC · original
@TheHoracio, @Foniass, @mastrr9 and @einfachama thank you for the reports on
328cf29; noted, each as you gave it:main(#155).main64b3f35: 703 passed, 0 failed, 42 ignored, no regression at the first menu; the linked path was not exercised in the title (1 pipeline, its DXIL came from the cache).Since #187 landed, this PR conflicted with
maininemit.rsand at the end oftests.rs. I rebased it ontomainafc5ee8(one commit,ddb9350) and it merges without conflicts now. Your results are for the old head. Onddb9350the two new tests pass on a GTX 1650, and a smoke pair againstmainis in the description (913 frames and 11 707 MB for the PR against 904 and 11 655 MB formain). The whole suite on the new head has not been run yet, and the measurements in the description were not repeated after the rebase. A rerun on the new head from any of you would be welcome.AI use: Claude Code (Claude Sonnet 5.5) wrote this comment for @gefydev.
@gefydev on GitHub · 2026-11-25 13:54 UTC · original
@Kalmarv and @ryosen0 thank you for the review and the measurements.
On the DXC version: the finding is right. In
compile_hereonly the warning is behind aOnce, so after the first failure ofcompile_linkedevery latercs_*program with enough accesses tries again (the accessor library is kept, so each retry costs one compile of the program as a library). I agree with both of you that the check should be on the DXC version (1.8 or newer, as @ryosen0's 26100 SDK with 1.8.2502 shows), not on the SDK, and that a first failure should stop the attempts for the rest of the process. Neither change is in the PR yet, and neither is the README note that the gain needs DXC 1.8 or newer.On #187: the merge is done as @Kalmarv described it.
mainhasmem_accessors(windows, heap)with its out-of-rangedefault; this PR keeps it,mem_methods()also returns what each method does outside the windows, andlinked_formasks formem_accessors(w, None), so a program in the heap form has no switch accessors to find and is compiled whole once. The PR is rebased ontomainafc5ee8(ddb9350) and merges without conflicts. Heap windows are still opt-in (XCL_HEAP_WINDOWS=1), so the switch form is the default and this PR serves it.On the dense-access table: agreed, the driver's part, which this PR does not touch, is the larger one there.
AI use: Claude Code (Claude Sonnet 5.5) wrote this comment for @gefydev.
@gefydev on GitHub · 2026-11-25 13:54 UTC · original
@shdann thank you, that is right. In
compile_linkedtheKEPTlock is released between the lookup and the insert, so two threads that both miss compile the same accessor library. The result is correct and one of the two copies is dropped, but the extra DXC work falls in the cold start, which is where this PR is meant to save time. The fix you suggest, a per-key cell in the map with the compile outside the map's lock and a retry after a failure, is not in the PR yet, and the test you describe (two programs that share one library, counting the library compiles) does not exist yet.AI use: Claude Code (Claude Sonnet 5.5) wrote this comment for @gefydev.
@gefydev on GitHub · 2026-11-25 14:59 UTC · original
@shdann, @Kalmarv and @ryosen0 both points are now in the PR, as a second commit,
2007e7d(the PR still merges intomainafc5ee8without conflicts).IDxcVersionInfo: the gate covers the same case without reading versions, so a 26100 SDK with 1.8.2502 keeps linking, as @ryosen0 measured. The README now says the linker needs DXC 1.8 or newer.On this GTX 1650,
cargo test --workspace --no-fail-fast -- --test-threads=4on2007e7d: 1269 passed, 0 failed, 47 ignored, 27 SKIPPED. I could not make a smoke pair for this head (the machine ran out of memory twice); the description says so, and a run from anyone is welcome. The gate is tested on its own, not through a DXC that really fails to link.AI use: Claude Code (Claude Sonnet 5.5) wrote this comment for @gefydev.
@gefydev on GitHub · 2026-11-25 15:03 UTC · original
@einfachama and @Foniass you ran earlier heads of this PR with a title, so a request, only if you have a moment: a
scripts/smoke.ps1 -Seconds 60pair,mainagainst the head2007e7d, would fill the one thing this head lacks (the smoke block of the head commit; the description says why mine is missing). The request with the details is on #1607: #1607AI use: Claude Code (Claude Sonnet 5.5) wrote this comment for @gefydev.
@DavidM1911 on GitHub · 2026-11-25 15:19 UTC · original
Verification on RTX 3060 Ti (Windows 11): merge conflict with current
main— needs a rebase before it can be tested.@gefydev on GitHub · 2026-11-25 16:13 UTC · original
@DavidM1911 thank you for the note: #174 conflicted with
mainagain. I rebased it ontomain0829441(two commits,30773e1andcd19625) and it merges without conflicts now (the only conflict was at the end oftests.rs, both sides kept). On this GTX 1650,cargo test --workspace --no-fail-fast -- --test-threads=4atcd19625: 1278 passed, 0 failed, 47 ignored, 27 SKIPPED. The head has no smoke pair yet, and the description says why; a run on your RTX 3060 Ti would be welcome.AI use: Claude Code (Claude Sonnet 5.5) wrote this comment for @gefydev.
@gefydev on GitHub · 2026-11-25 16:30 UTC · original
@einfachama @Foniass the head of this PR moved to
d466910(rebased ontomain3f4495a). If you still have a moment, the smoke pair,mainagainstd466910, is the only thing it lacks; the details are in #1607. Thank you.AI use: Claude Code (Claude Sonnet 5.5) wrote this comment for @gefydev.
@oni-swr on GitHub · 2026-11-25 17:36 UTC · original
AMD run on
d466910a(the current head; it merges cleanly intomain68a284a, and I tested the head as it is, not the merge). This is a test run only: it is not the smoke pair requested on #1607, and that pair is still missing.Machine: AMD Radeon RX 7800 XT (RDNA3, native wave64), driver 32.0.31035.1003, Windows 11 Pro 10.0.26200, Rust 1.100.0
x86_64-pc-windows-msvc, DXC 1.8.2502.11 (Windows SDK 10.0.26100.0, the one xcl picked up), debug build, clean checkout, noXCL_SAMPLE_*.Tested
threads_asking_for_one_key_make_its_value_once,another_key_does_not_wait_for_a_value_being_made,a_failure_is_not_kept,the_link_gate_closes_at_the_first_failure,gpu_linked_memory_accessors,linked_programs_keep_their_declarations: 6 passed, 0 failed, none skipped on this adapter.cargo test --workspace --no-fail-fast -- --test-threads=4: 1280 passed, 1 failed, 47 ignored, 7SKIPPEDlines (f16 and f32 conversion per-lane forms refused, and one test with no heap windows).gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1(seed 722:res[30] = 0x1, CPU0x7fffffff); it fails identically onmain68a284a, so it is not this PR's.Not tested
scripts/smoke.ps1pair (mainagainstd466910) was run. A retail title is still needed for that pair and I did not run one.PR checksstill needs that block for this head, and the DXC time the PR is meant to save was not measured here.AI use: Claude Code (Claude Sonnet 5.5) ran the commands and wrote this report for oni-swr.
@gefydev on GitHub · 2026-11-25 17:49 UTC · original
@oni-swr thank you for the AMD run of #174 at
d466910(RX 7800 XT, RDNA3, native wave64, driver 32.0.31035.1003, Windows 11 Pro 10.0.26200, Rust 1.100.0, DXC 1.8.2502.11 from the Windows SDK, debug, clean checkout). Noted as you gave it:kept_onceand the link gate) andgpu_linked_memory_accessorsandlinked_programs_keep_their_declarations: 6 passed, 0 failed, none skipped on this adapter.cargo test --workspace --no-fail-fast -- --test-threads=4: 1280 passed, 1 failed, 47 ignored, 7 SKIPPED lines. The one failure,gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1(seed 722), fails the same way onmain68a284a, so it is not this PR's; it matches #2115.Agreed that this is a test run and not the smoke pair: the pair,
mainagainstd466910, is still missing. @throny said on #1607 that they are making it on an RTX 4080, and I am not pushing anything to the branch until it is in.AI use: Claude Code (Claude Sonnet 5.5) wrote this comment for @gefydev.
@thiagocalile on GitHub · 2026-11-25 17:49 UTC · original
Independent 60 s smoke pair (plus a second warm run for comparison) for head
d466910a014989b941a040c054459f0b9f53ad7eon an AMD Radeon RX 6600 (8 GB VRAM, RDNA2, native wave64).Tested
32.0.21045.29003,XCL_ADAPTER=radeon), AMD Ryzen 7 5700X3D, 47.9 GB RAM, Windows 11 (10.0.26200.0), Rust1.100.0(stable-x86_64-pc-windows-msvc), DXC1.8.2502.11.cargo build --release -p xcl),scripts/smoke.ps1 -Seconds 60onmain(50a9fde) and twice on#174(d466910, first run + immediate warm repeat).Comparison (
main50a9fdevs#174d466910)#174(1,512cold /1,568warm vs1,501onmain, steady60 60 60,0crashes,0device removals).#174in both runs (15,958 MBcold /16,910 MBwarm vs11,951 MBonmain, i.e.,133.5%/141.5%ofmain, which exceedspr_check.py's 125% peak-commit threshold on this RX 6600 + DXC1.8.2502.11setup).Regression run
main(50a9fde):PR
#174(d466910, run 1 — cold):PR
#174(d466910, run 2 — warm):Not tested:
cargo testsuite on this head (already run by @gefydev on GTX 1650), NVIDIA/Intel GPUs, Linux/Wine, or world load past the 60 s smoke window.AI use: Antigravity (Gemini 4 Neon) ran the builds and smoke runs and drafted this report; the account owner reviewed and approved posting.
@gefydev on GitHub · 2026-11-25 18:23 UTC · original
@thiagocalile thank you for the smoke pair on
d466910(RX 6600, driver 32.0.21045.29003, Ryzen 7 5700X3D, 47.9 GB RAM, Windows 11 26200, Rust 1.100.0, DXC 1.8.2502.11, release,XCL_ADAPTER=radeon;mainat50a9fdeonce and #174 twice, cold and warm). Noted as you gave it:main, steady60 60 60, no crash and no device removal.main, that is 133.5 % and 141.5 %, above the 125 % limit ofpr_check.py.That last number is a real finding I did not have. On my GTX 1650 the pair of the first commit showed no such difference (913 frames and 11,707 MB against 904 and 11,655 MB), so it may depend on the card or on DXC 1.8 linking where DXC 1.7 would not. I have not found the cause yet.
The branch also conflicts with
mainagain, at the end oftests.rs, so its head may change. I will say here if it does, and I will not paste the blocks into the description before that is settled.AI use: Claude Code (Claude Sonnet 5.5) wrote this comment for @gefydev.
@throny on GitHub · 2026-11-25 18:35 UTC · original
Test report for exact head
d466910.Tested
cargo build --workspace && cargo test --workspace -- --test-threads=4ond466910as it is (its own base): 1281 passed, 0 failed, 47 ignored.SKIPPED: 26 lines (no wave64 on this adapter, and the like).scripts/smoke.ps1, the retail title, 60 s, release builds,main22b6222first, then this head. Both runs started without the preload list newer builds leave behind (used-pipelines.txtin the DXIL cache), which makes builds on an older base run out of memory at start:main:
PR:
Not tested: AMD, the head merged onto current
main, a world load.AI use: Claude Code (Claude Opus 5.5) ran this and wrote the report; the diff was read for safety before it was built.
@gefydev on GitHub · 2026-11-25 18:46 UTC · original
@throny thank you, that is the pair the check needed. I pasted your two blocks into the description exactly as printed, and
PR descriptionis green now. Noted your numbers for the exact headd466910(RTX 4080, driver 610.88, i9-12900K, 64 GB, Windows 11 Pro 26300, DXC 1.9.2602.17):main22b62221,527 frames and a peak commit of 14,073 MB against 1,567 frames and 14,048 MB for the PR, steady60 60 60, no crash and no device removal (so no extra commit on this card); and the whole suite on the head, 1,281 passed, 0 failed, 47 ignored, 26 SKIPPED. I also kept @thiagocalile's RX 6600 pair in the description, which shows a peak commit of 133.5 % and 141.5 % ofmain, so that nothing is left out.The branch conflicts with
mainagain, now indxc.rs(a recent change adds a cache of DXC errors next tocompile_here) and intests.rs, so the head will change when it is rebased and this pair will then belong to the previous head.AI use: Claude Code (Claude Sonnet 5.5) wrote this comment for @gefydev.
@gefydev on GitHub · 2026-11-25 19:21 UTC · original
@throny thank you again for the pair on
d466910. If you have a moment, one more, please: I rebased the branch to solve the conflicts withmain(2898511), so the head changed andPR checkswants a pair for the new one. It is mergeable now.The head is
6ccfd1d(fork gefydev/xcl, branchmem-accessor-cost), two commits. The code is the same as ind466910, with two differences:main's newE_OUTOFMEMORYcase now sits insideoutput()indxc.rs, and the three tests of this PR moved to their own file,link_tests.rs, so that tests added at the end oftests.rsstop conflicting with them.What is needed, as before:
scripts/smoke.ps1 -Game <title folder> -Seconds 60, release builds, the same title and time formain(2898511or newer) and for6ccfd1d, both blocks posted as printed as a comment on #174; I will paste them into the description. On my GTX 1650 the whole suite at6ccfd1dgives 1,366 passed, 3 failed, 47 ignored; the 3 failures are the title-texture tests of #718 and its poisoned lock, which fail the same way on a cleanmainand pass alone.I will not push anything more to the branch until your pair is in.
AI use: Claude Code (Claude Sonnet 5.5) wrote this comment for @gefydev.
@throny on GitHub · 2026-11-25 20:55 UTC · original
Test report for exact head
6ccfd1d.Tested
cargo build --workspace && cargo test --workspace -- --test-threads=4on6ccfd1das it is (its own base): 1369 passed, 0 failed, 47 ignored.SKIPPED: 26 lines (no wave64 on this adapter, and the like).scripts/smoke.ps1, the retail title, 60 s, release builds,main2898511first, then this head. Both runs started without the preload list newer builds leave behind (used-pipelines.txtin the DXIL cache), which makes builds on an older base run out of memory at start:main:
PR:
Not tested: AMD, the head merged onto current
main, a world load.AI use: Claude Code (Claude Opus 5.5) ran this and wrote the report; the diff was read for safety before it was built.
Note on the choice of
main: the pair above is against this head's own base,2898511. Against a newermain(72b59b5) the same head showed 14,010 MB againstmain's 9,225 MB, becausemainitself got lighter in between (the shared stand-ins,625a0f3and after), not because of this PR. A rebase onto currentmainshould bring this head down with it.@gefydev on GitHub · 2026-11-25 21:19 UTC · original
@throny thank you, that is the pair for the exact head. I pasted your two blocks into the description as printed, and added your numbers: 1,647 against 1,625 frames (101 %) and a peak commit of 14,014 against 14,099 MB, no device removal and no crash on either; and the suite on
6ccfd1d, 1369 passed, 0 failed, 47 ignored.Noted too that against a newer
main(72b59b5) the head shows 14,010 MB against 9,225 MB becausemainitself got lighter in between (625a0f3and after). I put that in the description as you reported it and did not rebase again, so that the head that has your pair stays the same. If a maintainer asks for it, I will rebase and ask for one more pair.AI use: Claude Code (Claude Sonnet 5.5) wrote this comment for @gefydev.
@thiagocalile on GitHub · 2026-11-25 21:37 UTC · original
@bmjask @gefydev Fresh AMD RX 6600 run on the rebased head
6ccfd1d(compared against its base main2898511: peak commit is 13,687 MB vs 11,934 MB = 114.7%, within the 125% threshold).Independent test and smoke report for head
6ccfd1d2679a3d15f74efa341e647d7824376ef8on an AMD Radeon RX 6600 (8 GB VRAM, RDNA2, native wave64).Tested
32.0.21045.29003,XCL_ADAPTER=radeon), AMD Ryzen 7 5700X3D, 47.9 GB RAM, Windows 11 (10.0.26200.0), Rust1.100.0(stable-x86_64-pc-windows-msvc), DXC1.8.2502.11.XCL_ADAPTER=radeon cargo test --no-fail-fast -p xcl --lib -- link --test-threads=4: 6 passed, 0 failed, 1 ignored (0skipped).Regression run (
scripts/smoke.ps1, release builds,XCL_ADAPTER=radeon)main(2898511):PR
#174(6ccfd1d):Not tested: full workspace suite on this head (tested by @throny on RTX 4080), NVIDIA/Intel GPUs, Linux/Wine, or world load past the 60 s smoke window.
AI use: Antigravity (Gemini 4 Hydrogen) ran the builds, tests, and smoke runs and drafted this report; the account owner reviewed and approved posting.
@gefydev on GitHub · 2026-11-25 21:48 UTC · original
@thiagocalile thank you, that is the run that was missing on AMD. For the exact head
6ccfd1don the RX 6600: 1,483 frames against 1,488 for its basemain2898511, no device removal and no crash, and a peak commit of 13,687 against 11,934 MB (114.7 %), inside the 125 % of the check; the 6 tests withlinkin their names pass. I added it to the description, and changed what I had written about your earlier run (133 % and 141 % on the previous head against an oldermain): the run on the current head does not repeat it, and I do not know what made the difference.AI use: Claude Code (Claude Sonnet 5.5) wrote this comment for @gefydev.
@Gevroska on GitHub · 2026-11-26 00:52 UTC · original
I tested accessor linking on Windows with an RTX 3080, stock
08db8020, and DXC/DXIL1.9.2609.5. In the four-window synthetic shader with 1,600 accesses, linking reduced median DXC time by about 75%. Pipeline creation plus warm-up and GPU execution time were nearly identical in this run.All seven focused checks passed with zero skips, including a two-window GPU readback that compared loads, stores, and atomics between the two forms. The benchmark explicitly compiles both forms in one process, and the linked form can reuse accessor library bytes. These measurements establish a compile-time saving for this workload. Whether GTA VI selected the linked path remains unverified.
I used Codex GPT-6.2 Sol to run the tests and a separate GPT-6.2 Sol agent to verify the build, GPU readback results, and timing calculations.
I reviewed and approved this comment before posting.
@DavidM1911 on GitHub · 2026-11-26 02:45 UTC · original
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.Thanks!
— Devin
@shdann on GitHub · 2026-11-24 00:57 UTC · original · reviewed
In
dxc.rs:249–254, two different compute shaders can request the same accessor library at startup. Each thread can see an empty cache before either stores its result. Both then compile the same library. The result is correct, but the extra DXC work happens during the cold start this change aims to shorten. Consider storing a per-key initialization cell under the map lock, then compiling outside the map lock. Preserve retry after a compile failure. A test with two distinct programs sharing one library can count library compilations and check that both programs link. Static review of328cf29with OpenAI Codex (GPT-6); I did not measure the timing impact.@bmjask on GitHub · 2026-11-25 21:11 UTC · original · reviewed
No source-level defect found, but this draft is not merge-ready. Current-head main/PR smoke pair is missing, and RX 6600 results show 133.5%/141.5% of main peak commit—above the project 125% threshold—without root cause. Resolve/gate that regression before merge. Also add title-output validation for linked programs and, if practical, end-to-end DXC 1.7 failed-link fallback coverage. Windows no-GPU build/test alone is insufficient.