Repository navigation
perf(shader): convert one f16 value instead of an (x, 0.0) pair - #7698
Merged
oneandonlydean merged 1 commit intoOct 19, 2026
Merged
Conversation
ConvertF16F32 built an (x, 0.0) f32 pair and packed it, and unary f16 results (v_rcp_f16, v_sqrt_f16, ...) were packed with a 0.0 high half: the constant half went through the whole f32-to-f16 conversion each time, which without native f16 is a bit-level rounding sequence. Both now convert the one value; the high half of the bits is zero as before, so the results are the same. Test: agc_f16_single_convert recompiles four v_rcp_f16 with and without native f16 and requires no (x, 0.0) f32 pair; on main each case emits four. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XBXM4pgkMHYEtqN1EQni2P
|
This pull request is labeled |
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
This was referenced Oct 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
ConvertF16F32built an(x, 0.0)f32 pair and packed it. Unary f16 results (v_rcp_f16,v_sqrt_f16, ...) were also packed with a0.0high half. In both cases the constant half went through the whole f32-to-f16 conversion every time; without native f16 support, that is a bit-level rounding sequence of about twenty instructions. Both now convert only the one value. The high half of the bits is zero as before, so results do not change.Tested
Windows 11, MinGW GCC 15.2:
agc_f16_single_convert. It recompiles fourv_rcp_f16, once with and once without native f16 capabilities, and requires that no(x, 0.0)f32 pair is emitted. Onmain, each case emits four.ctest -R ^agc_on the RTX 4090: 727/728. The failure isagc_driver_bda_device, which fails onmaintoo.APS5_DUMP_SHADERSwere dispatched on synthetic guest memory withmainand with this change, and every byte they wrote was compared:This change makes modules smaller; its effect is on pipeline creation time, not on the steady-state frame. A warm-cache trace of this title cannot separate it from scene variance (see #7673 for the attempt).
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
https://claude.ai/code/session_01XBXM4pgkMHYEtqN1EQni2P