numba_dpex.kernel_api.launcher¶
Implementation of mock kernel launcher functions
Overview¶
|
Mocks the launching of a kernel function over either a Range or NdRange. |
Functions¶
- call_kernel(kernel_fn, index_range: Range | NdRange, *kernel_args)¶
Mocks the launching of a kernel function over either a Range or NdRange.
Important
The function is meant to be used only during prototyping a kernel_api function in Python. To launch a JIT compiled kernel, the
numba_dpex.core.kernel_launcher.call_kernel()
function should be used.- Parameters:
kernel_fn – A callable function object written using
numba_dpex.kernel_api
.index_range (Range|NdRange) – An instance of a Range or an NdRange object
kernel_args (List) – The expanded list of actual arguments with which to launch the kernel execution.
- Raises:
ValueError – If the first positional argument is not callable.
ValueError – If the second positional argument is not a Range or an Ndrange object