File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -459,8 +459,21 @@ def _create_sycl_range(self, idx_range):
459459 for rext in idx_range
460460 ]
461461
462- # we reverse the global range to account for how sycl and opencl
463- # range differs
462+ # Index inversion is done here as numba-dpex first compiles a native
463+ # kernel (OpenCL or Level Zero) and then generates a SYCL
464+ # interoperability kernel from it. The convention for unit stride
465+ # dimensions is opposite for OpenCL and SYCL
466+ # refer:
467+ # https://registry.khronos.org/SYCL/specs/sycl-2020/html/sycl-2020.html#sec:opencl:kernel-conventions-sycl
468+ # For this reason, although numba-dpex follows SYCL like indexing in
469+ # the kernel front-end while launching the kernel the indexing is
470+ # reversed.
471+ #
472+ # TODO[1]: It needs to be investigated if we need the index reversal
473+ # if we use SYCL-like LLVM IR indexing intrinsic instead of
474+ # OpenCL-like LLVM IR intrinsic functions.
475+ #
476+ # TODO[2]: Do we need to do this when the backend is LevelZero
464477 int64_range .reverse ()
465478
466479 return self ._create_ll_from_py_list (types .uintp , int64_range )
You can’t perform that action at this time.
0 commit comments