Repository navigation
compute: classify SCC-neutral SOP1 ops in the direct SCC liveness - #3189
Conversation
|
LGTM on the code quality and test coverage. The SCC liveness improvements are solid, and the re-added |
uses_scc_after() treated every SOP1 outside a short list as an unknown SCC reader, so an SCC produced by a byte-window descriptor rewrite was kept live past s_ff1_i32_b64 and refused as "numeric SCC from a symbolic descriptor field". The scans and bit edits that neither read nor write SCC (s_ff0/s_ff1, s_flbit, s_brev, s_sext, s_bitset0/1, s_bitreplicate) now pass liveness through; s_abs_i32 and the 32-bit counts overwrite it, the remaining b64 saveexec forms join the mask writers. Unclassified ops keep the conservative rule. native_direct_container compiles the rewrite followed by s_ff1_i32_b64 and s_brev_b32, and still refuses it when s_cselect_b32 reads SCC after the scan. AI-assisted.
1eac968 to
e6e1083
Compare
R0Y00
left a comment
There was a problem hiding this comment.
Independently reviewed e6e10838. An SCC-preserving SOP1 now passes liveness through to actual readers; known writers stop propagation unless the instruction explicitly reads SCC. The paired descriptor controls verify that the unused symbolic SCC is accepted and a later SCC read through a scan still refuses. The proposed #3192 head composes cleanly and keeps #3071’s conditional moves and #3081’s scalar comparisons.
Built compile_dxil native_store_replay native_compute_ir_dump in Debug and Release over d99e0ae4 plus #3190 (tree 8afd409a70773b17d781bfe034b03dc5dd6f0ff9). ctest --test-dir <build> --no-tests=error -j 1 -V -R '^native_(direct_container$|(salu_(cmov|cmp64|bitscan64)|s_quadmask)_.*)' passed 11/11 in each configuration. Rebuilt Release over actual main afe70bd7 (tree 51db1e8c4c331c0862a4c2d979e196adaf83b52b) and the same 11 passed. I also built native_sampler_heap for #3140's adjacent suite. Its first run reported an iostream error in the temporary directory; rerunning ^native_sampler_heap_(warp|hardware)$ with a shorter temp path passed all 69 hardware assertions. WARP returned capability skip 77 because it has no wave32. Combined Release result on current main is 12 passes, 1 capability skip.
NVIDIA GeForce RTX 4060 Laptop driver 32.0.16.1656, Windows build 26200.9974, SDK/DXC 10.0.26100.0. git diff --check HEAD^1 HEAD and required hosted checks passed.
Fixes #3174. Part of #2935. Target branch
main.Change (
src/gfx1013_direct_compute.inl,DirectCompute::uses_scc_after): SOP1 ops that the direct path lowers are classified by their SCC behaviour, instead of every SOP1 outside a short list being treated as an unknown SCC reader.s_ff0/s_ff1(b32, b64),s_flbit(b32, b64, i32, i64),s_brev(b32, b64),s_sext_i32_i8/_i16,s_bitset0/s_bitset1(b32, b64) ands_bitreplicate_b64_b32.s_abs_i32, the 32-bits_bcnt0/s_bcnt1, and the remaining b64 saveexec forms (xor, andn2, orn2, nand, nor, xnor).s_cmovis not touched; merged withmain, shader: lower s_cmov_b32, s_cmov_b64 and s_cmovk_i32 in the direct compute path #3071's SCC-reader entry fors_cmov_b32/_b64/s_cmovk_i32is kept.An SCC written by a byte-window descriptor rewrite was kept live past such ops, for example
s_ff1_i32_b64. It was then refused as "numeric SCC from a symbolic descriptor field".Tests. The setup was Windows 11 build 26300.9974 with an NVIDIA GeForce RTX 5080 (driver 32.0.16.2101) and DXC from the Windows SDK 10.0.26100, on
main0f3e8248plus this commit.native_direct_containeradds two compile cases:s_ff1_i32_b64ands_brev_b32now compiles;s_cselect_b32reading SCC is still refused.native_salu*andnative_bytewin*pass.native_scalar_lds_hardwarefails with "native compute PSO creation failed", as it does onmainwithout this change.s_ff1from the SCC-neutral set failsnative_direct_container.Measured on a local capture (counts and instruction shape only) with
compile_dxil --jobs 8 gfx1013-direct-cs@36 --requests. The baseline ismain6057071b, and the change is on0f3e8248; the commits in between do not touch the two native source files.s_ff1_i32_b64with an EXEC source, which stays refused.AI-assisted.