Giter VIP home page Giter VIP logo

dpctl's Introduction

Code style: black Imports: isort pre-commit Coverage Status Generate Documentation Join the chat at https://matrix.to/#/#Data-Parallel-Python_community:gitter.im

oneAPI logo

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

Installing

You can install the library with conda and pip. It is also available in the Intel(R) Distribution for Python (IDP).

Inte(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 Basekit to get IDP and dpctl.

Conda

To install dpctl from the Intel(R) channel on Anaconda cloud, use the following command:

conda install dpctl -c intel

PyPi

To install dpctl from PyPi, run the following command:

pip3 install dpctl

Installing the bleeding edge

To try out the current master, install it from our development channel on Anaconda cloud:

conda install dpctl -c dppy\label\dev

Building

Refer to our Documentation for more information on setting up a development environment and building dpctl from the source.

Running Examples

Find our examples here.

To run these examples, use:

for script in `ls examples/python/`;
    do echo "executing ${script}";
    python examples/python/${script};
done

Cython extensions

See 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 --inplace

To execute extensions, refer to the run.py script in each folder.

Running Tests

Tests are located here.

To run the tests, use:

pytest --pyargs dpctl

dpctl's People

Contributors

oleksandr-pavlyk avatar diptorupd avatar pokhodenkosa avatar vlad-perevezentsev avatar npolina4 avatar ndgrigorian avatar reazulhoque avatar 1e-to avatar aepanchi avatar drtodd13 avatar xaleryb avatar vyacheslav-smirnov avatar dmitrykizaev avatar densmirn avatar andresguzman-ballen avatar jjerphan avatar adarshyoga avatar antonwolfy avatar kirillyashin avatar samaid avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.