Skip to content

Join f16 whole-wave sums and preserve the selected lane's high bits - #19

Open
steven-seagull27 wants to merge 1 commit into
r4tedx:shader/console-flow-ldsfrom
steven-seagull27:codex/pr439-half-sum
Open

steven-seagull27 wants to merge 1 commit into
r4tedx:shader/console-flow-ldsfrom
steven-seagull27:codex/pr439-half-sum

Conversation

@steven-seagull27

Copy link
Copy Markdown

This is the separate f16 sum from Machad3x's title-run report, based directly on the Marvisak#439 head 3fab5a1.

The split console-flow path now exchanges each Wave32 half's f32 sum, adds the two totals, and rounds the result to f16. It uses the console-wave ballot and lane-read helpers for the packed upper 16 bits. The tests put the source lane's ID in those high bits so a wrong-half read or a missing EXEC check shows up in the same dword. The existing f32-accumulate/round-once behavior still applies.

Each test dispatches two 64-thread groups. Three EXEC masks (all 64, first 40, upper 32) are each combined into lane 31 and lane 63. For example, with the first 40 lanes active, the low half must hold 40.0h (0x5100). Finishing in active lane 31 produces 0x001f5100, while finishing in inactive lane 63 gives 0x00005100.

Adapter / target Current Marvisak#439 With this commit
RTX 5080, fixed Wave32 All six refused before dispatch 0/768 wrong
Microsoft.Warp 1.0.22, fixed Wave32 All six refused before dispatch 0/768 wrong
Microsoft.Warp 1.0.22, fixed Wave64 0/768 wrong 0/768 wrong
Windows built-in WARP (Wave4) Unsupported Unsupported

The uninstrumented emit::split_tests:: suite passed 34/34, including the existing integer and float scan/reduction fixtures. Strict shader Clippy passed. The two Marvisak#439 candidates apply cleanly together in a merge-tree check, and this PR contains only the full-size f16 work. No title run on my side.

cargo test -p victory-shader --lib half_sum_and_packed_lane_cross_host_halves -- --nocapture

…gh bits

Machad3x proposed the split f16 reduction in Marvisak#2214. Exercise both halves of the packed source word for full, lower-forty and upper-half EXEC masks.
@r4tedx

r4tedx commented Nov 26, 2026

Copy link
Copy Markdown
Owner

Thank you for the f16 sum fix and the tests (head 591c51c). I have not reviewed or tested it yet. Marvisak#439 conflicts with main 63bcca4 right now. I'll review this together with your partial-group candidate 9cc76b8 when I bring the stack onto main, and I'll post what I verify here.

AI-assisted

@r4tedx

r4tedx commented Nov 26, 2026

Copy link
Copy Markdown
Owner

Taken into shader/console-flow-lds (Marvisak#439) as f968c54 by cherry-pick, with your authorship kept, together with 9cc76b8 as 611184e. Verified on WARP: translation and validation only, no dispatch. Thank you. Details: Marvisak#439

AI-assisted

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.

2 participants