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
numba-dpex.kernel decorated functions use the numba_dpex.core.kernel_interface.dispacther.JitKernel class to dispatch kernel functions. The JitKernel class does not derive from Numba's Dispatcher leading to various limitations, such as:
Overloads cannot be defined in the DpexKernelTarget
Kernel functions cannot be called from dpjit
All the kernel submit and unbox/box of arguments logic is in Python.
The issue is to track changing the JitKernel class into a proper Dispatcher object.
List of changes that should be completed:
Add a KernelDispatcher class that derives from numba.dispatcher.Dispatcher.
Modify the kernel decorator to create an instance of the KernelDispatcher class rather than the JitKernel class.
Override the compile method of the KernelDispatcher. The overridden method will generate a host wrapper function that uses the SPIR-V bitcode compiled for the kernel and generates a sycl::KernelBundle and launches it.
Implement a cpu/host dpjit wrapper function to call kernels.
Implement a step in the compilation pass where all functions in the kernel library (overloads, intrinsics) are linked together at the bitcode level using llvm-link and then fully inlined.
Implement specialization of kernels in the new dispatcher.
Marking the issue as completed barring the two pending tasks #795 and #1197. The remaining work can be tracked separately from the main task of creating a new Dispatcher for numba_dpex kernel.
numba-dpex.kernel
decorated functions use thenumba_dpex.core.kernel_interface.dispacther.JitKernel
class to dispatch kernel functions. TheJitKernel
class does not derive from Numba'sDispatcher
leading to various limitations, such as:DpexKernelTarget
dpjit
The issue is to track changing the
JitKernel
class into a properDispatcher
object.List of changes that should be completed:
KernelDispatcher
class that derives fromnumba.dispatcher.Dispatcher
.kernel
decorator to create an instance of theKernelDispatcher
class rather than theJitKernel
class.compile
method of theKernelDispatcher
. The overridden method will generate a host wrapper function that uses the SPIR-V bitcode compiled for the kernel and generates asycl::KernelBundle
and launches it.numba_dpex.experimental.dispatcher.KernelDispatcher
class. #1197func
decorator to use theKernelDispatcher
class. #1211pylint
in thenumba_dpex.experimental
module. #1196new_style
errors. #1195The text was updated successfully, but these errors were encountered: