@@ -8,7 +8,7 @@ oneAPI library and its Python interface
8
8
=======================================
9
9
10
10
Using oneAPI libraries, a user calls functions that take ``sycl::queue `` and a collection of
11
- ``sycl::event `` objects among other arguments, e.g.
11
+ ``sycl::event `` objects among other arguments. For example:
12
12
13
13
.. code-block :: cpp
14
14
:caption: Prototypical call signature of oneMKL function
@@ -27,7 +27,7 @@ vector complete. If the vector is empty, the runtime begins the execution as soo
27
27
ready. The function returns a ``sycl::event `` object representing completion of the set of
28
28
computational tasks submitted by the ``compute `` function.
29
29
30
- Hence, in oneAPI programming model, the execution **queue ** is used to specify which device the
30
+ Hence, in the oneAPI programming model, the execution **queue ** is used to specify which device the
31
31
function will execute on. To create a queue, one must specify a device to target.
32
32
33
33
In :mod: `dpctl `, the ``sycl::queue `` is represented by :class: `dpctl.SyclQueue ` Python type,
@@ -42,8 +42,9 @@ and a Python API to call such a function might look like
42
42
) -> dpctl.SyclEvent:
43
43
...
44
44
45
- Even if Python API to an offloading Python function looks different from this, it must
46
- translate to a similar call under the hood.
45
+ When building Python API for a SYCL offloading function, and you choose to
46
+ map the SYCL API to a different API on the Python side, it must still translate to a
47
+ similar call under the hood.
47
48
48
49
The arguments to the function must be suitable for use in the offloading functions.
49
50
Typically these are Python scalars, or objects representing USM allocations, such as
@@ -74,7 +75,7 @@ with the queue are used to make the allocation.
74
75
Python type representing the USM allocation.
75
76
76
77
This design choice allows :mod: `dpctl ` to have a preferred queue to use when operating on any single
77
- USM allocation, i.e.
78
+ USM allocation. For example:
78
79
79
80
.. code-block :: python
80
81
@@ -141,7 +142,7 @@ can be combined together in accordance with compute-follows-data programming mod
141
142
>> > # rules are not met
142
143
>> > tensor.concat((y1, y2))
143
144
144
- Please refer to :ref: `array migration <dpctl_tensor_array_migration >` section of the introduction to
145
+ Please refer to the :ref: `array migration <dpctl_tensor_array_migration >` section of the introduction to
145
146
:mod: `dpctl.tensor ` to examples on how to resolve ``ExecutionPlacementError `` exceptions.
146
147
147
148
..
0 commit comments