You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The intrinsic functions in the kernel API are presently called using the numba_dpex module qualifier. It may be cleaner conceptually if these functions are moved to a sycl submodule. Doing so will help people to easily port SYCL kernels to dpex kernels.
E.g.,
from numba_dpex import sycl
@sycl.kernel
def vecadd(a,b,c):
i = sycl.get_global_id(0)
a[i] = b[i] + c[i]
Having the module qualifier is much better in terms of overall readability and letting users know that the code is specific to the numba_dpex kernel API and will not work outside of the kernel function or without the kernel decorator.
The submodule name should be workitem, rather than sycl, since the corresponding SYCL most aligns with
sycl::nd_item::get_global_id, especially considering that the same namespace is going to expose barrier and group.
diptorupd
changed the title
Move the kernel API intrinsic functions to a sycl submodule
Convert the kernel API oclimpl intrinsic functions to overloads and move into a submodule inside core
Jan 3, 2024
The intrinsic functions in the kernel API are presently called using the
numba_dpex
module qualifier. It may be cleaner conceptually if these functions are moved to asycl
submodule. Doing so will help people to easily port SYCL kernels todpex
kernels.E.g.,
Having the module qualifier is much better in terms of overall readability and letting users know that the code is specific to the numba_dpex kernel API and will not work outside of the kernel function or without the kernel decorator.
Originally posted by @diptorupd in #694 (comment)
The text was updated successfully, but these errors were encountered: