Replies: 2 comments
-
I think we cannot. It is not only dimensions values are important, but also dimension id (0, 1, 2). Reverting range we can modify values but not ids. If I'm right using |
Beta Was this translation helpful? Give feedback.
-
Just to add on what I grasp of benefits for performance: there's how the The same is somewhat true at the work-group level, maybe anticipating in what order the work groups are dispatched can help with cache optimization. |
Beta Was this translation helpful? Give feedback.
-
The semantics of
numba_dpex.get_global_id
,numba_dpex.get_local_id
is relatively undocumented and can cause users to make incorrect assumptions about indexing order and run into performance/correctness issues.Refer: #941, #889
The problem stems from numba-dpex generating an OpenCL or Level Zero interoperability kernel rather than a SYCL kernel. Per the SYCL spec the indexing of SYCL and OpenCL have different orders, refer: https://registry.khronos.org/SYCL/specs/sycl-2020/html/sycl-2020.html#sec:opencl:kernel-conventions-sycl.
Thus, users programming a dpex kernel assuming that the indexing runs in SYCL/C++ order run into issues, as dpex really uses OpenCL's versions of these functions.'
#274 captures the initial aspect of what needs to be done. I am opening the discussion to capture both requirement and design ideas on how the numba_dpex indexing semantics should be fixed and aligned with SYCL irrespective of the backend selected.
Beta Was this translation helpful? Give feedback.
All reactions