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 SPIR-V testing for integer dot products #2258

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

Conversation

bashbaug
Copy link
Contributor

@bashbaug bashbaug commented Feb 2, 2025

This PR adds testing for integer dot products via SPIR-V rather than via OpenCL C. The overall logic for this test largely follows the same testing logic as the test_integer_ops test.

The test checks SPIR-V modules using both the SPV_KHR_integer_dot_product extension (works with any SPIR-V version) and SPIR-V 1.6, without the SPV_KHR_integer_dot_product extension.

All of the 64-bit non-saturating accumulation cases appear to be working.
@bashbaug
Copy link
Contributor Author

bashbaug commented Feb 2, 2025

Note: The majority of the changes are all of the different permutations of SPIR-V files:

  • There are two different combinations of SPIR-V files that are supported: SPV_KHR_integer_dot_product and SPIR-V 1.6.
  • There are three different type combinations that are supported: U, S, and SU.
  • There are two different opcodes that are tested: OpXDot and OpXDotAccSat.
  • There are two different operand types that are supported: 4 x 8-bit vectors and packed 32-bit integers.
  • There are two different bit widths that are supported: 64-bit and 32-bit.

Right now, each permutation is in a separate file, so there are a total of 2 x 3 x 2 x 2 x 2 = 48 different SPIR-V files.

I want a separate kernel for each test scenario, but I can try to consolidate similar variants into the same file, if desired. Is this worthwhile?

@bashbaug bashbaug mentioned this pull request Jan 31, 2025
6 tasks
@svenvh svenvh self-requested a review February 3, 2025 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant