-
Notifications
You must be signed in to change notification settings - Fork 29
Design dpctl classes corresponding to SYCL kernel argument types #71
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
Comments
@oleksandr-pavlyk need your help with designing this, especially how we can extend to support reduced precision types. |
@oleksandr-pavlyk adding you to help us design this feature. |
Does OpenCL or Level-Zero allow for arguments to be structs passed by values? |
Data types we have:
Numba -> Ctypes Ctypes -> DPCTLKernelArgType
DPCTLKernelArgType -> SYCL types |
The requested feature is no longer required in numba-dpex. Currently, in numba_dpex.experimental the Python interface of dpctl is no longer used to submit kernels. Instead we directly use libsyclinterface. |
Currently to submit (
SyclQueue.submit
) a kernel all scalar arguments for that kernel should be valid ctypes objects (e.g.ctypes.c_int
). InsideSyclQueue._populate_args
we have a if-elif statements to first cast the address of the ctypes object tovoid*
and also generate a DPPLKernelArgType enum value for the argument. The two things need to be done to callDPPLQueue_SubmitRange
andDPPLQueue_SubmitNdRange
A better design will be if we have the equivalent of
ctypes.c_xxx
classes defined in dpctl, e.g.dpctl.c_xxx
, and users cast the Python objects directly to the required dpctl type. The DPPLKernelArgType enum should then be a an attribute of the dpctl type that can be directly extracted without needed an extra switch. Moreover, users will want us to support other data types than just ctypes, e.g., numpy.dtypes.The design is also needed if we want to support reduced precision inside dpctl.
dpctl.c_xxx
data type classes.SyclQueue.submit
to usedpctl_.c_xxx
type instead ofctypes.c_xxx
.Related #72, #85
The text was updated successfully, but these errors were encountered: