dpctl


Namedpctl JSON
Version 0.16.0 PyPI version JSON
download
home_pagehttps://github.com/IntelPython/dpctl
SummaryA lightweight Python wrapper for a subset of SYCL.
upload_time2024-03-26 22:33:01
maintainerNone
docs_urlNone
authorIntel Corporation
requires_pythonNone
licenseApache 2.0
keywords dpctl
VCS
bugtrack_url
requirements setuptools cython numpy wheel
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
[![Coverage Status](https://coveralls.io/repos/github/IntelPython/dpctl/badge.svg?branch=master)](https://coveralls.io/github/IntelPython/dpctl?branch=master)
![Generate Documentation](https://github.com/IntelPython/dpctl/actions/workflows/generate-docs.yml/badge.svg?branch=master)
[![Join the chat at https://matrix.to/#/#Data-Parallel-Python_community:gitter.im](https://badges.gitter.im/Join%20Chat.svg)](https://app.gitter.im/#/room/#Data-Parallel-Python_community:gitter.im)
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/IntelPython/dpctl/badge)](https://securityscorecards.dev/viewer/?uri=github.com/IntelPython/dpctl)

<img align="left" src="https://spec.oneapi.io/oneapi-logo-white-scaled.jpg" alt="oneAPI logo" width="75"/>

# Data Parallel Control

Data Parallel Control or `dpctl` is a Python library that allows users
to *control* the execution placement of a [compute
kernel](https://en.wikipedia.org/wiki/Compute_kernel) on an
[XPU](https://www.intel.com/content/www/us/en/newsroom/news/xpu-vision-oneapi-server-gpu.html).

The compute kernel can be a code:
* written by the user, e.g., using [`numba-dpex`](https://github.com/IntelPython/numba-dpex)
* that is part of a library, such as oneMKL

The `dpctl` library is built upon the [SYCL
standard](https://www.khronos.org/sycl/). It implements Python
bindings for a subset of the standard [runtime
classes](https://www.khronos.org/registry/SYCL/specs/sycl-2020/html/sycl-2020.html#_sycl_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)](https://link.springer.com/chapter/10.1007/978-1-4842-5574-2_6)
management and implements a tensor [array
API](https://data-apis.org/array-api/latest/).

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](https://www.intel.com/content/www/us/en/developer/tools/oneapi/distribution-for-python.html)
to program on XPUs.



# Installing

You can install the library using [conda](https://anaconda.org/intel/dpctl) or
[pip](https://pypi.org/project/dpctl/) package managers. It is also available in the [Intel(R)
Distribution for
Python](https://www.intel.com/content/www/us/en/developer/tools/oneapi/distribution-for-python.html)
(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](https://www.intel.com/content/www/us/en/developer/articles/guide/installation-guide-for-oneapi-toolkits.html).

> **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) channel on Anaconda
cloud, use the following command:

```bash
conda install dpctl -c intel
```

## Pip

The `dpctl` can be installed using `pip` obtaining wheel packages either from PyPi or from Intel(R) channel on Anaconda.
To install `dpctl` wheel package from Intel(R) channel on Anaconda, run the following command:

```bash
python -m pip install --index-url https://pypi.anaconda.org/intel/simple dpctl
```

Installing the bleeding edge
------------------------

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

```bash
conda install dpctl -c dppy/label/dev
```

# Building

Refer to our [Documentation](https://intelpython.github.io/dpctl) for more information on
setting up a development environment and building `dpctl` from the source.


# Examples

Our examples are located in the [examples/](examples) folder and are organized in sub-folders. Examples
in the [Python/](examples/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/](examples/cython), [C/](examples/c), and [Pybind11](examples/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](dpctl/tests).

To run the tests, use:
```bash
pytest --pyargs dpctl
```

Running full test suite requires working C++ compiler. To run the test suite without one, use:

```bash
pytest --pyargs dpctl -k "not test_cython_api"
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/IntelPython/dpctl",
    "name": "dpctl",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "dpctl",
    "author": "Intel Corporation",
    "author_email": null,
    "download_url": null,
    "platform": "Linux",
    "description": "[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)\n[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)\n[![Coverage Status](https://coveralls.io/repos/github/IntelPython/dpctl/badge.svg?branch=master)](https://coveralls.io/github/IntelPython/dpctl?branch=master)\n![Generate Documentation](https://github.com/IntelPython/dpctl/actions/workflows/generate-docs.yml/badge.svg?branch=master)\n[![Join the chat at https://matrix.to/#/#Data-Parallel-Python_community:gitter.im](https://badges.gitter.im/Join%20Chat.svg)](https://app.gitter.im/#/room/#Data-Parallel-Python_community:gitter.im)\n[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/IntelPython/dpctl/badge)](https://securityscorecards.dev/viewer/?uri=github.com/IntelPython/dpctl)\n\n<img align=\"left\" src=\"https://spec.oneapi.io/oneapi-logo-white-scaled.jpg\" alt=\"oneAPI logo\" width=\"75\"/>\n\n# Data Parallel Control\n\nData Parallel Control or `dpctl` is a Python library that allows users\nto *control* the execution placement of a [compute\nkernel](https://en.wikipedia.org/wiki/Compute_kernel) on an\n[XPU](https://www.intel.com/content/www/us/en/newsroom/news/xpu-vision-oneapi-server-gpu.html).\n\nThe compute kernel can be a code:\n* written by the user, e.g., using [`numba-dpex`](https://github.com/IntelPython/numba-dpex)\n* that is part of a library, such as oneMKL\n\nThe `dpctl` library is built upon the [SYCL\nstandard](https://www.khronos.org/sycl/). It implements Python\nbindings for a subset of the standard [runtime\nclasses](https://www.khronos.org/registry/SYCL/specs/sycl-2020/html/sycl-2020.html#_sycl_runtime_classes) that allow users to:\n* query platforms\n* discover and represent devices and sub-devices\n* construct contexts and queues\n\n`dpctl` features classes for [SYCL Unified Shared Memory\n(USM)](https://link.springer.com/chapter/10.1007/978-1-4842-5574-2_6)\nmanagement and implements a tensor [array\nAPI](https://data-apis.org/array-api/latest/).\n\nThe library helps authors of Python native extensions written\nin C, Cython, or pybind11 to access `dpctl` objects representing SYCL\ndevices, queues, memory, and tensors.\n\n`Dpctl` is the core part of a larger family of [data-parallel Python\nlibraries and tools](https://www.intel.com/content/www/us/en/developer/tools/oneapi/distribution-for-python.html)\nto program on XPUs.\n\n\n\n# Installing\n\nYou can install the library using [conda](https://anaconda.org/intel/dpctl) or\n[pip](https://pypi.org/project/dpctl/) package managers. It is also available in the [Intel(R)\nDistribution for\nPython](https://www.intel.com/content/www/us/en/developer/tools/oneapi/distribution-for-python.html)\n(IDP).\n\n## Intel(R) oneAPI\n\nYou can find the most recent release of `dpctl` every quarter as part of the Intel(R) oneAPI releases.\n\nTo get the library from the latest oneAPI release, follow the\ninstructions from Intel(R) [oneAPI installation\nguide](https://www.intel.com/content/www/us/en/developer/articles/guide/installation-guide-for-oneapi-toolkits.html).\n\n> **NOTE:** You need to install the Intel(R) oneAPI AI Analytics Tookit to get\n>IDP and `dpctl`.\n\n\n## Conda\n\nTo install `dpctl` from the Intel(R) channel on Anaconda\ncloud, use the following command:\n\n```bash\nconda install dpctl -c intel\n```\n\n## Pip\n\nThe `dpctl` can be installed using `pip` obtaining wheel packages either from PyPi or from Intel(R) channel on Anaconda.\nTo install `dpctl` wheel package from Intel(R) channel on Anaconda, run the following command:\n\n```bash\npython -m pip install --index-url https://pypi.anaconda.org/intel/simple dpctl\n```\n\nInstalling the bleeding edge\n------------------------\n\nTo try out the current master, install it from our\ndevelopment channel on Anaconda cloud:\n\n```bash\nconda install dpctl -c dppy/label/dev\n```\n\n# Building\n\nRefer to our [Documentation](https://intelpython.github.io/dpctl) for more information on\nsetting up a development environment and building `dpctl` from the source.\n\n\n# Examples\n\nOur examples are located in the [examples/](examples) folder and are organized in sub-folders. Examples\nin the [Python/](examples/python) folder demonstrate how to inspect the heterogeneous platform,\nselect a device, create an execution queue, and how to control device memory allocation and\nexecution placement.\n\nExamples in [Cython/](examples/cython), [C/](examples/c), and [Pybind11](examples/pybind11) folders\ndemonstrate creation of SYCL-powered native Python extensions. Please refer to each folder's README\ndocument for directions on how to build and use each example.\n\n\n# Running Tests\n\nTests are located in folder [dpctl/tests](dpctl/tests).\n\nTo run the tests, use:\n```bash\npytest --pyargs dpctl\n```\n\nRunning full test suite requires working C++ compiler. To run the test suite without one, use:\n\n```bash\npytest --pyargs dpctl -k \"not test_cython_api\"\n```\n",
    "bugtrack_url": null,
    "license": "Apache 2.0",
    "summary": "A lightweight Python wrapper for a subset of SYCL.",
    "version": "0.16.0",
    "project_urls": {
        "Homepage": "https://github.com/IntelPython/dpctl"
    },
    "split_keywords": [
        "dpctl"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0bcdaa4bb213c60daf25cd0bd269bb94bb2af5de090f78686188fe15a20a7706",
                "md5": "9ba0ab955f7e189f4e1f59a14bd21f5c",
                "sha256": "dbaa52210791b7ae4f91f9071bd04a5dec5dacb58854c3b55f1394eb922cfb7f"
            },
            "downloads": -1,
            "filename": "dpctl-0.16.0-0-cp310-cp310-manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "9ba0ab955f7e189f4e1f59a14bd21f5c",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": null,
            "size": 30345308,
            "upload_time": "2024-03-26T22:33:01",
            "upload_time_iso_8601": "2024-03-26T22:33:01.771475Z",
            "url": "https://files.pythonhosted.org/packages/0b/cd/aa4bb213c60daf25cd0bd269bb94bb2af5de090f78686188fe15a20a7706/dpctl-0.16.0-0-cp310-cp310-manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "56bc7cb4fa3567f14888229975897ffbf65576441901839b277459b0ccd4547c",
                "md5": "30ad5b31c6e894a55fcc0418f60ac8f4",
                "sha256": "fce5d0b9c634546f1cf3f1864d3cc345352379722324d2e7d74e4cb530d30663"
            },
            "downloads": -1,
            "filename": "dpctl-0.16.0-0-cp310-cp310-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "30ad5b31c6e894a55fcc0418f60ac8f4",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": null,
            "size": 27028757,
            "upload_time": "2024-03-26T22:33:07",
            "upload_time_iso_8601": "2024-03-26T22:33:07.507466Z",
            "url": "https://files.pythonhosted.org/packages/56/bc/7cb4fa3567f14888229975897ffbf65576441901839b277459b0ccd4547c/dpctl-0.16.0-0-cp310-cp310-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "909321af77ef0fc653232bd6e751748557b399e8f9f92f5e37cb688c3cf3e968",
                "md5": "e310dfe7face7857215c08f43ca7e0ba",
                "sha256": "2e8b8121928d954aed2e11b3b4d2254abf954edcd181e5b739c220a1a037dea4"
            },
            "downloads": -1,
            "filename": "dpctl-0.16.0-0-cp39-cp39-manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "e310dfe7face7857215c08f43ca7e0ba",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": null,
            "size": 30351948,
            "upload_time": "2024-03-26T22:32:41",
            "upload_time_iso_8601": "2024-03-26T22:32:41.414338Z",
            "url": "https://files.pythonhosted.org/packages/90/93/21af77ef0fc653232bd6e751748557b399e8f9f92f5e37cb688c3cf3e968/dpctl-0.16.0-0-cp39-cp39-manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7129308fb00c2afb67035855b9d41cfc620c81fe1dce9223fe6ceb634f0a5c98",
                "md5": "caff5f402a342e973cb2c90261a7a333",
                "sha256": "30d3236e574288985b4337960eca2ca6ccbc0b680bfac2b33490d2359176bff2"
            },
            "downloads": -1,
            "filename": "dpctl-0.16.0-0-cp39-cp39-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "caff5f402a342e973cb2c90261a7a333",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": null,
            "size": 27034261,
            "upload_time": "2024-03-26T22:32:56",
            "upload_time_iso_8601": "2024-03-26T22:32:56.837527Z",
            "url": "https://files.pythonhosted.org/packages/71/29/308fb00c2afb67035855b9d41cfc620c81fe1dce9223fe6ceb634f0a5c98/dpctl-0.16.0-0-cp39-cp39-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-26 22:33:01",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "IntelPython",
    "github_project": "dpctl",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "setuptools",
            "specs": []
        },
        {
            "name": "cython",
            "specs": []
        },
        {
            "name": "numpy",
            "specs": []
        },
        {
            "name": "wheel",
            "specs": []
        }
    ],
    "lcname": "dpctl"
}
        
Elapsed time: 0.20623s