numba_dpex.core.targets.dpjit_target¶
Defines the target and typing contexts for numba_dpex’s dpjit decorator.
Overview¶
Mark the target as CPU. |
|
Custom typing context to support dpjit compilation. |
|
Changes BaseContext calling convention |
Classes¶
- class Dpex¶
Bases:
numba.core.target_extension.CPU
Mark the target as CPU.
- class DpexTypingContext¶
Bases:
numba.core.typing.Context
Custom typing context to support dpjit compilation.
Overview
¶ Register dpjit specific functions like dpnp ufuncs.
Members
- load_additional_registries()¶
Register dpjit specific functions like dpnp ufuncs.
- class DpexTargetContext(typingctx, target=DPEX_TARGET_NAME)¶
Bases:
numba.core.cpu.CPUContext
Changes BaseContext calling convention
Overview
¶ init
()For subclasses to add initializer
dpexrt
()-
Load dpjit-specific registries.
get_ufunc_info
(ufunc_key)Get the ufunc implementation for a given ufunc object.
Members
- init()¶
For subclasses to add initializer
- dpexrt()¶
- load_additional_registries()¶
Load dpjit-specific registries.
- get_ufunc_info(ufunc_key)¶
Get the ufunc implementation for a given ufunc object.
The default implementation in BaseContext always raises a
NotImplementedError
exception. Subclasses may raiseKeyError
to signal that the givenufunc_key
is not available.- Parameters:
ufunc_key (NumPy ufunc)
- Returns:
res – A mapping of a NumPy ufunc type signature to a lower-level implementation.
- Return type:
dict[str, callable]
Attributes¶
- DPEX_TARGET_NAME = 'dpex'¶
- dpex_function_registry¶