Repository navigation
Flush subnormal inputs and results for RDNA2 legacy fused multiply-add - #1
Open
MichaelSmithAI wants to merge 2 commits into
Open
MichaelSmithAI wants to merge 2 commits into
MichaelSmithAI wants to merge 2 commits into
Conversation
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.
Lyrnc’s RDNA2 measurements found that both legacy fused multiply-add instructions flush subnormal inputs and results in both FP32 denormal modes. This follow-up to Marvisak#284 clears subnormal magnitudes with integer operations before the existing zero-factor handling and after the result selection. It preserves the sign bit when flushing. Ordinary FMA and the separate legacy multiply keep their existing lowering.
The Windows readback fixture exercises both opcodes, each factor and the addend, positive and negative subnormal results, and the minimum normal value. The fixture type-checked for Windows. All 57 Linux shader library tests passed, and Microsoft DXV accepted source-built shaders for both instructions.
The published fixture passed for both opcodes on an RTX 4090 through Wine and vkd3d-proton. A separate nine-case comparison per opcode checked signed underflow and the minimum normal value. All 18 words matched expected values on both this change and the parent lowering. This adapter therefore confirms the output but exhibits no before/after gain on these inputs. Both adapter selections used the same physical GPU. Windows-native readback of this change remains pending. The hardware differential numbers in the linked report were measured on the parent branch. AI-assisted implementation, testing and review.