Skip to main content

An extension for Numba to add data-parallel offload capability

Project description

Code style: black Coverage Status pre-commit Join the chat at https://matrix.to/#/#Data-Parallel-Python_community:gitter.im oneAPI logo



Data-parallel Extension for Numba* (numba-dpex) is a standalone extension for the Numba Python JIT compiler. Numba-dpex provides a generic kernel programming API and an offload feature that extends Numba's auto-parallelizer to generate data-parallel kernels for parfor nodes.

Numba-dpex's kernel API has a design and API similar to Numba's cuda.jit module, but is based on the SYCL language. The code-generation for the kernel API currently supports SPIR-V-based OpenCL and oneAPI Level Zero devices that are supported by Intel® DPC++ SYCL compiler runtime. Supported devices include Intel&reg CPUs, integrated GPUs and discrete GPUs.

The offload functionality in numba-dpex is based on Numba's parfor loop-parallelizer. Our compiler extends Numba's parfor feature to generate kernels and offload them to devices supported by DPC++ SYCL compiler runtime. The offload functionality is supported via a new NumPy drop-in replacement library: dpnp and NumPy-based expressions and numba.prange loops are not offloaded.

Refer the documentation and examples to learn more.

Getting Started

Numba-dpex is part of the Intel® Distribution of Python (IDP) and Intel® oneAPI AIKit, and can be installed along with oneAPI. Additionally, we support installing it from Anaconda cloud. Please refer the instructions on our documentation page for more details.

Once the package is installed, a good starting point is to run the examples in the numba_dpex/examples directory. The test suite may also be invoked as follows:

python -m pytest --pyargs numba_dpex.tests

Conda

To install numba_dpex from the Intel(R) channel on Anaconda cloud, use the following command:

conda install numba-dpex -c intel -c conda-forge

Pip

The numba_dpex can be installed using pip obtaining wheel packages either from PyPi or from Intel(R) channel on Anaconda. To install numba_dpex wheel package from Intel(R) channel on Anaconda, run the following command:

python -m pip install --index-url https://pypi.anaconda.org/intel/simple numba-dpex

Contributing

Please create an issue for feature requests and bug reports. You can also use the GitHub Discussions feature for general questions.

If you want to chat with the developers, join the #Data-Parallel-Python_community room on Gitter.im.

Also refer our CONTRIBUTING page.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

numba_dpex-0.21.2-4-cp310-cp310-win_amd64.whl (286.6 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

numba_dpex-0.21.2-4-cp310-cp310-manylinux2014_x86_64.whl (289.9 kB view hashes)

Uploaded CPython 3.10

numba_dpex-0.21.2-4-cp39-cp39-win_amd64.whl (286.6 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

numba_dpex-0.21.2-4-cp39-cp39-manylinux2014_x86_64.whl (289.9 kB view hashes)

Uploaded CPython 3.9

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page