Skip to content

Commit 2f644e3

Browse files
[UR] Bump tag to 47af3ee (#11868)
testing branch for [PR](oneapi-src/unified-runtime#1072) and adding necessary fixes for it. Co-authored-by: omarahmed1111 <[email protected]>
1 parent 646ab08 commit 2f644e3

File tree

4 files changed

+23
-26
lines changed

4 files changed

+23
-26
lines changed

sycl/doc/design/CommandGraph.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ with the following entry-points:
3636
| `urCommandBufferReleaseExp` | Decrementing reference count of command-buffer. |
3737
| `urCommandBufferFinalizeExp` | No more commands can be appended, makes command-buffer ready to enqueue on a command-queue. |
3838
| `urCommandBufferAppendKernelLaunchExp` | Append a kernel execution command to command-buffer. |
39-
| `urCommandBufferAppendMemcpyUSMExp` | Append a USM memcpy command to the command-buffer. |
40-
| `urCommandBufferAppendMembufferCopyExp` | Append a mem buffer copy command to the command-buffer. |
41-
| `urCommandBufferAppendMembufferWriteExp` | Append a memory write command to a command-buffer object. |
42-
| `urCommandBufferAppendMembufferReadExp` | Append a memory read command to a command-buffer object. |
43-
| `urCommandBufferAppendMembufferCopyRectExp` | Append a rectangular memory copy command to a command-buffer object. |
44-
| `urCommandBufferAppendMembufferWriteRectExp` | Append a rectangular memory write command to a command-buffer object. |
45-
| `urCommandBufferAppendMembufferReadRectExp` | Append a rectangular memory read command to a command-buffer object. |
39+
| `urCommandBufferAppendUSMMemcpyExp` | Append a USM memcpy command to the command-buffer. |
40+
| `urCommandBufferAppendMemBufferCopyExp` | Append a mem buffer copy command to the command-buffer. |
41+
| `urCommandBufferAppendMemBufferWriteExp` | Append a memory write command to a command-buffer object. |
42+
| `urCommandBufferAppendMemBufferReadExp` | Append a memory read command to a command-buffer object. |
43+
| `urCommandBufferAppendMemBufferCopyRectExp` | Append a rectangular memory copy command to a command-buffer object. |
44+
| `urCommandBufferAppendMemBufferWriteRectExp` | Append a rectangular memory write command to a command-buffer object. |
45+
| `urCommandBufferAppendMemBufferReadRectExp` | Append a rectangular memory read command to a command-buffer object. |
4646
| `urCommandBufferEnqueueExp` | Submit command-buffer to a command-queue for execution. |
4747

4848
See the [UR EXP-COMMAND-BUFFER](https://oneapi-src.github.io/unified-runtime/core/EXP-COMMAND-BUFFER.html)

sycl/plugins/unified_runtime/CMakeLists.txt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,13 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT)
5757
include(FetchContent)
5858

5959
set(UNIFIED_RUNTIME_REPO "https://github.com/oneapi-src/unified-runtime.git")
60-
# commit b3de31844ca45d1815c54d85f248f13ad81b6755
61-
# Author: Kenneth Benzie (Benie) <[email protected]>
62-
# Date: Tue Nov 28 16:21:43 2023 +0000
63-
# Set version to v0.8.1
64-
set(UNIFIED_RUNTIME_TAG v0.8.1)
60+
# commit 47af3ee296ae0517213114332ffd3ac54a456b16
61+
# Merge: bd76c510 f2ca7a91
62+
# Author: Omar Ahmed <[email protected]>
63+
# Date: Thu Nov 30 16:11:56 2023 +0000
64+
# - Merge pull request #1072 from omarahmed1111/merge-some-main-changes-into-adapters-third-patch
65+
# - Merge main into adapters branch
66+
set(UNIFIED_RUNTIME_TAG 47af3ee296ae0517213114332ffd3ac54a456b16)
6567

6668
if(SYCL_PI_UR_OVERRIDE_FETCH_CONTENT_REPO)
6769
set(UNIFIED_RUNTIME_REPO "${SYCL_PI_UR_OVERRIDE_FETCH_CONTENT_REPO}")

sycl/plugins/unified_runtime/pi2ur.hpp

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -791,10 +791,6 @@ inline pi_result piTearDown(void *PluginParameter) {
791791
});
792792
HANDLE_ERRORS(Ret);
793793

794-
// TODO: Dont check for errors in urTearDown, since
795-
// when using Level Zero plugin, the second urTearDown
796-
// will fail as ur_loader.so has already been unloaded,
797-
urTearDown(nullptr);
798794
return PI_SUCCESS;
799795
}
800796

