Skip to content

Commit ad92fe8

Browse files
[SYCL][Docs] Clarify virtual memory accessibility (#20576)
This commit adds wording specifying that access mode applies to all devices in the context for which the corresponding memory is accessible. --------- Signed-off-by: Larsen, Steffen <[email protected]>
1 parent 11eca95 commit ad92fe8

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

sycl/doc/extensions/experimental/sycl_ext_oneapi_virtual_mem.asciidoc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,12 @@ the returned pointer is accessible after the call as read-only or read-write
298298
respectively. Otherwise, it is considered inaccessible and accessing it will
299299
result in undefined behavior.
300300

301+
If other devices in the context associated with this instance of `physical_mem`
302+
have enabled peer-to-peer access with the device associated with this instance
303+
of `physical_mem` via link:../supported/sycl_ext_oneapi_peer_access.asciidoc[
304+
sycl_ext_oneapi_peer_access], those other devices also have access to this
305+
mapped memory, and the access mode applies to accesses from those devices also.
306+
301307
The returned pointer is equivalent to `reinterpret_cast<void *>(ptr)`.
302308

303309
Writing to any address in the virtual memory range with access mode set to
@@ -353,6 +359,12 @@ If `mode` is `address_access_mode::read` or `address_access_mode::read_write`
353359
respectively. Otherwise, it is considered inaccessible and accessing it will
354360
result in undefined behavior.
355361

362+
If other devices in `syclContext` have enabled peer-to-peer access with the
363+
device on which the memory referenced by `ptr` resides via
364+
link:../supported/sycl_ext_oneapi_peer_access.asciidoc[
365+
sycl_ext_oneapi_peer_access], those other devices also have access to this
366+
mapped memory, and the access mode applies to accesses from those devices also.
367+
356368
The virtual memory range specified by `ptr` and `numBytes` must be a sub-range
357369
of virtual memory ranges previously mapped to `physical_mem`. `ptr`
358370
must be aligned to the minimum memory granularity of the device associated with

0 commit comments

Comments
 (0)