Getting Started

Installation

numba-dppy depends on following components:

It is recommended to use conda packages from Intel Distribution for Python channel or anaconda.org/intel channel. Intel Distribution for Python is available from Intel oneAPI.

Create conda environment:

export ONEAPI_ROOT=/opt/intel/oneapi
conda create -n numba-dppy-env numba-dppy dpnp -c ${ONEAPI_ROOT}/conda_channel

Build and Install Conda Package

Create and activate conda build environment:

conda create -n build-env conda-build
conda activate build-env

Set environment variable ONEAPI_ROOT and build conda package:

export ONEAPI_ROOT=/opt/intel/oneapi
conda build conda-recipe -c ${ONEAPI_ROOT}/conda_channel

Install conda package:

conda install numba-dppy

Build and Install with setuptools

setup.py requires environment variable ONEAPI_ROOT and following packages installed in conda environment:

export ONEAPI_ROOT=/opt/intel/oneapi
conda create -n numba-dppy-env -c ${ONEAPI_ROOT}/conda_channel python=3.7 dpctl dpnp numba spirv-tools llvm-spirv llvmdev cython pytest
conda activate numba-dppy-env

Activate DPC++ compiler:

source ${ONEAPI_ROOT}/compiler/latest/env/vars.sh

For installing:

python setup.py install

For development:

python setup.py develop

Testing

See folder numba_dppy/tests.

To run the tests:

python -m pytest --pyargs numba_dppy.tests

Examples

See folder numba_dppy/examples.

To run the examples:

python numba_dppy/examples/sum.py

Limitations

Using numba-dppy requires Intel Python Numba as that version of Numba has patches needed to recognize a dpctl.device_context scope and trigger code-generation for a SYCL device. Work in underway to upstream all patches, so that in future numba-dppy can work with upstream Numba.