Skip to content

Commit fb665c8

Browse files
committed
Add description PI function semantics
Signed-off-by: Larsen, Steffen <[email protected]>
1 parent ea99348 commit fb665c8

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

sycl/doc/design/DeviceGlobal.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -579,8 +579,21 @@ pi_result piextEnqueueDeviceVariableWrite(pi_queue Queue, pi_program Program,
579579
pi_event *Event);
580580
```
581581

582-
In both cases the `name` parameter is the same as the `sycl-unique-id` string
583-
that is associated with the device global variable.
582+
The `piextEnqueueDeviceVariableRead` function reads `Count` bytes at byte-offset
583+
`Offset` from a device global variable in `Program` identified by the name
584+
`Name`. The read data is stored in `Dst`. Likewise, the
585+
`piextEnqueueDeviceVariableWrite` function reads `Count` bytes from `Dst` and
586+
stores them at byte-offset `Offset` in the device global variable in `Program`
587+
identified by the name `Name`.
588+
589+
Both functions will enqueue the associated memory command on `Queue` where it
590+
will first wait for `NumEventsInWaitList` events in `EventsWaitList` to finish.
591+
`Event` will be populated with the event associated with resulting enqueued
592+
command. If either `BlockingRead` or `BlockingWrite` is `true` the call will
593+
block on the host until the enqueued command finishes execution.
594+
595+
For `device_global` variables the `Name` parameter in calls to these functions
596+
is the same as the associated `sycl-unique-id` string.
584597

585598
The Level Zero backend has existing APIs that can implement these PI
586599
interfaces. The plugin first calls [`zeModuleGetGlobalPointer()`][8] to get a

0 commit comments

Comments
 (0)