Skip to content

[HLSL] Add LinAlg runtime capability handling#8667

Draft
JoeCitizen wants to merge 5 commits into
microsoft:mainfrom
JoeCitizen:linalg-hlk-capability-handling
Draft

[HLSL] Add LinAlg runtime capability handling#8667
JoeCitizen wants to merge 5 commits into
microsoft:mainfrom
JoeCitizen:linalg-hlk-capability-handling

Conversation

@JoeCitizen

@JoeCitizen JoeCitizen commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add SDK-neutral wrappers for the LinAlg tier query and all six matrix-operation capability query categories
  • verify the private ABI mirror against preview D3D12 headers when available and reject normatively malformed successful responses
  • expose typed support predicates plus explicit mandatory/capability-gated applicability classification
  • gate CopyConvert_Wave_4x8_F32_Transpose using the advertised tier, source/destination MatrixConstruction minima, and the exact concrete wave size selected by the successful query

The inbox Windows SDK does not yet expose the Linear Algebra capability ABI. The runtime path therefore uses private test-only mirrors for feature IDs 77 and 78; preview-header builds activate size, alignment, offset, enum and feature-ID assertions so ABI drift fails compilation.

Unsupported capability-gated cases are skipped in focused developer runs. Under _HLK_CONF, reaching one is a failure because requirement/playlist applicability must have filtered it before execution. Existing mandatory F16 CopyConvert baselines remain ungated.

Validation

  • built the Release ExecHLSLTests target
  • passed LinAlgCapabilityTests::CapabilityPolicyAndPredicates
  • passed LinAlgCPUOracleTests::TypedMatrixBufferRoundTrip
  • passed the capability-gated 4x8 F32 transpose and both existing 16x16 F16 CopyConvert methods on WARP 1.65535.20-preview with D3D12 Agility SDK 1.721.2-preview and ExperimentalShaders=*
  • observed tier 0x10; the representative Float32/wave-4 MatrixConstruction query returned MinM=4, MinK=4, MinN=4, and the gated shader compiled with FORCED_WAVE_SIZE=4
  • compiled both changed implementation units against the preview SDK headers, activating all ABI assertions
  • clang-format 17.0.1, git diff --check, and focused correctness review pass

No physical GPU or HLK lab execution is claimed.

Stack

This draft is stacked on PR #8666, which is stacked on PR #8665 and PR #8662. Until those ancestors land, this diff contains their commits as well. The capability handling is commits 7439d3ded and 111c2a902; the follow-up pins the capability-gated shader to the exact queried wave size.

This is intentionally a draft for named human review. The reviewer should verify the test-only ABI mirror against the target preview SDK, the query-response invariants, and the _HLK_CONF applicability policy before requesting maintainer review.

Refs #7841
Refs #8647
Refs #8546

Assisted-by: GitHub Copilot

Jack Elliott and others added 4 commits July 23, 2026 14:52
Use the shared MatrixUse parameter for the OuterProduct result and set it to Accumulator, matching proposal 0035 and the public dx::linalg API. Add a host-side invariant to prevent the legacy A-use declaration from returning.

Assisted-by: GitHub Copilot

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 83725f5d-8e98-4c1d-91ee-ad47629e007b
Create SRV buffers without UAV flags and transition them for both pixel and non-pixel shader access. Use a direct resource-initialization list so the graphics-only pixel state is legal.

Assisted-by: GitHub Copilot

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 83725f5d-8e98-4c1d-91ee-ad47629e007b
Add typed F16, F32, I32, and U32 matrix data with safe byte encoding, rectangular row/column-major storage mapping, and explicit exact, permitted-result, or excluded comparison policy. Cover offsets and padded strides with independent host goldens, and migrate the existing CopyConvert tests onto the oracle.

Assisted-by: GitHub Copilot

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 83725f5d-8e98-4c1d-91ee-ad47629e007b
Add ABI-checked wrappers for the six D3D12 Linear Algebra capability
query categories and explicit applicability classification. Gate the
rectangular F32 CopyConvert case using concrete supported wave sizes.

Assisted-by: GitHub Copilot

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 83725f5d-8e98-4c1d-91ee-ad47629e007b
Compile capability-gated CopyConvert coverage at the exact wave size whose MatrixConstruction support was queried. Keep mandatory baseline cases on the existing ranged WaveSize attribute.

Assisted-by: GitHub Copilot

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 83725f5d-8e98-4c1d-91ee-ad47629e007b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

1 participant