-
Notifications
You must be signed in to change notification settings - Fork 408
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
UB when using desul's array lock on SYCL with RangePolicy #6745
Comments
Yes, that's difficult to work around if we still want the runtime to find a good workgroup size. I'm not sure if this is causing any real issues yet, though. |
Was there a good reason for this restriction anyway? |
I'd speculate that Tagging @rarutyun @Pennycook @steffenlarsen @gmlueck for the actual reasoning behind specification. |
This is correct. A DPC++ has an extension that enables you to request the ND-range execution model but using a runtime-provided size: q.parallel_for(sycl::nd_range<1>{{N}, sycl::ext::oneapi::experimental::auto_range<1>()}, [=](sycl::nd_item<1>) {
/* kernel body */
}); It's safe to use this extension in conjunction with the free-function queries. |
Even better! Let me update accordingly then. |
I would still be very careful here. If range size is a prime number, I'd expect an |
It appears that this feature isn't available with the compiler drops on the Argonne tests beds yet. So we'll have to wait some.
It seems that we would possibly have worse performance for a |
Range-rounding is disabled for ND-range kernels for exactly this reason. Rounding an ND-range would effectively mean that all uses of groups and sub-groups were UB, not just uses with the free functions.
If you don't do any checks of your loop bound, then I agree this is possible. Because the work-group size selected by an If you're talking about cases where |
This test:
kokkos/core/unit_test/TestAtomics.hpp
Lines 537 to 538 in 2dc7cbc
ultimately ends enqueued via SYCL's
range
version ofparallel_for
(vs.nd_range
being an alternative).desul's implementation at https://github.com/desul/desul/blob/fd6cd0639863a48ae0c57ed5db286955d6a412e2/atomics/include/desul/atomics/Lock_Based_Fetch_Op_SYCL.hpp#L35 uses https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/experimental/sycl_ext_oneapi_free_function_queries.asciidoc extension that specifies in https://github.com/intel/llvm/blob/f694c841e234835bc08578c905b7e904a1a57b4b/sycl/doc/extensions/experimental/sycl_ext_oneapi_free_function_queries.asciidoc?plain=1#L199-L209 that
The text was updated successfully, but these errors were encountered: