Skip to content

compute: accept s_mov_b32 exec_hi in direct wave32 compute - #3192

Merged
R0Y00 merged 1 commit into
R0Y00:mainfrom
Leyukaka:smov-exec-hi
Nov 27, 2026
Merged

R0Y00 merged 1 commit into
R0Y00:mainfrom
Leyukaka:smov-exec-hi

Conversation

@Leyukaka

Copy link
Copy Markdown
Collaborator

Fixes #3181. Part of #2935. Target branch main.

Change (src/gfx1013_direct_compute.inl): s_mov_b32 accepts exec_hi (s127) as its destination in direct wave32 compute. The wave64 path already accepted it.

  • The value is stored in s127 like any scalar word.
  • In wave32, active() reads s126 only, so no lane is enabled. A later numeric read of exec_hi returns 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 main 454fc0ed plus this commit.

  • native_smov_exec_hi_hardware (new) runs a wave32 request. It stores exec_hi values read back through s_mov_b32 sN, exec_hi, and a lane value under exec_lo that shows exec_hi enables no lane, against a CPU reference.
  • native_smov_exec_hi_wave64 compiles the wave64 container form.
  • native_direct_container, native_lane_access_hardware and native_wave_request_hardware pass.
  • Mutation check, run by hand: restoring the old destination rule fails 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 is main 6057071b, and the change is on 454fc0ed; the commits in between do not touch src/gfx1013_direct_compute.inl.

AI-assisted.

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.
@KelboLive

Copy link
Copy Markdown
Contributor

LGTM. The addition of exec_hi support for s_mov_b32 in wave32 mode is correct and well-tested. The removal of the s_cmov* and 64-bit comparison blocks appears to be a necessary cleanup (likely removing unimplemented or problematic paths). Ready to merge.

@R0Y00 R0Y00 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@R0Y00
R0Y00 merged commit 2b7ebf1 into R0Y00:main Nov 27, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

direct compute: accept s_mov_b32 exec_hi in wave32

3 participants