[HLSL] Map FP8 and packed 8-bit types for LinAlg matrix conversion - #8866
Merged
Jack Elliott (JoeCitizen) merged 1 commit intoSep 1, 2026
Merged
Conversation
toLinAlgDataType handled only F16, F32, I16, U16, I32 and U32, falling through to a VERIFY_IS_TRUE(false) for everything else. That made Convert_F16_ToE4M3FN_AndBack and Convert_F16_ToE5M2_AndBack fail outright: they never reached a capability query, and instead tripped the assert while still resolving which datatype to ask about. The function is a second, independent mapping of the same D3D12 enum that toCapabilityDataType already maps in full. queryConvertTypesSupport deliberately cross-checks the two against each other before issuing any query, so the incomplete one is what fires. That guard behaved correctly; the mapping behind it was simply missing entries. Add the four cases the other mapping already had: I8, U8, F8_E4M3FN and F8_E5M2. The enumerators are present in the D3D12 header and their values are already pinned against it by the ASSERT_RUNTIME_ENUM block, so the two mappings now agree by construction for every type either can be asked about. Both conversion tests pass on preview WARP rather than merely getting past the assert, so the FP8 round-trip oracle is exercising real converted values. Removing either new case individually returns exactly its own test to the original assert failure and leaves the other passing. I8 and U8 have no test reaching them today. They are included because leaving one mapping a strict subset of the other is what produced this bug, and a partial fix would leave the same trap set for the next type. Assisted-by: GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 83725f5d-8e98-4c1d-91ee-ad47629e007b
Contributor
There was a problem hiding this comment.
Pull request overview
Updates LinAlg test datatype conversion so FP8 and 8-bit integer cases reach capability queries correctly.
Changes:
- Maps I8/U8 to SINT8/UINT8.
- Maps both FP8 formats to their D3D12 equivalents.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Alex Sepkowski (alsepkow)
approved these changes
Aug 31, 2026
Damyan Pepper (damyanp)
approved these changes
Sep 1, 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.
toLinAlgDataTypemapped only six component types and hit a hardVERIFY_IS_TRUE(false)for the rest, which madeConvert_F16_ToE4M3FN_AndBackandConvert_F16_ToE5M2_AndBackfail while still working out which datatype to query about, before either capability query ran.Assisted-by: GitHub Copilot