Add packed integer dot product sample - #572
Merged
Merged
Conversation
kainino0x
requested changes
Sep 16, 2026
kainino0x
approved these changes
Sep 16, 2026
kainino0x
force-pushed
the
cc/dp4a-recovery-0915
branch
from
September 16, 2026 21:15
5bbef30 to
0495650
Compare
kainino0x
enabled auto-merge (squash)
September 16, 2026 21:15
kainino0x
disabled auto-merge
September 16, 2026 21:17
kainino0x
enabled auto-merge (squash)
September 16, 2026 21:39
Collaborator
|
Decided to add back a GUI to let people actually play with the inputs of the function, and remove the batched execution because there's just one input. It's a really barebones sample so will be interested still in replacing it at some point. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a small
dot4I8Packedcompute example toward #350.The sample packs four signed 8-bit components into each
u32, computes four example dot products, and reads the results back from the GPU. A dat.gui selector displays the input vectors and result for each example.It requires
packed_4x8_integer_dot_productand displays a requirement message when that WGSL language feature is unavailable. There is one packed compute pipeline, with no scalar fallback or in-sample result validation.Testing
--enable-unsafe-webgpu, on an Apple Metal adapter: all four examples returned the expected results, and the dat.gui selector was exercised.No new dependencies or external assets.