numba_dpex.compiler module
- class numba_dpex.compiler.DPPYCompiler(typingctx, targetctx, library, args, return_type, flags, locals)
Bases:
numba.core.compiler.CompilerBase
DPPY Compiler
- define_pipelines()
Child classes override this to customize the pipelines in use.
- class numba_dpex.compiler.DPPYFunction(cres)
Bases:
object
- class numba_dpex.compiler.DPPYFunctionTemplate(pyfunc, debug=None)
Bases:
object
Unmaterialized dppy function
- compile(args)
Compile the function for the given argument types.
Each signature is compiled once by caching the compiled function inside this object.
- class numba_dpex.compiler.DPPYKernel(context, sycl_queue, llvm_module, name, argtypes, ordered_arg_access_types=None)
Bases:
numba_dpex.compiler.DPPYKernelBase
A OCL kernel object
- check_for_invalid_access_type(access_type)
- class numba_dpex.compiler.DPPYKernelBase
Bases:
object
Define interface for configurable kernels
- configure(sycl_queue, global_size, local_size=None)
Configure the OpenCL kernel. The local_size can be None
- copy()
- class numba_dpex.compiler.JitDPPYKernel(func, debug, access_types)
Bases:
numba_dpex.compiler.DPPYKernelBase
- specialize(argtypes, queue)
- numba_dpex.compiler.compile_dppy_func(pyfunc, return_type, args, debug=None)
- numba_dpex.compiler.compile_dppy_func_template(pyfunc, debug=None)
Compile a DPPYFunctionTemplate
- numba_dpex.compiler.compile_kernel(sycl_queue, pyfunc, args, access_types, debug=None)
- numba_dpex.compiler.compile_kernel_parfor(sycl_queue, func_ir, args, args_with_addrspaces, debug=None)
- numba_dpex.compiler.compile_with_dppy(pyfunc, return_type, args, is_kernel, debug=None)
Compiles with numba-dpex’s pipeline and returns the compiled result.
- Args:
pyfunc: The Python function to be compiled. return_type: The Numba type of the return value. args: The list of arguments sent to the Python function. is_kernel (bool): Indicates whether the function is decorated
with @dppy.kernel or not.
debug (bool): Flag to turn debug mode ON/OFF.
- Returns:
cres: Compiled result.
- Raises:
- TypeError: @dppy.kernel does not allow users to return any
value. TypeError is raised when users do.
- numba_dpex.compiler.get_ordered_arg_access_types(pyfunc, access_types)