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

Workgroup size should never be larger than the capacity of the group #389

Open
pcwalton opened this issue Oct 24, 2024 · 1 comment
Open
Labels
A - shaders Compute and render shaders C - enhancement New feature or request

Comments

@pcwalton
Copy link
Contributor

We hard-code a workgroup size of 64, even if the group has capacity 1. This will always make 63 of the GPU threads go to waste. We should cap the workgroup size at the capacity.

@djeedai
Copy link
Owner

djeedai commented Oct 29, 2024

Good point. On the other hand, the hardware will never spawn less than its internal workgroup size limit, which is at least 32 for some vendors, and 64 for others. So the threads will go to waste either way. Having a hard-coded limit simplifies a tiny bit some places (hard-coded conversions, instead of having to inject a size).

@djeedai djeedai added C - enhancement New feature or request A - shaders Compute and render shaders labels Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A - shaders Compute and render shaders C - enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants