Skip to content

Commit af944bd

Browse files
committed
Add a bit of detail about unified shared memory to KDE Python extension chapter
Also fixes a small typo
1 parent 5c3823d commit af944bd

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

content/en/docs/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ by [Nikita Grigorian](https://github.com/ndgrigorian) and [Oleksandr Pavlyk](htt
1010

1111
This poster is intended to introduce writing portable data-parallel Python extensions using oneAPI.
1212

13-
We present several examples, starting with the basics of initializing a USM (universal shared memory) array, then a KDE (kernel density estimation) with pure DPC++/Sycl, then a KDE Python extension, and finally how to write a portable Python extension which uses oneMKL.
13+
We present several examples, starting with the basics of initializing a USM (unified shared memory) array, then a KDE (kernel density estimation) with pure DPC++/Sycl, then a KDE Python extension, and finally how to write a portable Python extension which uses oneMKL.

content/en/docs/kde-python.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ date: 2024-07-02
55
weight: 3
66
---
77

8-
Since SYCL builds on C++, we are going to use `pybind11` project to generate Python extension.
8+
Since SYCL builds on C++, we are going to use the `pybind11` project to generate a Python extension.
99
We also need Python objects to carry USM allocations of input and output data, such as `dpctl` ([Data Parallel Control](https://github.com/IntelPython/dpctl.git) Python package). The `dpctl` package also provides Python objects corresponding to DPC++ runtime objects:
1010

1111
| Python object | SYCL C++ object |
@@ -15,9 +15,9 @@ We also need Python objects to carry USM allocations of input and output data, s
1515
| ``dpctl.SyclContext`` | ``sycl::context`` |
1616
| ``dpctl.SyclEvent`` | ``sycl::event`` |
1717

18-
`dpctl` provides integration with `pybind11` supporting castings between `dpctl` Python objects and corresponding C++ SYCL classes listed in the table above. Furthermore, the integration provides C++ class ``dpctl::tensor::usm_ndarray`` which derives from ``pybind11::object``.
19-
It stores `dpctl.tensor.usm_ndarray` object and provides methods to query its attributes, such as data pointer, dimensionality, shape, strides
20-
and elemental type information.
18+
`dpctl` provides integration with `pybind11` supporting castings between `dpctl` Python objects and corresponding C++ SYCL classes listed in the table above. Furthermore, the integration provides the C++ class ``dpctl::tensor::usm_ndarray`` which derives from ``pybind11::object``.
19+
It stores the `dpctl.tensor.usm_ndarray` object and provides methods to query its attributes, such as data pointer, dimensionality, shape, strides
20+
and elemental type information. Underlying `dpctl.tensor.usm_ndarray` is a SYCL unified shared memory (USM) allocation. See the [SYCL standard](https://registry.khronos.org/SYCL/specs/sycl-2020/html/sycl-2020.html#sec:usm) or [dpctl.memory documentation](https://intelpython.github.io/dpctl/latest/api_reference/dpctl/memory.html#dpctl-memory-pyapi) for more details.
2121

2222
For illustration purpose, here is a sample extension source code:
2323

0 commit comments

Comments
 (0)