- Notifications
You must be signed in to change notification settings - Fork31
Python SYCL bindings and SYCL-based Python Array API library
License
IntelPython/dpctl
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Data Parallel Control ordpctl is a Python library that allows userstocontrol the execution placement of acomputekernel on anXPU.
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
Thedpctl library is built upon theSYCLstandard. It implements Pythonbindings for a subset of the standardruntimeclasses that allow users to:
- query platforms
- discover and represent devices and sub-devices
- construct contexts and queues
dpctl features classes forSYCL Unified Shared Memory(USM)management and implements a tensor library conforming toPython ArrayAPI standard.
The library helps authors of Python native extensions writtenin C, Cython, or pybind11 to accessdpctl objects representing SYCLdevices, queues, memory, and tensors.
Dpctl is the core part of a larger family ofdata-parallel Pythonlibraries and toolsto program on XPUs.
You can install the library using conda (from Intel's channel - see instructions below) orpip package managers. It is also available in theIntel(R)Distribution forPython(IDP).
You can find the most recent release ofdpctl every quarter as part of the Intel(R) oneAPI releases.
To get the library from the latest oneAPI release, follow theinstructions from Intel(R)oneAPI installationguide.
NOTE: You need to install the Intel(R) oneAPI AI Analytics Tookit to getIDP and
dpctl.
To installdpctl from the Intel(R) conda channel, use the following command:
conda install dpctl -c https://software.repos.intel.com/python/conda/ -c conda-forge --override-channels
Thedpctl can be installed usingpip obtaining wheel packages either from PyPi or from Intel(R) channel.To installdpctl wheel package from Intel(R) channel, run the following command:
python -m pip install --index-url https://software.repos.intel.com/python/pypi dpctl
To try out the latest features, installdpctl from ourdevelopment channel on Anaconda cloud:
conda install dpctl -c dppy/label/dev -c conda-forge --override-channels
Refer to ourDocumentation for more information onsetting up a development environment and buildingdpctl from the source.
Our examples are located in theexamples/ folder and are organized in sub-folders. Examplesin thePython/ folder demonstrate how to inspect the heterogeneous platform,select a device, create an execution queue, and how to control device memory allocation andexecution placement.
Examples inCython/,C/, andPybind11 foldersdemonstrate creation of SYCL-powered native Python extensions. Please refer to each folder's READMEdocument for directions on how to build and use each example.
Tests are located in folderdpctl/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"About
Python SYCL bindings and SYCL-based Python Array API library
Topics
Resources
License
Code of conduct
Contributing
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
