https://github.com/IntelPython/numba-dpex
Data Parallel Extension for Numba
https://github.com/IntelPython/numba-dpex
intel-xpu numba python sycl
Last synced: about 2 months ago
JSON representation
Data Parallel Extension for Numba
- Host: GitHub
- URL: https://github.com/IntelPython/numba-dpex
- Owner: IntelPython
- License: apache-2.0
- Created: 2020-11-03T11:30:02.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-11-18T06:37:52.000Z (6 months ago)
- Last Synced: 2025-03-28T16:11:48.814Z (about 2 months ago)
- Topics: intel-xpu, numba, python, sycl
- Language: Python
- Homepage: https://intelpython.github.io/numba-dpex/
- Size: 38.7 MB
- Stars: 79
- Watchers: 12
- Forks: 32
- Open Issues: 103
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
- awesome-oneapi - numba-dpex - Numba dpex is an extension for the Numba Python JIT compiler that provides a kernel programming API and an offload feature. It supports devices including Intel CPUs, integrated GPUs, and discrete GPUs. (Table of Contents / Tools and Development)
README
[](https://github.com/psf/black)
[](https://coveralls.io/github/IntelPython/numba-dpex?branch=main)
[](https://github.com/pre-commit/pre-commit)
[](https://app.gitter.im/#/room/#Data-Parallel-Python_community:gitter.im)
[](https://scan.coverity.com/projects/intelpython-numba-dpex)
[](https://securityscorecards.dev/viewer/?uri=github.com/IntelPython/numba-dpex)![]()
Data Parallel Extension for Numba* (numba-dpex) is an open-source standalone
extension for the [Numba](http://numba.pydata.org) Python JIT compiler.
Numba-dpex provides a [SYCL*](https://sycl.tech/)-like API for kernel
programming Python. SYCL* is an open standard developed by the [Unified
Acceleration Foundation](https://uxlfoundation.org/) 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](https://www.khronos.org/spir/) intermediate representation format that
includes [OpenCL](https://www.khronos.org/opencl/) CPU (Intel, AMD) devices,
OpenCL GPU (Intel integrated and discrete GPUs) devices, and [oneAPI Level
Zero](https://spec.oneapi.io/level-zero/latest/index.html) 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](https://intelpython.github.io/numba-dpex/latest/supported_sycl_features.html)
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](https://github.com/IntelPython/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](https://github.com/IntelPython/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](https://intelpython.github.io/numba-dpex) 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](https://intelpython.github.io/numba-dpex/latest/getting_started.html)
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:```bash
python -m pytest --pyargs numba_dpex.tests
```## Conda
To install `numba_dpex` from the Intel(R) channel on Anaconda
cloud, use the following command:```bash
conda install numba-dpex -c conda-forge
```## Pip
The `numba_dpex` can be installed using `pip` obtaining wheel packages either from PyPi.
```bash
python -m pip install 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](https://app.gitter.im/#/room/#Data-Parallel-Python_community:gitter.im) room on Gitter.im.Also refer our [CONTRIBUTING](https://github.com/IntelPython/numba-dpex/blob/main/CONTRIBUTING.md) page.