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.CPUMark the target as CPU.
- class DpexTypingContext#
Bases:
numba.core.typing.ContextCustom typing context to support dpjit compilation.
Overview
Methods# 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.CPUContextChanges BaseContext calling convention
Overview
Methods# 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
NotImplementedErrorexception. Subclasses may raiseKeyErrorto signal that the givenufunc_keyis 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#