numba_dpex.vectorizers module

Provide @vectorize(target=”dppy”) support.

class numba_dpex.vectorizers.DPPYUFuncDispatcher(types_to_retty_kernels)

Bases: object

Invoke the dppy ufunc specialization for the given inputs.

reduce(arg, queue=0)
class numba_dpex.vectorizers.DPPYUFuncMechanism(typemap, args)

Bases: numba.np.ufunc.deviceufunc.UFuncMechanism

Mechanism to process Input to a SYCL kernel and launch that kernel

as_device_array(obj)

Convert the obj to a device array Override in subclass

Default implementation is an identity function

broadcast_device(ary, shape)

Handles ondevice broadcasting

Override in subclass to add support.

classmethod call(typemap, args, kws)

Perform the entire ufunc call mechanism. Args:

typemap (dict): Signature mapped to kernel. args: Arguments to the @vectorize function. kws (optional): Optional keywords. Not supported.

device_array(shape, dtype, queue)

Implements device allocation Override in subclass

is_device_array(obj)

Is the obj a device array? Override in subclass

is_host_array(obj)
launch(func, count, queue, args)

Implements device function invocation Override in subclass

to_device(hostary, queue)

Implement to device transfer Override in subclass

to_host(devary, queue)

Implement to host transfer Override in subclass

class numba_dpex.vectorizers.DPPYVectorize(func, identity=None, cache=False, targetoptions={})

Bases: numba.np.ufunc.deviceufunc.DeviceVectorize

build_ufunc()