Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[0031] Preliminary Draft of the HLSL changes for CoopVec #432

Closed

Conversation

anupamachandra
Copy link
Contributor

This draft adds the various HLSL fuctions and classes in the dx.linalg space needed for the cooperative vector feature. This PR is a first draft with all these functions defined, not all the details are filled out.

@llvm-beanz llvm-beanz changed the title Preliminary Draft of the HLSL changes for CoopVec [0031] Preliminary Draft of the HLSL changes for CoopVec Mar 18, 2025
```

> Note we need to support RWByteAddressBuffer and ByteAddressBuffer if we want
to use MatrixRef for both Mul and OuterProductAccumulate. How do we do this?
Copy link
Collaborator

Choose a reason for hiding this comment

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

Curious for @tex3d's feedback here, but I wonder if we should have MatrixRef and RWMatrixRef as separate types to clarify usage and align with existing HLSL conventions?

The other approaches I can think of aren't particularly clean and would complicate our future desire to support separate compilation.


The base address of **Buffer** and the **StartOffset** must be 64 byte aligned.

`dx.linalg.InterpretedVector`
Copy link
Member

Choose a reason for hiding this comment

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

It's not clear to me that this is actually necessary. For input types that are converted to a destination type prior to math, specifying the conversion target as an "interpretation" is confusing - and also seems unnecessary given the lack of precision requirements. For input types that are bit-packed, HLSL has an explicit scalar type to use instead, e.g. uint8_t4_packed, which could then be composed as a native vector type without this kind of wrapper.

Copy link
Member

Choose a reason for hiding this comment

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

@damyanp
Copy link
Member

damyanp commented Mar 21, 2025

Moved to #439, where parts of this PR will be shamelessly included in that one.

@damyanp damyanp closed this Mar 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Triaged
Development

Successfully merging this pull request may close these issues.

4 participants