Skip to content

[0035] Address a few linalg typos and clarifications#800

Open
pow2clk wants to merge 2 commits intomicrosoft:mainfrom
pow2clk:linalg-fixes
Open

[0035] Address a few linalg typos and clarifications#800
pow2clk wants to merge 2 commits intomicrosoft:mainfrom
pow2clk:linalg-fixes

Conversation

@pow2clk
Copy link
Contributor

@pow2clk pow2clk commented Feb 18, 2026

Mostly changes the inlined header to be consistent with itself, other parts of the spec and other corrections for compilability

Finish update to SIZE_TYPE in header.
Remove unused IsNativeScalar boolean.
These finish the cleanups that #712 started to fix #570

Finish update to align mat/vec multiplies with coopvec spec. Finishes #741

Update mat/vec multiply operations to not take a scope parameter, limiting them to thread scope Fixes #797

Remove unused template type for accumulate() methods fixes #795

Renumbered componenttype enum to be consistent with internal numbers fixes #798

Removed latent p prefix to overload names of groupshared dxil ops for consistency. Corrects omission in #769 fixing #756

Corrected latent mention of linAlgMatrixMulOp

Mostly changes the inlined header to be consistent with itself, other parts of the spec and other corrections for compilability

Renames new vector types to not clash with previous spec in common header fixes microsoft#796

Finish update to SIZE_TYPE in header.
Remove unused IsNativeScalar boolean.
These finish the cleanups that microsoft#712 started to fix microsoft#570

Finish update to align mat/vec multiplies with coopvec spec. Finishes microsoft#741

Update mat/vec multiply operations to not take a scope parameter, limiting them to thread scope Fixes microsoft#797

Remove unused template type for accumulate() methods fixes microsoft#795

Renumbered componenttype enum to be consistent with internal numbers fixes microsoft#798

Added `p` prefix to overload names of groupshared dxil ops for consistency. Corrects typo in microsoft#769 fixing microsoft#756

Consolidated dxil op overloads that must be the same for correctness. This required reordering parameters in some cases to preserve in-order usage fixes microsoft#799

Corrected latent mention of linAlgMatrixMulOp
Revert changes to typenames in linalg.h meant to prevent clashing with coopvec as those types have been moved to another header.

Correct list of supported type enums and numbers.

Correct commas in dxil op parameter descriptions

Revert dxil intrinsics with always identical extended overloads to have an overload for each overloaded parameter.

Rmove .p overload types. Brings them into consitency by eliminating them all as agreed

template <ComponentEnum LHSTy, ComponentEnum RHSTy,
MatrixUseEnum UseLocal = Use>
template <ComponentEnum T, MatrixUseEnum UseLocal = Use>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
template <ComponentEnum T, MatrixUseEnum UseLocal = Use>
template <ComponentEnum ElTy, MatrixUseEnum UseLocal = Use>

I prefer to not use single-letter template argument names except in cases like the M, N, and K dimensions where the names directly match the documentation.

#define __MATRIX_SCALAR_COMPONENT_MAPPING(enum_val, type) \
template <> struct ComponentTypeTraits<enum_val> { \
using Type = type; \
static const bool IsNativeScalar = true; \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect we may need these since they may need these, so I'd rather not remove them at least yet.


## Appendix 1: HLSL Header

[Compiler Explorer](https://godbolt.org/z/habj4EnaW)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update this with the updated code?

F32 = 9,
F64 = 10,
PackedS8x32 = 17,
PackedU8x32 = 18,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On reflection, while I do think we should have the value of these enumerations match the DXIL constants, we should probably not include the Packed types here since they're not valid element types in the linalg templates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

3 participants