Skip to content

[SYCL][Graph] Bump UR hash to command-buffer event sync API #14459

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

Merged
merged 3 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions sycl/cmake/modules/FetchUnifiedRuntime.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,13 @@ if(SYCL_UR_USE_FETCH_CONTENT)
endfunction()

set(UNIFIED_RUNTIME_REPO "https://github.com/oneapi-src/unified-runtime.git")
# commit 22ef899035a85b70b5472416ad6db8021effb5c1
# Merge: 4814e505 f5979a68
# commit 5ade7fc44d453d86dc7440595dbea37c29ce54dc
# Merge: 66ea35dc 0b5b89f0
# Author: aarongreig <[email protected]>
# Date: Mon Oct 14 10:03:13 2024 +0100
# Merge pull request #1469 from RossBrunton/ross/specconst
# [Spec Constants] Improved handling of invalid spec. constants
set(UNIFIED_RUNTIME_TAG 22ef899035a85b70b5472416ad6db8021effb5c1)
# Date: Mon Oct 14 12:17:07 2024 +0100
# Merge pull request #1823 from Bensuo/ewan/ur_dyn_events
# Add event update to command-buffers
set(UNIFIED_RUNTIME_TAG 5ade7fc44d453d86dc7440595dbea37c29ce54dc)

set(UMF_BUILD_EXAMPLES OFF CACHE INTERNAL "EXAMPLES")
# Due to the use of dependentloadflag and no installer for UMF and hwloc we need
Expand Down
34 changes: 18 additions & 16 deletions sycl/source/detail/memory_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1346,8 +1346,8 @@ void MemoryManager::ext_oneapi_copyD2D_cmd_buffer(
Adapter->call<UrApiKind::urCommandBufferAppendMemBufferCopyExp>(
CommandBuffer, sycl::detail::ur::cast<ur_mem_handle_t>(SrcMem),
sycl::detail::ur::cast<ur_mem_handle_t>(DstMem), SrcXOffBytes,
DstXOffBytes, SrcAccessRangeWidthBytes, Deps.size(), Deps.data(),
OutSyncPoint);
DstXOffBytes, SrcAccessRangeWidthBytes, Deps.size(), Deps.data(), 0,
nullptr, OutSyncPoint, nullptr, nullptr);
} else {
// passing 0 for pitches not allowed. Because clEnqueueCopyBufferRect will
// calculate both src and dest pitch using region[0], which is not correct
Expand All @@ -1373,7 +1373,7 @@ void MemoryManager::ext_oneapi_copyD2D_cmd_buffer(
CommandBuffer, sycl::detail::ur::cast<ur_mem_handle_t>(SrcMem),
sycl::detail::ur::cast<ur_mem_handle_t>(DstMem), SrcOrigin, DstOrigin,
Region, SrcRowPitch, SrcSlicePitch, DstRowPitch, DstSlicePitch,
Deps.size(), Deps.data(), OutSyncPoint);
Deps.size(), Deps.data(), 0, nullptr, OutSyncPoint, nullptr, nullptr);
}
}

Expand Down Expand Up @@ -1411,7 +1411,8 @@ void MemoryManager::ext_oneapi_copyD2H_cmd_buffer(
Adapter->call_nocheck<UrApiKind::urCommandBufferAppendMemBufferReadExp>(
CommandBuffer, sycl::detail::ur::cast<ur_mem_handle_t>(SrcMem),
SrcXOffBytes, SrcAccessRangeWidthBytes, DstMem + DstXOffBytes,
Deps.size(), Deps.data(), OutSyncPoint);
Deps.size(), Deps.data(), 0, nullptr, OutSyncPoint, nullptr,
nullptr);

