-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Dispatch size exceeds WebGPU limits in Y or Z dimension #8373
Comments
Note: This same matrix multiplication operation works fine using the webgl backend. |
Hi @arcman7 , I've successfully replicated the issue you're experiencing and am seeing the same error. I'm currently investigating further and will update you with my findings as soon as possible. Thank You!! |
@shmishra99 Idk if this is useful to you or not, but in my own webGPU helper code I use something like this:
But then you still have to maintain properly calculating flat global ids wherever it applies. |
Hi, @arcman7 I apologize for the delayed response and it seems like there is maximum limit for
Case 01 : When I tried value less than or equal to Case 02 : When I tried value greater than to It seems like you'll have to use value less than or equal to Thank you for your cooperation and patience. |
Hi @gaikwadrahul8 it is my understanding that
You could just as well first divide N by the size of the workgroup (256 is the max) when N is greater than |
Please make sure that this is a bug. As per our
GitHub Policy,
we only address code/doc bugs, performance issues, feature requests and
build/installation issues on GitHub. tag:bug_template
System information
Describe the current behavior
When attempting to perform matrix multiplication using
tf.matMul(r, s)
where tensorr
has shape [1493284, 3, 3] and tensors
has shape [1493284, 3, 3], an error is thrown: "Dispatch size exceeds WebGPU limits in Y or Z dimension."The error occurs in the
reshapeDispatch
function of the WebGPU backend when it tries to handle a dispatch shape of [1, 1, 1493284].Describe the expected behavior
The matrix multiplication should be performed successfully without throwing an error related to dispatch size limits.
Standalone code to reproduce the issue
Other info / logs
The error is triggered by this assertion in the WebGPU backend code:
This occurs in the
reshapeDispatch
function, which is called to handle the dispatch shape [1, 1, 1493284] generated by the matrix multiplication operation.The full implementation of the
reshapeDispatch
function can be found at:https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-webgpu/dist/tf-backend-webgpu.js (around line 1252)
The text was updated successfully, but these errors were encountered: