dpctl


Namedpctl JSON
Version 0.18.3 PyPI version JSON
download
home_pagehttps://github.com/IntelPython/dpctl
SummaryA lightweight Python wrapper for a subset of SYCL.
upload_time2024-12-11 13:00:32
maintainerNone
docs_urlNone
authorIntel Corporation
requires_python>=3.9
licenseApache 2.0
keywords dpctl intel oneapi dpcpp
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 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) conda channel, use the following command:

```bash
conda install dpctl -c https://software.repos.intel.com/python/conda/ -c conda-forge
```

## Pip

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

```bash
python -m pip install --index-url https://software.repos.intel.com/python/pypi 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 -c conda-forge
```

# 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 and installed Cython package.
To run the test suite without these, 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": ">=3.9",
    "maintainer_email": null,
    "keywords": "dpctl, intel, oneapi, dpcpp",
    "author": "Intel Corporation",
    "author_email": null,
    "download_url": null,
    "platform": null,
    "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) conda channel, use the following command:\n\n```bash\nconda install dpctl -c https://software.repos.intel.com/python/conda/ -c conda-forge\n```\n\n## Pip\n\nThe `dpctl` can be installed using `pip` obtaining wheel packages either from PyPi or from Intel(R) channel.\nTo install `dpctl` wheel package from Intel(R) channel, run the following command:\n\n```bash\npython -m pip install --index-url https://software.repos.intel.com/python/pypi 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 -c conda-forge\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 and installed Cython package.\nTo run the test suite without these, 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.18.3",
    "project_urls": {
        "Changelog": "https://github.com/IntelPython/dpctl/blob/main/CHANGELOG.md",
        "Documentation": "https://intelpython.github.io/dpctl/",
        "Homepage": "https://github.com/IntelPython/dpctl",
        "Issues": "https://github.com/IntelPython/dpctl/issues",
        "Repository": "https://github.com/IntelPython/dpctl.git"
    },
    "split_keywords": [
        "dpctl",
        " intel",
        " oneapi",
        " dpcpp"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "89d1586a4d2bbb10661c43db6bc5b2172b479585f318b088e665a8b1c5de1012",
                "md5": "3e06019f4b76ddd3835422ded33a8af7",
                "sha256": "4b91c9ad009ded090dbd6995486091075d1584049d9a78972ad18b9a74214c1c"
            },
            "downloads": -1,
            "filename": "dpctl-0.18.3-1-cp310-cp310-manylinux_2_28_x86_64.whl",
            "has_sig": false,
            "md5_digest": "3e06019f4b76ddd3835422ded33a8af7",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.9",
            "size": 33381259,
            "upload_time": "2024-12-11T13:00:32",
            "upload_time_iso_8601": "2024-12-11T13:00:32.190480Z",
            "url": "https://files.pythonhosted.org/packages/89/d1/586a4d2bbb10661c43db6bc5b2172b479585f318b088e665a8b1c5de1012/dpctl-0.18.3-1-cp310-cp310-manylinux_2_28_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6ff13940c2bb93ca8bb7d9d473fc6aa1a59a2ae0c45d536dcacf973529fa4ea1",
                "md5": "149740100bedcf46eece1af2442d3bd8",
                "sha256": "3b7f0c30dd730c8ed4474ce57ed489837da46e5aa893e2756e4d14d8647a4704"
            },
            "downloads": -1,
            "filename": "dpctl-0.18.3-1-cp310-cp310-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "149740100bedcf46eece1af2442d3bd8",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.9",
            "size": 31937025,
            "upload_time": "2024-12-11T13:00:40",
            "upload_time_iso_8601": "2024-12-11T13:00:40.726037Z",
            "url": "https://files.pythonhosted.org/packages/6f/f1/3940c2bb93ca8bb7d9d473fc6aa1a59a2ae0c45d536dcacf973529fa4ea1/dpctl-0.18.3-1-cp310-cp310-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2f31f5749769fccf7d0698640d645ff5fe0a52ccbfe98cad95d657b8d7f8f2bb",
                "md5": "232a47a37b9d8732db3645fa5f258b42",
                "sha256": "b6bc47a69d503f71402ef2d0f1b6a7a0556731690a4b1f0abbe17646a6437c48"
            },
            "downloads": -1,
            "filename": "dpctl-0.18.3-1-cp311-cp311-manylinux_2_28_x86_64.whl",
            "has_sig": false,
            "md5_digest": "232a47a37b9d8732db3645fa5f258b42",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.9",
            "size": 33404269,
            "upload_time": "2024-12-11T13:00:50",
            "upload_time_iso_8601": "2024-12-11T13:00:50.647395Z",
            "url": "https://files.pythonhosted.org/packages/2f/31/f5749769fccf7d0698640d645ff5fe0a52ccbfe98cad95d657b8d7f8f2bb/dpctl-0.18.3-1-cp311-cp311-manylinux_2_28_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "58e772b38ad2a2e7250791240699d140b4740d986d4c784f58bbed8be3069c0f",
                "md5": "8de18a053ebca3390ac16ad2d768bd7a",
                "sha256": "3b8229e79c9a516684aedecac08df1dedc1893a35dfa27361b3b2dc56b317101"
            },
            "downloads": -1,
            "filename": "dpctl-0.18.3-1-cp311-cp311-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "8de18a053ebca3390ac16ad2d768bd7a",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.9",
            "size": 31948856,
            "upload_time": "2024-12-11T13:01:01",
            "upload_time_iso_8601": "2024-12-11T13:01:01.494619Z",
            "url": "https://files.pythonhosted.org/packages/58/e7/72b38ad2a2e7250791240699d140b4740d986d4c784f58bbed8be3069c0f/dpctl-0.18.3-1-cp311-cp311-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "27d756811602bf42027c0fb12324254da64ec42ea7c8537f1e5e3d640ad662d2",
                "md5": "99b91dd4ed326f5d4e28e3cbb87f4071",
                "sha256": "282cffc4a6da157c2338a370042eb8f2bb48411425b2849ac990d83e5a15f6df"
            },
            "downloads": -1,
            "filename": "dpctl-0.18.3-1-cp312-cp312-manylinux_2_28_x86_64.whl",
            "has_sig": false,
            "md5_digest": "99b91dd4ed326f5d4e28e3cbb87f4071",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.9",
            "size": 33443025,
            "upload_time": "2024-12-11T13:01:12",
            "upload_time_iso_8601": "2024-12-11T13:01:12.833254Z",
            "url": "https://files.pythonhosted.org/packages/27/d7/56811602bf42027c0fb12324254da64ec42ea7c8537f1e5e3d640ad662d2/dpctl-0.18.3-1-cp312-cp312-manylinux_2_28_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dc90d3ef3f33cbb4488a6adde487d3c0d28ae06fe9b15a5ae7d620375d303c4f",
                "md5": "f66b2d69bcf79af8478b48e58d4274db",
                "sha256": "c963032e480b41f969a7fcd771b3e782627e6336e8379c1948abc0a3fe40ed72"
            },
            "downloads": -1,
            "filename": "dpctl-0.18.3-1-cp312-cp312-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "f66b2d69bcf79af8478b48e58d4274db",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.9",
            "size": 31976239,
            "upload_time": "2024-12-11T13:01:23",
            "upload_time_iso_8601": "2024-12-11T13:01:23.318509Z",
            "url": "https://files.pythonhosted.org/packages/dc/90/d3ef3f33cbb4488a6adde487d3c0d28ae06fe9b15a5ae7d620375d303c4f/dpctl-0.18.3-1-cp312-cp312-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "691684d6941fb9df177af0998171f05cec4eac6f1144b3c55d107b6a6b7a55a7",
                "md5": "b12c5fc191eb225049de10e02dd98386",
                "sha256": "50181c347b4466bf839293bdc821ac76ca3f5de7472865ff4abb4e54b92bc8ff"
            },
            "downloads": -1,
            "filename": "dpctl-0.18.3-1-cp39-cp39-manylinux_2_28_x86_64.whl",
            "has_sig": false,
            "md5_digest": "b12c5fc191eb225049de10e02dd98386",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.9",
            "size": 33387887,
            "upload_time": "2024-12-11T13:01:34",
            "upload_time_iso_8601": "2024-12-11T13:01:34.327193Z",
            "url": "https://files.pythonhosted.org/packages/69/16/84d6941fb9df177af0998171f05cec4eac6f1144b3c55d107b6a6b7a55a7/dpctl-0.18.3-1-cp39-cp39-manylinux_2_28_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "349315c60a0047801a74b996145b6cf504a91084341d7b6cc7aa8dd7cae7e94c",
                "md5": "fda5892d8d99518020f762bd955ab7ae",
                "sha256": "dd7f824b3a425b4ca019e366e19c1372ff317bb205520fd655cc3a1cde88e28c"
            },
            "downloads": -1,
            "filename": "dpctl-0.18.3-1-cp39-cp39-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "fda5892d8d99518020f762bd955ab7ae",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.9",
            "size": 31944173,
            "upload_time": "2024-12-11T13:01:47",
            "upload_time_iso_8601": "2024-12-11T13:01:47.356448Z",
            "url": "https://files.pythonhosted.org/packages/34/93/15c60a0047801a74b996145b6cf504a91084341d7b6cc7aa8dd7cae7e94c/dpctl-0.18.3-1-cp39-cp39-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-11 13:00:32",
    "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.67035s