[HLSL] Add CopyConvert and Convert coverage for LinAlg - #8772
Merged
Jack Elliott (JoeCitizen) merged 1 commit intoAug 14, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds cross-component LinAlg execution coverage for CopyConvert and Convert.
Changes:
- Tests F16/F32 matrix conversion, transpose, and source preservation.
- Tests integer RTNE/saturation and both FP8 formats.
- Adds capability selection and host-side conversion oracles.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Jack Elliott (JoeCitizen)
force-pushed
the
linalg-hlk-convert-copyconvert
branch
from
August 13, 2026 22:58
2e1a252 to
73246d7
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Suppressed comments (2)
tools/clang/unittests/HLSLExec/LinAlgTests.cpp:2339
- The PR description promises six cross-component tests covering both FP8 formats, but only four tests are registered here, and none of the added test shaders invokes
ConvertwithF8_E4M3FNorF8_E5M2. The advertised FP8 encode/decode coverage is therefore missing; please add and register those cases with the independent host inputs described in the PR, or revise the stated scope if they were intentionally dropped.
// CopyConvert / Convert coverage
TEST_METHOD(CopyConvert_Wave_4x8_F16_ToF32);
TEST_METHOD(CopyConvert_Wave_4x8_F32_ToF16_Transpose);
TEST_METHOD(Convert_I16_ToI32_Exact);
TEST_METHOD(Convert_F32_ToI16_RTNE_Saturate);
tools/clang/unittests/HLSLExec/LinAlgTests.cpp:5287
- These declarations mirror an unreleased D3D12 ABI outside the repository's dedicated
linalg_abicompatibility layer, and the assertions below check only total size. An SDK change that preserves size but changes alignment or field offsets would compile and then pass malformed data toCheckFeatureSupport.HlslExecTestUtils.h:169-239establishes the convention of pinning mirrored types by enum value, size, alignment, and every field offset; please add these feature/enumeration definitions and checks there as well.
struct ConvertThreadVectorMatrixMultiplyEnumeration {
UINT OperationType;
UINT NumEntries;
ConvertThreadVectorMatrixMultiplyEntry *ThreadVectorMatrixMultiply;
};
Damyan Pepper (damyanp)
left a comment
Member
There was a problem hiding this comment.
Mainly LGTM, but there are some coding guidelines not being followed that we should get addressed and teach the agent about before merging.
Alex Sepkowski (alsepkow)
approved these changes
Aug 14, 2026
Exercise cross-component CopyConvert at one advertised wave size and read back the source matrix to catch destructive implementations. Rectangular and transposed cases make the destination shape and stride observable. Add exact I16 widening and F32-to-I16 RTNE/saturation vectors. Gate each Convert direction on native HLSL source support and destination VectorInputType advertisement, with a granular-query fallback for _1 drivers. Dispatch the element-wise Convert shaders as a single thread. FP8 coverage is held back for a follow-up change. The earlier gate asked for FP8 matrix construction, which WARP does not advertise, so the FP8 cases skipped and never ran. The corrected gate makes them executable and they fail, so landing them separately keeps this change green and lets that result be triaged on its own. Assisted-by: GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 83725f5d-8e98-4c1d-91ee-ad47629e007b
Jack Elliott (JoeCitizen)
force-pushed
the
linalg-hlk-convert-copyconvert
branch
from
August 14, 2026 19:51
73246d7 to
6b63697
Compare
Alex Sepkowski (alsepkow)
approved these changes
Aug 14, 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.
Proposal 0035 specifies
CopyConvertas a converting copy between matrix layouts andConvertas an element-wise conversion with RTNE and saturation. Neither had cross-component coverage.These four tests convert between component types at one advertised wave size and read the source matrix back so a destructive implementation is caught. Rectangular and transposed cases make the destination shape and stride observable. Expected values are derived on the host: exact I16 widening, and hand-derived RTNE and saturation vectors for F32 to I16.
FP8 coverage is held back for a follow-up. The gate here now asks whether a destination type is advertised as a vector input rather than whether FP8 matrices can be constructed. That is the right question, but it also makes the FP8 cases executable on WARP, where they fail. That result deserves its own change rather than being buried in this one.