numba_dpex package
Subpackages
- numba_dpex.core package
- Subpackages
- numba_dpex.core.datamodel package
- numba_dpex.core.kernel_interface package
- numba_dpex.core.parfors package
- numba_dpex.core.passes package
- numba_dpex.core.pipelines package
- numba_dpex.core.runtime package
- numba_dpex.core.targets package
- numba_dpex.core.typeconv package
- numba_dpex.core.types package
- numba_dpex.core.typing package
- numba_dpex.core.utils package
- Submodules
- numba_dpex.core.caching module
- numba_dpex.core.codegen module
- numba_dpex.core.compiler module
- numba_dpex.core.descriptor module
- numba_dpex.core.dpjit_dispatcher module
- numba_dpex.core.exceptions module
ExecutionQueueInferenceErrorIllegalRangeValueErrorInvalidKernelLaunchArgsErrorInvalidKernelSpecializationErrorKernelHasReturnValueErrorMissingSpecializationErrorSUAIProtocolErrorUncompiledKernelErrorUnknownGlobalRangeErrorUnmatchedNumberOfRangeDimsErrorUnreachableErrorUnsupportedBackendErrorUnsupportedCompilationModeErrorUnsupportedGroupWorkItemSizeErrorUnsupportedKernelArgumentErrorUnsupportedNumberOfRangeDimsErrorUnsupportedParforErrorUnsupportedWorkItemSizeError
- numba_dpex.core.itanium_mangler module
- Module contents
- Subpackages
- numba_dpex.dpctl_iface package
- numba_dpex.dpnp_iface package
- numba_dpex.numba_patches package
- numba_dpex.ocl package
- Subpackages
- Submodules
- numba_dpex.ocl.mathdecl module
MathModuleAttributeMath_acosMath_acoshMath_asinMath_asinhMath_atanMath_atan2Math_atanhMath_binaryMath_ceilMath_copysignMath_cosMath_coshMath_degreesMath_erfMath_erfcMath_expMath_expm1Math_fabsMath_floorMath_fmodMath_gammaMath_isinfMath_isnanMath_lgammaMath_logMath_log10Math_log1pMath_powMath_radiansMath_sinMath_sinhMath_sqrtMath_tanMath_tanhMath_truncMath_unary
- numba_dpex.ocl.mathimpl module
- numba_dpex.ocl.ocldecl module
OCL_local_arrayOCL_private_arrayOclAtomicTemplateOclLocalTemplateOclModuleTemplateOclPrivateTemplateOcl_atomic_addOcl_atomic_subOcl_barrierOcl_get_global_idOcl_get_global_sizeOcl_get_group_idOcl_get_local_idOcl_get_local_sizeOcl_get_num_groupsOcl_get_work_dimOcl_mem_fenceOcl_sub_group_barrier
- numba_dpex.ocl.oclimpl module
atomic_add()atomic_add_tuple()atomic_sub_tuple()atomic_sub_wrapper()barrier_no_arg_impl()barrier_one_arg_impl()dpex_local_array_integer()dpex_local_array_tuple()dpex_private_array_integer()dpex_private_array_tuple()get_global_id_impl()get_global_size_impl()get_group_id_impl()get_local_id_impl()get_local_size_impl()get_num_groups_impl()get_work_dim_impl()insert_and_call_atomic_fn()mem_fence_impl()native_atomic_add()sub_group_barrier_impl()
- numba_dpex.ocl.stubs module
- numba_dpex.ocl.mathdecl module
- Module contents
- numba_dpex.utils package
- Submodules
- Module contents
Submodules
Module contents
The numba-dpex extension module adds data-parallel offload support to Numba.
- class numba_dpex.Array(*args, **kwargs)
Bases:
ArrayAn array type for use inside our compiler pipeline.
- property box_type
Returns the Python type to box to.
- copy(dtype=None, ndim=None, layout=None, readonly=None, addrspace=None)
- is_precise()
Whether this type is precise, i.e. can be part of a successful type inference. Default implementation returns True.
- property key
A property used for __eq__, __ne__ and __hash__. Can be overridden in subclasses.
- class numba_dpex.DpctlSyclQueue(*args, **kwargs)
Bases:
TypeA Numba type to represent a dpctl.SyclQueue PyObject.
- property box_type
- property key
Returns a Python object used as the key to cache an instance of DpctlSyclQueue. The key is constructed by hashing the actual dpctl.SyclQueue object encapsulated by an instance of DpctlSyclQueue. Doing so ensures, that different dpctl.SyclQueue instances are inferred as separate instances of the DpctlSyclQueue type. Returns:
int: hash of the self._sycl_queue Python object.
- rand_digit_str(n)
- property sycl_device
Returns the SYCL oneAPI extension filter string associated with the queue.
- Returns:
str: A SYCL oneAPI extension filter string
- class numba_dpex.DpnpNdArray(*args, **kwargs)
Bases:
USMNdArrayThe Numba type to represent an dpnp.ndarray. The type has the same structure as USMNdArray used to represent dpctl.tensor.usm_ndarray.
- property is_internal
Sets the property so that DpnpNdArray expressions can be converted to Numba array_expression objects.
- Returns:
bool: Always returns True.
- class numba_dpex.NdRange(global_size, local_size)
Bases:
objectA class to encapsulate all kernel launch parameters.
The NdRange defines the index space for a work group as well as the global index space. It is passed to parallel_for to execute a kernel on a set of work items.
This class basically contains two Range object, one for the global_range and the other for the local_range. The global_range parameter contains the global index space and the local_range parameter contains the index space of a work group. This class mimics the behavior of sycl::nd_range class.
- get_global_range()
Returns a Range defining the index space.
- Returns:
Range: A Range object defining the index space.
- get_local_range()
Returns a Range defining the index space of a work group.
- Returns:
Range: A Range object to specify index space of a work group.
- property global_range
Accessor for global_range.
- Returns:
Range: The global_range Range object.
- property local_range
Accessor for local_range.
- Returns:
Range: The local_range Range object.
- class numba_dpex.Range(dim0, dim1=None, dim2=None)
Bases:
tupleA data structure to encapsulate a single kernel launch parameter.
The range is an abstraction that describes the number of elements in each dimension of buffers and index spaces. It can contain 1, 2, or 3 numbers, depending on the dimensionality of the object it describes.
This is just a wrapper class on top of a 3-tuple. The kernel launch parameter is consisted of three int’s. This class basically mimics the behavior of sycl::range.
- get(index)
Returns the range of a single dimension.
- Args:
index (int): The index of the dimension, i.e. [0,2]
- Returns:
int: The range of the dimension indexed by index.
- size()
Returns the size of a range.
Returns the size of a range by multiplying the range of the individual dimensions.
- Returns:
int: The size of a range.
- class numba_dpex.USMNdArray(*args, **kwargs)
Bases:
ArrayA type class to represent dpctl.tensor.usm_ndarray.
- property as_array
The equivalent array type, for operations supporting array-compatible objects (such as ufuncs).
- property box_type
Returns the Python type to box to.
- can_convert_to(typingctx, other)
Convert this USMNdArray to the other.
- copy(dtype=None, ndim=None, layout=None, readonly=None, addrspace=None, device=None, usm_type=None)
- property key
A property used for __eq__, __ne__ and __hash__. Can be overridden in subclasses.
- unify(typingctx, other)
Unify this with the other USMNdArray.
- numba_dpex.usm_ndarray
alias of
USMNdArray