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

Work Group Size Error is Confusing #2985

Closed
mwalczyk opened this issue Aug 26, 2022 · 4 comments
Closed

Work Group Size Error is Confusing #2985

mwalczyk opened this issue Aug 26, 2022 · 4 comments
Labels
area: documentation Documentation for crate items, public or private good first issue Good for newcomers help required We need community help to make this happen. type: enhancement New feature or request

Comments

@mwalczyk
Copy link

I am working on a project involving a compute shader on MacOS and have set the local work group size in the shader like so:

@workgroup_size(8, 8, 8)

However, this results in an error that reads:

shader entry point current workgroup size [8, 8, 8] must be less or equal to [256, 256, 64] of total 256

After talking to some folks on Matrix, it seems that what the error is trying to say is: the total number of invocations in a work group cannot exceed 256. In my case, the total # of invocations is 8x8x8 = 512, which is greater than 256, so it fails to compile. I'm not sure how to best word the error message, but I think it's a little confusing as-is, since [8, 8, 8] is clearly less than [256, 256, 64] across all dimensions.

@kpreid
Copy link
Contributor

kpreid commented Aug 26, 2022

Idea for improvement: add "of total 512" to the first half — show the value derived from the input — so that it is immediately obvious what is too big because it parallels the second half specifying the limits.

"Total" doesn't seem like a great description but I don't have any suggestions I like very much. "Product" would specify how the number was gotten better? What if the dimensions were printed with "×"es between?

@cwfitzgerald cwfitzgerald added type: enhancement New feature or request help required We need community help to make this happen. good first issue Good for newcomers area: documentation Documentation for crate items, public or private labels Aug 29, 2022
@haraldreingruber
Copy link
Contributor

haraldreingruber commented Oct 15, 2022

I would like to fix this.

Building on top of the idea by @kpreid. Would a message like shader entry point current workgroup size [8, 8, 8] of total 512 must be less or equal to [256, 256, 64] and of total 256 be an improvement? @mwalczyk

By the way, I would be motivated to work on a few PRs for the Hacktoberfest challenge.
@cwfitzgerald would you be open to adding the “hacktoberfest” topic to the repo? https://hacktoberfest.com/participation/#maintainers

@haraldreingruber
Copy link
Contributor

I've went ahead and proposed #3139.

The idea from @kpreid is definitely an improvement to the current message. If anybody shares new ideas, we can improve further easily....

@haraldreingruber
Copy link
Contributor

This issue can be closed because #3139 was merged to master. @cwfitzgerald

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: documentation Documentation for crate items, public or private good first issue Good for newcomers help required We need community help to make this happen. type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants