Whole-wave sections: an EXEC set by s_bfm_b32 of constant counts is refused (wave32 prefix sums, 10 compute shaders) #364
Labels
No labels
accessibility
bug
claimed
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
tester report
urgent
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LakshanSivakumar--Native-Victory-macOS#364
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@tiagonogueiraa-bit on GitHub · 2026-11-27 14:08 UTC · original
A shape from #4's list ("a whole-wave section step the simulation does not follow").
What is refused. The title's wave32 compute prefix sums build an inclusive sum in each row of 16 lanes (DPP
row_shr1, 2, 4, 8). Then they set EXEC to the upper row withs_bfm_b32 exec_lo, 16, 16and add lane 15 throughv_permlanex16_b32 v46, v47, -1, -1. InLower::section_inst,wave::register_onlydoes not take thes_bfm, so the section stops there with "GFX10 code at …: s_bfm_b32 is not supported". The simulator follows onlys_movEXEC writes, even though this is a constant lane set too (0xffff0000).How many. 10 unique compute shaders in a 12,020-shader corpus (Series S, boot to the menus, main
905e7aa) are refused fors_bfm_b32. All 10 are this shape.Plan.
s_bfm_b32ands_bfm_b64EXEC writes of two constant counts as the lane set they give.s_bfmwith a count in an SGPR stays refused.@tiagonogueiraa-bit on GitHub · 2026-11-27 14:08 UTC · original
/claim
@github-actions[bot] on GitHub · 2026-11-27 14:09 UTC · original
Claimed by @tiagonogueiraa-bit. Open a draft pull request with
Refs #361in its description within 24 hours, or the claim expires.@Olima34 on GitHub · 2026-11-27 14:14 UTC · original
Thanks, this looks worth doing, and our data agrees with yours. Our corpus of shaders refused at boot (M5 Pro, Series S, main
60baf130, native host options) has the same count: 10 compute shaders refused with "s_bfm_b32 is not supported", nothing else with that message:1ba04ed0bdb9d8f734046961ba5a083e6c7f547fee86539d6eb2cad0734f084471ffd0d7b57f54138c9f69d0d905ffe3b8c3843f71fb4eaac38c7bd6ba697164cbd298c95c519202d9be592e55ce3180Pointers that may save you time:
wave::register_only(emit/wave.rs) admits onlys_mov/s_andplusOp::salu_offor section steps. The simulator's EXEC tracking is wheres_bfmneeds to become a constant lane set.s_bfmhandling you can reuse instead of writing it again:resource.rs(around l. 2911):s_bfm_b32/s_bfm_b64with two constant operands;structure.rs(around l. 1149):s_bfmwith constant width and offset in the lane algebra;mask_tests.rs: tests fors_bfm_b64 exec, 8, 4and for a count in an SGPR, which must stay refused.When your draft is up, mention @Olima34 and we'll run it over our two boot sets (4,129 refused and 4,921 translated containers) and post the table.
@tiagonogueiraa-bit on GitHub · 2026-11-27 14:20 UTC · original
Widened to the wave64 form of the same prefix sums:
s_bitreplicate_b64_b32 exec, 0xff00ff00thens_bfm_b64 exec, 32, 32. That adds 2 shaders refused by name and 6 whose section values were unknown, which were refused later at a mask read. #365 now gains 17 compute shaders with no regressions.@LakshanSivakumar on GitHub · 2026-11-28 00:35 UTC · original
Thank you for the careful report and the PR. Both commits (s_bfm for the wave32 sums, s_bitreplicate for the wave64 form) are on main through #365. Your corpus sweep showed 17 more compute shaders translating, with no regressions and no changed outputs. I did not re-run the sweep and I have not seen these shaders work in the game, so this rests on your numbers. Closing as fixed. If one of the 10 shaders is still refused for s_bfm on
a6a58361, please tell me and I will reopen it.