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 Coverity Scan Build Status OpenSSF Scorecard oneAPI logo



Data Parallel Extension for Numba* (numba-dpex) is an open-source standalone extension for the Numba Python JIT compiler. Numba-dpex provides a SYCL*-like API for kernel programming Python. SYCL* is an open standard developed by the Unified Acceleration Foundation as a vendor-agnostic way of programming different types of data-parallel hardware such as multi-core CPUs, GPUs, and FPGAs. Numba-dpex's kernel-programming API brings the same programming model and a similar API to Python. The API allows expressing portable data-parallel kernels in Python and then JIT compiling them for different hardware targets. JIT compilation is supported for hardware that use the SPIR-V intermediate representation format that includes OpenCL CPU (Intel, AMD) devices, OpenCL GPU (Intel integrated and discrete GPUs) devices, and oneAPI Level Zero GPU (Intel integrated and discrete GPUs) devices.

The kernel programming API does not yet support every SYCL* feature. Refer to the SYCL* and numba-dpex feature comparison page to get a summary of supported features. Numba-dpex only implements SYCL*'s kernel programming API, all SYCL runtime Python bindings are provided by the dpctl package.

Along with the kernel programming API, numba-dpex extends Numba's auto-parallelizer to bring device offload capabilities to prange loops and NumPy-like vector expressions. The offload functionality is supported via the NumPy drop-in replacement library: dpnp. Note that dpnp and NumPy-based expressions can be used together in the same function, with dpnp expressions getting offloaded by numba-dpex and NumPy expressions getting parallelized by Numba.

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.23.0-5-cp311-cp311-win_amd64.whl (334.8 kB view details)

Uploaded CPython 3.11 Windows x86-64

numba_dpex-0.23.0-5-cp311-cp311-manylinux_2_28_x86_64.whl (325.1 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.28+ x86-64

numba_dpex-0.23.0-5-cp310-cp310-win_amd64.whl (334.8 kB view details)

Uploaded CPython 3.10 Windows x86-64

numba_dpex-0.23.0-5-cp310-cp310-manylinux_2_28_x86_64.whl (325.1 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.28+ x86-64

numba_dpex-0.23.0-5-cp39-cp39-win_amd64.whl (334.8 kB view details)

Uploaded CPython 3.9 Windows x86-64

numba_dpex-0.23.0-5-cp39-cp39-manylinux_2_28_x86_64.whl (325.1 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.28+ x86-64

File details

Details for the file numba_dpex-0.23.0-5-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for numba_dpex-0.23.0-5-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 75c33d768ee7b5a551370d256d404d27140437e13c3df9ead0dabfb591a54811
MD5 899aab66ec3f0bd30be27f6dab451c6a
BLAKE2b-256 a7a01db3816a85b435f5e5e259c4b72de0c90825f38065eaab7d0252385d49ab

See more details on using hashes here.

File details

Details for the file numba_dpex-0.23.0-5-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for numba_dpex-0.23.0-5-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3411962fc7d20cdf639aa698a6289033fd133b8122f5cfb4208e597e22aa578d
MD5 37b6c4b3b965d640eb6571214657412e
BLAKE2b-256 bf2d06d48c45dbdc9f6f82dd659176c7b78afdd577f9e3004d03b8b84cc4c74a

See more details on using hashes here.

File details

Details for the file numba_dpex-0.23.0-5-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for numba_dpex-0.23.0-5-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 69ba20cd89c3a03aab1cf62a62a861bf4c079221426bf1fc006a655fe5abb324
MD5 c1d8b998b4cce2ad53feabe830483059
BLAKE2b-256 327ed7492bdff66d1eca3be947b052853b2dec68cdb6c91edf7350cc7fc7eab3

See more details on using hashes here.

File details

Details for the file numba_dpex-0.23.0-5-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for numba_dpex-0.23.0-5-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b0552d23339f60277d3b700b9b23a3b5166b5476ac34fade2e9011a5d6696938
MD5 fedc9e50c82a10e1d929fb7242b05c88
BLAKE2b-256 a5c69e99e3ccf31307eaf7be35a3342a4dbc7156b67317a3583b4a12db51fe24

See more details on using hashes here.

File details

Details for the file numba_dpex-0.23.0-5-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for numba_dpex-0.23.0-5-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 d9f3ef86fc007e7761a92f55b440a93d61c3161c8e289f706c13e6714de406d8
MD5 e9c348d02de8f4b78e14f70734381355
BLAKE2b-256 17645167d4ab0723ace85c7416dcc109daa5104f4c11f74352e3d1d8c839f1d0

See more details on using hashes here.

File details

Details for the file numba_dpex-0.23.0-5-cp39-cp39-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for numba_dpex-0.23.0-5-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b338b114b9eab965fda6bb166caf9041049c3e47d33dcf470a3bd420f9022f2e
MD5 5fc920aa3815714846a7e78a8e6be132
BLAKE2b-256 2f32041c4b8f4c523582ddfce4b85f6ca11b29187feb8838e876bcb9c2b9ec47

See more details on using hashes here.

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