From a0485d324984cf186bef9769109ef4027c51dccb Mon Sep 17 00:00:00 2001 From: Ewan Crawford Date: Fri, 5 Jul 2024 13:05:24 +0100 Subject: [PATCH 1/3] [SYCL][Graph] Bump UR hash Test UR PR https://github.com/oneapi-src/unified-runtime/pull/1823 --- sycl/cmake/modules/FetchUnifiedRuntime.cmake | 10 ++---- sycl/source/detail/memory_manager.cpp | 34 +++++++++++--------- sycl/source/detail/scheduler/commands.cpp | 4 +-- 3 files changed, 22 insertions(+), 26 deletions(-) diff --git a/sycl/cmake/modules/FetchUnifiedRuntime.cmake b/sycl/cmake/modules/FetchUnifiedRuntime.cmake index ee17573ba6bb7..058f89f5bbc16 100644 --- a/sycl/cmake/modules/FetchUnifiedRuntime.cmake +++ b/sycl/cmake/modules/FetchUnifiedRuntime.cmake @@ -116,14 +116,8 @@ if(SYCL_UR_USE_FETCH_CONTENT) CACHE PATH "Path to external '${name}' adapter source dir" FORCE) endfunction() - set(UNIFIED_RUNTIME_REPO "https://github.com/oneapi-src/unified-runtime.git") - # commit 0247d0966ca8c5d1e3245f375e48e6c997bed9af - # Merge: 675dd292 04ffc909 - # Author: aarongreig - # Date: Tue Oct 1 17:10:58 2024 +0100 - # Merge pull request #2154 from npmiller/fix-graph-exce - # [CUDA][HIP] Fix exceptions throwing from adapter - set(UNIFIED_RUNTIME_TAG 0247d0966ca8c5d1e3245f375e48e6c997bed9af) + set(UNIFIED_RUNTIME_REPO "https://github.com/Bensuo/unified-runtime.git") + set(UNIFIED_RUNTIME_TAG ewan/ur_dyn_events) set(UMF_BUILD_EXAMPLES OFF CACHE INTERNAL "EXAMPLES") # Due to the use of dependentloadflag and no installer for UMF and hwloc we need diff --git a/sycl/source/detail/memory_manager.cpp b/sycl/source/detail/memory_manager.cpp index 5c86e5e21d216..880def95eb314 100644 --- a/sycl/source/detail/memory_manager.cpp +++ b/sycl/source/detail/memory_manager.cpp @@ -1346,8 +1346,8 @@ void MemoryManager::ext_oneapi_copyD2D_cmd_buffer( Adapter->call( CommandBuffer, sycl::detail::ur::cast(SrcMem), sycl::detail::ur::cast(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 @@ -1373,7 +1373,7 @@ void MemoryManager::ext_oneapi_copyD2D_cmd_buffer( CommandBuffer, sycl::detail::ur::cast(SrcMem), sycl::detail::ur::cast(DstMem), SrcOrigin, DstOrigin, Region, SrcRowPitch, SrcSlicePitch, DstRowPitch, DstSlicePitch, - Deps.size(), Deps.data(), OutSyncPoint); + Deps.size(), Deps.data(), 0, nullptr, OutSyncPoint, nullptr, nullptr); } } @@ -1411,7 +1411,8 @@ void MemoryManager::ext_oneapi_copyD2H_cmd_buffer( Adapter->call_nocheck( CommandBuffer, sycl::detail::ur::cast(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( @@ -1440,8 +1441,8 @@ void MemoryManager::ext_oneapi_copyD2H_cmd_buffer( UrApiKind::urCommandBufferAppendMemBufferReadRectExp>( CommandBuffer, sycl::detail::ur::cast(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), @@ -1487,7 +1488,8 @@ void MemoryManager::ext_oneapi_copyH2D_cmd_buffer( ->call_nocheck( CommandBuffer, sycl::detail::ur::cast(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( @@ -1516,8 +1518,8 @@ void MemoryManager::ext_oneapi_copyH2D_cmd_buffer( UrApiKind::urCommandBufferAppendMemBufferWriteRectExp>( CommandBuffer, sycl::detail::ur::cast(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( @@ -1541,8 +1543,8 @@ void MemoryManager::ext_oneapi_copy_usm_cmd_buffer( const AdapterPtr &Adapter = Context->getAdapter(); ur_result_t Result = Adapter->call_nocheck( - 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), @@ -1566,7 +1568,7 @@ void MemoryManager::ext_oneapi_fill_usm_cmd_buffer( const AdapterPtr &Adapter = Context->getAdapter(); Adapter->call( 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( @@ -1597,7 +1599,7 @@ void MemoryManager::ext_oneapi_fill_cmd_buffer( Adapter->call( CommandBuffer, ur::cast(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 @@ -1614,7 +1616,7 @@ void MemoryManager::ext_oneapi_prefetch_usm_cmd_buffer( const AdapterPtr &Adapter = Context->getAdapter(); Adapter->call( 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( @@ -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( - 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( diff --git a/sycl/source/detail/scheduler/commands.cpp b/sycl/source/detail/scheduler/commands.cpp index 41570dd11a3c1..b2718284386e6 100644 --- a/sycl/source/detail/scheduler/commands.cpp +++ b/sycl/source/detail/scheduler/commands.cpp @@ -2539,8 +2539,8 @@ ur_result_t enqueueImpCommandBufferKernel( Adapter->call_nocheck( 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(UrKernel); From 876bca1a8b9e5584776002a15ae614ed2ea5d17b Mon Sep 17 00:00:00 2001 From: Aaron Greig Date: Mon, 14 Oct 2024 12:19:36 +0100 Subject: [PATCH 2/3] Update UR tag. --- sycl/cmake/modules/FetchUnifiedRuntime.cmake | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sycl/cmake/modules/FetchUnifiedRuntime.cmake b/sycl/cmake/modules/FetchUnifiedRuntime.cmake index 18eb1b6cc1bcd..0128a6c8821a3 100644 --- a/sycl/cmake/modules/FetchUnifiedRuntime.cmake +++ b/sycl/cmake/modules/FetchUnifiedRuntime.cmake @@ -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 - # 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 From dd71ba5677ec22f11278ec8b313e02e7070dcb6d Mon Sep 17 00:00:00 2001 From: Aaron Greig Date: Mon, 14 Oct 2024 13:25:22 +0100 Subject: [PATCH 3/3] Pull in a batch of minor native cpu fixes. --- sycl/cmake/modules/FetchUnifiedRuntime.cmake | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sycl/cmake/modules/FetchUnifiedRuntime.cmake b/sycl/cmake/modules/FetchUnifiedRuntime.cmake index 0128a6c8821a3..2cf90d334a45b 100644 --- a/sycl/cmake/modules/FetchUnifiedRuntime.cmake +++ b/sycl/cmake/modules/FetchUnifiedRuntime.cmake @@ -116,14 +116,14 @@ if(SYCL_UR_USE_FETCH_CONTENT) CACHE PATH "Path to external '${name}' adapter source dir" FORCE) endfunction() - set(UNIFIED_RUNTIME_REPO "https://github.com/oneapi-src/unified-runtime.git") - # commit 5ade7fc44d453d86dc7440595dbea37c29ce54dc - # Merge: 66ea35dc 0b5b89f0 + set(UNIFIED_RUNTIME_REPO "https://github.com/aarongreig/unified-runtime.git") + # commit 22ef899035a85b70b5472416ad6db8021effb5c1 + # Merge: 4814e505 f5979a68 # Author: aarongreig - # 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) + # 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 aaron/nativeCPUBatch) set(UMF_BUILD_EXAMPLES OFF CACHE INTERNAL "EXAMPLES") # Due to the use of dependentloadflag and no installer for UMF and hwloc we need