From 4c9d4d84553698c87aba39d98fd4ac0b81deca18 Mon Sep 17 00:00:00 2001 From: Sean Stirling Date: Wed, 10 Jul 2024 16:04:46 +0100 Subject: [PATCH 1/4] [SYCL][Bindless][Doc][ABI-Break] Rename external semaphore destroy to release Rename function destroy_external_semaphore to release_external_semaphore. This name change is to clarify exactly what is happening to the external semaphore. That is, it is being released not destroyed. --- .../sycl_ext_oneapi_bindless_images.asciidoc | 12 +++++++----- sycl/include/sycl/detail/pi.def | 2 +- sycl/include/sycl/detail/pi.h | 9 +++++---- sycl/include/sycl/ext/oneapi/bindless_images.hpp | 8 ++++---- sycl/plugins/cuda/pi_cuda.cpp | 4 ++-- sycl/plugins/hip/pi_hip.cpp | 4 ++-- sycl/plugins/level_zero/pi_level_zero.cpp | 4 ++-- sycl/plugins/native_cpu/pi_native_cpu.cpp | 4 ++-- sycl/plugins/opencl/pi_opencl.cpp | 4 ++-- sycl/plugins/unified_runtime/CMakeLists.txt | 14 +++++++------- sycl/plugins/unified_runtime/pi2ur.hpp | 4 ++-- .../plugins/unified_runtime/pi_unified_runtime.cpp | 4 ++-- sycl/source/detail/bindless_images.cpp | 8 ++++---- .../vulkan_interop/unsampled_images.cpp | 4 ++-- sycl/test/abi/pi_cuda_symbol_check.dump | 4 ++-- sycl/test/abi/pi_hip_symbol_check.dump | 2 +- sycl/test/abi/pi_level_zero_symbol_check.dump | 4 ++-- sycl/test/abi/pi_nativecpu_symbol_check.dump | 2 +- sycl/test/abi/pi_opencl_symbol_check.dump | 10 +++++----- sycl/test/abi/sycl_symbols_linux.dump | 8 ++++---- sycl/test/abi/sycl_symbols_windows.dump | 6 +++--- sycl/unittests/helpers/PiMockPlugin.hpp | 2 +- 22 files changed, 63 insertions(+), 60 deletions(-) diff --git a/sycl/doc/extensions/experimental/sycl_ext_oneapi_bindless_images.asciidoc b/sycl/doc/extensions/experimental/sycl_ext_oneapi_bindless_images.asciidoc index 215731eae0bc4..40dee2e9113f4 100644 --- a/sycl/doc/extensions/experimental/sycl_ext_oneapi_bindless_images.asciidoc +++ b/sycl/doc/extensions/experimental/sycl_ext_oneapi_bindless_images.asciidoc @@ -1904,16 +1904,16 @@ the `ext_oneapi_signal_external_semaphore` call complete. are non-blocking, asynchronous operations. The user must ensure to destroy all external semaphore objects once they are no -longer required through `destroy_external_semaphore`. +longer required through `release_external_semaphore`. ```cpp namespace sycl::ext::oneapi::experimental { -void destroy_external_semaphore(interop_semaphore_handle semaphoreHandle, +void release_external_semaphore(interop_semaphore_handle semaphoreHandle, const sycl::device &syclDevice, const sycl::context &syclContext); -void destroy_external_semaphore(interop_semaphore_handle semaphoreHandle, +void release_external_semaphore(interop_semaphore_handle semaphoreHandle, const sycl::queue &syclQueue); } @@ -2579,9 +2579,9 @@ try { input_interop_mem_handle, queue); sycl::ext::oneapi::experimental::release_external_memory( output_interop_mem_handle, queue); - sycl::ext::oneapi::experimental::destroy_external_semaphore( + sycl::ext::oneapi::experimental::release_external_semaphore( wait_interop_semaphore_handle, queue); - sycl::ext::oneapi::experimental::destroy_external_semaphore( + sycl::ext::oneapi::experimental::release_external_semaphore( done_interop_semaphore_handle, queue); sycl::ext::oneapi::experimental::destroy_image_handle(img_input, queue); sycl::ext::oneapi::experimental::destroy_image_handle(img_output, queue); @@ -2806,4 +2806,6 @@ These features still need to be handled: |5.12|2024-06-19| - Add support for sampled image arrays. - Sample image arrays with `sample_image_array` API. - Fetch sampled image arrays with `fetch_image_array` API. +|5.13|2024-07-10| - Rename `destroy_external_semaphore` to + `release_external_semaphore`. |====================== diff --git a/sycl/include/sycl/detail/pi.def b/sycl/include/sycl/detail/pi.def index d1d76ddd8ed6f..eb4aba9d1983e 100644 --- a/sycl/include/sycl/detail/pi.def +++ b/sycl/include/sycl/detail/pi.def @@ -211,7 +211,7 @@ _PI_API(piextMemReleaseInterop) _PI_API(piextMemMapExternalArray) _PI_API(piextImportExternalSemaphoreOpaqueFD) _PI_API(piextImportExternalSemaphore) -_PI_API(piextDestroyExternalSemaphore) +_PI_API(piextReleaseExternalSemaphore) _PI_API(piextWaitExternalSemaphore) _PI_API(piextSignalExternalSemaphore) diff --git a/sycl/include/sycl/detail/pi.h b/sycl/include/sycl/detail/pi.h index dec1dbb9c9e84..b669ab63722db 100644 --- a/sycl/include/sycl/detail/pi.h +++ b/sycl/include/sycl/detail/pi.h @@ -199,9 +199,10 @@ // 16.56 Replaced piextUSMEnqueueMemset with piextUSMEnqueueFill // 16.57 Added mappings to UR launch properties extension // (piextEnqueueKernelLaunchCustom) +// 17.58 Rename piextDestroyExternalSemaphore to piextReleaseExternalSemaphore -#define _PI_H_VERSION_MAJOR 16 -#define _PI_H_VERSION_MINOR 57 +#define _PI_H_VERSION_MAJOR 17 +#define _PI_H_VERSION_MINOR 58 #define _PI_STRING_HELPER(a) #a #define _PI_CONCAT(a, b) _PI_STRING_HELPER(a.b) @@ -3190,14 +3191,14 @@ piextImportExternalSemaphore(pi_context context, pi_device device, pi_external_semaphore_descriptor *sem_descriptor, pi_interop_semaphore_handle *ret_handle); -/// API to destroy the external semaphore handle. +/// API to release the external semaphore. /// /// \param context is the pi_context /// \param device is the pi_device /// \param sem_handle is the interop semaphore handle to the external semaphore /// to be destroyed __SYCL_EXPORT pi_result -piextDestroyExternalSemaphore(pi_context context, pi_device device, +piextReleaseExternalSemaphore(pi_context context, pi_device device, pi_interop_semaphore_handle sem_handle); /// API to instruct the queue with a non-blocking wait on an external semaphore. diff --git a/sycl/include/sycl/ext/oneapi/bindless_images.hpp b/sycl/include/sycl/ext/oneapi/bindless_images.hpp index 75e7f06297d4e..9778c76df2844 100644 --- a/sycl/include/sycl/ext/oneapi/bindless_images.hpp +++ b/sycl/include/sycl/ext/oneapi/bindless_images.hpp @@ -328,7 +328,7 @@ __SYCL_EXPORT interop_semaphore_handle import_external_semaphore( const sycl::queue &syclQueue); /** - * @brief Destroy the external semaphore handle + * @brief Release the external semaphore * * @param semaphoreHandle The interop semaphore handle to destroy * @param syclDevice The device in which the interop semaphore handle was @@ -337,19 +337,19 @@ __SYCL_EXPORT interop_semaphore_handle import_external_semaphore( * created */ __SYCL_EXPORT void -destroy_external_semaphore(interop_semaphore_handle semaphoreHandle, +release_external_semaphore(interop_semaphore_handle semaphoreHandle, const sycl::device &syclDevice, const sycl::context &syclContext); /** - * @brief Destroy the external semaphore handle + * @brief Release the external semaphore * * @param semaphoreHandle The interop semaphore handle to destroy * @param syclQueue The queue in which the interop semaphore handle was * created */ __SYCL_EXPORT void -destroy_external_semaphore(interop_semaphore_handle semaphoreHandle, +release_external_semaphore(interop_semaphore_handle semaphoreHandle, const sycl::queue &syclQueue); /** diff --git a/sycl/plugins/cuda/pi_cuda.cpp b/sycl/plugins/cuda/pi_cuda.cpp index 92d1eb4e4c825..ca27291725fd4 100644 --- a/sycl/plugins/cuda/pi_cuda.cpp +++ b/sycl/plugins/cuda/pi_cuda.cpp @@ -502,9 +502,9 @@ piextImportExternalSemaphore(pi_context Context, pi_device Device, } __SYCL_EXPORT pi_result -piextDestroyExternalSemaphore(pi_context Context, pi_device Device, +piextReleaseExternalSemaphore(pi_context Context, pi_device Device, pi_interop_semaphore_handle SemHandle) { - return pi2ur::piextDestroyExternalSemaphore(Context, Device, SemHandle); + return pi2ur::piextReleaseExternalSemaphore(Context, Device, SemHandle); } __SYCL_EXPORT pi_result piextWaitExternalSemaphore( diff --git a/sycl/plugins/hip/pi_hip.cpp b/sycl/plugins/hip/pi_hip.cpp index 671df35c30ac4..22ee939db45aa 100644 --- a/sycl/plugins/hip/pi_hip.cpp +++ b/sycl/plugins/hip/pi_hip.cpp @@ -505,9 +505,9 @@ piextImportExternalSemaphore(pi_context Context, pi_device Device, } __SYCL_EXPORT pi_result -piextDestroyExternalSemaphore(pi_context Context, pi_device Device, +piextReleaseExternalSemaphore(pi_context Context, pi_device Device, pi_interop_semaphore_handle SemHandle) { - return pi2ur::piextDestroyExternalSemaphore(Context, Device, SemHandle); + return pi2ur::piextReleaseExternalSemaphore(Context, Device, SemHandle); } __SYCL_EXPORT pi_result piextWaitExternalSemaphore( diff --git a/sycl/plugins/level_zero/pi_level_zero.cpp b/sycl/plugins/level_zero/pi_level_zero.cpp index daff872067f86..32ff92d14e9c6 100644 --- a/sycl/plugins/level_zero/pi_level_zero.cpp +++ b/sycl/plugins/level_zero/pi_level_zero.cpp @@ -514,9 +514,9 @@ piextImportExternalSemaphore(pi_context Context, pi_device Device, } __SYCL_EXPORT pi_result -piextDestroyExternalSemaphore(pi_context Context, pi_device Device, +piextReleaseExternalSemaphore(pi_context Context, pi_device Device, pi_interop_semaphore_handle SemHandle) { - return pi2ur::piextDestroyExternalSemaphore(Context, Device, SemHandle); + return pi2ur::piextReleaseExternalSemaphore(Context, Device, SemHandle); } __SYCL_EXPORT pi_result piextWaitExternalSemaphore( diff --git a/sycl/plugins/native_cpu/pi_native_cpu.cpp b/sycl/plugins/native_cpu/pi_native_cpu.cpp index 4e61f0a9da031..7be17db3ae192 100644 --- a/sycl/plugins/native_cpu/pi_native_cpu.cpp +++ b/sycl/plugins/native_cpu/pi_native_cpu.cpp @@ -509,9 +509,9 @@ piextImportExternalSemaphore(pi_context Context, pi_device Device, } __SYCL_EXPORT pi_result -piextDestroyExternalSemaphore(pi_context Context, pi_device Device, +piextReleaseExternalSemaphore(pi_context Context, pi_device Device, pi_interop_semaphore_handle SemHandle) { - return pi2ur::piextDestroyExternalSemaphore(Context, Device, SemHandle); + return pi2ur::piextReleaseExternalSemaphore(Context, Device, SemHandle); } __SYCL_EXPORT pi_result piextWaitExternalSemaphore( diff --git a/sycl/plugins/opencl/pi_opencl.cpp b/sycl/plugins/opencl/pi_opencl.cpp index e3345d4cb5237..d5732ac9f58a1 100644 --- a/sycl/plugins/opencl/pi_opencl.cpp +++ b/sycl/plugins/opencl/pi_opencl.cpp @@ -484,9 +484,9 @@ piextImportExternalSemaphore(pi_context Context, pi_device Device, RetHandle); } -pi_result piextDestroyExternalSemaphore(pi_context Context, pi_device Device, +pi_result piextReleaseExternalSemaphore(pi_context Context, pi_device Device, pi_interop_semaphore_handle SemHandle) { - return pi2ur::piextDestroyExternalSemaphore(Context, Device, SemHandle); + return pi2ur::piextReleaseExternalSemaphore(Context, Device, SemHandle); } __SYCL_EXPORT pi_result piextWaitExternalSemaphore( diff --git a/sycl/plugins/unified_runtime/CMakeLists.txt b/sycl/plugins/unified_runtime/CMakeLists.txt index a9e2d522f9f25..478f3b9cfaf42 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -99,14 +99,14 @@ if(SYCL_PI_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 529e8b9c34acd231eb5b829f6af8123e5f09c974 - # Merge: 6b33a1bb 5dc794cb + set(UNIFIED_RUNTIME_REPO "https://github.com/Seanst98/unified-runtime.git") + # commit 9d3bce6ad92e6f0a4af0139f9744584b5a402827 + # Merge: e0775441 1c9c2d0b # Author: Kenneth Benzie (Benie) - # Date: Wed Jul 10 15:05:31 2024 +0100 - # Merge pull request #1816 from nrspruit/l0_intel_driver_version - # [L0] Use Intel Level Zero Driver String extension - set(UNIFIED_RUNTIME_TAG 529e8b9c34acd231eb5b829f6af8123e5f09c974) + # Date: Tue Jul 9 15:57:44 2024 +0100 + # Merge pull request #1822 from JackAKirk/cuda-cubemap-driver-fix + # [cuda][bindless_images][2025.0 req] Fix for cuda < 11.6 support. + set(UNIFIED_RUNTIME_TAG e7e465f59c7a76d2be0d1144521820853ca90b58) fetch_adapter_source(level_zero ${UNIFIED_RUNTIME_REPO} diff --git a/sycl/plugins/unified_runtime/pi2ur.hpp b/sycl/plugins/unified_runtime/pi2ur.hpp index 1f82292f960fe..27262f68c6c83 100644 --- a/sycl/plugins/unified_runtime/pi2ur.hpp +++ b/sycl/plugins/unified_runtime/pi2ur.hpp @@ -5674,7 +5674,7 @@ piextImportExternalSemaphore(pi_context Context, pi_device Device, } inline pi_result -piextDestroyExternalSemaphore(pi_context Context, pi_device Device, +piextReleaseExternalSemaphore(pi_context Context, pi_device Device, pi_interop_semaphore_handle SemHandle) { PI_ASSERT(Context, PI_ERROR_INVALID_CONTEXT); PI_ASSERT(Device, PI_ERROR_INVALID_DEVICE); @@ -5684,7 +5684,7 @@ piextDestroyExternalSemaphore(pi_context Context, pi_device Device, auto UrSemHandle = reinterpret_cast(SemHandle); - HANDLE_ERRORS(urBindlessImagesDestroyExternalSemaphoreExp(UrContext, UrDevice, + HANDLE_ERRORS(urBindlessImagesReleaseExternalSemaphoreExp(UrContext, UrDevice, UrSemHandle)); return PI_SUCCESS; diff --git a/sycl/plugins/unified_runtime/pi_unified_runtime.cpp b/sycl/plugins/unified_runtime/pi_unified_runtime.cpp index b75a5abd60327..b67fc758897ee 100644 --- a/sycl/plugins/unified_runtime/pi_unified_runtime.cpp +++ b/sycl/plugins/unified_runtime/pi_unified_runtime.cpp @@ -1437,9 +1437,9 @@ piextImportExternalSemaphore(pi_context Context, pi_device Device, } __SYCL_EXPORT pi_result -piextDestroyExternalSemaphore(pi_context Context, pi_device Device, +piextReleaseExternalSemaphore(pi_context Context, pi_device Device, pi_interop_semaphore_handle SemHandle) { - return pi2ur::piextDestroyExternalSemaphore(Context, Device, SemHandle); + return pi2ur::piextReleaseExternalSemaphore(Context, Device, SemHandle); } __SYCL_EXPORT pi_result piextWaitExternalSemaphore( diff --git a/sycl/source/detail/bindless_images.cpp b/sycl/source/detail/bindless_images.cpp index a02fa47a0139c..591d0f1c42c62 100644 --- a/sycl/source/detail/bindless_images.cpp +++ b/sycl/source/detail/bindless_images.cpp @@ -767,7 +767,7 @@ interop_semaphore_handle import_external_semaphore( } __SYCL_EXPORT void -destroy_external_semaphore(interop_semaphore_handle semaphoreHandle, +release_external_semaphore(interop_semaphore_handle semaphoreHandle, const sycl::device &syclDevice, const sycl::context &syclContext) { std::shared_ptr CtxImpl = @@ -779,14 +779,14 @@ destroy_external_semaphore(interop_semaphore_handle semaphoreHandle, pi_device Device = DevImpl->getHandleRef(); Plugin->call( + sycl::detail::PiApiKind::piextReleaseExternalSemaphore>( C, Device, (pi_interop_semaphore_handle)semaphoreHandle.raw_handle); } __SYCL_EXPORT void -destroy_external_semaphore(interop_semaphore_handle semaphoreHandle, +release_external_semaphore(interop_semaphore_handle semaphoreHandle, const sycl::queue &syclQueue) { - destroy_external_semaphore(semaphoreHandle, syclQueue.get_device(), + release_external_semaphore(semaphoreHandle, syclQueue.get_device(), syclQueue.get_context()); } diff --git a/sycl/test-e2e/bindless_images/vulkan_interop/unsampled_images.cpp b/sycl/test-e2e/bindless_images/vulkan_interop/unsampled_images.cpp index 9b609df39380f..980c320f12784 100644 --- a/sycl/test-e2e/bindless_images/vulkan_interop/unsampled_images.cpp +++ b/sycl/test-e2e/bindless_images/vulkan_interop/unsampled_images.cpp @@ -134,9 +134,9 @@ create_test_handles(sycl::context &ctxt, sycl::device &dev, } void cleanup_test(sycl::context &ctxt, sycl::device &dev, handles_t handles) { - syclexp::destroy_external_semaphore( + syclexp::release_external_semaphore( handles.sycl_wait_interop_semaphore_handle, dev, ctxt); - syclexp::destroy_external_semaphore( + syclexp::release_external_semaphore( handles.sycl_done_interop_semaphore_handle, dev, ctxt); syclexp::destroy_image_handle(handles.input_1, dev, ctxt); syclexp::destroy_image_handle(handles.input_2, dev, ctxt); diff --git a/sycl/test/abi/pi_cuda_symbol_check.dump b/sycl/test/abi/pi_cuda_symbol_check.dump index f85c8a8b1b55f..d68ee09df1f67 100644 --- a/sycl/test/abi/pi_cuda_symbol_check.dump +++ b/sycl/test/abi/pi_cuda_symbol_check.dump @@ -106,7 +106,6 @@ piextCommandBufferUpdateKernelLaunch piextContextCreateWithNativeHandle piextContextGetNativeHandle piextContextSetExtendedDeleter -piextDestroyExternalSemaphore piextDeviceCreateWithNativeHandle piextDeviceGetNativeHandle piextDeviceSelectBinary @@ -114,6 +113,7 @@ piextDisablePeerAccess piextEnablePeerAccess piextEnqueueCommandBuffer piextEnqueueCooperativeKernelLaunch +piextEnqueueKernelLaunchCustom piextEnqueueNativeCommand piextEnqueueReadHostPipe piextEnqueueWriteHostPipe @@ -159,6 +159,7 @@ piextProgramSetSpecializationConstant piextQueueCreate piextQueueCreateWithNativeHandle piextQueueGetNativeHandle +piextReleaseExternalSemaphore piextSignalExternalSemaphore piextUSMDeviceAlloc piextUSMEnqueueFill @@ -183,4 +184,3 @@ piextVirtualMemReserve piextVirtualMemSetAccess piextVirtualMemUnmap piextWaitExternalSemaphore -piextEnqueueKernelLaunchCustom diff --git a/sycl/test/abi/pi_hip_symbol_check.dump b/sycl/test/abi/pi_hip_symbol_check.dump index f3706312ae9d6..79c77f23fe45d 100644 --- a/sycl/test/abi/pi_hip_symbol_check.dump +++ b/sycl/test/abi/pi_hip_symbol_check.dump @@ -106,7 +106,7 @@ piextCommandBufferUpdateKernelLaunch piextContextCreateWithNativeHandle piextContextGetNativeHandle piextContextSetExtendedDeleter -piextDestroyExternalSemaphore +piextReleaseExternalSemaphore piextDeviceCreateWithNativeHandle piextDeviceGetNativeHandle piextDeviceSelectBinary diff --git a/sycl/test/abi/pi_level_zero_symbol_check.dump b/sycl/test/abi/pi_level_zero_symbol_check.dump index 88fc7c1e80cf7..67bbd02f181a7 100644 --- a/sycl/test/abi/pi_level_zero_symbol_check.dump +++ b/sycl/test/abi/pi_level_zero_symbol_check.dump @@ -105,7 +105,6 @@ piextCommandBufferUpdateKernelLaunch piextContextCreateWithNativeHandle piextContextGetNativeHandle piextContextSetExtendedDeleter -piextDestroyExternalSemaphore piextDeviceCreateWithNativeHandle piextDeviceGetNativeHandle piextDeviceSelectBinary @@ -113,6 +112,7 @@ piextDisablePeerAccess piextEnablePeerAccess piextEnqueueCommandBuffer piextEnqueueCooperativeKernelLaunch +piextEnqueueKernelLaunchCustom piextEnqueueNativeCommand piextEnqueueReadHostPipe piextEnqueueWriteHostPipe @@ -158,6 +158,7 @@ piextProgramSetSpecializationConstant piextQueueCreate piextQueueCreateWithNativeHandle piextQueueGetNativeHandle +piextReleaseExternalSemaphore piextSignalExternalSemaphore piextUSMDeviceAlloc piextUSMEnqueueFill @@ -182,4 +183,3 @@ piextVirtualMemReserve piextVirtualMemSetAccess piextVirtualMemUnmap piextWaitExternalSemaphore -piextEnqueueKernelLaunchCustom diff --git a/sycl/test/abi/pi_nativecpu_symbol_check.dump b/sycl/test/abi/pi_nativecpu_symbol_check.dump index 760f222f9a11e..20747e51f583b 100644 --- a/sycl/test/abi/pi_nativecpu_symbol_check.dump +++ b/sycl/test/abi/pi_nativecpu_symbol_check.dump @@ -106,7 +106,7 @@ piextCommandBufferUpdateKernelLaunch piextContextCreateWithNativeHandle piextContextGetNativeHandle piextContextSetExtendedDeleter -piextDestroyExternalSemaphore +piextReleaseExternalSemaphore piextDeviceCreateWithNativeHandle piextDeviceGetNativeHandle piextDeviceSelectBinary diff --git a/sycl/test/abi/pi_opencl_symbol_check.dump b/sycl/test/abi/pi_opencl_symbol_check.dump index 75fba0db0809a..e2156ddb55c4c 100644 --- a/sycl/test/abi/pi_opencl_symbol_check.dump +++ b/sycl/test/abi/pi_opencl_symbol_check.dump @@ -105,7 +105,6 @@ piextCommandBufferUpdateKernelLaunch piextContextCreateWithNativeHandle piextContextGetNativeHandle piextContextSetExtendedDeleter -piextDestroyExternalSemaphore piextDeviceCreateWithNativeHandle piextDeviceGetNativeHandle piextDeviceSelectBinary @@ -113,6 +112,7 @@ piextDisablePeerAccess piextEnablePeerAccess piextEnqueueCommandBuffer piextEnqueueCooperativeKernelLaunch +piextEnqueueKernelLaunchCustom piextEnqueueNativeCommand piextEnqueueReadHostPipe piextEnqueueWriteHostPipe @@ -134,9 +134,6 @@ piextMemGetNativeHandle piextMemImageAllocate piextMemImageCopy piextMemImageCreateWithNativeHandle -piextPhysicalMemCreate -piextPhysicalMemRelease -piextPhysicalMemRetain piextMemImageFree piextMemImageGetInfo piextMemImportOpaqueFD @@ -149,6 +146,9 @@ piextMemSampledImageHandleDestroy piextMemUnsampledImageCreate piextMemUnsampledImageHandleDestroy piextPeerAccessGetInfo +piextPhysicalMemCreate +piextPhysicalMemRelease +piextPhysicalMemRetain piextPlatformCreateWithNativeHandle piextPlatformGetNativeHandle piextPluginGetOpaqueData @@ -158,6 +158,7 @@ piextProgramSetSpecializationConstant piextQueueCreate piextQueueCreateWithNativeHandle piextQueueGetNativeHandle +piextReleaseExternalSemaphore piextSignalExternalSemaphore piextUSMDeviceAlloc piextUSMEnqueueFill @@ -182,4 +183,3 @@ piextVirtualMemReserve piextVirtualMemSetAccess piextVirtualMemUnmap piextWaitExternalSemaphore -piextEnqueueKernelLaunchCustom diff --git a/sycl/test/abi/sycl_symbols_linux.dump b/sycl/test/abi/sycl_symbols_linux.dump index 52ce97ef1c943..5fd8cb222539b 100644 --- a/sycl/test/abi/sycl_symbols_linux.dump +++ b/sycl/test/abi/sycl_symbols_linux.dump @@ -3057,8 +3057,8 @@ _ZN4sycl3_V13ext6oneapi12experimental25map_external_image_memoryENS3_18interop_m _ZN4sycl3_V13ext6oneapi12experimental25map_external_image_memoryENS3_18interop_mem_handleERKNS3_16image_descriptorERKNS0_6deviceERKNS0_7contextE _ZN4sycl3_V13ext6oneapi12experimental25map_external_memory_arrayENS3_18interop_mem_handleERKNS3_16image_descriptorERKNS0_5queueE _ZN4sycl3_V13ext6oneapi12experimental25map_external_memory_arrayENS3_18interop_mem_handleERKNS3_16image_descriptorERKNS0_6deviceERKNS0_7contextE -_ZN4sycl3_V13ext6oneapi12experimental26destroy_external_semaphoreENS3_24interop_semaphore_handleERKNS0_5queueE -_ZN4sycl3_V13ext6oneapi12experimental26destroy_external_semaphoreENS3_24interop_semaphore_handleERKNS0_6deviceERKNS0_7contextE +_ZN4sycl3_V13ext6oneapi12experimental26release_external_semaphoreENS3_24interop_semaphore_handleERKNS0_5queueE +_ZN4sycl3_V13ext6oneapi12experimental26release_external_semaphoreENS3_24interop_semaphore_handleERKNS0_6deviceERKNS0_7contextE _ZN4sycl3_V13ext6oneapi12experimental4node12update_rangeILi1EEEvNS0_5rangeIXT_EEE _ZN4sycl3_V13ext6oneapi12experimental4node12update_rangeILi2EEEvNS0_5rangeIXT_EEE _ZN4sycl3_V13ext6oneapi12experimental4node12update_rangeILi3EEEvNS0_5rangeIXT_EEE @@ -3516,7 +3516,6 @@ _ZN4sycl3_V17handler22memcpyFromDeviceGlobalEPvPKvbmm _ZN4sycl3_V17handler22setHandlerKernelBundleENS0_6kernelE _ZN4sycl3_V17handler22setHandlerKernelBundleERKSt10shared_ptrINS0_6detail18kernel_bundle_implEE _ZN4sycl3_V17handler22setKernelIsCooperativeEb -_ZN4sycl3_V17handler26setKernelUsesClusterLaunchEv _ZN4sycl3_V17handler24GetRangeRoundingSettingsERmS2_S2_ _ZN4sycl3_V17handler24ext_intel_read_host_pipeENS0_6detail11string_viewEPvmb _ZN4sycl3_V17handler24ext_oneapi_memcpy2d_implEPvmPKvmmm @@ -3524,6 +3523,7 @@ _ZN4sycl3_V17handler24ext_oneapi_memset2d_implEPvmimm _ZN4sycl3_V17handler24registerDynamicParameterERNS0_3ext6oneapi12experimental6detail22dynamic_parameter_baseEi _ZN4sycl3_V17handler25ext_intel_write_host_pipeENS0_6detail11string_viewEPvmb _ZN4sycl3_V17handler26associateWithHandlerCommonESt10shared_ptrINS0_6detail16AccessorImplHostEEi +_ZN4sycl3_V17handler26setKernelUsesClusterLaunchEv _ZN4sycl3_V17handler27computeFallbackKernelBoundsEmm _ZN4sycl3_V17handler28extractArgsAndReqsFromLambdaEPcmPKNS0_6detail19kernel_param_desc_tEb _ZN4sycl3_V17handler28memcpyToHostOnlyDeviceGlobalEPKvS3_mbmm @@ -3958,6 +3958,7 @@ _ZNK4sycl3_V16device13get_info_implINS0_4info6device27preferred_vector_width_hal _ZNK4sycl3_V16device13get_info_implINS0_4info6device27preferred_vector_width_longEEENS0_6detail11ABINeutralTINS6_19is_device_info_descIT_E11return_typeEE4typeEv _ZNK4sycl3_V16device13get_info_implINS0_4info6device28preferred_vector_width_floatEEENS0_6detail11ABINeutralTINS6_19is_device_info_descIT_E11return_typeEE4typeEv _ZNK4sycl3_V16device13get_info_implINS0_4info6device28preferred_vector_width_shortEEENS0_6detail11ABINeutralTINS6_19is_device_info_descIT_E11return_typeEE4typeEv +_ZNK4sycl3_V16device13get_info_implINS0_4info6device29ext_oneapi_cuda_cluster_groupEEENS0_6detail11ABINeutralTINS6_19is_device_info_descIT_E11return_typeEE4typeEv _ZNK4sycl3_V16device13get_info_implINS0_4info6device29ext_oneapi_max_work_groups_1dEEENS0_6detail11ABINeutralTINS6_19is_device_info_descIT_E11return_typeEE4typeEv _ZNK4sycl3_V16device13get_info_implINS0_4info6device29ext_oneapi_max_work_groups_2dEEENS0_6detail11ABINeutralTINS6_19is_device_info_descIT_E11return_typeEE4typeEv _ZNK4sycl3_V16device13get_info_implINS0_4info6device29ext_oneapi_max_work_groups_3dEEENS0_6detail11ABINeutralTINS6_19is_device_info_descIT_E11return_typeEE4typeEv @@ -3973,7 +3974,6 @@ _ZNK4sycl3_V16device13get_info_implINS0_4info6device33ext_oneapi_max_global_work _ZNK4sycl3_V16device13get_info_implINS0_4info6device33usm_restricted_shared_allocationsEEENS0_6detail11ABINeutralTINS6_19is_device_info_descIT_E11return_typeEE4typeEv _ZNK4sycl3_V16device13get_info_implINS0_4info6device35ext_intel_gpu_eu_count_per_subsliceEEENS0_6detail11ABINeutralTINS6_19is_device_info_descIT_E11return_typeEE4typeEv _ZNK4sycl3_V16device13get_info_implINS0_4info6device38sub_group_independent_forward_progressEEENS0_6detail11ABINeutralTINS6_19is_device_info_descIT_E11return_typeEE4typeEv -_ZNK4sycl3_V16device13get_info_implINS0_4info6device29ext_oneapi_cuda_cluster_groupEEENS0_6detail11ABINeutralTINS6_19is_device_info_descIT_E11return_typeEE4typeEv _ZNK4sycl3_V16device13get_info_implINS0_4info6device4nameEEENS0_6detail11ABINeutralTINS6_19is_device_info_descIT_E11return_typeEE4typeEv _ZNK4sycl3_V16device13get_info_implINS0_4info6device6vendorEEENS0_6detail11ABINeutralTINS6_19is_device_info_descIT_E11return_typeEE4typeEv _ZNK4sycl3_V16device13get_info_implINS0_4info6device7aspectsEEENS0_6detail11ABINeutralTINS6_19is_device_info_descIT_E11return_typeEE4typeEv diff --git a/sycl/test/abi/sycl_symbols_windows.dump b/sycl/test/abi/sycl_symbols_windows.dump index 05bca51528284..110377ed3c391 100644 --- a/sycl/test/abi/sycl_symbols_windows.dump +++ b/sycl/test/abi/sycl_symbols_windows.dump @@ -137,12 +137,12 @@ ??$get_info_impl@Uext_intel_max_mem_bandwidth@device@info@_V1@sycl@@@device@_V1@sycl@@AEBA_KXZ ??$get_info_impl@Uext_intel_mem_channel@device@info@_V1@sycl@@@device@_V1@sycl@@AEBA_NXZ ??$get_info_impl@Uext_intel_pci_address@device@info@_V1@sycl@@@device@_V1@sycl@@AEBA?AVstring@detail@12@XZ +??$get_info_impl@Uext_oneapi_cuda_cluster_group@device@info@_V1@sycl@@@device@_V1@sycl@@AEBA_NXZ ??$get_info_impl@Uext_oneapi_max_global_work_groups@device@info@_V1@sycl@@@device@_V1@sycl@@AEBA_KXZ ??$get_info_impl@Uext_oneapi_max_work_groups_1d@device@info@_V1@sycl@@@device@_V1@sycl@@AEBA?AV?$id@$00@12@XZ ??$get_info_impl@Uext_oneapi_max_work_groups_2d@device@info@_V1@sycl@@@device@_V1@sycl@@AEBA?AV?$id@$01@12@XZ ??$get_info_impl@Uext_oneapi_max_work_groups_3d@device@info@_V1@sycl@@@device@_V1@sycl@@AEBA?AV?$id@$02@12@XZ ??$get_info_impl@Uext_oneapi_srgb@device@info@_V1@sycl@@@device@_V1@sycl@@AEBA_NXZ -??$get_info_impl@Uext_oneapi_cuda_cluster_group@device@info@_V1@sycl@@@device@_V1@sycl@@AEBA_NXZ ??$get_info_impl@Uextensions@device@info@_V1@sycl@@@device@_V1@sycl@@AEBA?AV?$vector@Vstring@detail@_V1@sycl@@V?$allocator@Vstring@detail@_V1@sycl@@@std@@@std@@XZ ??$get_info_impl@Uextensions@platform@info@_V1@sycl@@@platform@_V1@sycl@@AEBA?AV?$vector@Vstring@detail@_V1@sycl@@V?$allocator@Vstring@detail@_V1@sycl@@@std@@@std@@XZ ??$get_info_impl@Ufree_memory@device@info@intel@ext@_V1@sycl@@@device@_V1@sycl@@AEBA_KXZ @@ -3931,8 +3931,6 @@ ?depends_on@handler@_V1@sycl@@IEAAXAEBV?$vector@V?$shared_ptr@Vevent_impl@detail@_V1@sycl@@@std@@V?$allocator@V?$shared_ptr@Vevent_impl@detail@_V1@sycl@@@std@@@2@@std@@@Z ?depends_on@handler@_V1@sycl@@QEAAXAEBV?$vector@Vevent@_V1@sycl@@V?$allocator@Vevent@_V1@sycl@@@std@@@std@@@Z ?depends_on@handler@_V1@sycl@@QEAAXVevent@23@@Z -?destroy_external_semaphore@experimental@oneapi@ext@_V1@sycl@@YAXUinterop_semaphore_handle@12345@AEBVdevice@45@AEBVcontext@45@@Z -?destroy_external_semaphore@experimental@oneapi@ext@_V1@sycl@@YAXUinterop_semaphore_handle@12345@AEBVqueue@45@@Z ?destroy_image_handle@experimental@oneapi@ext@_V1@sycl@@YAXAEAUsampled_image_handle@12345@AEBVdevice@45@AEBVcontext@45@@Z ?destroy_image_handle@experimental@oneapi@ext@_V1@sycl@@YAXAEAUsampled_image_handle@12345@AEBVqueue@45@@Z ?destroy_image_handle@experimental@oneapi@ext@_V1@sycl@@YAXAEAUunsampled_image_handle@12345@AEBVdevice@45@AEBVcontext@45@@Z @@ -4366,6 +4364,8 @@ ?registerDynamicParameter@handler@_V1@sycl@@AEAAXAEAVdynamic_parameter_base@detail@experimental@oneapi@ext@23@H@Z ?release_external_memory@experimental@oneapi@ext@_V1@sycl@@YAXUinterop_mem_handle@12345@AEBVdevice@45@AEBVcontext@45@@Z ?release_external_memory@experimental@oneapi@ext@_V1@sycl@@YAXUinterop_mem_handle@12345@AEBVqueue@45@@Z +?release_external_semaphore@experimental@oneapi@ext@_V1@sycl@@YAXUinterop_semaphore_handle@12345@AEBVdevice@45@AEBVcontext@45@@Z +?release_external_semaphore@experimental@oneapi@ext@_V1@sycl@@YAXUinterop_semaphore_handle@12345@AEBVqueue@45@@Z ?release_from_device_copy@experimental@oneapi@ext@_V1@sycl@@YAXPEBXAEBVcontext@45@@Z ?release_from_device_copy@experimental@oneapi@ext@_V1@sycl@@YAXPEBXAEBVqueue@45@@Z ?removeDuplicateDevices@detail@_V1@sycl@@YA?BV?$vector@Vdevice@_V1@sycl@@V?$allocator@Vdevice@_V1@sycl@@@std@@@std@@AEBV45@@Z diff --git a/sycl/unittests/helpers/PiMockPlugin.hpp b/sycl/unittests/helpers/PiMockPlugin.hpp index 6668f33087967..418d35f0b4a84 100644 --- a/sycl/unittests/helpers/PiMockPlugin.hpp +++ b/sycl/unittests/helpers/PiMockPlugin.hpp @@ -559,7 +559,7 @@ mock_piextImportExternalMemory(pi_context context, pi_device device, } inline pi_result -mock_piextDestroyExternalSemaphore(pi_context context, pi_device device, +mock_piextReleaseExternalSemaphore(pi_context context, pi_device device, pi_interop_semaphore_handle sem_handle) { return PI_SUCCESS; } From 5eb867f4e4dbe7aa99de949ddfc3996f7d759941 Mon Sep 17 00:00:00 2001 From: Sean Stirling Date: Thu, 11 Jul 2024 15:50:08 +0100 Subject: [PATCH 2/4] Address feedback on spec wording --- .../experimental/sycl_ext_oneapi_bindless_images.asciidoc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sycl/doc/extensions/experimental/sycl_ext_oneapi_bindless_images.asciidoc b/sycl/doc/extensions/experimental/sycl_ext_oneapi_bindless_images.asciidoc index 40dee2e9113f4..f54a37d4d41af 100644 --- a/sycl/doc/extensions/experimental/sycl_ext_oneapi_bindless_images.asciidoc +++ b/sycl/doc/extensions/experimental/sycl_ext_oneapi_bindless_images.asciidoc @@ -1906,6 +1906,10 @@ are non-blocking, asynchronous operations. The user must ensure to destroy all external semaphore objects once they are no longer required through `release_external_semaphore`. +The user must ensure to destroy all SYCL external semaphore objects used to +access the external semaphore once they are no longer required through +`release_external_semaphore`. + ```cpp namespace sycl::ext::oneapi::experimental { From 264a12f7bfedabc7fc89839fe19ad4fb4839dc9c Mon Sep 17 00:00:00 2001 From: Sean Stirling Date: Thu, 11 Jul 2024 15:53:39 +0100 Subject: [PATCH 3/4] Address feedback on spec wording --- .../experimental/sycl_ext_oneapi_bindless_images.asciidoc | 3 --- 1 file changed, 3 deletions(-) diff --git a/sycl/doc/extensions/experimental/sycl_ext_oneapi_bindless_images.asciidoc b/sycl/doc/extensions/experimental/sycl_ext_oneapi_bindless_images.asciidoc index f54a37d4d41af..8707b572c4ab9 100644 --- a/sycl/doc/extensions/experimental/sycl_ext_oneapi_bindless_images.asciidoc +++ b/sycl/doc/extensions/experimental/sycl_ext_oneapi_bindless_images.asciidoc @@ -1903,9 +1903,6 @@ the `ext_oneapi_signal_external_semaphore` call complete. `ext_oneapi_wait_external_semaphore` and `ext_oneapi_signal_external_semaphore` are non-blocking, asynchronous operations. -The user must ensure to destroy all external semaphore objects once they are no -longer required through `release_external_semaphore`. - The user must ensure to destroy all SYCL external semaphore objects used to access the external semaphore once they are no longer required through `release_external_semaphore`. From 2dfdc06aa05ff9e0c31cb08b5d0c855bb25acaca Mon Sep 17 00:00:00 2001 From: Sean Stirling Date: Thu, 18 Jul 2024 11:08:48 +0100 Subject: [PATCH 4/4] Update UR CMakeLists --- sycl/include/sycl/detail/pi.h | 1 - sycl/plugins/unified_runtime/CMakeLists.txt | 13 ++++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/sycl/include/sycl/detail/pi.h b/sycl/include/sycl/detail/pi.h index 40c5036372528..e25ac61c8cea1 100644 --- a/sycl/include/sycl/detail/pi.h +++ b/sycl/include/sycl/detail/pi.h @@ -205,7 +205,6 @@ // piextImportExternalSemaphoreOpaqueFD // 19.61 Rename piextDestroyExternalSemaphore to piextReleaseExternalSemaphore - #define _PI_H_VERSION_MAJOR 19 #define _PI_H_VERSION_MINOR 61 diff --git a/sycl/plugins/unified_runtime/CMakeLists.txt b/sycl/plugins/unified_runtime/CMakeLists.txt index b737a4fa69e12..2f6bb78a74eda 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -99,14 +99,13 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) CACHE PATH "Path to external '${name}' adapter source dir" FORCE) endfunction() - set(UNIFIED_RUNTIME_REPO "https://github.com/Seanst98/unified-runtime.git") - # commit 9d3bce6ad92e6f0a4af0139f9744584b5a402827 - # Merge: e0775441 1c9c2d0b + set(UNIFIED_RUNTIME_REPO "https://github.com/oneapi-src/unified-runtime.git") + # commit 0abf37072567c27ff412ea7acfce7b72b9e4b3c0 # Author: Kenneth Benzie (Benie) - # Date: Tue Jul 9 15:57:44 2024 +0100 - # Merge pull request #1822 from JackAKirk/cuda-cubemap-driver-fix - # [cuda][bindless_images][2025.0 req] Fix for cuda < 11.6 support. - set(UNIFIED_RUNTIME_TAG 037d3b57d9c7c62f5989ba9950d926f800f8d84c) + # Date: Wed Jul 17 19:12:31 2024 +0100 + # Reinstate "Merge pull request #1855 from Seanst98/sean/rename-external-semaphore-release"" + # This reverts commit b26e53cdbd178ee03c3e8252aa00e596deb1f313. + set(UNIFIED_RUNTIME_TAG 0abf37072567c27ff412ea7acfce7b72b9e4b3c0) fetch_adapter_source(level_zero ${UNIFIED_RUNTIME_REPO}