diff --git a/sycl/doc/design/CommandGraph.md b/sycl/doc/design/CommandGraph.md index 47c835d664330..48c0a7fa197f1 100644 --- a/sycl/doc/design/CommandGraph.md +++ b/sycl/doc/design/CommandGraph.md @@ -36,13 +36,13 @@ with the following entry-points: | `urCommandBufferReleaseExp` | Decrementing reference count of command-buffer. | | `urCommandBufferFinalizeExp` | No more commands can be appended, makes command-buffer ready to enqueue on a command-queue. | | `urCommandBufferAppendKernelLaunchExp` | Append a kernel execution command to command-buffer. | -| `urCommandBufferAppendMemcpyUSMExp` | Append a USM memcpy command to the command-buffer. | -| `urCommandBufferAppendMembufferCopyExp` | Append a mem buffer copy command to the command-buffer. | -| `urCommandBufferAppendMembufferWriteExp` | Append a memory write command to a command-buffer object. | -| `urCommandBufferAppendMembufferReadExp` | Append a memory read command to a command-buffer object. | -| `urCommandBufferAppendMembufferCopyRectExp` | Append a rectangular memory copy command to a command-buffer object. | -| `urCommandBufferAppendMembufferWriteRectExp` | Append a rectangular memory write command to a command-buffer object. | -| `urCommandBufferAppendMembufferReadRectExp` | Append a rectangular memory read command to a command-buffer object. | +| `urCommandBufferAppendUSMMemcpyExp` | Append a USM memcpy command to the command-buffer. | +| `urCommandBufferAppendMemBufferCopyExp` | Append a mem buffer copy command to the command-buffer. | +| `urCommandBufferAppendMemBufferWriteExp` | Append a memory write command to a command-buffer object. | +| `urCommandBufferAppendMemBufferReadExp` | Append a memory read command to a command-buffer object. | +| `urCommandBufferAppendMemBufferCopyRectExp` | Append a rectangular memory copy command to a command-buffer object. | +| `urCommandBufferAppendMemBufferWriteRectExp` | Append a rectangular memory write command to a command-buffer object. | +| `urCommandBufferAppendMemBufferReadRectExp` | Append a rectangular memory read command to a command-buffer object. | | `urCommandBufferEnqueueExp` | Submit command-buffer to a command-queue for execution. | See the [UR EXP-COMMAND-BUFFER](https://oneapi-src.github.io/unified-runtime/core/EXP-COMMAND-BUFFER.html) diff --git a/sycl/plugins/unified_runtime/CMakeLists.txt b/sycl/plugins/unified_runtime/CMakeLists.txt index f754bfd167293..8291a4fd02bf9 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -57,11 +57,13 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) include(FetchContent) set(UNIFIED_RUNTIME_REPO "https://github.com/oneapi-src/unified-runtime.git") - # commit b3de31844ca45d1815c54d85f248f13ad81b6755 - # Author: Kenneth Benzie (Benie) - # Date: Tue Nov 28 16:21:43 2023 +0000 - # Set version to v0.8.1 - set(UNIFIED_RUNTIME_TAG v0.8.1) + # commit 47af3ee296ae0517213114332ffd3ac54a456b16 + # Merge: bd76c510 f2ca7a91 + # Author: Omar Ahmed <30423288+omarahmed1111@users.noreply.github.com> + # Date: Thu Nov 30 16:11:56 2023 +0000 + # - Merge pull request #1072 from omarahmed1111/merge-some-main-changes-into-adapters-third-patch + # - Merge main into adapters branch + set(UNIFIED_RUNTIME_TAG 47af3ee296ae0517213114332ffd3ac54a456b16) if(SYCL_PI_UR_OVERRIDE_FETCH_CONTENT_REPO) set(UNIFIED_RUNTIME_REPO "${SYCL_PI_UR_OVERRIDE_FETCH_CONTENT_REPO}") diff --git a/sycl/plugins/unified_runtime/pi2ur.hpp b/sycl/plugins/unified_runtime/pi2ur.hpp index cda2d80aa7ce5..01da9137e440c 100644 --- a/sycl/plugins/unified_runtime/pi2ur.hpp +++ b/sycl/plugins/unified_runtime/pi2ur.hpp @@ -791,10 +791,6 @@ inline pi_result piTearDown(void *PluginParameter) { }); HANDLE_ERRORS(Ret); - // TODO: Dont check for errors in urTearDown, since - // when using Level Zero plugin, the second urTearDown - // will fail as ur_loader.so has already been unloaded, - urTearDown(nullptr); return PI_SUCCESS; } @@ -803,7 +799,6 @@ inline pi_result piTearDown(void *PluginParameter) { inline pi_result piPlatformsGet(pi_uint32 NumEntries, pi_platform *Platforms, pi_uint32 *NumPlatforms) { - urInit(0, nullptr); // We're not going through the UR loader so we're guaranteed to have exactly // one adapter (whichever is statically linked). The PI plugin for UR has its // own implementation of piPlatformsGet. @@ -4376,7 +4371,7 @@ inline pi_result piextCommandBufferMemcpyUSM( ur_exp_command_buffer_handle_t UrCommandBuffer = reinterpret_cast(CommandBuffer); - HANDLE_ERRORS(urCommandBufferAppendMemcpyUSMExp( + HANDLE_ERRORS(urCommandBufferAppendUSMMemcpyExp( UrCommandBuffer, DstPtr, SrcPtr, Size, NumSyncPointsInWaitList, SyncPointWaitList, SyncPoint)); @@ -4394,7 +4389,7 @@ inline pi_result piextCommandBufferMemBufferCopy( ur_mem_handle_t UrSrcMem = reinterpret_cast(SrcMem); ur_mem_handle_t UrDstMem = reinterpret_cast(DstMem); - HANDLE_ERRORS(urCommandBufferAppendMembufferCopyExp( + HANDLE_ERRORS(urCommandBufferAppendMemBufferCopyExp( UrCommandBuffer, UrSrcMem, UrDstMem, SrcOffset, DstOffset, Size, NumSyncPointsInWaitList, SyncPointWaitList, SyncPoint)); @@ -4422,7 +4417,7 @@ inline pi_result piextCommandBufferMemBufferCopyRect( UrRegion.height = Region->height_scalar; UrRegion.width = Region->width_bytes; - HANDLE_ERRORS(urCommandBufferAppendMembufferCopyRectExp( + HANDLE_ERRORS(urCommandBufferAppendMemBufferCopyRectExp( UrCommandBuffer, UrSrcMem, UrDstMem, UrSrcOrigin, UrDstOrigin, UrRegion, SrcRowPitch, SrcSlicePitch, DstRowPitch, DstSlicePitch, NumSyncPointsInWaitList, SyncPointWaitList, SyncPoint)); @@ -4452,7 +4447,7 @@ inline pi_result piextCommandBufferMemBufferReadRect( UrRegion.height = Region->height_scalar; UrRegion.width = Region->width_bytes; - HANDLE_ERRORS(urCommandBufferAppendMembufferReadRectExp( + HANDLE_ERRORS(urCommandBufferAppendMemBufferReadRectExp( UrCommandBuffer, UrBuffer, UrBufferOffset, UrHostOffset, UrRegion, BufferRowPitch, BufferSlicePitch, HostRowPitch, HostSlicePitch, Ptr, NumSyncPointsInWaitList, SyncPointWaitList, SyncPoint)); @@ -4470,7 +4465,7 @@ inline pi_result piextCommandBufferMemBufferRead( reinterpret_cast(CommandBuffer); ur_mem_handle_t UrBuffer = reinterpret_cast(Src); - HANDLE_ERRORS(urCommandBufferAppendMembufferReadExp( + HANDLE_ERRORS(urCommandBufferAppendMemBufferReadExp( UrCommandBuffer, UrBuffer, Offset, Size, Dst, NumSyncPointsInWaitList, SyncPointWaitList, SyncPoint)); @@ -4499,7 +4494,7 @@ inline pi_result piextCommandBufferMemBufferWriteRect( UrRegion.height = Region->height_scalar; UrRegion.width = Region->width_bytes; - HANDLE_ERRORS(urCommandBufferAppendMembufferWriteRectExp( + HANDLE_ERRORS(urCommandBufferAppendMemBufferWriteRectExp( UrCommandBuffer, UrBuffer, UrBufferOffset, UrHostOffset, UrRegion, BufferRowPitch, BufferSlicePitch, HostRowPitch, HostSlicePitch, const_cast(Ptr), NumSyncPointsInWaitList, SyncPointWaitList, @@ -4519,7 +4514,7 @@ inline pi_result piextCommandBufferMemBufferWrite( reinterpret_cast(CommandBuffer); ur_mem_handle_t UrBuffer = reinterpret_cast(Buffer); - HANDLE_ERRORS(urCommandBufferAppendMembufferWriteExp( + HANDLE_ERRORS(urCommandBufferAppendMemBufferWriteExp( UrCommandBuffer, UrBuffer, Offset, Size, const_cast(Ptr), NumSyncPointsInWaitList, SyncPointWaitList, SyncPoint)); diff --git a/sycl/plugins/unified_runtime/pi_unified_runtime.cpp b/sycl/plugins/unified_runtime/pi_unified_runtime.cpp index 23588bef905f5..2dd31640afb5d 100644 --- a/sycl/plugins/unified_runtime/pi_unified_runtime.cpp +++ b/sycl/plugins/unified_runtime/pi_unified_runtime.cpp @@ -25,7 +25,7 @@ static void releaseAdapters(std::vector &Vec) { for (auto Adapter : Vec) { urAdapterRelease(Adapter); } - urTearDown(nullptr); + urLoaderTearDown(); }); } @@ -1302,7 +1302,7 @@ __SYCL_EXPORT pi_result piPluginInit(pi_plugin *PluginInit) { strncpy(PluginInit->PluginVersion, SupportedVersion, PluginVersionSize); // Initialize UR and discover adapters - HANDLE_ERRORS(urInit(0, nullptr)); + HANDLE_ERRORS(urLoaderInit(0, nullptr)); uint32_t NumAdapters; HANDLE_ERRORS(urAdapterGet(0, nullptr, &NumAdapters)); if (NumAdapters > 0) {