-
Notifications
You must be signed in to change notification settings - Fork 35
Documentation overhaul #670
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,31 @@ | ||
| Welcome to Data-parallel Control (dpctl)'s documentation! | ||
| ========================================================= | ||
|
|
||
| The data-parallel control (dpctl) library provides C and Python bindings for | ||
| `Data-parallel control <https://github.com/IntelPython/dpctl>`_ (dpctl) is a | ||
| runtime library for Python applications and libraries to execute a compute | ||
| kernel on a device that supports a data-parallel mode of execution. Using | ||
| dpctl's API a library or an application can query a system to identify | ||
| data-parallel devices, allocate memory on those devices, and schedule execution | ||
| of compute kernels on the devices. Dpctl's role is only to facilitate the | ||
| scheduling of compute kernels, the library plays no role in | ||
| the definition of the kernels themselves. It is up to the users of dpctl to | ||
| define the kernels. As an example, the | ||
| `numba-dppy <https://intelpython.github.io/numba-dppy/latest/index.html>`_ | ||
| package uses an OpenCL-like abstraction to define kernels directly in Python | ||
| and JIT compiles them to native binary. Numba-dppy then schedules the kernels on | ||
| devices using dpctl. Another example is the | ||
| `dpnp <https://intelpython.github.io/dpnp/>`_ package, a NumPy-like | ||
| library of pre-compiled kernels written in the | ||
| `SYCL language <https://sycl.readthedocs.io/en/latest/index.html>`_. Dpnp too | ||
| uses dpctl to schedule and execute the kernels it provides. | ||
|
|
||
| Dpctl uses SYCL as the underlying low-level runtime layer and implements | ||
| Python bindings for a subset of the runtime classes defined in | ||
| `SYCL 2020 <https://www.khronos.org/registry/SYCL/specs/sycl-2020/html/sycl-2020.html>`_. | ||
| The SYCL 2020 features supported by dpctl are limited to those included by | ||
| Intel's DPCPP compiler and specifically cover the SYCL runtime classes described | ||
| in `Section 4.6 <https://www.khronos.org/registry/SYCL/specs/sycl-2020/html/sycl-2020.html#_sycl_runtime_classes>`_ | ||
| of the SYCL 2020 specification. Apart from the bindings for these runtime | ||
| classes, dpctl includes bindings for SYCL USM memory allocators and | ||
| deallocators. Dpctl's Python API provides classes that implement | ||
| `Python buffer protocol <https://docs.python.org/3/c-api/buffer.html>`_ | ||
| using SYCL USM memory; making it possible to create Python objects that are | ||
| backed by SYCL USM memory. | ||
| Currently, only Intel(R)'s `DPC++ <https://intel.ly/3wwjEsd>`_ is the only | ||
| supported SYCL implementation. Refer the User Guide and API documentation for a | ||
| comprehensive list of SYCL features exposed by dpctl. | ||
|
|
||
| .. todo:: | ||
|
|
||
| Dpctl also supports the DPCPP ``ONEAPI::filter_selector`` extension and has | ||
| experimental support for SYCL's ``kernel`` and ``program`` classes. | ||
| A paragraph on dpctl.tensor | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| .. _user_manual: | ||
|
|
||
| ########### | ||
| User Manual | ||
| ########### | ||
|
|
||
| .. toctree:: | ||
| :maxdepth: 2 | ||
|
|
||
| manual/intro | ||
| manual/platforms | ||
| manual/devices | ||
| manual/contexts | ||
| manual/queues | ||
| manual/submitting_kernels | ||
| manual/events | ||
| manual/profiling |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| .. _querying_platforms: | ||
|
|
||
| .. contents:: | ||
| :local: | ||
| :backlinks: none | ||
| :depth: 1 | ||
|
|
||
| Listing devices | ||
| ~~~~~~~~~~~~~~~ | ||
|
|
||
| .. todo:: | ||
|
|
||
| Get a list of devices | ||
|
|
||
| Selecting a device | ||
| ~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| .. todo:: | ||
|
|
||
| Demonstrate all the ways we can select devices. | ||
|
|
||
| Query device properties | ||
| ~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| .. todo:: | ||
|
|
||
| Demonstrate how to query a device's various aspects and properties. | ||
|
|
||
|
|
||
| Creating a sub-device | ||
| ~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| .. todo:: | ||
|
|
||
| Talk about sub-device creation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| .. _user_manual_intro: | ||
|
|
||
| Introduction | ||
| ------------ | ||
|
|
||
| .. todo:: | ||
|
|
||
| Introduce the basic concepts of Platforms, Devices, Contexts, Queues, | ||
| Events, and USM. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| .. _querying_platforms: | ||
|
|
||
| Querying Platforms | ||
| ------------------ | ||
|
|
||
| .. todo:: | ||
|
|
||
| Demonstrate use of ``lsplatform`` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not think this is true.
dpnponly usesdpctl.SyclQueueprovided by the user, and submits to that queue by directly calling the DPC++ run-time, i.e.q.submit(...).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dpctl.tensorwill also be using DPC++ runtime directly.