DPNP – A NumPy-compatible library for SYCL-based devices¶
DPNP is a NumPy-like library accelerated with SYCL on Intel devices.
It provides Python interfaces for many NumPy functions, and includes a subset of methods of
Under the hood it is based on native C++ and oneMKL based kernels.
Being drop-in replacement for Numpy its usage is very similar to Numpy:
>>> import dpnp as np
>>> x = np.array([1, 2, 3])
x in the above example is an instance of
dpnp.ndarray that is created identically to
The key difference of
that the memory is allocated on Intel GPU when setting up
DPNP_QUEUE_GPU=1 in the environment.
Most of the array manipulations are also done in the way similar to NumPy such as:
>>> s = np.sum(x)
Please see the API Reference for the complete list of supported NumPy APIs along with their limitations.
- Installation Guide
- API Reference
- C++ backend API Reference
- DPCtl Usage