A lightweight Python wrapper for a subset of SYCL.
Project description
Data Parallel Control
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-dpex
- that is part of a library, such as oneMKL
The dpctl
library is built upon the SYCL
standard. It implements Python
bindings for a subset of the standard runtime
classes that 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 library conforming to Python Array
API standard.
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.
Installing
You can install the library using conda or pip package managers. It is also available in the Intel(R) Distribution for Python (IDP).
Intel(R) oneAPI
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 AI Analytics Tookit to get IDP and
dpctl
.
Conda
To install dpctl
from the Intel(R) conda channel, use the following command:
conda install dpctl -c https://software.repos.intel.com/python/conda/ -c conda-forge
Pip
The dpctl
can be installed using pip
obtaining wheel packages either from PyPi or from Intel(R) channel.
To install dpctl
wheel package from Intel(R) channel, run the following command:
python -m pip install --index-url https://software.repos.intel.com/python/pypi dpctl
Installing the bleeding edge
To try out the latest features, install dpctl
from our
development channel on Anaconda cloud:
conda install dpctl -c dppy/label/dev -c conda-forge
Building
Refer to our Documentation for more information on
setting up a development environment and building dpctl
from the source.
Examples
Our examples are located in the examples/ folder and are organized in sub-folders. Examples in the Python/ folder demonstrate how to inspect the heterogeneous platform, select a device, create an execution queue, and how to control device memory allocation and execution placement.
Examples in Cython/, C/, and Pybind11 folders demonstrate creation of SYCL-powered native Python extensions. Please refer to each folder's README document for directions on how to build and use each example.
Running Tests
Tests are located in folder dpctl/tests.
To run the tests, use:
pytest --pyargs dpctl
Running full test suite requires working C/C++ compiler and installed Cython package. To run the test suite without these, use:
pytest --pyargs dpctl -k "not test_cython_api and not test_c_headers"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
File details
Details for the file dpctl-0.18.1-0-cp312-cp312-win_amd64.whl
.
File metadata
- Download URL: dpctl-0.18.1-0-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 32.0 MB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc6f97e5898f224e90030fd9b44c788dd0c6bf9985f1f3365185d7634196bfdf |
|
MD5 | a4f324319c7fd597986b73f8f5e712f6 |
|
BLAKE2b-256 | 35cc552b4d5e6bf3ae947927434200b411220bc9fb47fdc0e727c4ad39078519 |
File details
Details for the file dpctl-0.18.1-0-cp312-cp312-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: dpctl-0.18.1-0-cp312-cp312-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 33.5 MB
- Tags: CPython 3.12, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33d8dc60d10cf3815315b1ab0865e7b51333cb5ff6dec26f09b1eba41350310a |
|
MD5 | b52f8e5b74809169a3e8bc57e3de1783 |
|
BLAKE2b-256 | b8c6eca25937b2b0e75124163745612041a3b7f434053ad05a691f72cb1ee75e |
File details
Details for the file dpctl-0.18.1-0-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: dpctl-0.18.1-0-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 31.9 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89eab2d7602bbd171b0f4e5fd5217140fe8d2e90e2898cc2576c53e3bc7b6661 |
|
MD5 | 885ee5979aa518df0ab1a09c01841741 |
|
BLAKE2b-256 | 28bdee15ba356d81ef152e0fca2d7d6c8797a9d9990a5a33ac79ce35e7532e59 |
File details
Details for the file dpctl-0.18.1-0-cp311-cp311-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: dpctl-0.18.1-0-cp311-cp311-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 33.4 MB
- Tags: CPython 3.11, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d27092437673f227d0de1bd51362da12a483ce6a08fba82eabcb5d7ea1e0519 |
|
MD5 | 30f8ce8d209ab6706c83d1da71668473 |
|
BLAKE2b-256 | d1f71b25df6b5fa29f4973cbf9ed3bec386a88ea596b3c3117629845894c56c5 |
File details
Details for the file dpctl-0.18.1-0-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: dpctl-0.18.1-0-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 31.9 MB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ea7300a9ecbf21b9462e62ce99d7468249ba39d8462d6a0fb8cfd479c0f3db3 |
|
MD5 | eebe50309e04b1fe6751fe082847af36 |
|
BLAKE2b-256 | 1102004cb5daa37e80e938f8ba51df6864492e7a8a1f20f8b8115e16968bcf1c |
File details
Details for the file dpctl-0.18.1-0-cp310-cp310-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: dpctl-0.18.1-0-cp310-cp310-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 33.4 MB
- Tags: CPython 3.10, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20efb2d75e1f0ed8bc82c022eb74001cf811c0bb3a4a9969127c2198b3b7e756 |
|
MD5 | 38b1d2e4f589c2088daccb35e5c099d3 |
|
BLAKE2b-256 | 21ca70107277d19affa5dfa78c78e47739d2aaccb8ff77756c9ff894367a4e80 |
File details
Details for the file dpctl-0.18.1-0-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: dpctl-0.18.1-0-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 31.9 MB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0a94b6cbcddf3242d4357884f4f60eef611c4ed8ae315a72f7be980025b415c |
|
MD5 | f178b4ef63d13dd8f2467d4e450ae1a1 |
|
BLAKE2b-256 | 5226ab075866e5461411fb60ba2fa91d50ae2872c214ab56104811323bc87a61 |
File details
Details for the file dpctl-0.18.1-0-cp39-cp39-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: dpctl-0.18.1-0-cp39-cp39-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 33.4 MB
- Tags: CPython 3.9, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d2f97ffb996ce789ce7c19c5f45a07190f5ab08c54815edce5575661225f88c |
|
MD5 | 298fbb51265cf2f75d0cc0d085f46d77 |
|
BLAKE2b-256 | d1539dcb5470cb7df6b1ec9b1400aeebd4de13215a04dac0b4c3f02043ccfc66 |