dpctl


Namedpctl JSON
Version 0.17.0 PyPI version JSON
download
home_pagehttps://github.com/IntelPython/dpctl
SummaryA lightweight Python wrapper for a subset of SYCL.
upload_time2024-06-21 17:38:51
maintainerNone
docs_urlNone
authorIntel Corporation
requires_pythonNone
licenseApache 2.0
keywords dpctl
VCS
bugtrack_url
requirements No requirements were recorded.
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 library conforming to [Python Array
API](https://data-apis.org/array-api/latest/) standard.

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 latest features, install `dpctl` 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/C++ compiler. To run the test suite without one, use:

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

            

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 library conforming to [Python Array\nAPI](https://data-apis.org/array-api/latest/) standard.\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 latest features, install `dpctl` 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/C++ compiler. To run the test suite without one, use:\n\n```bash\npytest --pyargs dpctl -k \"not test_cython_api and not test_c_headers\"\n```\n",
    "bugtrack_url": null,
    "license": "Apache 2.0",
    "summary": "A lightweight Python wrapper for a subset of SYCL.",
    "version": "0.17.0",
    "project_urls": {
        "Homepage": "https://github.com/IntelPython/dpctl"
    },
    "split_keywords": [
        "dpctl"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c7f6beadb21babfb3c6ab09824f4310db6615d85480ce132ae4928e83d77bc73",
                "md5": "e7a42f5322946a5314f3bb48454e2fdc",
                "sha256": "b072f62da22d796e43debc36a26fc599dfccabeeca01b38303be3acafd6e74c5"
            },
            "downloads": -1,
            "filename": "dpctl-0.17.0-0-cp310-cp310-manylinux_2_28_x86_64.whl",
            "has_sig": false,
            "md5_digest": "e7a42f5322946a5314f3bb48454e2fdc",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": null,
            "size": 35054165,
            "upload_time": "2024-06-21T17:38:51",
            "upload_time_iso_8601": "2024-06-21T17:38:51.443135Z",
            "url": "https://files.pythonhosted.org/packages/c7/f6/beadb21babfb3c6ab09824f4310db6615d85480ce132ae4928e83d77bc73/dpctl-0.17.0-0-cp310-cp310-manylinux_2_28_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7214631eef944bd2e8985d9f5a461a074d13db5c98cedd3735c4544dd56591d5",
                "md5": "fee556db23ad8955f49fa4709e695c17",
                "sha256": "93758d1a49fc691e1327a63b63e879ab9dbb30c2e7b2f56cba64cc6d9dc6593e"
            },
            "downloads": -1,
            "filename": "dpctl-0.17.0-0-cp310-cp310-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "fee556db23ad8955f49fa4709e695c17",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": null,
            "size": 30743830,
            "upload_time": "2024-06-21T17:38:59",
            "upload_time_iso_8601": "2024-06-21T17:38:59.448911Z",
            "url": "https://files.pythonhosted.org/packages/72/14/631eef944bd2e8985d9f5a461a074d13db5c98cedd3735c4544dd56591d5/dpctl-0.17.0-0-cp310-cp310-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3a1a7b8a597d75e8702f259acc0aed0080cacb238037f2a34dc314dbee44b206",
                "md5": "04996e601156f59f9a7c1257b3187084",
                "sha256": "14c4d0a6332ea134be3f8ed24fe816aeb617c0533bf651ac033ab4d9679a49ae"
            },
            "downloads": -1,
            "filename": "dpctl-0.17.0-0-cp311-cp311-manylinux_2_28_x86_64.whl",
            "has_sig": false,
            "md5_digest": "04996e601156f59f9a7c1257b3187084",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": null,
            "size": 35057551,
            "upload_time": "2024-06-21T17:39:07",
            "upload_time_iso_8601": "2024-06-21T17:39:07.286711Z",
            "url": "https://files.pythonhosted.org/packages/3a/1a/7b8a597d75e8702f259acc0aed0080cacb238037f2a34dc314dbee44b206/dpctl-0.17.0-0-cp311-cp311-manylinux_2_28_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7f38829424ea8d987233808c85ca1c31e47cde32305d53a50b37536f82ced54a",
                "md5": "ce2d2d658640e84c8f16b9f4cd7b3ea4",
                "sha256": "13b65aa2abb44e747858ee35e804e65bc7450b79d0b6c9b49a9f0724fc7c338a"
            },
            "downloads": -1,
            "filename": "dpctl-0.17.0-0-cp311-cp311-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "ce2d2d658640e84c8f16b9f4cd7b3ea4",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": null,
            "size": 30752081,
            "upload_time": "2024-06-21T17:39:13",
            "upload_time_iso_8601": "2024-06-21T17:39:13.656524Z",
            "url": "https://files.pythonhosted.org/packages/7f/38/829424ea8d987233808c85ca1c31e47cde32305d53a50b37536f82ced54a/dpctl-0.17.0-0-cp311-cp311-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8d20b5bcfbaf0d06bc74601395af0c871d7827fb37d5b771f64c15fa273ac9cb",
                "md5": "3c4218a1cc13368101e2dd654000a8bd",
                "sha256": "9548c0d4cfccd995640104dd78692d490d0de69bbb04c65cd01bcb98aa4ea282"
            },
            "downloads": -1,
            "filename": "dpctl-0.17.0-0-cp39-cp39-manylinux_2_28_x86_64.whl",
            "has_sig": false,
            "md5_digest": "3c4218a1cc13368101e2dd654000a8bd",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": null,
            "size": 35046737,
            "upload_time": "2024-06-21T17:38:34",
            "upload_time_iso_8601": "2024-06-21T17:38:34.397972Z",
            "url": "https://files.pythonhosted.org/packages/8d/20/b5bcfbaf0d06bc74601395af0c871d7827fb37d5b771f64c15fa273ac9cb/dpctl-0.17.0-0-cp39-cp39-manylinux_2_28_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1a8f512fc6cdcfeed8d6a98ca80c99cb37a3f7f46c7de24bf13a876cf7b48d5b",
                "md5": "2bb81af30653942d5f25ca62b454afe6",
                "sha256": "61660e65cda69363e962d22c40de81c689b10d9f7b406a0b4b57f0f3f20e2362"
            },
            "downloads": -1,
            "filename": "dpctl-0.17.0-0-cp39-cp39-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "2bb81af30653942d5f25ca62b454afe6",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": null,
            "size": 30751842,
            "upload_time": "2024-06-21T17:38:43",
            "upload_time_iso_8601": "2024-06-21T17:38:43.623146Z",
            "url": "https://files.pythonhosted.org/packages/1a/8f/512fc6cdcfeed8d6a98ca80c99cb37a3f7f46c7de24bf13a876cf7b48d5b/dpctl-0.17.0-0-cp39-cp39-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-21 17:38:51",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "IntelPython",
    "github_project": "dpctl",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "dpctl"
}
        
Elapsed time: 0.55109s