-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SYCL][Graph] Support for read and write for 1d and 2d buffers #238
[SYCL][Graph] Support for read and write for 1d and 2d buffers #238
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work! Mostly minor comments/nitpicks.
sycl/plugins/unified_runtime/ur/adapters/level_zero/ur_level_zero_command_buffer.cpp
Outdated
Show resolved
Hide resolved
sycl/plugins/unified_runtime/ur/adapters/level_zero/ur_level_zero_command_buffer.cpp
Outdated
Show resolved
Hide resolved
sycl/test-e2e/Graph/Explicit/buffer_copy_host2target_offset.cpp
Outdated
Show resolved
Hide resolved
sycl/test-e2e/Graph/Explicit/buffer_copy_host2target_offset.cpp
Outdated
Show resolved
Hide resolved
sycl/test-e2e/Graph/Explicit/buffer_copy_target2host_offset.cpp
Outdated
Show resolved
Hide resolved
4ffa711
to
3292593
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great overall, have some minor comments.
sycl/plugins/unified_runtime/ur/adapters/level_zero/ur_level_zero_command_buffer.cpp
Outdated
Show resolved
Hide resolved
3292593
to
7cae0f2
Compare
7cae0f2
to
719f400
Compare
Pulls in changes from #238 which requires bumping the UR commit to oneapi-src/unified-runtime#644 Co-authored-by: Maxime France-Pillois <maxime.francepillois@codeplay.com>
719f400
to
0c4f0b6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Final couple files where the parameter naming needs touched up, but looks good to go otherwise.
sycl/plugins/unified_runtime/ur/adapters/level_zero/ur_level_zero_command_buffer.cpp
Outdated
Show resolved
Hide resolved
…uffers Adds support required to handle: - host to buffer memcpy for 1d and 2d buffers - buffer to host memcpy for 1d and 2d buffers This commit also fixes a bug in buffer to buffer memcpy enabling to copy from/to buffers accessed with user-defined offsets. Adds basic tests to check all use-cases of mixed host/buffer memcpy, and buffer to buffer memcpy with user-defined offsets. Addresses Issue: #196
0c4f0b6
to
4589950
Compare
Fix some build errors I've seen with clang-17 after #238 was merged. 1) Arithmitic on void pointer, fixed by passing a `char*` rather than `void*` when an offset is needed ``` /home/ewan/Development/dpcpp/sycl/source/detail/memory_manager.cpp:1316:44: error: arithmetic on a pointer to void 1316 | SrcAccessRangeWidthBytes, DstMem + DstXOffBytes, Deps.size(), | ~~~~~~ ^ /home/ewan/Development/dpcpp/sycl/source/detail/memory_manager.cpp:1372:44: error: arithmetic on a pointer to void 1372 | DstAccessRangeWidthBytes, SrcMem + SrcXOffBytes, Deps.size(), | ~~~~~~ ^ 2) Fixup use of `numEventsInWaitList` when should be `numSyncPointsInWaitList` /home/ewan/Development/dpcpp/sycl/plugins/unified_runtime/ur/adapters/level_zero/ur_level_zero_command_buffer.cpp:611:13: error: use of undeclared identifier 'numEventsInWaitList' 611 | size, numEventsInWaitList, pSyncPointWaitList, pSyncPoint); ```
Fix some build errors I've seen with clang-17 after #238 was merged. 1) Arithmitic on void pointer, fixed by passing a `char*` rather than `void*` when an offset is needed ``` /home/ewan/Development/dpcpp/sycl/source/detail/memory_manager.cpp:1316:44: error: arithmetic on a pointer to void 1316 | SrcAccessRangeWidthBytes, DstMem + DstXOffBytes, Deps.size(), | ~~~~~~ ^ /home/ewan/Development/dpcpp/sycl/source/detail/memory_manager.cpp:1372:44: error: arithmetic on a pointer to void 1372 | DstAccessRangeWidthBytes, SrcMem + SrcXOffBytes, Deps.size(), | ~~~~~~ ^ 2) Fixup use of `numEventsInWaitList` when should be `numSyncPointsInWaitList` /home/ewan/Development/dpcpp/sycl/plugins/unified_runtime/ur/adapters/level_zero/ur_level_zero_command_buffer.cpp:611:13: error: use of undeclared identifier 'numEventsInWaitList' 611 | size, numEventsInWaitList, pSyncPointWaitList, pSyncPoint); ```
…uffers (#238) Adds support required to handle: - host to buffer memcpy for 1d and 2d buffers - buffer to host memcpy for 1d and 2d buffers This commit also fixes a bug in buffer to buffer memcpy enabling to copy from/to buffers accessed with user-defined offsets. Adds basic tests to check all use-cases of mixed host/buffer memcpy, and buffer to buffer memcpy with user-defined offsets. Addresses Issue: #196
Fix some build errors I've seen with clang-17 after #238 was merged. 1) Arithmitic on void pointer, fixed by passing a `char*` rather than `void*` when an offset is needed ``` /home/ewan/Development/dpcpp/sycl/source/detail/memory_manager.cpp:1316:44: error: arithmetic on a pointer to void 1316 | SrcAccessRangeWidthBytes, DstMem + DstXOffBytes, Deps.size(), | ~~~~~~ ^ /home/ewan/Development/dpcpp/sycl/source/detail/memory_manager.cpp:1372:44: error: arithmetic on a pointer to void 1372 | DstAccessRangeWidthBytes, SrcMem + SrcXOffBytes, Deps.size(), | ~~~~~~ ^ 2) Fixup use of `numEventsInWaitList` when should be `numSyncPointsInWaitList` /home/ewan/Development/dpcpp/sycl/plugins/unified_runtime/ur/adapters/level_zero/ur_level_zero_command_buffer.cpp:611:13: error: use of undeclared identifier 'numEventsInWaitList' 611 | size, numEventsInWaitList, pSyncPointWaitList, pSyncPoint); ```
Adds support required to handle:
- host to buffer memcpy for one-dimensional and 2d buffers
- buffer to host memcpy for 1d and 2d buffers
This commit also fixes a bug in buffer to buffer memcpy enabling to copy from/to buffers accessed with user-defined offsets.
Adds basic tests to check all use-cases of mixed host/buffer memcpy, and buffer to buffer memcpy with user-defined offsets.
Addresses Issue: #196