Skip to content

Commit 088a947

Browse files
aarongreigkbenzie
andauthored
[UR] Pull in changes from UR PR #805 (#12270)
oneapi-src/unified-runtime#805 --------- Co-authored-by: Kenneth Benzie (Benie) <[email protected]>
1 parent 0bd4738 commit 088a947

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

sycl/plugins/unified_runtime/CMakeLists.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,13 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT)
100100
endfunction()
101101

102102
set(UNIFIED_RUNTIME_REPO "https://github.com/oneapi-src/unified-runtime.git")
103-
# commit 975313cb01840683068ce8bc2c4c6bdf77921709
104-
# Merge: ded4b88a 836056ef
103+
# commit 1e9b1b493fe30e6236bf611ae6d82366c9376f6c
104+
# Merge: a011f092 d8500a36
105105
# Author: Kenneth Benzie (Benie) <[email protected]>
106-
# Date: Thu Jun 20 16:40:29 2024 +0100
107-
# Merge pull request #1774 from hdelan/readytomerge-branch
108-
# [UR][HIP][CUDA] Master Branch
109-
set(UNIFIED_RUNTIME_TAG 975313cb01840683068ce8bc2c4c6bdf77921709)
106+
# Date: Fri Jun 21 10:22:52 2024 +0100
107+
# Merge pull request #805 from aarongreig/aaron/kernelSetArgIndirectionFix
108+
# Correct level of indirection used in KernelSetArgPointer calls.
109+
set(UNIFIED_RUNTIME_TAG 1e9b1b493fe30e6236bf611ae6d82366c9376f6c)
110110

111111
fetch_adapter_source(level_zero
112112
${UNIFIED_RUNTIME_REPO}

sycl/plugins/unified_runtime/pi2ur.hpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2288,7 +2288,10 @@ inline pi_result piKernelSetArgPointer(pi_kernel Kernel, pi_uint32 ArgIndex,
22882288
size_t ArgSize, const void *ArgValue) {
22892289
std::ignore = ArgSize;
22902290
ur_kernel_handle_t UrKernel = reinterpret_cast<ur_kernel_handle_t>(Kernel);
2291-
HANDLE_ERRORS(urKernelSetArgPointer(UrKernel, ArgIndex, nullptr, ArgValue));
2291+
// The old PI interface was expecting a pointer to the pointer obtained via
2292+
// usm/virtual memory, UR now consumes that pointer directly.
2293+
const void *Arg = *static_cast<const void *const *>(ArgValue);
2294+
HANDLE_ERRORS(urKernelSetArgPointer(UrKernel, ArgIndex, nullptr, Arg));
22922295

22932296
return PI_SUCCESS;
22942297
}
@@ -2552,7 +2555,10 @@ inline pi_result piProgramRelease(pi_program Program) {
25522555
inline pi_result piextKernelSetArgPointer(pi_kernel Kernel, pi_uint32 ArgIndex,
25532556
size_t, const void *ArgValue) {
25542557
ur_kernel_handle_t UrKernel = reinterpret_cast<ur_kernel_handle_t>(Kernel);
2555-
HANDLE_ERRORS(urKernelSetArgPointer(UrKernel, ArgIndex, nullptr, ArgValue));
2558+
// The old PI interface was expecting a pointer to the pointer obtained via
2559+
// usm/virtual memory, UR now consumes that pointer directly.
2560+
const void *Arg = *static_cast<const void *const *>(ArgValue);
2561+
HANDLE_ERRORS(urKernelSetArgPointer(UrKernel, ArgIndex, nullptr, Arg));
25562562

25572563
return PI_SUCCESS;
25582564
}

0 commit comments

Comments
 (0)