Skip to content

Commit

Permalink
[UR] Bump for OpenCL handle adding
Browse files Browse the repository at this point in the history
  • Loading branch information
RossBrunton committed Feb 13, 2025
1 parent 6d17a08 commit 580f93a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
13 changes: 6 additions & 7 deletions sycl/cmake/modules/UnifiedRuntimeTag.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# commit 064d3560cbcc24a40380b57adb3690b2bc256d6e
# Merge: 739d8a75 e1bbdad9
# Author: Kenneth Benzie (Benie) <[email protected]>
# Date: Wed Feb 12 10:20:12 2025 +0000
# Merge pull request #2672 from lukaszstolarczuk/umf-with-icx-build-0.11.0-dev2
# common: Bump UMF version to v0.11.0-dev2
set(UNIFIED_RUNTIME_TAG 064d3560cbcc24a40380b57adb3690b2bc256d6e)
set(UNIFIED_RUNTIME_REPO "https://github.com/omarahmed1111/unified-runtime.git")
# commit 0644512d366216153fbeba76e629f0b5468cd691
# Author: omarahmed1111 <[email protected]>
# Date: Fri Oct 4 16:12:36 2024 +0100
# Add handles to opencl adapter
set(UNIFIED_RUNTIME_TAG 0644512d366216153fbeba76e629f0b5468cd691)
14 changes: 11 additions & 3 deletions sycl/source/kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,17 @@ kernel::kernel(cl_kernel ClKernel, const context &SyclContext) {
ur_kernel_handle_t hKernel = nullptr;
ur_native_handle_t nativeHandle =
reinterpret_cast<ur_native_handle_t>(ClKernel);
Adapter->call<detail::UrApiKind::urKernelCreateWithNativeHandle>(
nativeHandle, detail::getSyclObjImpl(SyclContext)->getHandleRef(),
nullptr, nullptr, &hKernel);
auto Err =
Adapter->call_nocheck<detail::UrApiKind::urKernelCreateWithNativeHandle>(
nativeHandle, detail::getSyclObjImpl(SyclContext)->getHandleRef(),
nullptr, nullptr, &hKernel);
if (Err == UR_RESULT_ERROR_INVALID_CONTEXT ||
Err == UR_RESULT_ERROR_INVALID_PROGRAM) {
Adapter->checkUrResult<errc::invalid>(Err);
} else {
Adapter->checkUrResult(Err);
}

impl = std::make_shared<detail::kernel_impl>(
hKernel, detail::getSyclObjImpl(SyclContext), nullptr, nullptr);
// This is a special interop constructor for OpenCL, so the kernel must be
Expand Down

0 comments on commit 580f93a

Please sign in to comment.