Skip to content
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

Convert the kernel API oclimpl intrinsic functions to overloads and move into a submodule inside core #795

Closed
Tracked by #1120
diptorupd opened this issue Oct 12, 2022 · 2 comments · Fixed by #1420
Labels
enhancement New feature or request
Milestone

Comments

@diptorupd
Copy link
Contributor

diptorupd commented Oct 12, 2022

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.

Originally posted by @diptorupd in #694 (comment)

@diptorupd
Copy link
Contributor Author

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.

Originally posted by @oleksandr-pavlyk in #694 (comment)

@diptorupd
Copy link
Contributor Author

Ongoing work in experimental addresses the issue.

@diptorupd diptorupd added this to the 0.22 milestone Dec 20, 2023
@diptorupd diptorupd added the enhancement New feature or request label Dec 20, 2023
@diptorupd 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
1 participant