if (Result == UR_RESULT_ERROR_UNSUPPORTED_FEATURE) {
throw sycl::exception(
Expand Down Expand Up @@ -1440,8 +1441,8 @@ void MemoryManager::ext_oneapi_copyD2H_cmd_buffer(
UrApiKind::urCommandBufferAppendMemBufferReadRectExp>(
CommandBuffer, sycl::detail::ur::cast<ur_mem_handle_t>(SrcMem),
BufferOffset, HostOffset, RectRegion, BufferRowPitch, BufferSlicePitch,
HostRowPitch, HostSlicePitch, DstMem, Deps.size(), Deps.data(),
OutSyncPoint);
HostRowPitch, HostSlicePitch, DstMem, Deps.size(), Deps.data(), 0,
nullptr, OutSyncPoint, nullptr, nullptr);
if (Result == UR_RESULT_ERROR_UNSUPPORTED_FEATURE) {
throw sycl::exception(
sycl::make_error_code(sycl::errc::feature_not_supported),
Expand Down Expand Up @@ -1487,7 +1488,8 @@ void MemoryManager::ext_oneapi_copyH2D_cmd_buffer(
->call_nocheck<UrApiKind::urCommandBufferAppendMemBufferWriteExp>(
CommandBuffer, sycl::detail::ur::cast<ur_mem_handle_t>(DstMem),
DstXOffBytes, DstAccessRangeWidthBytes, SrcMem + SrcXOffBytes,
Deps.size(), Deps.data(), OutSyncPoint);
Deps.size(), Deps.data(), 0, nullptr, OutSyncPoint, nullptr,
nullptr);

if (Result == UR_RESULT_ERROR_UNSUPPORTED_FEATURE) {
throw sycl::exception(
Expand Down Expand Up @@ -1516,8 +1518,8 @@ void MemoryManager::ext_oneapi_copyH2D_cmd_buffer(
UrApiKind::urCommandBufferAppendMemBufferWriteRectExp>(
CommandBuffer, sycl::detail::ur::cast<ur_mem_handle_t>(DstMem),
BufferOffset, HostOffset, RectRegion, BufferRowPitch, BufferSlicePitch,
HostRowPitch, HostSlicePitch, SrcMem, Deps.size(), Deps.data(),
OutSyncPoint);
HostRowPitch, HostSlicePitch, SrcMem, Deps.size(), Deps.data(), 0,
nullptr, OutSyncPoint, nullptr, nullptr);

if (Result == UR_RESULT_ERROR_UNSUPPORTED_FEATURE) {
throw sycl::exception(
Expand All @@ -1541,8 +1543,8 @@ void MemoryManager::ext_oneapi_copy_usm_cmd_buffer(
const AdapterPtr &Adapter = Context->getAdapter();
ur_result_t Result =
Adapter->call_nocheck<UrApiKind::urCommandBufferAppendUSMMemcpyExp>(
CommandBuffer, DstMem, SrcMem, Len, Deps.size(), Deps.data(),
OutSyncPoint);
CommandBuffer, DstMem, SrcMem, Len, Deps.size(), Deps.data(), 0,
nullptr, OutSyncPoint, nullptr, nullptr);
if (Result == UR_RESULT_ERROR_UNSUPPORTED_FEATURE) {
throw sycl::exception(
sycl::make_error_code(sycl::errc::feature_not_supported),
Expand All @@ -1566,7 +1568,7 @@ void MemoryManager::ext_oneapi_fill_usm_cmd_buffer(
const AdapterPtr &Adapter = Context->getAdapter();
Adapter->call<UrApiKind::urCommandBufferAppendUSMFillExp>(
CommandBuffer, DstMem, Pattern.data(), Pattern.size(), Len, Deps.size(),
Deps.data(), OutSyncPoint);
Deps.data(), 0, nullptr, OutSyncPoint, nullptr, nullptr);
}

void MemoryManager::ext_oneapi_fill_cmd_buffer(
Expand Down Expand Up @@ -1597,7 +1599,7 @@ void MemoryManager::ext_oneapi_fill_cmd_buffer(
Adapter->call<UrApiKind::urCommandBufferAppendMemBufferFillExp>(
CommandBuffer, ur::cast<ur_mem_handle_t>(Mem), Pattern, PatternSize,
AccessOffset[0] * ElementSize, RangeMultiplier * ElementSize,
Deps.size(), Deps.data(), OutSyncPoint);
Deps.size(), Deps.data(), 0, nullptr, OutSyncPoint, nullptr, nullptr);
return;
}
// The sycl::handler uses a parallel_for kernel in the case of unusable
Expand All @@ -1614,7 +1616,7 @@ void MemoryManager::ext_oneapi_prefetch_usm_cmd_buffer(
const AdapterPtr &Adapter = Context->getAdapter();
Adapter->call<UrApiKind::urCommandBufferAppendUSMPrefetchExp>(
CommandBuffer, Mem, Length, ur_usm_migration_flags_t(0), Deps.size(),
Deps.data(), OutSyncPoint);
Deps.data(), 0, nullptr, OutSyncPoint, nullptr, nullptr);
}

void MemoryManager::ext_oneapi_advise_usm_cmd_buffer(
Expand All @@ -1625,8 +1627,8 @@ void MemoryManager::ext_oneapi_advise_usm_cmd_buffer(
ur_exp_command_buffer_sync_point_t *OutSyncPoint) {
const AdapterPtr &Adapter = Context->getAdapter();
Adapter->call<UrApiKind::urCommandBufferAppendUSMAdviseExp>(
CommandBuffer, Mem, Length, Advice, Deps.size(), Deps.data(),
OutSyncPoint);
CommandBuffer, Mem, Length, Advice, Deps.size(), Deps.data(), 0, nullptr,
OutSyncPoint, nullptr, nullptr);
}

void MemoryManager::copy_image_bindless(
Expand Down
4 changes: 2 additions & 2 deletions sycl/source/detail/scheduler/commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2562,8 +2562,8 @@ ur_result_t enqueueImpCommandBufferKernel(
Adapter->call_nocheck<UrApiKind::urCommandBufferAppendKernelLaunchExp>(
CommandBuffer, UrKernel, NDRDesc.Dims, &NDRDesc.GlobalOffset[0],
&NDRDesc.GlobalSize[0], LocalSize, 0, nullptr, SyncPoints.size(),
SyncPoints.size() ? SyncPoints.data() : nullptr, OutSyncPoint,
OutCommand);
SyncPoints.size() ? SyncPoints.data() : nullptr, 0, nullptr,
OutSyncPoint, nullptr, OutCommand);

if (!SyclKernelImpl && !Kernel) {
Adapter->call<UrApiKind::urKernelRelease>(UrKernel);
Expand Down
Loading