Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Python SYCL bindings and SYCL-based Python Array API library

License

NotificationsYou must be signed in to change notification settings

IntelPython/dpctl

Code style: blackImports: isortpre-commitCoverage StatusGenerate DocumentationJoin the chat at https://matrix.to/#/#Data-Parallel-Python_community:gitter.imOpenSSF Scorecard

oneAPI logo

Data Parallel Control

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., usingnumba-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.

Installing

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).

Intel(R) oneAPI

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 anddpctl.

Conda

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

Pip

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

Installing the bleeding edge

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

Building

Refer to ourDocumentation for more information onsetting up a development environment and buildingdpctl from the source.

Examples

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.

Running Tests

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"

[8]ページ先頭

©2009-2025 Movatter.jp