Git Product home page Git Product logo

dpctl's Introduction

Code style: black Imports: isort pre-commit Coverage Status Generate Documentation

About

oneAPI logo

Data Parallel Control (dpctl) is a Python library that allows a user to control the execution placement of a compute kernel on an XPU. The compute kernel can be either a code written by the user, e.g., using numba-dppy, or a code that is part of a library like oneMKL. The dpctl library is built upon the SYCL standard and implements Python bindings for a subset of the standard runtime classes that allow users to query platforms, discover and represent devices and sub-devices, and construct contexts and queues. In addition, dpctl features classes for SYCL Unified Shared Memory (USM) management and implements a tensor array API.

The library also assists 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 XPUs. The library is available via conda and pip. It is included in the Intel(R) Distribution for Python* (IDP).

Installing

From Intel oneAPI

dpctl is packaged as part of the quarterly Intel oneAPI releases. To get the library from the latest oneAPI release please follow the instructions from Intel's oneAPI installation guide. Note that you will need to install the Intel BaseKit toolkit to get IDP and dpctl.

From Conda

dpctl package is available on the Intel channel on Annaconda cloud. You an use the following to install dpctl from there:

conda install dpctl -c intel

From PyPi

dpctl is also available from PyPi and can be installed using:

pip3 install dpctl

Installing the bleeding edge

If you want to try out the current master, you can install it from our development channel on Anaconda cloud:

conda install dpctl -c dppy\label\dev

Building

Please refer our getting started user guide for more information on setting up a development environment and building dpctl from source.

Running Examples

See examples in folder examples.

Run python examples:

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

Examples of building Cython extensions with DPC++ compiler, that interoperate with dpctl can be found in folder cython.

Each example in cython folder can be built using CC=icx CXX=dpcpp python setup.py build_ext --inplace. Please refer to run.py script in respective folders to execute extensions.

Running Tests

Tests are located in folder dpctl/tests.

Run tests:

pytest --pyargs dpctl

dpctl's People

Contributors

1e-to avatar adarshyoga avatar andresguzman-ballen avatar densmirn avatar diptorupd avatar dmitrykizaev avatar drtodd13 avatar kirillyashin avatar ndgrigorian avatar npolina4 avatar oleksandr-pavlyk avatar pokhodenkosa avatar reazulhoque avatar samaid avatar vlad-perevezentsev avatar vyacheslav-smirnov avatar xaleryb 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.