numba_dpex.core.types.kernel_api.local_accessor

Overview

Classes

DpctlMDLocalAccessorType

numba-dpex internal type to represent a dpctl SyclInterface type

LocalAccessorType

numba-dpex internal type to represent a Python object of

Function

unbox_local_accessor(typ, obj, c)

Unboxes a Python LocalAccessor PyObject* into a numba-dpex internal

Classes

class DpctlMDLocalAccessorType

Bases: numba.core.types.Type

numba-dpex internal type to represent a dpctl SyclInterface type MDLocalAccessorTy.

class LocalAccessorType(ndim, dtype)

Bases: numba_dpex.core.types.USMNdArray

numba-dpex internal type to represent a Python object of numba_dpex.experimental.kernel_iface.LocalAccessor.

Overview

Methods

cast_python_value(args)

abc The helper function is not overloaded and using it on the

Members

abstract cast_python_value(args)

The helper function is not overloaded and using it on the LocalAccessorType throws a NotImplementedError.

Functions

unbox_local_accessor(typ, obj, c)

Unboxes a Python LocalAccessor PyObject* into a numba-dpex internal representation.

A LocalAccessor object is represented internally in numba-dpex with the same data model as a numpy.ndarray. It is done as a LocalAccessor object serves only as a placeholder type when passed to call_kernel and the data buffer should never be accessed inside a host-side compiled function such as call_kernel.

When a LocalAccessor object is passed as an argument to a kernel function it uses the USMArrayDeviceModel. Doing so allows numba-dpex to correctly generate the kernel signature passing in a pointer in the local address space.