Repository navigation
Conversation
|
More local tests, beyond the description. Heads: this PR's Machine: RTX 3070 8 GB (driver 32.0.16.2140), i9-9900K, 32 GB, Windows 11 Pro N 26200, Rust 1.99.0 MSVC. 1. Each switch on a warm translated cache (retail title, release,
The same programs under each switch's identity and the default one, the 32-byte header (which holds the identity) excluded:
2. The reverse direction, deterministic (fresh
So on 3. Test suite
4. Long runs, default settings (600 s asked, one pair, previous head)
AI use: Claude Code (Claude Opus 5.5) ran these tests and wrote this report. |
|
Review (head cdb365b, diff read, not a merge-check): No problems found in the diff. Checked the new tags against how AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point. |
…APSE Both switches change the DXIL the direct translator emits (XCL_RDNA_FLOAT=0: v_fract_f32 and the legacy multiplies keep their general form; XCL_WATERFALL_COLLAPSE=0: sampler waterfall loops are not collapsed), but neither was in the translated cache's identity nor in the warm-pipeline settings key. A run with either set to 0 after a default run loaded the translations made with it on, so the switch did nothing; the other way round, a cache filled with =0 served its programs to a default run. A switch that is off now tags the direct identity (identity_from_source under XCL_DIRECT_DXIL, and direct_output_identity for the enormous programs rerouted to the direct translator), the way XCL_X_LDS_ORDER=0 does. With both on, the default, no tag is added. Both names join semantic_pipeline_setting. Fixes xcl-dev#3520 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cdb365b to
ac528d0
Compare
|
Follow-up review (head ac528d0, since cdb365b, diff read, not a merge-check):
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. |
|
merge-check
|
XCL_RDNA_FLOATandXCL_WATERFALL_COLLAPSEboth change the DXIL the direct translator emits, but neither was in the translated cache's identity nor in the warm-pipeline settings key. After a default run, a run with either set to0(the obvious thing to try when a float result or a sampled texture looks wrong) loaded the translations made with the switch on, so the switch did nothing. The other way round, a cache filled with=0served its programs to a default run. Same class as #1409 / #2327 (XCL_SAFE_BARRIER).Fixes #3520 (reported by @Grimkaaah, whose proposed fix this follows).
XCL_WATERFALL_COLLAPSE(added in 4250e76) has the same gap and is not in the issue.Rebased onto
main38ad22da. The only conflict was thesemantic_pipeline_settingline, where #3655 addedXCL_WAVE64_IDIOMSbeside these names; that switch is already in the translated identity throughcompact_nest_tag.What is in it
gpu/recomp/pso.rs:translated::direct_switches_taggedtags an identity for each switch that is off (xcl-rdna-float-0,xcl-waterfall-collapse-0), the wayXCL_X_LDS_ORDER=0does. With both on (the default) it adds no tag. It is applied inidentity_from_sourcewhen the backend is direct, and indirect_output_identity, which keys the enormous programs rerouted to the direct translator on the HLSL path.direct_output_identitytakes the two switches as parameters, likenest_tagandsplit_limit, so a test can reach it.gpu/dxil/waterfall.rs:collapse_enabled(), the switchcollapsealready read.gpu/dxil/mod.rs:preludeandwaterfallarepub(crate), sopso.rscan read both switches.shaders.rs: both names joinsemantic_pipeline_setting.warm_settings_key().direct_output_switches_split_the_disk_cacheruns each case as a process of its own on one disk cache (the identities use OnceLock), asrerouted_disk_entries_follow_compact_nesting_policydoes:identity_from_source(XCL_DIRECT_DXIL=all,left: 1, right: 2) and without the switches indirect_output()(=0, same).direct_output_switches_that_are_off_get_their_own_identity: the default keeps the identity, and each combination of switches gives a distinct one.warm_settings_ignore_waits_watchdogs_and_traces_but_keep_pipeline_switchesnow also checks both names.XCL_RDNA_FLOAT stays in the key).Tested
cargo test --workspace -- --test-threads=4(with--no-fail-fast) on this head (ac528d09), aftercargo clean -p xcl, twice:hle::d3d12x::list_x::tests::wait64_flags_do_not_mask_the_recorded_counter("misaligned pointer dereference" inwindows-core, a non-unwinding panic,0xc0000409). The other 42 binaries: 148 passed, 0 failed, 20 ignored.list_x.cdb365bd): 2906 passed, 0 failed, 51 ignored, twice on a quiet machine.cda7d4d3), whose non-test code was the same ascdb365bd's, one of two full runs hadtitle_textures::tests::placed_title_textures_share_vram_and_preserve_pixelsfail, plus threePoisonErrors from the mutex it poisoned.main).title_textures; reported on CI: tests that fail by timing or shared state keep unrelated PRs red (5 sightings on 28 Nov) #3180.no wave64(wave32 adapter), 2no heap windows(opt-inXCL_HEAP_WINDOWS=1), 1pso_measurement_compiles_an_exact_synthetic_record(cannot disable the driver cache without Developer Mode)cda7d4d3), counting the entries under eachtranslated/v2identity:main: with either switch at0, no entry is written anywhere; all 26,008 entries come from the default identity, so the switch has no effect.XCL_RDNA_FLOAT=0andXCL_WATERFALL_COLLAPSE=0each make their own identity (220 and 799 entries), and a default run afterwards goes back to its own.XCL_RDNA_FLOAT=0, 4 of 799 withXCL_WATERFALL_COLLAPSE=0.XCL_DXIL_CACHEfolders and a fixed set (xcl shaders <pack> --precompile --only ms|vs --limit 300, plus--only psonmain):main: a default pass after anXCL_RDNA_FLOAT=0pass reuses those entries. Against a clean default cache, 9,457 of 12,356 programs differ (Pixel 9,341, Mesh 80, Vertex 36).cdb365bd): the same order leaves the default entries byte for byte equal to a clean default cache (0 of 300 differ), while the=0identity differs in 116 of 300.XCL_WATERFALL_COLLAPSE=0changes none of the programs in this set.Regression run
Same title, 60 s each, release builds of this head and of the
mainit is rebased on, run one after the other on a quiet machine. Both builds have new translated-cache identities:mainchanged the direct translator's sources since the earlier runs, and this PR edits them too. So both runs started with a cold translated cache for the title.main:This PR's head:
Not tested
Noticed, not changed
XCL_PER_LANE_MAX_INSTS(the per-lane form's instruction limit) is in no cache key either. It only matters withXCL_PER_LANE=1, so it is left out here.ComputePolicyKey(pso.rs, "output-affecting process policy") lists neither switch, norXCL_X_LDS_ORDER. It only keys in-flight builds within one process, where the environment does not change, so nothing goes wrong.XCL_DIRECT_DXIL=0, whether a compute program takes the huge direct route depends on the size of its direct output, which the switches change. The HLSL entry stored under the untagged HLSL identity is found first, so a run with a switch at0can leave an HLSL translation that later default runs keep using.XCL_DIRECT_COMPACTandXCL_DIRECT_SPLIT_INSTRUCTIONSare in the same position: they also tag the identity only when the backend is direct.gpu/dxilchangesXCL_DIRECT_DXIL_SOURCE_ID, so the first run after this PR translates the direct programs again (expected, as for every such merge). That also drops any entries made before it with a switch at0.AI use
🤖 Generated with Claude Code