Repository navigation
compute: accept s_mov_b32 exec_hi in direct wave32 compute - #3192
Conversation
Captured compute programs write the high EXEC word with s_mov_b32 exec_hi, <constant>. The direct path accepted s127 as a move destination only on the wave64 path. In wave32 compute it is now stored like any scalar word; active() reads s126 only, so it enables no lane, and a later numeric read of exec_hi returns the stored value as on hardware. native_smov_exec_hi_hardware stores exec_hi values and a lane value under exec_lo against a CPU reference; native_smov_exec_hi_wave64 compiles the wave64 container form. AI-assisted.
|
LGTM. The addition of |
R0Y00
left a comment
There was a problem hiding this comment.
Independently reviewed 80a7e8aa over current main afe70bd7 plus #3189 (tree 104c513bcf695afb9e6612ae65fbe9d06a82d8b8). The only compiler delta over that base is the scalar move destination check. Existing SCC liveness, s_cmov*, and 64-bit scalar comparisons remain in the trial tree. The wave32 activity test still reads exec_lo.
Built compile_dxil native_store_replay in dev and release. ctest --test-dir <build> --no-tests=error -j 1 -V -R '^native_(smov_exec_hi|lane_access)_' passed 3/3 in Debug and Release /O2, zero skips. Physical wave32 readback checked the value stored in exec_hi and the unchanged active lanes. The wave64 container case compiled. RTX 4060 Laptop 32.0.16.1656, Windows build 26200.9974, SDK/DXC 10.0.26100.0, native replay debug layer disabled. git diff --check HEAD^1 HEAD and required hosted checks passed.
Fixes #3181. Part of #2935. Target branch
main.Change (
src/gfx1013_direct_compute.inl):s_mov_b32acceptsexec_hi(s127) as its destination in direct wave32 compute. The wave64 path already accepted it.active()reads s126 only, so no lane is enabled. A later numeric read ofexec_hireturns the stored value, as on hardware.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
main454fc0edplus this commit.native_smov_exec_hi_hardware(new) runs a wave32 request. It storesexec_hivalues read back throughs_mov_b32 sN, exec_hi, and a lane value underexec_lothat showsexec_hienables no lane, against a CPU reference.native_smov_exec_hi_wave64compiles the wave64 container form.native_direct_container,native_lane_access_hardwareandnative_wave_request_hardwarepass.native_smov_exec_hi_hardware.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 on454fc0ed; the commits in between do not touchsrc/gfx1013_direct_compute.inl.exec_hi, 17andexec_hi, 0x550055).s_bitreplicate_b64_b32 execthrough.AI-assisted.