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

Add header file to define cooperative matrices in spir-v #6720

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

s-perron
Copy link
Collaborator

This pr will introduce the HLSL standard header files. This will become the a
way to add new extensions to HLSL without having to make modifications to the
compiler.

This first example is a fairly complex example that demonstrates how to do a few
different things:

  1. Trying to create a simple class interface that allows the compiler to
    naturally enforce the validation rules. In this case, we might be more strict
    than the spir-v validation, but I believe this is still usable.
  2. How to create a builtin that can be expanded by the spir-v backend. The
    OpCooperativeMatrixLengthKHR instruction does not have an interface that is
    natural in a language like HLSL. However, we can define a function that is, and
    have the backend, make small adjustments. These cases should be avoided as much
    as possible.

@s-perron
Copy link
Collaborator Author

@EpicJeanNoeMorissette FYI: You said you were interested in seeing this when it was ready to be made public. This will probably still go through some changes before it is merged, but this is the vision I have.

Copy link
Contributor

github-actions bot commented Jun 28, 2024

✅ With the latest revision this PR passed the C/C++ code formatter.

@s-perron s-perron force-pushed the coop_matrix branch 4 times, most recently from cf7be64 to 9546037 Compare July 5, 2024 15:04
@s-perron s-perron force-pushed the coop_matrix branch 2 times, most recently from c71eb29 to 1e0ddd0 Compare July 18, 2024 12:54
@s-perron s-perron force-pushed the coop_matrix branch 2 times, most recently from ec32d8a to 1922a69 Compare July 31, 2024 18:51
@s-perron s-perron force-pushed the coop_matrix branch 3 times, most recently from 64f4aa6 to df118bc Compare August 21, 2024 17:30
@s-perron s-perron force-pushed the coop_matrix branch 4 times, most recently from 3028830 to b5403c4 Compare September 17, 2024 13:37
Implements [HLSL spec proposal 0021](https://github.com/microsoft/hlsl-specs/blob/9c42e278961dbf5b77d7d18b1e7ba7f6c0856154/proposals/0021-vk-coop-matrix.md)

This commit adds a header file to the HLSL Standard Header library to
implement cooperative matrices for SPIR-V. See the proposal for the
specifics of the interface, and design decisions.
@s-perron s-perron marked this pull request as ready for review September 20, 2024 19:49
@s-perron s-perron requested a review from a team as a code owner September 20, 2024 19:49
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.

2 participants