@@ -803,7 +799,6 @@ inline pi_result piTearDown(void *PluginParameter) {
803799
inline pi_result piPlatformsGet(pi_uint32 NumEntries, pi_platform *Platforms,
804800
pi_uint32 *NumPlatforms) {
805801

806-
urInit(0, nullptr);
807802
// We're not going through the UR loader so we're guaranteed to have exactly
808803
// one adapter (whichever is statically linked). The PI plugin for UR has its
809804
// own implementation of piPlatformsGet.
@@ -4376,7 +4371,7 @@ inline pi_result piextCommandBufferMemcpyUSM(
43764371
ur_exp_command_buffer_handle_t UrCommandBuffer =
43774372
reinterpret_cast<ur_exp_command_buffer_handle_t>(CommandBuffer);
43784373

4379-
HANDLE_ERRORS(urCommandBufferAppendMemcpyUSMExp(
4374+
HANDLE_ERRORS(urCommandBufferAppendUSMMemcpyExp(
43804375
UrCommandBuffer, DstPtr, SrcPtr, Size, NumSyncPointsInWaitList,
43814376
SyncPointWaitList, SyncPoint));
43824377

@@ -4394,7 +4389,7 @@ inline pi_result piextCommandBufferMemBufferCopy(
43944389
ur_mem_handle_t UrSrcMem = reinterpret_cast<ur_mem_handle_t>(SrcMem);
43954390
ur_mem_handle_t UrDstMem = reinterpret_cast<ur_mem_handle_t>(DstMem);
43964391

4397-
HANDLE_ERRORS(urCommandBufferAppendMembufferCopyExp(
4392+
HANDLE_ERRORS(urCommandBufferAppendMemBufferCopyExp(
43984393
UrCommandBuffer, UrSrcMem, UrDstMem, SrcOffset, DstOffset, Size,
43994394
NumSyncPointsInWaitList, SyncPointWaitList, SyncPoint));
44004395

@@ -4422,7 +4417,7 @@ inline pi_result piextCommandBufferMemBufferCopyRect(
44224417
UrRegion.height = Region->height_scalar;
44234418
UrRegion.width = Region->width_bytes;
44244419

4425-
HANDLE_ERRORS(urCommandBufferAppendMembufferCopyRectExp(
4420+
HANDLE_ERRORS(urCommandBufferAppendMemBufferCopyRectExp(
44264421
UrCommandBuffer, UrSrcMem, UrDstMem, UrSrcOrigin, UrDstOrigin, UrRegion,
44274422
SrcRowPitch, SrcSlicePitch, DstRowPitch, DstSlicePitch,
44284423
NumSyncPointsInWaitList, SyncPointWaitList, SyncPoint));
@@ -4452,7 +4447,7 @@ inline pi_result piextCommandBufferMemBufferReadRect(
44524447
UrRegion.height = Region->height_scalar;
44534448
UrRegion.width = Region->width_bytes;
44544449

4455-
HANDLE_ERRORS(urCommandBufferAppendMembufferReadRectExp(
4450+
HANDLE_ERRORS(urCommandBufferAppendMemBufferReadRectExp(
44564451
UrCommandBuffer, UrBuffer, UrBufferOffset, UrHostOffset, UrRegion,
44574452
BufferRowPitch, BufferSlicePitch, HostRowPitch, HostSlicePitch, Ptr,
44584453
NumSyncPointsInWaitList, SyncPointWaitList, SyncPoint));
@@ -4470,7 +4465,7 @@ inline pi_result piextCommandBufferMemBufferRead(
44704465
reinterpret_cast<ur_exp_command_buffer_handle_t>(CommandBuffer);
44714466
ur_mem_handle_t UrBuffer = reinterpret_cast<ur_mem_handle_t>(Src);
44724467

4473-
HANDLE_ERRORS(urCommandBufferAppendMembufferReadExp(
4468+
HANDLE_ERRORS(urCommandBufferAppendMemBufferReadExp(
44744469
UrCommandBuffer, UrBuffer, Offset, Size, Dst, NumSyncPointsInWaitList,
44754470
SyncPointWaitList, SyncPoint));
44764471

@@ -4499,7 +4494,7 @@ inline pi_result piextCommandBufferMemBufferWriteRect(
44994494
UrRegion.height = Region->height_scalar;
45004495
UrRegion.width = Region->width_bytes;
45014496

4502-
HANDLE_ERRORS(urCommandBufferAppendMembufferWriteRectExp(
4497+
HANDLE_ERRORS(urCommandBufferAppendMemBufferWriteRectExp(
45034498
UrCommandBuffer, UrBuffer, UrBufferOffset, UrHostOffset, UrRegion,
45044499
BufferRowPitch, BufferSlicePitch, HostRowPitch, HostSlicePitch,
45054500
const_cast<void *>(Ptr), NumSyncPointsInWaitList, SyncPointWaitList,
@@ -4519,7 +4514,7 @@ inline pi_result piextCommandBufferMemBufferWrite(
45194514
reinterpret_cast<ur_exp_command_buffer_handle_t>(CommandBuffer);
45204515
ur_mem_handle_t UrBuffer = reinterpret_cast<ur_mem_handle_t>(Buffer);
45214516

4522-
HANDLE_ERRORS(urCommandBufferAppendMembufferWriteExp(
4517+
HANDLE_ERRORS(urCommandBufferAppendMemBufferWriteExp(
45234518
UrCommandBuffer, UrBuffer, Offset, Size, const_cast<void *>(Ptr),
45244519
NumSyncPointsInWaitList, SyncPointWaitList, SyncPoint));
45254520

sycl/plugins/unified_runtime/pi_unified_runtime.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ static void releaseAdapters(std::vector<ur_adapter_handle_t> &Vec) {
2525
for (auto Adapter : Vec) {
2626
urAdapterRelease(Adapter);
2727
}
28-
urTearDown(nullptr);
28+
urLoaderTearDown();
2929
});
3030
}
3131

@@ -1302,7 +1302,7 @@ __SYCL_EXPORT pi_result piPluginInit(pi_plugin *PluginInit) {
13021302
strncpy(PluginInit->PluginVersion, SupportedVersion, PluginVersionSize);
13031303

13041304
// Initialize UR and discover adapters
1305-
HANDLE_ERRORS(urInit(0, nullptr));
1305+
HANDLE_ERRORS(urLoaderInit(0, nullptr));
13061306
uint32_t NumAdapters;
13071307
HANDLE_ERRORS(urAdapterGet(0, nullptr, &NumAdapters));
13081308
if (NumAdapters > 0) {

0 commit comments

Comments
 (0)