Data Parallel Control or dpctl is a Python* library that allows users
to control the execution placement of a compute
kernel on an
XPU*.
The compute kernel can be a code:
- written by the user, e.g., using
numba-dppy - that is part of a library, such as oneMKL
The dpctl library is built upon the SYCL*
standard. It also implements Python
bindings for a subset of the standard runtime
classes.
Such classes allow users to:
- query platforms
- discover and represent devices and sub-devices
- construct contexts and queues
dpctl features classes for SYCL* Unified Shared Memory
(USM)
management and implements a tensor array
API.
The library helps authors of Python native extensions written
in C*, Cython*, or pybind11* to access dpctl objects representing SYCL*
devices, queues, memory, and tensors.
Dpctl is the core part of a larger family of data-parallel Python*
libraries and tools
to program on XPUs.
You can install the library with conda* and pip*. It is also available in the Intel(R) Distribution for Python* (IDP).
You can find the most recent release of dpctl every quarter as part of the Intel(R) oneAPI releases.
To get the library from the latest oneAPI release, follow the instructions from Intel(R) oneAPI installation guide.
NOTE: You need to install the Intel(R) oneAPI Base Toolkit to get IDP and
dpctl.
To install dpctl from the Intel(R) channel on Annaconda*
cloud, use the following command:
conda install dpctl -c intelTo install dpctl from PyPi*, run the following command:
pip3 install dpctlTo try out the current master, install it from our development channel on Anaconda* cloud:
conda install dpctl -c dppy\label\devRefer to our Documentation for more information on
setting up a development environment and building dpctl from the source.
Find our examples here.
To build these examples, run:
for script in `ls examples/python/`;
do echo "executing ${script}";
python examples/python/${script};
doneSee examples of building Cython* extensions with DPC++ compiler that interoperates
with dpctl in the cython folder.
To build these examples, run:
CC=icx CXX=dpcpp python setup.py build_ext --inplaceTo execute extensions, refer to the run.py script in each folder.
Tests are located here.
To run the tests, use:
pytest --pyargs dpctl