Repository navigation
Recompiler: programs whose compact table needs more than 12,288 words take the plain form again - #3516
Recompiler: programs whose compact table needs more than 12,288 words take the plain form again#3516KDenKC wants to merge 1 commit into
Conversation
|
merge-check claim |
|
merge-check |
|
Test report: a game run of this PR's head on current
Result (1 run): ran to the 1,800 s limit ( Record For comparison, on Not tested: Claude Code, Claude Fable 5.2 ran the build and the game run, read the log and wrote this report. |
|
@KDenKC I matched compute record
The cold run reported I used Codex GPT-6.2 Sol to analyze the logs. A separate GPT-6.2 Sol agent independently matched the record and checked the return timings against all three runs. Codex GPT-6.2 Astra drafted this comment. I reviewed and approved this comment before posting. |
|
@MacieGx @SergeAx a request, only if you have the time: you have both reached the world on an RTX 5080, which would make a useful third RTX 50-series card here. Could one of you check whether #3261's compact form removes the device on a 5080, and whether this PR stops it?
Fair warning: this is a long A/B, and arm B's first start compiles that program cold (Gevroska measured 124 s on a 3080 above). Two runs per arm would settle it; one each already helps. AI use: an agent swarm: Claude Opus 5.5, Claude Sonnet 5.5, GPT-6.2-Sol, Gemini 4 Neon and Gemini 3.8 Flash. |
|
Test report: runs with this PR on an RTX 5070 Ti (arm B of the request in #505; I did not run arm A again tonight).
Hardware: NVIDIA GeForce RTX 5070 Ti 16 GB, driver 621.24 (32.0.16.2124), i7-12700K, 32 GB RAM, Windows 11 Pro 26200. AI use: Claude Code, Claude Fable 5.2 made the runs and wrote this report. |
|
@BBareth thank you, and that's more than enough from you on this one 😄 Your 30-minute run earlier plus these seven (six clean, and run 7 a different removal: a page fault at VA 0x0 with AI use: an agent swarm: Claude Opus 5.5, Claude Sonnet 5.5, GPT-6.2-Sol, Gemini 4 Neon and Gemini 3.8 Flash. |
|
Cross-linking an AMD result relevant to this PR's adapter-wide default: the RX 7900 XT report in #505 tested That report's faster comparison tree differs in more than this PR and had a different cache history. It does not establish that #3516 regresses AMD against a matched current- Before treating the 12,288-word default as an adapter-wide resolution, I suggest a matched AMD AI use: OpenAI Codex (GPT-6.2 Sol) checked the linked report, this PR's current head, and the source-level selection change. I did not run an AMD test. |
0dfcbd5 to
8d7d509
Compare
|
@thehollowedone thank you, agreed: crosettiremi's RX 7900 XT result shows the plain form of that program is the costly one on AMD, and an adapter-wide 12,288 default was not justified by evidence that is all NVIDIA's. Narrowed in 8d7d509 (squashed): the limit is 12,288 only when the main adapter's vendor is NVIDIA ( The tests now check both: the plain-form test builds a program over 12,288 table words and checks that it gets no compact plan at NVIDIA's limit and keeps it at AMD's, and the switch test covers the limit by vendor. A matched AMD AI use: an agent swarm: Claude Opus 5.5, Claude Sonnet 5.5, GPT-6.2-Sol, Gemini 4 Neon and Gemini 3.8 Flash. |
Folded, the two copies of each repeated memory access are compact blocks of their own, so a folded program's tables can pass the limit its split form's stay under, and it then took the plain form. On a tree with xcl-dev#3516's limit of 12,288 words, a retail wave64 compute program of 78,920 reachable instructions took the compact form split (11,311 table words) and, folded (14,805 words), the plain form: 4,346,408 B of DXIL in one function, which NVIDIA's compiler had not finished after ten minutes at 4.9 GB. The folded translation now refuses a program whose compact form is refused only for the size of its tables (compact::wanted_plan: the automatic choice before its table check), and the split form takes the compact form as it did before folding. Under main's 32,768 words no program of that pack changes: two folded programs want the compact form, with 14,776 and 14,805 table words. Under xcl-dev#3516's 12,288 both do. The test folds a program of 57,344 copies of a load whose split form's tables fit and whose folded tables do not: the folded translation is refused. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
merge-check AI-written and posted by Foniass without a human check of each point. |
|
Ran the Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only, 16 GB, mesh shaders) driver 32.0.16.2140 (621.40), Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09), MSVC 14.44.35207, DXC 1.9.2609.5, debug build, All 23 Not tested: the full workspace suite, a retail title in the world, the AI-assisted (OpenCode), model: MiMo-V2.6-Flash Free - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used. |
…2,288 words take the plain form xcl-dev#3261 raised the most table words a program may need to take the compact form from 12,288 to 32,768. On the retail title one program then takes it whose tables need 16,121 words (19,840 blocks of 1,471 kinds, record 95cc13288a27a96e); on RTX 50-series cards its Dispatch never finishes and the device is removed at the first world frame (DRED: the Dispatch after that program). With the limit at 12,288 the program takes the plain form and runs (BBareth, xcl-dev#505). The limit goes back to 12,288 on NVIDIA adapters only. On AMD the plain form of that program is the costly one (an RX 7900 XT report on xcl-dev#505: a driver compile of minutes refused with E_OUTOFMEMORY), so other adapters keep 32,768. The vendor is that of the main adapter, noted where the title's device and the launch preparation's are made, so both pick the same limit and the same cache identity. XCL_COMPACT_TABLE_WORDS sets the limit on any adapter (1 to 32,768); a limit other than 32,768 goes into the translated cache identity with the nesting tag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Checked: xcl-dev#3516, including Foniass merge-check 7305483219 (cache identity is requested before device creation).
8d7d509 to
868dd97
Compare
|
@Foniass thanks for catching the preparation ordering: fixed in Validation on the RTX 3090: The failures are the same set this VM shows on the base without the PR (your run of main had none, so they are this machine's): D16 resinfo, placed-title-texture plus its three poisoned follow-on tests, and the end-to-end title test ( A new regression pair for this head is running on the RTX 5090 and goes into the description when it lands. AI use: an agent swarm: Claude Opus 5.5, Claude Sonnet 5.5, GPT-6.2-Sol, Gemini 4 Neon and Gemini 4 Hydrogen. |
|
Re-review (head 868dd97, the 3-line change from 8d7d509 read; not a merge-check, since
Nothing else changed: the rest of the diff is identical to the head I merge-checked (suite 2898 passed / 0 failed, smoke 1663 -> 1682 frames). With the smoke pair rerun on this head it looks ready to me. AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point. |
|
This is a new response on the same thread as my report at Ran the Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only, 16 GB, mesh shaders) driver 32.0.16.2140 (621.40), Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09), MSVC 14.44.35207, DXC 1.9.2609.5, debug build, The same 23 Not tested: the full workspace suite, a retail title in the world, the AI-assisted (OpenCode), model: MiMo-V2.6-Flash Free - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used. |
|
No other open PR changes the compact table limit this way (#3562 and #3479 touch the same AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human. |
|
@Foniass checked the other paths you named: AI use: an agent swarm: Claude Opus 5.5, Claude Sonnet 5.5, GPT-6.2-Sol, Gemini 4 Neon and Gemini 4 Hydrogen. |
|
merge-check
|
|
merge-check claim |
|
merge-check |
Folded, the two copies of each repeated memory access are compact blocks of their own, so a folded program's tables can pass the limit its split form's stay under, and it then took the plain form. On a tree with xcl-dev#3516's limit of 12,288 words, a retail wave64 compute program of 78,920 reachable instructions took the compact form split (11,311 table words) and, folded (14,805 words), the plain form: 4,346,408 B of DXIL in one function, which NVIDIA's compiler had not finished after ten minutes at 4.9 GB. The folded translation now refuses a program whose compact form is refused only for the size of its tables (compact::wanted_plan: the automatic choice before its table check), and the split form takes the compact form as it did before folding. Under main's 32,768 words no program of that pack changes: two folded programs want the compact form, with 14,776 and 14,805 table words. Under xcl-dev#3516's 12,288 both do. The test folds a program of 57,344 copies of a load whose split form's tables fit and whose folded tables do not: the folded translation is refused. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Heads-up on overlaps, found by trial merges on
AI use: an agent swarm: Claude Opus 5.5, Claude Sonnet 5.5, GPT-6.2-Sol, Gemini 4 Neon and Gemini 4 Hydrogen. |
#3261 raised the most table words a program may need to take the direct DXIL compact form from 12,288 to 32,768. On the retail title that lets one more program take it: record
95cc13288a27a96e, whose tables need 16,121 words (19,840 blocks of 1,471 kinds, 237,860 B of DXIL). Its Dispatch never finishes, and the device is removed at the first world frame (DRED's first operation not done: the Dispatch aftercs 95cc13288a27a96e). BBareth found it on #505; with the limit at 12,288 the program takes the plain form and the title stays in the world.This puts the limit back to 12,288 on NVIDIA adapters and keeps 32,768 on others.
XCL_COMPACT_TABLE_WORDS(1 to 32,768) sets it on any adapter; a value other than the default goes into the translated cache identity, with the nesting tag. Why the compact form of that program never finishes is not answered here (#3261's liveness or far-jump changes are the suspects in #505); this only stops the form from being chosen for tables that large.Fixes the removal at the first world frame reported on #3261. Related: #505, #3261. Overlaps #3562 (compact.rs table limit, kernel.rs cache tag) and #3479 (its sized_plan uses the table-limit constant this PR replaces with
max_table_words(): the two merge cleanly but the merged tree does not build until that line uses the function).What is in it (one commit)
gpu/dxil/compact.rs:default_table_words: 12,288 on NVIDIA (NVIDIA_TABLE_WORDS),TABLE_WORDS_CEILING(32,768) on other adapters and before the adapter is known;XCL_COMPACT_TABLE_WORDS(max_table_words,table_words) on any adapter;table_words_tag(a limit other than 32,768) for the cache identity;automatic_plan_withintakes the limit (tests).gpu/adapter.rs:note_main_vendor/main_vendor, noted where the title's device (hle/d3d12x/real.rs) and the launch preparation's (shaders.rs) are made, so both use the same limit and cache identity.gpu/dxil/kernel.rs:compact_nest_tagalso carries that tag, so all three identity sites (recomp/pso.rs) see it.gpu/dxil/compact_tests.rs:a_program_whose_tables_pass_the_limit_takes_the_plain_form(runs of repeated blocks added until the plan needs more than 12,288 table words, and at most 32,768: no plan at NVIDIA's limit, a plan at AMD's; CPU only),compact_table_limit_switch_parses(the limit by vendor, and the switch on any vendor).README.md: the limit by vendor and the switch, where the compact form is described.Cache. This changes translator source, so the direct DXIL source identity changes: every program is translated again (CPU and DXC) on the first run after updating, as with any translator change. Driver blobs are keyed by their DXIL, so only the programs whose DXIL changes need a new driver compile: on the retail title, by #3261's own count, 5 of 16,307 programs take the new form, so at most those.
Scope: NVIDIA only. The hang is seen on RTX 50-series (our RTX 5090, BBareth's RTX 5070 Ti); on an RTX 4080 the compact form of this program is built and the title stays in the world (throny, #505). On AMD the plain form is the costly one: on an RX 7900 XT with this PR, the driver compile of this program's plain form ran 150–311 s and returned
0x8007000ein 4 runs, and was still in the driver when 7 other runs ended, at the 48 GiB commit limit in most runs (crosettiremi, #505; thehollowedone pointed out what that means for an adapter-wide default, here). That report is not a matchedmain/ head comparison and does not show the compact form is right on AMD, but it is reason enough not to change AMD's default here. The rule is by vendor (0x10DE), not by RTX 50 device ids: all the evidence for the hang is NVIDIA's, and a device-id list would have to be kept up to date for every new card; the RTX 4080 result means NVIDIA cards older than the 50-series pay the plain form's compile cost for nothing (measured on an RTX 3080 below: 124 s once, then a driver blob).Tested
d52ff48c+ the new plain-form test only (50c72beb):cargo test -p xcl --lib -- a_program_whose_tables_pass_the_limit_takes_the_plain_form:868dd971(=8d7d5091+ the GPU vendor noted during launch preparation, so the translation cache's identity carries the table limit from the start),cargo test --workspace --no-fail-fast -- --test-threads=4(leaving out the 3uma_drivertests this VM cannot run): 2870 passed, 6 failed, 51 ignored; 28SKIPPED. The failures are this VM's onmaind52ff48c(gpu_direct_image_get_resinfo_d16, the threetitle_textures::stream_recheck_*,test_title_runs_and_game_folder_is_untouched) andplaced_title_textures_share_vram_and_preserve_pixels, which passes when run alone (onmaind0832e61and other heads): a failure of the parallel run on this VM.8d7d5091(the same tree as81d3f670, tested before the squash),cargo test -p xcl --lib -- compact:test result: ok. 23 passed; 0 failed; 0 ignored; 0 measured; 2744 filtered out(the plain-form test now checks NVIDIA's limit and AMD's). The whole suite on this head,cargo test --workspace --no-fail-fast -- --test-threads=4(leaving out the 3uma_drivertests this VM cannot run): in both runs the lib test binary was killed by an access violation in the parallel run (seen onmainruns on this VM too); the other binaries 142 passed, 1 failed, 20 ignored, and the lib binary's one-thread rerun (all ofuma_driver::testsleft out) 2723 passed, 5 failed, 31 ignored. The failures aremaind52ff48c's on this machine:gpu_direct_image_get_resinfo_d16, the 3title_textures::stream_recheck_*andtest_title_runs_and_game_folder_is_untouched.0dfcbd5e,cargo test -p xcl --lib -- compact:8d7d5091,cargo test --workspace --no-fail-fast -- --test-threads=4(leaving out the 3uma_drivertests that need a GPU upload segment this VM does not have): the other binaries 142 passed, 1 failed, 20 ignored; the lib binary gave no result in the parallel run, so its tests come from a one-thread rerun that leaves out all ofuma_driver::tests: 2727 passed, 1 failed, 31 ignored. SKIPPED: 11 (7 no wave64, 1 no heap windows, 3 no debug layer). The 2 failures,gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16andtest_title_runs_and_game_folder_is_untouched, fail onmaind52ff48con the same machine too (its run lost the lib binary the same way; its one-thread rerun: 2721 passed, 5 failed, 31 ignored, the other 3 beingtitle_textures::stream_recheck_*, which pass here).maind52ff48cwith our local runner patches (an input filter, D3D12.X: XCL_PAIR_PAGES=1 caps a texture in a live one's memory to its pages #3281, a port of D3D12.X: a sampled texture in the memory of a written one of another format is copied from it (XCL_ALIAS_COPY=1) #3094 with the fix posted there), the same switches in each pair:16f2f5c1(two runs):16f2f5c1reverted (two runs):WORLD (+268 s in it, entry at 107 s); world fps 5.4; crashes 0, device removals 0andWORLD (+246 s in it, entry at 98 s); world fps 5.9; crashes 0, device removals 0.8d7d5091reached the world (entry at 247 s, 600 s, no device removal; its smoke pair wasmain9dfbe3e 2,797 / 0 / 46,900 MB against 3,177 / 0 / 48,123 MB); this head868dd971stayed in the menus under the same recipe (see Regression run); and the run by BBareth below.main9dfbe3e merged with this head (clean), release, RTX 5070 Ti 16 GB, driver 621.24, 1,800 s withXCL_DRED=1 XCL_PLACE_RETIRE=0 XCL_TEXTURE_LEVEL_PAGES=1 XCL_PRESS_A_AT=450 XCL_ACTIVITY=1 XCL_CS_PSO_WAIT_MS=250, noXCL_SKIP_CS, noXCL_COMPACT_TABLE_WORDS: ran to its 1,800 s limit with no device removal, about 1,260 s of it in the world; record95cc13288a27a96e's compute PSO is made from 1,383,220 B of DXIL again (the plain form; 237,860 B in the compact form that hung). Their merge check onmain9dfbe3e:cargo test --workspace --no-fail-fast -- --test-threads=4: 2887 passed, 1 failed (gpu_direct_image_get_resinfo_d16, failing on the base alone too), 51 ignored.95cc13288a27a96e's compute pipeline took 124.0 s cold in the plain form (this head, no driver blob), against 14.2 s for the compact form ond52ff48c, and 0.2 s warm once XCL supplies the driver blob. Their two device errors came 39 min 29 s and 190.6 s after that creation returned; their logs do not tie them to this program.Regression run
RTX 5090 32 GB, driver 621.40, the retail title, 600 s each,
scripts/smoke.ps1with preparation off (XCL_PREPARE=0), themainarm from a copy of a translated cache made bymain. Both runs used this machine's usual settings (XCL_UMA_WINDOWS=16,XCL_UMA_DRIVER=mixed:1536:1792,XCL_COHERENT_MB=4095,XCL_HUGE_PSO_CONCURRENCY=3),XCL_DRED=1, held Enter from the first frame, andXCL_SKIP_CS=95cc13288a27a96e. The head arm started from a translated cache made by a prepared run of this head (its cache identity carries this PR's table limit, somain's cache does not serve it); it built the program this PR changes in its plain form (1,383,220 B of DXIL) and left its dispatches out.The head arm stayed on the title's menus for its 600 s under this recipe on this machine (shader preparation off, held-Enter input; other heads did the same tonight), so this pair checks start-up and the menus only: no device removal and no crash in either run; the head's 14,802 frames are menu presents and say nothing about speed or the world. The world is covered by BBareth's runs (RTX 5070 Ti, 7 runs), claudetools-gh's A/B (RTX 5070 Ti) and our pair on the previous head (
8d7d5091, same base, world entry at 247 s), listed under Tested.main9dfbe3e:this head
868dd971:Not tested
main's 32,768; the AMD plain-form cost above is from the PR's earlier, adapter-wide head).mainrun did not hang within its 600 s (the smoke recipe does not reach the hang), so the pair shows no regression, not the fix; the removals it fixes are under Tested.95cc13288a27a96ehangs.AI use
🤖 Generated with Claude Code
https://claude.ai/code/session_013oPUFCA9W9F8Qb5MPK33bR