Skip to content

Commit 30c426d

Browse files
Apply comments
1 parent 647e2cf commit 30c426d

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

sycl/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ option(SYCL_ADD_DEV_VERSION_POSTFIX "Adds -V postfix to version string" ON)
1212
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
1313
include(AddSYCLExecutable)
1414

15+
add_definitions(-g -O0)
1516
set(SYCL_MAJOR_VERSION 5)
1617
set(SYCL_MINOR_VERSION 0)
1718
set(SYCL_PATCH_VERSION 0)

sycl/doc/LinkedAllocations.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ data pointer provided by the user:
3838
auto acc = buf.get_access<cl::sycl::access::mode::read_write>();
3939
```
4040

41-
Or because a mapped host pointer obtained from a non-host native memory object
41+
Or because a mapped host pointer obtained from a native device memory object
4242
is used in its place (as is the case for linked commands, covered below).
4343

4444
## Linked allocation commands
@@ -49,8 +49,8 @@ as "linked" to another one if they satisfy these requirements:
4949
- Exactly one of the two commands is associated with a host context.
5050
- Neither of the commands is already linked.
5151

52-
The idea behind linked commands is that the non-host allocation of the pair is
53-
supposed to reuse the host allocation, i. e. the host memory is requested to be
52+
The idea behind linked commands is that the device allocation of the pair is
53+
supposed to reuse the host allocation, i.e. the host memory is requested to be
5454
shared between the two (the underlying backend is still free to ignore that
5555
request and allocate additional memory if needed). The difference in handling
5656
linked and unlinked allocations is summarized in the table below.
@@ -59,7 +59,7 @@ linked and unlinked allocations is summarized in the table below.
5959
| - | -------- | ------ |
6060
| Native memory object creation | Created with COPY_HOST_PTR if a host pointer is available and the first access mode does not discard the data. | Created with USE_HOST_PTR if a suitable host pointer is available, regardless of the first access mode. |
6161
| Host allocation command behaviour | Skipped if a suitable user host pointer is available. | In addition to skipping the allocation if a suitable user pointer is provided, the allocation is also skipped if the host command is created after its linked counterpart (it's retrieved via map operation instead). |
62-
| Memory transfer | Performed with read/write operations, non-host to non-host transfer is done with a host allocation as an intermediary (direct transfer is not supported by PI). | Only one allocation from the pair can be active at a time, the switch is done with map/unmap operations. |
62+
| Memory transfer | Performed with read/write operations, device-to-device transfer is done with a host allocation as an intermediary (direct transfer is not supported by PI). | Only one allocation from the pair can be active at a time, the switch is done with map/unmap operations. Device-to-device transfer where one of the device allocations is linked is done with the host allocation from the pair as an intermediary (e.g. for transfer from unlinked device allocation A to linked device allocation B: map B -> read A to the host allocation -> unmap B). |
6363

6464
## Command linking approach
6565

@@ -71,6 +71,6 @@ and host share the same physical memory). The motivation for this is two-fold:
7171
should not result in any additional device memory allocation or copying between
7272
the two during map/unmap operations.
7373
- Even if the point above makes no difference for a particular pair of
74-
allocations (e. g. no host pointer is available for the non-host allocation),
74+
allocations (e.g. no host pointer is available for the device allocation),
7575
it might be possible to exploit that later in the application for another device
7676
that does support host unified memory.

0 commit comments

Comments
 (0)