Repository navigation
Conversation
|
Update for head AMD native wave64 run (listed as untested), plus an RTX 3060, paired against Head
Per-test comparison: on both cards the only difference is the new Not tested: a title with |
|
Independent AMD RDNA4 (native wave64) test report on exact head Tested
Regression run (60 s retail-title smoke, (Matched Not tested
AI use
|
|
Additional in-title check covering the AI use: Antigravity (Gemini 4 Neon) ran the smoke check and posted this comment. |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
bmjask
left a comment
There was a problem hiding this comment.
No concrete source-level defect found. Enabling reload analysis for VS/PS retains the existing safety exclusions and CFG availability handling; title smoke/AMD/RTX evidence is encouraging. Nonblocking gap: tests count rawBufferLoad elimination but do not execute a Direct-DXIL VS/PS fixture whose output depends on reused scalar data. Add graphics execution parity coverage and provide current CI confirmation.
… shaders Enable reload::analyze for Entry::Vertex and Entry::Pixel in the direct DXIL translator. Unlike two-phase Entry::Geometry, vertex and pixel shaders use the same single-entry Cfg::build as compute, so repeated s_load_dword* descriptor reloads can safely reuse their first values and avoid redundant memory-window switches. Part of xcl-dev#2088 Assisted-by: Antigravity (Gemini 4 Neon) Assisted-by: Codex (gpt-6.2-astra)
926428e to
3a71471
Compare
|
@bmjask, please take another look at 3a71471. The new graphics execution test checks that a reused scalar load produces the expected vertex positions and pixel colors on the RTX 5090, and matches the HLSL output. The original load-elimination test also passed. The description includes the full-suite results and the post-push offline smoke pair. |
…ev#2446, xcl-dev#2503 Integrates direct DXIL graphics shader flags (xcl-dev#2451), PS live-lane v_readfirstlane/SCC (xcl-dev#2501), MSG_GS_DONE emit/cut (xcl-dev#2485), VS/PS scalar reload CSE (xcl-dev#2446), and per-lane V_CMP EXEC masking (xcl-dev#2503). Assisted-by: Antigravity (Gemini 4 Neon)
|
Independent RTX 3080 Ti check of #2446 head Tested
Not tested
AI use
|
|
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
Thanks! — Devin |
|
Independent native Windows RX 7800 XT verification at Environment: RX 7800 XT (driver 32.0.31035.1003), Ryzen 7 5700X3D, Windows 11 Pro 26200.9974, Rust 1.100.0 MSVC, DXC 1.8.2502.11. The head passed
Both runs reproduced the same seed-722 failure in The synthetic AI use: Codex (gpt-6.2-sol) ran and compared the tests and drafted this report. |
luckyteagirl
left a comment
There was a problem hiding this comment.
This enables reload::analyze for VS/PS (kernel.rs:206,334) while the current base's reload::changes still misses VOPC SDWA SD=1 writes to SDST and some cache barriers. Open #2479 has a failing-first fixture for those invalidations. For a graphics program that loads through s[4:5], overwrites s4 with such an SDWA compare, then repeats the load, this PR can reuse the value from the old address instead of emitting the second load. The existing VS/PS tests cover repeated loads and an ordinary store, not this address-register write.
Could #2446 depend on #2479's invalidation fix before merge and include a VS or PS variant of its fixture? This is a source-derived cross-PR dependency at exact #2446 head 3a71471c80b842d8e6f2bffd74556947fc11921b; #2479's live head is d423c902918bcac16c8e8fe6192e85e2003c16b0. I have not run a graphics GPU reproduction. AI-assisted review with Codex.
|
merge-check base: 6089122a Candidate fix and regression (local, uncommitted)diff --git a/crates/xcl/src/gpu/dxil/reload.rs b/crates/xcl/src/gpu/dxil/reload.rs
index 96dfc2cd..1edd7b79 100644
--- a/crates/xcl/src/gpu/dxil/reload.rs
+++ b/crates/xcl/src/gpu/dxil/reload.rs
@@ -124,6 +124,17 @@ fn changes(d: &Decoded) -> (u128, bool) {
}
}
}
+ if d.enc.name == "ENC_VOPC" && d.variant == rdna2::Variant::Sdwa {
+ let Some(ext) = rdna2::encoding("VOPC_VOP_SDWA_SDST_ENC") else {
+ return (u128::MAX, false);
+ };
+ if rdna2::field_value(ext, &d.words, "SD") == Some(1) {
+ let dst = rdna2::field_value(ext, &d.words, "SDST").unwrap_or(106);
+ if dst < 125 {
+ regs |= pair(dst, 2);
+ }
+ }
+ }
let writes = name.contains("_STORE") || name.contains("_ATOMIC");
let memory = match d.enc.name {
"ENC_MUBUF" | "ENC_MTBUF" | "ENC_FLAT" | "ENC_FLAT_GLBL" | "ENC_FLAT_SCRATCH" | "ENC_MIMG" => writes,
@@ -312,6 +323,13 @@ mod tests {
}
}
+ #[test]
+ fn sdwa_compare_destination_invalidates_load_offset() {
+ let load: I = ("S_LOAD_DWORD", "ENC_SMEM", &[("SDATA", 12), ("SBASE", 2), ("OFFSET", 0), ("SOFFSET", 8)]);
+ let cmp: I = ("V_CMP_EQ_U32", "VOPC_VOP_SDWA_SDST_ENC", &[("SRC0", 0xF9), ("VSRC0", 0), ("VSRC1", 1), ("SRC0_SEL", 6), ("SRC1_SEL", 6), ("SD", 1), ("SDST", 8)]);
+ assert_eq!(loads(&[load, cmp, load, END]), [(0, false), (2, false)]);
+ }
+
#[test]
fn loads_that_cannot_be_followed_are_left_alone() {
// a coherent load, and one that overwrites its own base
Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti (621.35), rustc 1.99.1 MSVC, DXC 1.8.2502.11. AI use: Codex (GPT-6.2 Sol) ran the merge, build, tests, and candidate fix; Codex (GPT-6.2 Astra) independently traced the missing destination. |
|
merge-check claim |
|
merge-check |
|
Not on main: AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human. |
graphics_stages_emit_a_repeated_load_once (from amd-dev, xcl-dev#2446) counts rawBufferLoad calls in vertex and pixel programs whose loaded SGPRs are never observed: a VS or PS writes no SGPRs back at its end. Main's xcl-dev#3503 (6ff86e3) made rawBufferLoad eligible for dead-code elimination and keeps a single raw load only so the shader flags stay valid, so in the merge every program in the test compiled to exactly one load. The store case then failed (1 vs 1 + 4), and the repeat case passed only because both sides were that one surviving load. Neither side's lowering is wrong and the merge did not combine the reload or window code badly: reload.rs, the follow_loads stages and the s_load path are amd-dev's as is. Each program now stores the sum it computes, so the loads it reads stay live and both assertions measure the reload again.
Enable scalar reload CSE (
reload::analyze) for direct-DXIL vertex and pixel shaders (Entry::Vertex,Entry::Pixel). Previouslyfollow_loadswas restricted toEntry::Kernel | Entry::Compute(_)because two-phaseEntry::Geometryenters its GS blocks via edges outside the CFG; vertex and pixel shaders use the exact same single-entryCfg::buildas compute, so repeateds_load_dword*descriptor reloads can safely reuse their first values and avoid redundant memory-window switches.Part of #2088.
What is in it
crates/xcl/src/gpu/dxil/kernel.rs: includeEntry::Vertex(_) | Entry::Pixel(_)infollow_loadssoreload::analyze(&cfg)runs for direct-DXIL VS and PS.crates/xcl/src/gpu/dxil/reload.rs: addgraphics_stages_emit_a_repeated_load_onceverifying DXIL validation, repeateds_load_dwordx4elimination, and store-invalidation across 4 memory windows for bothtranslate_vertexandtranslate_pixel.Tested
Hardware: NVIDIA GeForce RTX 5090 32 GB (driver 621.01, wave32-only), AMD Ryzen 9 5950X, 64 GB RAM, Windows 11 26300,
rustc 1.100.0 (0ef1bc386 2026-11-09), DXC 1.9.2609.5, debug tests / release benchmarks and smoke runs.Clean head 3a71471. cargo build --workspace succeeded. cargo test --workspace --no-fail-fast -- --test-threads=4 --show-output reported 1361 passed, 4 failed, 46 ignored and 25 SKIPPED notices (1 heap windows unavailable, 21 no wave64, 3 unsupported per-lane translation). The four NVIDIA compute fuzz failures match DXIL GPU fuzz tests reproducibly fail with E_OUTOFMEMORY on RTX 5060 #1905.
Both gpu_graphics_scalar_reloads_match_hlsl and graphics_stages_emit_a_repeated_load_once passed on the RTX 5090.
Cold RTX 5090 pixel-shader
CreateGraphicsPipelineStatebenchmark (XCL_DIRECT_DXIL=all,XCL_TRANSLATED_CACHE=0,--windows 4 --repeat 3,ShaderCacheControl(IMPLICIT_DRIVER_MANAGED | IMPLICIT_D3D_CACHE_FOR_DRIVER, DISABLE), distinct exe basenames per build, measured with Shaders: support pixel shaders and direct DXIL in --measure-pso #2438's--measure-psoon2898511vs926428e):c7f0a851a539391c1f0e250e6f22b0593552327805b442b77221675a6826d87634253cc8188405fdRegression run
60 seconds per build, XCL_NETWORK=0, XCL_PRESS_AT=18:A,30:A,44:A,52:A and XCL_FRAME_DUMP=300.
XCL_DIRECT_DXIL=all on both builds.
main
PR head
Not tested
AMD, Intel, native wave64 and shader execution-time benchmarks on this revision.
AI use
--measure-psobenchmarks, and smoke runs, and drafted this PR description.