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

extensions to webGPU strategies for hamming distance #183

Draft
wants to merge 1 commit into
base: 12-20-working_hamming_distance_transformation
Choose a base branch
from

Conversation

bmschmidt
Copy link
Collaborator

No description provided.

Copy link
Collaborator Author

bmschmidt commented Dec 20, 2024

}),
);

passEncoder.dispatchWorkgroups(size / 4 / 64);
Copy link

Choose a reason for hiding this comment

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

The workgroup dispatch calculation needs to handle input sizes that aren't multiples of 256 (the total threads per workgroup). Currently, integer division will round down and potentially skip processing the final partial workgroup. Using Math.ceil(size / 4 / 64) ensures all data is processed, even when the input size isn't perfectly aligned with the workgroup size.

Spotted by Graphite Reviewer

Is this helpful? React 👍 or 👎 to let us know.

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