Skip to content

[SM6.10] Update LinAlg Matrix ComponentType enum#8298

Open
hekota wants to merge 2 commits intomicrosoft:mainfrom
hekota:linalg-comptype-reduce
Open

[SM6.10] Update LinAlg Matrix ComponentType enum#8298
hekota wants to merge 2 commits intomicrosoft:mainfrom
hekota:linalg-comptype-reduce

Conversation

@hekota
Copy link
Member

@hekota hekota commented Mar 26, 2026

Component types valid for LinAlg Matrix are a subset of existing DXIL component type constants.

Spec: LinAlg hlsl-header

Part of #7839

Component types valid for LinAlg Matrix are a subset of existing DXIL component type constants.
@hekota hekota requested a review from V-FEXrt March 26, 2026 19:56
@hekota hekota changed the title [SM6.10] Update LinAlg Matrix ComponentType definition [SM6.10] Update LinAlg Matrix ComponentType enum Mar 26, 2026

namespace dxil {

// This enum is be _exactly_ the DXIL constants.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// This enum is be _exactly_ the DXIL constants.
// This enum must _exactly_ match the DXIL constants.

Copy link
Member

Choose a reason for hiding this comment

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

Although.....is this really a thing we want in the user-visible header?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Not sure what we can actually do here to make this better but I had a similar thought. Would be nice if we could magically depend on the C++ version of the header but that doesn't really make sense

Copy link
Member

Choose a reason for hiding this comment

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

IMO the values happening to match DXIL is an implementation detail that wouldn't necessarily hold / make sense with a SPIRV implementation.

Copy link
Collaborator

Choose a reason for hiding this comment

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

In this case, the spec mandates that they match! We might change that for SPIRV but at least for now I'm not sure I'd call it an implementation detail

__COMPONENT_TYPE(F16),
__COMPONENT_TYPE(F32),
__COMPONENT_TYPE(F64),
};
Copy link
Member

Choose a reason for hiding this comment

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

#undef __COMPONENT_TYPE

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.

3 participants