Repository navigation
Conversation
|
Native AMD follow-up on exact clean head RX 7900 XT (20 GiB), Windows 11 build 26100, SDK DXC 1.9.2602.17. Same release executable, fresh copies of the same Series S-profile save/config, networking off and no input in either timed run. The driver-managed Windows cache was shared.
The cold run recorded 55,064 graphics and 2,734 compute entries, 5,651 shader records and four used markers. I copied six original pipeline records and their dependencies into a separate sample journal, including all four marked used (three graphics and one compute), plus two more compute pipelines. The same executable ran The workspace reported 703 passed, 0 failed, 41 ignored. One counted pass printed a runtime skip for the missing xgameruntime.dll debug-layer fixture. This covers journal capture, resume and DXIL reuse at the menu. The six-entry sample did not establish driver-blob reuse or world-loading stability. Codex (GPT-6) ran the tests and prepared this report. |
|
Follow-up patch index (full measurements and limitations remain below):
Native NVIDIA follow-up on The test builds one compute journal from the existing synthetic console CS fixture, runs Patch: d2a3e01, directly on this PR's head. The file now opens for writing, truncates and rewinds a fresh record, or seeks to the end of valid progress. Initialization errors return 2 instead of being ignored. The new test checks cold compilation, unchanged resume, and exact progress replacement after key invalidation. With the fix, all three CLI passes succeed and the file returns to the original 16 bytes. No change to shader translation or pipeline descriptors. Tested on Windows 10 Pro 19045, RTX 3060 12 GB, driver 32.0.16.2114, Rust/MSVC 1.100.0, SDK DXC 1.9.2602.17 and Agility 1.620.2: Build passed. Clean PR head: 703 passed / 0 failed / 41 ignored. Patched tree: 704 passed / 0 failed / 41 ignored. Both runs printed two Not tested: retail title smoke, graphics journal replay, AI use: Codex (GPT-6; exact variant unavailable) investigated, wrote the patch and synthetic test, ran validation, and prepared this report. Follow-up: 26d7532 extends the same synthetic test with a complete journal frame containing an incomplete compute payload. Two subsequent CLI processes each report made 0 / failed 1, retry that record, and preserve the exact successful progress bytes. This covers unreadable journal entries staying retryable; it does not simulate a driver compile failure. Test-only follow-up, no additional runtime changes. The full workspace was rerun with the command above: 704 passed / 0 failed / 41 ignored, exit 0, with the same two native-wave64 skips. Tool, model, hardware and coverage limits remain as reported above. Native NVIDIA follow-up on
|
| Tree / run | Passed | Failed | Ignored |
|---|---|---|---|
| Clean head, first run, 4 test threads | 707 | 0 | 41 |
| Optional test patch, 4 threads, twice | 705 | 3 | 41 |
| Optional test patch, 1 thread | 703 | 5 | 41 |
| Clean head again, patch removed, 4 threads | 703 | 4 | 41 |
Each run printed the same two native-wave64 skips: gpu_geometry_wave32_prefix_count_over_a_mask and gpu_wave32_program_in_wave64_hardware. Samples were unset; sample-gated counted passes are not title coverage.
The two patched parallel runs failed in placed_title_textures_share_vram_and_preserve_pixels (placement readback mismatch), then transitions_apply_when_their_list_is_submitted and d32s8_targets_take_their_own_size_of_video_memory (poisoned locks). All three passed separately with cargo test --locked -p xcl --lib <full-name> -- --exact --show-output. The serial run also failed ensure_mapped_with_query_holes_skips_uncommitted_pages_on_readback and gpu_mirror_upload_follows_cpu_writes_and_later_mapping_changes. The clean rerun hit the original three plus cpu_writes::tests::writes_land_after_the_queue. These failures were in the unchanged library test binary, before the added integration test ran. The cause of the texture/sparse failures has not been established here.
CLI regression: 1 passed / 0 failed in the focused run, and it passed in all three patched workspace runs. It checks:
- cold compute compilation, resume, stale-key replacement, and trimming a torn progress record;
- a Windows sharing violation on
pipelines.donereturns 2 without altering saved progress or creating.trying; - two runs retry an unreadable compute payload and retain the exact successful progress bytes;
- a clean exit removes
.trying.
Not tested: real-title smoke, graphics replay, --watch, a real driver update, driver/DXC crash recovery, Wine/Proton, AMD/Intel, or driver-blob reuse. The sharing check holds the file from the test process; it is not two concurrent CLI warmers. #1335 already covers a separate crash/interrupt follow-up; this patch does not change that logic.
Optional test-only patch against this exact head (git apply --check passed):
Synthetic CLI regression patch (90 added lines)
diff --git a/crates/xcl/tests/gpu_compute_e2e.rs b/crates/xcl/tests/gpu_compute_e2e.rs
index 587c489..9363cdc 100644
--- a/crates/xcl/tests/gpu_compute_e2e.rs
+++ b/crates/xcl/tests/gpu_compute_e2e.rs
@@ -81,6 +81,96 @@ fn console_cs(code: &[u8], rsrc2: u32, threads: [u32; 3]) -> Vec<u8> {
const V: u64 = 256; // VALU source code of v0
+#[test]
+fn pipeline_journal_cli_compiles_and_resumes() {
+ let _serial = SERIAL.lock().unwrap_or_else(|e| e.into_inner());
+ if xcl::gpu::recomp::dxc::location().is_err() {
+ runner::skip_test("no DXC");
+ return;
+ }
+ if runner::wave64_programs_supported() != Ok(true) {
+ runner::skip_test("no wave64");
+ return;
+ }
+ let stamp = std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH).unwrap().as_nanos();
+ let dir = std::env::temp_dir().join(format!("xcl_pipeline_cli_{}_{stamp}", std::process::id()));
+ std::fs::create_dir_all(&dir).unwrap();
+ let journal = dir.join("pipelines.bin");
+ let cache = dir.join("dxil");
+ let blob = console_cs(&program(), 2 << 1 | 1 << 7 | 1 << 8 | 1 << 11, [16, 8, 1]);
+ let shader_hash = xcl::gpu::shader::fnv64(&blob);
+ // The journal stores the shader hash, desc size, then a pointer-free desc.
+ let mut payload = shader_hash.to_le_bytes().to_vec();
+ let desc_size = std::mem::size_of::<D3D12_COMPUTE_PIPELINE_STATE_DESC>();
+ le(&mut payload, desc_size as u32);
+ payload.resize(payload.len() + desc_size, 0);
+ let hash = xcl::gpu::shader::fnv64(&[payload.as_slice(), &[4]].concat());
+ let mut bytes = xcl::hle::d3d12x::pso_journal::MAGIC.to_vec();
+ for (tag, windows, hash, data) in [(b'S', 0, shader_hash, blob.as_slice()), (b'C', 4, hash, payload.as_slice()), (b'U', 0, hash, &[][..])] {
+ bytes.extend_from_slice(&[tag, windows, 0, 0]);
+ le(&mut bytes, data.len() as u32);
+ bytes.extend_from_slice(&hash.to_le_bytes());
+ bytes.extend_from_slice(data);
+ }
+ std::fs::write(&journal, bytes).unwrap();
+ let command = || {
+ let mut cmd = std::process::Command::new(env!("CARGO_BIN_EXE_xcl"));
+ cmd.arg("pipelines").arg(&journal).args(["--threads", "1"])
+ .env("XCL_DXIL_CACHE", &cache).env("XCL_PIPELINE_THREADS", "1");
+ cmd
+ };
+ let run = |expected: &str, failed: usize| {
+ let out = command().output().unwrap();
+ let log = format!("{}\n{}", String::from_utf8_lossy(&out.stdout), String::from_utf8_lossy(&out.stderr));
+ println!("{log}");
+ assert!(out.status.success(), "{log}");
+ assert!(log.contains(expected), "{log}");
+ assert!(log.contains(&format!("failed {failed},")), "{log}");
+ assert!(!journal.with_extension("trying").exists(), "a clean exit must remove in-flight state");
+ log
+ };
+ assert!(!cache.exists(), "first run must start without an application cache");
+ run("made 1,", 0);
+ let done = journal.with_extension("done");
+ let progress = std::fs::read(&done).unwrap();
+ assert_eq!(progress.len(), 16, "binary key and one completed pipeline");
+ assert_eq!(&progress[8..], &hash.to_le_bytes());
+ // The second process must refuse a progress file held by another writer.
+ use std::os::windows::fs::OpenOptionsExt;
+ let held = std::fs::OpenOptions::new().read(true).write(true).share_mode(1).open(&done).unwrap();
+ let refused = command().output().unwrap();
+ assert_eq!(refused.status.code(), Some(2), "{refused:?}");
+ assert!(String::from_utf8_lossy(&refused.stderr).contains("pipelines.done"), "{refused:?}");
+ assert_eq!(std::fs::read(&done).unwrap(), progress);
+ assert!(!journal.with_extension("trying").exists());
+ drop(held);
+ // A torn final progress record must not offset the next completed hash.
+ std::fs::write(&done, [progress.as_slice(), &[0xaa, 0xbb, 0xcc]].concat()).unwrap();
+ let resumed = run("made 0,", 0);
+ assert!(resumed.contains("1 done before"), "{resumed}");
+ assert_eq!(std::fs::read(&done).unwrap(), progress);
+ // A different binary key invalidates progress, even with a populated DXIL cache.
+ let mut stale = progress.clone();
+ stale[0] ^= 1;
+ std::fs::write(&done, stale).unwrap();
+ run("made 1,", 0);
+ assert_eq!(std::fs::read(&done).unwrap(), progress);
+ // An incomplete compute payload cannot be replayed and must remain retryable.
+ let mut broken = vec![b'C', 4, 0, 0];
+ le(&mut broken, 8);
+ broken.extend_from_slice(&(hash ^ 1).to_le_bytes());
+ broken.extend_from_slice(&shader_hash.to_le_bytes());
+ use std::io::Write;
+ std::fs::OpenOptions::new().append(true).open(&journal).unwrap().write_all(&broken).unwrap();
+ for _ in 0..2 {
+ let retried = run("made 0,", 1);
+ assert!(retried.contains("1 pipelines to make"), "{retried}");
+ assert!(retried.contains("not readable from the journal"), "{retried}");
+ assert_eq!(std::fs::read(&done).unwrap(), progress, "a failure must not enter completed progress");
+ }
+ std::fs::remove_dir_all(&dir).unwrap();
+}
+
/// 16×8 threads per group (two wave64s), s[0:1] = output base and row width, TGID_X/Y in
/// s2/s3, thread ids in v0/v1: each thread writes its global (x, y), and through LDS +
/// s_barrier the (x, y) of the thread at the mirrored index, which is in the other wave.AI use: Codex (GPT-6; exact variant unavailable) ported the test, ran the validation, and prepared this follow-up.
Current-main integration: build failure reproduced and fixed
I also confirmed @3L1A5-1's build report. After resolving the merge with main fc0462b4f442f390e7b9b637c168271b7720935f, cargo check --locked -p xcl --lib -j 4 failed with E0599 (Slots::acquire) and E0425 (wait_for_commit) in the offline compute warmer.
82bd8fd is a tested integration tree with parents fc0462b and your unchanged head 3407393. The offline call becomes:
let _big = (compiled.dxil.len() >= BIG_DRIVER_COMPILE).then(|| big_compile_turn(&BIG_COMPILES, big_compile_commit_free, || false));The tool has no waiting title thread; the title path keeps main's build_is_wanted predicate. Merge resolution retains main's demand-aware worker code, collision-safe driver-cache writes, sparse fixes and CI tests; it keeps this stack's graphics preparation and journal callbacks. Main's Discord URL is retained too.
On the same RTX 3060 / Windows 10 / Rust 1.100.0 MSVC / DXC 1.9 / Agility 1.620.2 setup:
cargo build --locked --workspace -j 4: passed.cargo test --locked --workspace --no-fail-fast -j 4 -- --test-threads=4 --show-output: integration before the optional CLI test 774 passed / 0 failed / 41 ignored; final tree with it 775 / 0 / 41, exit 0.- Focused
pipeline_journal_cli_compiles_and_resumes: 1 passed / 0 failed. It executes the generated compute journal in child CLI processes and checks progress/retry behavior.
Both workspace runs printed the same two native-wave64 skips. Samples remain unset. This validates the merge tree, not the old head by itself; it does not establish stable title behavior, a large-program driver compile, graphics replay, --watch, Wine, or main/head retail smoke. Runtime code changed, so the required title smoke is still outstanding before merge.
AI use: Codex (GPT-6; exact variant unavailable) resolved and checked the integration, ported the synthetic test, ran these commands and prepared this update.
New regression: an existing but invalid blob was counted as complete
1e7047b fixes a separate issue in warm's compute branch, on top of the tested 82bd8fd integration.
The old is_file() shortcut returned Ok(()) without asking the driver to load the file. In the synthetic CLI test I wrote invalid cached journal pipeline into the matching driver-cache file, removed progress, and replayed the same journal. The tool printed made 1, failed 0 and wrote completed progress, but the invalid bytes remained untouched. The new assertion fails before the fix.
The patch loads the blob into CachedPSO, asks the driver to create the pipeline, and falls back to a normal compile after dropping a refused blob. Valid blobs are reused and left unchanged. It retains the existing driver-slot and big-compile admission guards and updates the README. The 26-line regression extension also seeds a valid blob via the same executable's xcl shaders --precompile --pipelines, then requires the warmer's actual driver-blob-hit message.
Measured with the fix: invalid blob refused and removed/replaced, normal creation succeeds; the valid blob is accepted and stays byte-identical. Focused CLI test 1 passed / 0 failed. Build passed; full workspace 775 passed / 0 failed / 41 ignored, exit 0, with the same two native-wave64 skips. Commands and native RTX 3060 setup are unchanged from the integration report above.
This matters when .done starts over while incompatible files remain, including the situation the driver-key change is intended to cover. I did not change the installed driver: the regression uses an invalid synthetic blob. No retail smoke, Wine, AMD/Intel or large-program timing measurement. Runtime changed, so main/head title smoke remains required before merge. Static-sampler key separation (#1420) and NodeMask normalization (#1368) are separate changes.
AI use: Codex (GPT-6; exact variant unavailable) reproduced the failure, wrote the patch and regression, ran the tests and prepared this follow-up.
CLI help regression
ffc40b3 adds a one-line help guard and a standalone CLI regression on top of 1e7047b.
Before the fix, xcl pipelines --help tried to open a path named --help and exited 2. The new test reproduces that failure. It now checks all four forms (--help, -h, and each after a missing target path) with XCL_ADAPTER deliberately set to a nonmatching name: each exits 0, prints the command's options, and leaves stderr empty. No GPU or title data is needed for the test.
Focused test 1 passed / 0 failed; build passed; full workspace 776 passed / 0 failed / 41 ignored, exit 0, the same two native-wave64 skips. This is still the fc0462b-based integration, not a fresh merge of every later main change. No retail smoke. Codex (GPT-6; exact variant unavailable) wrote the guard/test, ran validation, and prepared this update.
Combined #759 / #1420 native cache check
83ac24b combines the #759 integration/cache/help fixes (ffc40b3) with #1420's rebased 867d307 on main b7aa9f3. The clean merge initially failed E0061: the journal warmer still supplied two arguments to the new three-argument driver_cache::path. It now passes &compiled.samplers.
A new synthetic native-driver regression goes beyond the filename unit test:
- two console CS containers differ only in static U addressing (wrap/clamp);
- both cached DXIL files are byte-identical, while the offline compiler writes two distinct driver blobs;
- each journal replay must report an actual saved-driver-blob hit and preserve both files byte-for-byte.
The focused test journal_warmer_reuses_offline_blobs_for_distinct_static_samplers passed 1 / 0, no skips. A control that supplied an empty sampler slice to the warmer made the code compile but failed its cache-hit assertion. The corrected caller passed. The shared journal encoder is the existing synthetic fixture, factored for reuse.
Full results on the RTX 3060 / Windows 10 / Rust 1.100.0 / DXC 1.9 / Agility 1.620.2 setup:
- Build passed.
cargo test --locked --workspace --no-fail-fast -j 4 -- --test-threads=1 --show-output: 780 passed / 0 failed / 41 ignored, exit 0, two native-wave64 skips.- The same command with
--test-threads=4: 777 / 3 / 41, five explicit skips. Failures werelist_x::tests::write_buffer_immediate_on_open_existing_heap_visible_to_cpu,rotating_queue_self_deadlock_and_non_monotonic_rescue_do_not_hang, andtimestamps_outside_unified_memory_land_after_the_queue, at queue creation. Additional no-device skips were the console depth-target test, shader-cache-session fallback test and placed-texture test. The cause of these parallel failures is unresolved; this is not a green default-suite claim.
Samples were unset. The new regression compiles pipelines and checks cache loading; it does not dispatch the sampler shaders or compare rendered output. No retail title smoke, Wine, AMD/Intel, native wave64, or real driver update. #1368 is not part of this integration.
AI use: Codex (GPT-6; exact variant unavailable) prepared the integration and fixture, reproduced the API/caller failures, ran validation and wrote this update.
Invalid option values could start an unlimited pass
f5a2e21 is a separate input-validation fix on ffc40b3.
Reproduced with the one-record synthetic journal: --limit with no value selected usize::MAX, compiled the pipeline, wrote progress and exited 0. The new assertion expects 2 and fails before the patch. Missing/invalid --threads values also fell back to the default. The patch validates supported options before journal/device resolution, rejects bad values and unknown arguments, preserves first-value precedence, and keeps --limit 0 valid.
The no-GPU CLI suite covers ten invalid forms plus the four help forms (2 test functions passed). The journal regression (1 passed) checks that bad limits produce no cache/progress files; limit 0 creates only the 8-byte key and compiles nothing.
Build passed. Full serial workspace: 777 passed / 0 failed / 41 ignored, two native-wave64 skips. Parallel run: 775 / 2 / 41, four skips (two wave64, console depth target/no GPU, placed textures/no device); the rotating-queue and mid-list-write64/wait64 tests failed creating queues. Those parallel failures remain unresolved. No title smoke. Same hardware/toolchain and commands as above, with the reported test-thread setting.
Codex (GPT-6; exact variant unavailable) reproduced the behavior, wrote the parser/regressions and ran validation.
Invalid journal headers were reported as successful empty work
3a1be15, on f5a2e21, checks the journal header before GPU selection or progress creation.
Before the fix, an ASCII .bin containing not an XCL pipeline journal exited 0 and created an 8-byte .done file. With the fix it exits 2 with invalid pipeline journal header; an already-existing progress file also stays unchanged (hash checked).
Four no-GPU CLI cases cover wrong magic, an unsupported full header under --watch, and empty/short non-watch input. They require error 2 before the deliberately nonmatching adapter can be selected and no new progress files. The existing GPU journal test checks that --watch --limit 0 still accepts empty and partial initial headers. Complete frames and torn payload handling are unchanged; live appending beside a running title was not tested.
Focused CLI 3 test functions passed; focused journal 1 passed; build passed. Full serial workspace 778 passed / 0 failed / 41 ignored, two native-wave64 skips. Parallel workspace 777 / 1 / 41, four skips; mid_list_write64_wait64_split_avoids_cycle_and_reuses_spares failed at queue creation. The extra skips were the console depth target and placed textures (no device). This remains an unresolved parallel GPU-test limitation, not a green default-suite result. No title smoke or proprietary inputs.
Codex (GPT-6; exact variant unavailable) reproduced the input behavior, wrote the validation/regressions and ran these checks.
Test report: #759 under Wine (Linux, NVIDIA):
|
The progress file was opened for appending, and on Windows an append handle cannot be truncated: the set_len(0) for a new binary failed unseen and its key was appended after the old records. It is now opened for writing; a file of another binary starts over and a torn last record is cut off, and an open error ends the run (2). Reported by @anes66 on ivall#759. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
6dd5c1d to
ab1479a
Compare
|
Thanks @anes66, and @crosettiremi and @JoaoPauluu for the runs on #757 / #759. The A fresh review of the whole stack afterwards found four more of the same kind, now fixed:
Still open (not fixed here): the tool's device takes the first adapter matching the title's New smoke runs on the fixed heads are in #758's and this PR's descriptions. |
…goes past one it crashed on - A big compute pipeline (256 KB of DXIL and more) now takes the title's BIG_COMPILES turn and waits for 3 GB of free commit, as the title's own background compiles do. The tool's threads (xcl-warm-*) missed that rule and ran up to four of these at once, 1.5 to 3 GB each in the driver. - The pipelines being made are noted in pipelines.trying, which a run that ends by itself removes. A run that died (a crash in the driver or DXC on one pipeline, reported under Wine on xcl-dev#759) leaves it behind, and the next run leaves those pipelines to the title instead of ending the same way. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@JoaoPauluu thanks for the Wine run, and sorry, I missed your report when I wrote the reply above. The last ~5 % of a journal are the title's huge compute pipelines: on an RX 6700 XT one took 62 s and 1.5–3 GB in the driver. The tool had two problems there, both fixed now:
The stack overflow itself I can't reproduce on Windows: there the driver compiles these without a crash. Under Wine the driver compile is vkd3d-proton's DXIL→SPIR-V in the calling thread (64 MB of stack, as the title's own compile threads have), so I suspect the #611 kind of deep recursion on those shaders; the title would meet it too when it builds them. With the change above, a re-run goes past them instead of ending every time. The |
|
Test report for the Tested
Not tested
AI use
|
|
Test report: Setup: RTX 4090 (driver 621.24), Ryzen 9 9950X3D (32 threads), 47 GB RAM, Windows 11 26300, release. Tree:
If a shard option (or several AI use: Claude Code with Claude Opus 5.5 applied the stack, ran the builds, tests and passes, took the stack samples and wrote and posted this comment at my request. |
|
@oishigeso, answers to your question, and a rerun on this PR's head The
Title runs ( Tested
Not tested
AI use
|
|
Tested
This shows that the offline compiler can finish the exact entries that missed the in-title deadline. A cache-status trace confirmed that all four recurrent compute timeouts found a saved blob and entered the driver before the bind deadline. Each blob was 112 bytes and contained only the vkd3d-proton compatibility metadata chunk. With Not tested Native Windows, AMD, and rendered gameplay. AI use OpenAI Codex with GPT-6.2-Sol high prepared the local instrumentation, ran the tests, and wrote this report. |
|
Test report for #759 (with #744 and #573) on NVIDIA, retail title 1.0.2.1: precompiling outside the title cuts the skipped compute work by 85 %. Setup
What we did
Result (same point in the run, ~190–200 s)
The intro cinematic plays with sound and letterbox bars, but the scene stays grey/black. Graphics pipelines are warmed only into NVIDIA's own cache, so the draws improve less than the dispatches. Two things that helped, offered as ideas
Not tested
AI-assisted. |
…form fallback The tool sets the run's `mem_windows` with its HEAP_WINDOWS flag from the journal (`mem_windows_of`), so a heap-window run's pipelines get the same HLSL and cache keys as in the title. A pipeline the driver refuses with E_OUTOFMEMORY in that form is made again in the switch form through `with_switch_fallback`, as the title makes it since xcl-dev#680. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013hQzywPUY9kSTPQPh31CWh
9d5c58c to
d9cea04
Compare
Ctrl+C is how --watch ends, and it left `.trying` behind as a crash does: the next run wrote the pipelines being made at that moment to `pipelines.done` as left to the title, most often the biggest compute programs, the ones most worth making ahead. A console control handler now removes `.trying` before the default handler ends the process, so the next run makes them again; a crash in the driver or DXC still leaves it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013hQzywPUY9kSTPQPh31CWh
main.rs: the help of `xcl shaders --direct` (xcl-dev#1426) and `xcl pipelines` both kept, the shaders lines first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013hQzywPUY9kSTPQPh31CWh
…s only to append The first pipeline the title noted read the frame headers of every earlier run (about 63 000 for a 123 MB journal) with the journal's lock held, and each later one hashed its shaders and desc under the same lock, so the title's pipeline threads waited on one another. An entry is now built and hashed with no lock held, and the lock covers its append only. The journal is opened on a thread of its own; what is noted meanwhile waits in memory, each frame once (up to 256 MB, past which the journal is off for the run), and is written in order once it is open. `XCL_PSO_JOURNAL` is read once, and a journal turned off stops entries being built at all. A panic on another thread while it held the lock no longer ends the journal. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013hQzywPUY9kSTPQPh31CWh
… threads) into pipelines-3-tool Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013hQzywPUY9kSTPQPh31CWh
|
A rerun at Tested
Not tested
AI use
|
|
@oishigeso a heads-up for the next rebase:
What I used locally to build (one way, not necessarily the right one): // translated_graphics_pso_once
let bytes = _dxil.0.len() + _dxil.1.as_ref().map_or(0, Vec::len) + rect_gs.as_ref().map_or(0, Vec::len);
// warm_once
let _big = (compiled.dxil.len() >= huge_pso_bytes()).then(|| big_compile_turn(compile_slots(compiled.dxil.len()), big_compile_commit_free, || false)).flatten();With that, AI use
|
|
@JoaoPauluu @oishigeso possibly the cause of the warm-worker overflow above: #1805. On this machine the AI use
|
|
Stacked Small thing seen while testing it: AI use: Claude Code (Claude Opus 5.5) wrote this comment. |
The progress file was opened for appending, and on Windows an append handle cannot be truncated: the set_len(0) for a new binary failed unseen and its key was appended after the old records. It is now opened for writing; a file of another binary starts over and a torn last record is cut off, and an open error ends the run (2). Reported by @anes66 on xcl-dev#759. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…goes past one it crashed on - A big compute pipeline (256 KB of DXIL and more) now takes the title's BIG_COMPILES turn and waits for 3 GB of free commit, as the title's own background compiles do. The tool's threads (xcl-warm-*) missed that rule and ran up to four of these at once, 1.5 to 3 GB each in the driver. - The pipelines being made are noted in pipelines.trying, which a run that ends by itself removes. A run that died (a crash in the driver or DXC on one pipeline, reported under Wine on xcl-dev#759) leaves it behind, and the next run leaves those pipelines to the title instead of ending the same way. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Part 3 of 3 for #755. Stacked on #758; its own commits are the eight after #758's head.
xcl pipelines <game | data folder | pipelines.bin> [--watch]reads the journal from part 2 andmakes each pipeline on its own D3D12 device, the way the title would:
prep_graphicsfor VS /PS, and for compute the same path with XCL's ABI root signature. It uses the GPU the title's
xcl.tomlnames. Afterwards the DXIL cache, the driver's cache anddriver_cache(#634) holdwhat the title asks for. Run it before the next run, or next to the running title with
--watch, which follows the journal and takes the used pipelines first.Translation and DXC run on half the cores at below-normal priority; the driver's compiles run a
few at a time (
XCL_PIPELINE_THREADS). Progress is kept inpipelines.donefor this binary,and failures are retried by the next run. It must be the same xcl.exe as the title's. GS / HS /
DS and mesh pipelines are left to the title.
Unlike #690, which builds the pipelines an earlier run used, inside the title, this one covers
every queued pipeline, and none of the work happens in the title's process.
Two small changes it needs:
pso::set_mem_windows: the run's memory windows come from the journal, becauseprep_graphicstranslates throughconsole_to_dxil_forlike the title does.shader::readableno longer creates the UMA (uma::existing). Without this, the tool reserved12 GiB of windows and a 512 MB coherent window just for a pointer check.
704 lines: the command (
pipelines.rs) is 581 of them, with its tests, and it does nothing on itsown if split.
What is in it
crates/xcl/src/pipelines.rs,crates/xcl/src/main.rs,crates/xcl/src/lib.rs,README), with its tests; a console control handler removes
.tryingon Ctrl+C, so what wascut short is made again by the next run (a crash still leaves it to the title)
warm(crates/xcl/src/hle/d3d12x/real.rs): one journal entry made on a plain device, withthe switch-form fallback of Recompiler: memory windows from the descriptor heap (no per-access switch) #680
pso::set_mem_windows(crates/xcl/src/gpu/recomp/pso.rs),uma::existing(
crates/xcl/src/gpu/uma.rs, used bycrates/xcl/src/gpu/shader.rs),launcher::resolve_locationmadepub(crate)(crates/xcl/src/launcher.rs)Tested
main9e3831e:cargo test -p xcl --lib -- pipeline heap_window --test-threads=1: 14 passed, 0 failed (with Recompiler: memory windows from the descriptor heap (no per-access switch) #680's heap-window tests). d9cea04: the tool replays a run's heap-window flag and, like the title, makes a pipeline the driver refuses with heap windows again in the switch form (with_switch_fallback)mainc160d86 (gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426; thexcl shaders --directhelp and this command's both kept inmain.rs): the same 14 tests passcargo test -p xcl --lib -- pipeline heap_window pso_journal --test-threads=1: 16 passed, 0 failed; the run below is on this headXCL_HEAP_WINDOWS=1(exit 0x0, 437 frames), thenxcl pipelines --limit 100without it on that journal:4 memory windows (from the descriptor heap), made 100, failed 0; the run's earlier switch-form frames were left outcargo test --workspace -- --test-threads=4: 659 passed, 3 failed, 21 ignored; the 3 failures (title_textures::placed_title_textures_share_vram_and_preserve_pixels,title_textures::transitions_apply_when_their_list_is_submitted,vram::d32s8_targets_take_their_own_size_of_video_memory) fail onmain(f4ce27c) the same way in a full run (657 passed, 3 failed there) and pass alone; no GPU test SKIPPEDcache (
XCL_DXIL_CACHE). Run A: empty cache – the title compiled 4 programs itself (hits 0,misses 4). Then
xcl pipelinesfor 8 min into a second empty cache (50 895 of the journal's57 798 pipelines, 17/s at first and ~870/s at the end, as later pipelines share already
compiled shaders). Run B on that cache alone: hits 4, misses 0, 0 compilations in the title
(
report.json→d3d12.dxil_cache). Both runs on the same build, exit 0x0, no crashRegression run
main:
PR (this PR's head commit; the title is run through a folder named RetailTitle):
Not tested
--watchnext to a running titlecome first)
driver_cachematters most), Intel, RDNA4XCL_DIRECT_DXIL(gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426): the tool translates throughconsole_to_dxil_foras the title does,so it follows the variable, but the journal does not record it: the tool has to run with the
title's setting, or it fills the cache of the other backend
AI use