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
how to set gridSize and groupSize? #8404
Comments
Hi @wangzy0327, Thanks for the report. This seems like a bug to me: llvm/sycl/source/detail/error_handling/enqueue_kernel.cpp Lines 232 to 234 in 2d47764
If I read all those huge nested |
I think there is a bug in the code: sycl::range<3> dimGrid(1,1,16);
sycl::range<3> dimBlock(1,1,64); This is how CUDA specifies the range of a launch, but in SYCL you have to specify the total size of the range and the work-group size, as: sycl::range<3> dimGrid(1, 1, 16 * 64);
sycl::range<3> dimBlock(1, 1, 64); I think the DPC++ error message could definitely be clearer. It should probably say that the sizes don't divide evenly instead of referencing non-uniform work-group sizes. |
Is it right that "LocalExceedGlobal" is an error for any backend ? Thanks.
|
Yes. I fix the about the code .
The total size of the range is multiplication of the GridSize and the BlockSize.
|
Oh, thanks for pointing it out, @Pennycook. I don't have CUDA background, so I haven't even though to check which exact value passed where, as I assumed that bigger one is a global size
I took another look at the code and it is definitely me missing the fact that the function is only called after native API failed and not before we call to native API. So everything is correct there.
That is correct. From 4.9.4.2. SYCL functions for invoking kernels
If local exceeds global, it means that global is not evenly divisible by local, which is is incorrect in SYCL.
@wangzy0327, was your problem resolved with that fix? Can we close the issue? |
Describe the bug
As I use the gridSize and groupSize occurs Error as follow.
exception code : sycl:4 exception message : Non-uniform work-groups are not supported by the target device -54 (PI_ERROR_INVALID_WORK_GROUP_SIZE)
How to solve the problem ? how to set gridSize and groupSize?
To Reproduce
CMakeLists.txt
add_2.cc
Environment (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: