From 7125ba0d5cece2f2652705273d7c3c999e9b8eac Mon Sep 17 00:00:00 2001 From: Sean Stirling Date: Tue, 4 Jun 2024 12:12:53 +0100 Subject: [PATCH 01/27] [SYCL][Bindless][Doc][ABI-Break] Rename interop related structs/funcs to external Rename related interop structs/funcs with "external" keyword over "interop" to align better with existing structs/funcs and other 3rd party APIs. Remove "handle" keyword from imported external memory/semaphore objects to distinguish between 3rd party external handles and imported external handles. --- .../llvm/SYCLLowerIR/DeviceConfigFile.td | 16 +- .../sycl_ext_oneapi_bindless_images.asciidoc | 141 ++++++++------- sycl/include/sycl/detail/cg.hpp | 33 ++-- sycl/include/sycl/detail/pi.def | 2 +- sycl/include/sycl/detail/pi.h | 107 ++++++----- sycl/include/sycl/detail/pi.hpp | 4 +- sycl/include/sycl/device_aspect_macros.hpp | 48 ++--- .../sycl/ext/oneapi/bindless_images.hpp | 169 ++++++++---------- .../ext/oneapi/bindless_images_interop.hpp | 8 +- sycl/include/sycl/handler.hpp | 22 +-- sycl/include/sycl/info/aspects.def | 8 +- sycl/include/sycl/queue.hpp | 74 ++++---- sycl/plugins/cuda/pi_cuda.cpp | 51 +++--- sycl/plugins/hip/pi_hip.cpp | 51 +++--- sycl/plugins/level_zero/pi_level_zero.cpp | 51 +++--- sycl/plugins/native_cpu/pi_native_cpu.cpp | 51 +++--- sycl/plugins/opencl/pi_opencl.cpp | 46 +++-- sycl/plugins/unified_runtime/CMakeLists.txt | 15 +- sycl/plugins/unified_runtime/pi2ur.hpp | 139 +++++++------- .../unified_runtime/pi_unified_runtime.cpp | 51 +++--- sycl/source/detail/bindless_images.cpp | 108 +++++------ sycl/source/detail/device_impl.cpp | 18 +- sycl/source/detail/handler_impl.hpp | 2 +- sycl/source/detail/scheduler/commands.cpp | 4 +- sycl/source/handler.cpp | 40 ++--- .../bindless_images/image_get_info.cpp | 8 +- .../vulkan_interop/mipmaps.cpp | 11 +- .../vulkan_interop/sampled_images.cpp | 15 +- .../vulkan_interop/unsampled_images.cpp | 59 +++--- sycl/test/abi/pi_cuda_symbol_check.dump | 2 +- sycl/test/abi/pi_hip_symbol_check.dump | 2 +- sycl/test/abi/pi_level_zero_symbol_check.dump | 2 +- sycl/test/abi/pi_nativecpu_symbol_check.dump | 2 +- sycl/test/abi/pi_opencl_symbol_check.dump | 2 +- sycl/test/abi/sycl_symbols_linux.dump | 48 ++--- sycl/test/abi/sycl_symbols_windows.dump | 72 ++++---- sycl/unittests/helpers/PiMockPlugin.hpp | 48 ++--- 37 files changed, 755 insertions(+), 775 deletions(-) diff --git a/llvm/include/llvm/SYCLLowerIR/DeviceConfigFile.td b/llvm/include/llvm/SYCLLowerIR/DeviceConfigFile.td index bbaad03a27479..ea199fb14d3d2 100644 --- a/llvm/include/llvm/SYCLLowerIR/DeviceConfigFile.td +++ b/llvm/include/llvm/SYCLLowerIR/DeviceConfigFile.td @@ -53,10 +53,10 @@ def AspectExt_oneapi_bindless_images : Aspect<"ext_oneapi_bindless_images">; def AspectExt_oneapi_bindless_images_shared_usm : Aspect<"ext_oneapi_bindless_images_shared_usm">; def AspectExt_oneapi_bindless_images_1d_usm : Aspect<"ext_oneapi_bindless_images_1d_usm">; def AspectExt_oneapi_bindless_images_2d_usm : Aspect<"ext_oneapi_bindless_images_2d_usm">; -def AspectExt_oneapi_interop_memory_import : Aspect<"ext_oneapi_interop_memory_import">; -def AspectExt_oneapi_interop_memory_export : Aspect<"ext_oneapi_interop_memory_export">; -def AspectExt_oneapi_interop_semaphore_import : Aspect<"ext_oneapi_interop_semaphore_import">; -def AspectExt_oneapi_interop_semaphore_export : Aspect<"ext_oneapi_interop_semaphore_export">; +def AspectExt_oneapi_external_memory_import : Aspect<"ext_oneapi_external_memory_import">; +def AspectExt_oneapi_external_memory_export : Aspect<"ext_oneapi_external_memory_export">; +def AspectExt_oneapi_external_semaphore_import : Aspect<"ext_oneapi_external_semaphore_import">; +def AspectExt_oneapi_external_semaphore_export : Aspect<"ext_oneapi_external_semaphore_export">; def AspectExt_oneapi_mipmap : Aspect<"ext_oneapi_mipmap">; def AspectExt_oneapi_mipmap_anisotropy : Aspect<"ext_oneapi_mipmap_anisotropy">; def AspectExt_oneapi_mipmap_level_reference : Aspect<"ext_oneapi_mipmap_level_reference">; @@ -128,8 +128,8 @@ def : TargetInfo<"__TestAspectList", AspectExt_intel_device_id, AspectExt_intel_memory_clock_rate, AspectExt_intel_memory_bus_width, AspectEmulated, AspectExt_intel_legacy_image, AspectExt_oneapi_bindless_images, AspectExt_oneapi_bindless_images_shared_usm, AspectExt_oneapi_bindless_images_1d_usm, AspectExt_oneapi_bindless_images_2d_usm, - AspectExt_oneapi_interop_memory_import, AspectExt_oneapi_interop_memory_export, - AspectExt_oneapi_interop_semaphore_import, AspectExt_oneapi_interop_semaphore_export, + AspectExt_oneapi_external_memory_import, AspectExt_oneapi_external_memory_export, + AspectExt_oneapi_external_semaphore_import, AspectExt_oneapi_external_semaphore_export, AspectExt_oneapi_mipmap, AspectExt_oneapi_mipmap_anisotropy, AspectExt_oneapi_mipmap_level_reference, AspectExt_oneapi_cubemap, AspectExt_oneapi_cubemap_seamless_filtering, AspectExt_oneapi_bindless_sampled_image_fetch_1d_usm, AspectExt_oneapi_bindless_sampled_image_fetch_1d, @@ -183,8 +183,8 @@ defvar CudaMinAspects = !listconcat(AllUSMAspects, [AspectGpu, AspectFp64, Aspec AspectExt_oneapi_opportunistic_group, AspectExt_oneapi_graph, AspectExt_oneapi_limited_graph]); // Bindless images aspects are partially supported on CUDA and disabled by default at the moment. defvar CudaBindlessImagesAspects = [AspectExt_oneapi_bindless_images, AspectExt_oneapi_bindless_images_shared_usm, - AspectExt_oneapi_bindless_images_1d_usm, AspectExt_oneapi_bindless_images_2d_usm, AspectExt_oneapi_interop_memory_import, - AspectExt_oneapi_interop_semaphore_import, AspectExt_oneapi_mipmap, AspectExt_oneapi_mipmap_anisotropy, + AspectExt_oneapi_bindless_images_1d_usm, AspectExt_oneapi_bindless_images_2d_usm, AspectExt_oneapi_external_memory_import, + AspectExt_oneapi_external_semaphore_import, AspectExt_oneapi_mipmap, AspectExt_oneapi_mipmap_anisotropy, AspectExt_oneapi_mipmap_level_reference, AspectExt_oneapi_cubemap, AspectExt_oneapi_cubemap_seamless_filtering]; def : CudaTargetInfo<"nvidia_gpu_sm_50", !listconcat(CudaMinAspects, CudaBindlessImagesAspects)>; 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..7d7b232306a84 100644 --- a/sycl/doc/extensions/experimental/sycl_ext_oneapi_bindless_images.asciidoc +++ b/sycl/doc/extensions/experimental/sycl_ext_oneapi_bindless_images.asciidoc @@ -1545,13 +1545,13 @@ The device aspect descriptors for these queries are: [frame="none",options="header"] |====================== |Device descriptor |Description -|`aspect::ext_oneapi_interop_memory_import` | Indicates if the device supports +|`aspect::ext_oneapi_external_memory_import` | Indicates if the device supports importing external memory resources. -|`aspect::ext_oneapi_interop_memory_export` | Indicates if the device supports +|`aspect::ext_oneapi_external_memory_export` | Indicates if the device supports exporting internal memory resources. -|`aspect::ext_oneapi_interop_semaphore_import`` | Indicates if the device +|`aspect::ext_oneapi_external_semaphore_import`` | Indicates if the device supports importing external semaphore resources. -|`aspect::ext_oneapi_interop_semaphore_export` | Indicates if the device +|`aspect::ext_oneapi_external_semaphore_export` | Indicates if the device supports exporting internal event resources. |====================== @@ -1645,35 +1645,35 @@ resource type. ```cpp namespace sycl::ext::oneapi::experimental { -struct interop_mem_handle { +struct external_mem { using raw_handle_type = /* Implementation defined */; raw_handle_type raw_handle; }; template -interop_mem_handle import_external_memory( +external_mem import_external_memory( external_mem_descriptor externalMemDescriptor, const sycl::device &syclDevice, const sycl::context &syclContext); template -interop_mem_handle import_external_memory( +external_mem import_external_memory( external_mem_descriptor externalMemDescriptor, const sycl::queue &syclQueue); image_mem_handle map_external_image_memory( - interop_mem_handle interopMemHandle, + external_mem externalMemHandle, const image_descriptor &imageDescriptor, const sycl::device &syclDevice, const sycl::context &syclContext); image_mem_handle map_external_image_memory( - interop_mem_handle interopMemHandle, + external_mem externalMemHandle, const image_descriptor &imageDescriptor, const sycl::queue &syclQueue); } ``` -The resulting `interop_mem_handle` can then be mapped, where the resulting type +The resulting `external_mem` can then be mapped, where the resulting type is an `image_mem_handle`. This can be used to construct images in the same way as memory allocated through `alloc_image_mem`. The `ext_oneapi_copy` operations also work with imported memory mapped to `image_mem_handle` types. @@ -1692,16 +1692,16 @@ behaviour. Once a user has finished operating on imported memory, they must ensure that they destroy the imported memory handle through `release_external_memory`. -`release_external_memory` can only accept `interop_mem_handles` that were +`release_external_memory` can only accept `external_mems` that were created through `import_external_memory`. ```cpp namespace sycl::ext::oneapi::experimental { -void release_external_memory(interop_mem_handle interopMem, +void release_external_memory(external_mem externalMem, const sycl::device &syclDevice, const sycl::context &syclContext); -void release_external_memory(interop_mem_handle interopMem, +void release_external_memory(external_mem externalMem, const sycl::queue &syclQueue); } ``` @@ -1765,27 +1765,27 @@ compatible with the `resource_fd` resource type. ```cpp namespace sycl::ext::oneapi::experimental { -struct interop_semaphore_handle { +struct external_semaphore_handle { using raw_handle_type = /* Implementation defined */; raw_handle_type raw_handle; }; template -interop_semaphore_handle import_external_semaphore( +external_semaphore_handle import_external_semaphore( external_semaphore_descriptor externalSemaphoreDescriptor, const sycl::device &syclDevice, const sycl::context &syclContext); template -interop_semaphore_handle import_external_semaphore( +external_semaphore_handle import_external_semaphore( external_semaphore_descriptor externalSemaphoreDescriptor, const sycl::queue &syclQueue); } ``` -The resulting `interop_semaphore_handle` can then be used in a SYCL command +The resulting `external_semaphore_handle` can then be used in a SYCL command group, to either wait until the semaphore signalled, or signal the semaphore. If the type of semaphore imported supports setting the state of discrete @@ -1801,77 +1801,77 @@ namespace sycl { class handler { public: void ext_oneapi_wait_external_semaphore( - ext::oneapi::experimental::interop_semaphore_handle - interop_semaphore_handle); + ext::oneapi::experimental::external_semaphore_handle + external_semaphore_handle); void ext_oneapi_wait_external_semaphore( - ext::oneapi::experimental::interop_semaphore_handle - interop_semaphore_handle, + ext::oneapi::experimental::external_semaphore_handle + external_semaphore_handle, uint64_t wait_value); void ext_oneapi_signal_external_semaphore( - ext::oneapi::experimental::interop_semaphore_handle - interop_semaphore_handle); + ext::oneapi::experimental::external_semaphore_handle + external_semaphore_handle); void ext_oneapi_signal_external_semaphore( - ext::oneapi::experimental::interop_semaphore_handle - interop_semaphore_handle, + ext::oneapi::experimental::external_semaphore_handle + external_semaphore_handle, uint64_t signal_value); }; class queue { public: event ext_oneapi_wait_external_semaphore( - ext::oneapi::experimental::interop_semaphore_handle - interop_semaphore_handle); + ext::oneapi::experimental::external_semaphore_handle + external_semaphore_handle); event ext_oneapi_wait_external_semaphore( - ext::oneapi::experimental::interop_semaphore_handle - interop_semaphore_handle, + ext::oneapi::experimental::external_semaphore_handle + external_semaphore_handle, event DepEvent); event ext_oneapi_wait_external_semaphore( - ext::oneapi::experimental::interop_semaphore_handle - interop_semaphore_handle, + ext::oneapi::experimental::external_semaphore_handle + external_semaphore_handle, const std::vector &DepEvents); event ext_oneapi_wait_external_semaphore( - ext::oneapi::experimental::interop_semaphore_handle - interop_semaphore_handle, + ext::oneapi::experimental::external_semaphore_handle + external_semaphore_handle, uint64_t wait_value); event ext_oneapi_wait_external_semaphore( - ext::oneapi::experimental::interop_semaphore_handle - interop_semaphore_handle, + ext::oneapi::experimental::external_semaphore_handle + external_semaphore_handle, uint64_t wait_value, event DepEvent); event ext_oneapi_wait_external_semaphore( - ext::oneapi::experimental::interop_semaphore_handle - interop_semaphore_handle, + ext::oneapi::experimental::external_semaphore_handle + external_semaphore_handle, uint64_t wait_value, const std::vector &DepEvents); event ext_oneapi_signal_external_semaphore( - ext::oneapi::experimental::interop_semaphore_handle - interop_semaphore_handle); + ext::oneapi::experimental::external_semaphore_handle + external_semaphore_handle); event ext_oneapi_signal_external_semaphore( - ext::oneapi::experimental::interop_semaphore_handle - interop_semaphore_handle, + ext::oneapi::experimental::external_semaphore_handle + external_semaphore_handle, event DepEvent); event ext_oneapi_signal_external_semaphore( - ext::oneapi::experimental::interop_semaphore_handle - interop_semaphore_handle, + ext::oneapi::experimental::external_semaphore_handle + external_semaphore_handle, const std::vector &DepEvents); event ext_oneapi_signal_external_semaphore( - ext::oneapi::experimental::interop_semaphore_handle - interop_semaphore_handle, + ext::oneapi::experimental::external_semaphore_handle + external_semaphore_handle, uint64_t signal_value); event ext_oneapi_signal_external_semaphore( - ext::oneapi::experimental::interop_semaphore_handle - interop_semaphore_handle, + ext::oneapi::experimental::external_semaphore_handle + external_semaphore_handle, uint64_t signal_value, event DepEvent); event ext_oneapi_signal_external_semaphore( - ext::oneapi::experimental::interop_semaphore_handle - interop_semaphore_handle, + ext::oneapi::experimental::external_semaphore_handle + external_semaphore_handle, uint64_t signal_value, const std::vector &DepEvents); }; @@ -1909,11 +1909,11 @@ longer required through `destroy_external_semaphore`. ```cpp namespace sycl::ext::oneapi::experimental { -void destroy_external_semaphore(interop_semaphore_handle semaphoreHandle, +void destroy_external_semaphore(external_semaphore_handle semaphoreHandle, const sycl::device &syclDevice, const sycl::context &syclContext); -void destroy_external_semaphore(interop_semaphore_handle semaphoreHandle, +void destroy_external_semaphore(external_semaphore_handle semaphoreHandle, const sycl::queue &syclQueue); } @@ -2504,34 +2504,34 @@ sycl::ext::oneapi::experimental::external_semaphore_descriptor< try { // Extension: import external semaphores - sycl::ext::oneapi::experimental::interop_semaphore_handle - wait_interop_semaphore_handle = + sycl::ext::oneapi::experimental::external_semaphore_handle + wait_external_semaphore_handle = sycl::ext::oneapi::experimental::import_external_semaphore( wait_external_semaphore_desc, queue); - sycl::ext::oneapi::experimental::interop_semaphore_handle - done_interop_semaphore_handle = + sycl::ext::oneapi::experimental::external_semaphore_handle + done_external_semaphore_handle = sycl::ext::oneapi::experimental::import_external_semaphore( done_external_semaphore_desc, queue); // Extension: import external memory from descriptors - sycl::ext::oneapi::experimental::interop_mem_handle - input_interop_mem_handle = + sycl::ext::oneapi::experimental::external_mem + input_external_mem = sycl::ext::oneapi::experimental::import_external_memory( input_ext_mem_desc, queue); - sycl::ext::oneapi::experimental::interop_mem_handle - output_interop_mem_handle = + sycl::ext::oneapi::experimental::external_mem + output_external_mem = sycl::ext::oneapi::experimental::import_external_memory( output_ext_mem_desc, queue); // Extension: map imported external memory to image memory sycl::ext::oneapi::experimental::image_mem_handle input_mapped_mem_handle = sycl::ext::oneapi::experimental::map_external_image_memory( - input_interop_mem_handle, desc, queue); + input_external_mem, desc, queue); sycl::ext::oneapi::experimental::image_mem_handle output_mapped_mem_handle = sycl::ext::oneapi::experimental::map_external_image_memory( - output_interop_mem_handle, desc, queue); + output_external_mem, desc, queue); // Extension: create images from mapped memory and return the handles sycl::ext::oneapi::experimental::unsampled_image_handle img_input = @@ -2542,7 +2542,7 @@ try { output_mapped_mem_handle, desc, queue); // Extension: wait for imported semaphore - q.ext_oneapi_wait_external_semaphore(wait_interop_semaphore_handle) + q.ext_oneapi_wait_external_semaphore(wait_external_semaphore_handle) // Submit our kernel that depends on imported "wait_semaphore_file_descriptor" q.submit([&](sycl::handler &cgh) { @@ -2567,7 +2567,7 @@ try { }); // Extension: signal imported semaphore - q.ext_oneapi_signal_external_semaphore(done_interop_semaphore_handle) + q.ext_oneapi_signal_external_semaphore(done_external_semaphore_handle) // The external API can now use the semaphore it exported to // "done_semaphore_file_descriptor" to schedule its own command submissions @@ -2576,13 +2576,13 @@ try { // Extension: destroy all external resources sycl::ext::oneapi::experimental::release_external_memory( - input_interop_mem_handle, queue); + input_external_mem, queue); sycl::ext::oneapi::experimental::release_external_memory( - output_interop_mem_handle, queue); + output_external_mem, queue); sycl::ext::oneapi::experimental::destroy_external_semaphore( - wait_interop_semaphore_handle, queue); + wait_external_semaphore_handle, queue); sycl::ext::oneapi::experimental::destroy_external_semaphore( - done_interop_semaphore_handle, queue); + done_external_semaphore_handle, queue); sycl::ext::oneapi::experimental::destroy_image_handle(img_input, queue); sycl::ext::oneapi::experimental::destroy_image_handle(img_output, queue); } catch (sycl::exception e) { @@ -2806,4 +2806,11 @@ 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-06-25| - Renamed interop aspect queries, handles, semaphore wait and + signal functions, by replacing `interop` with `external` for + consistency with other interop related structs/funcs and + 3rd party interop API naming. + - Removed `handle` keyword from `interop_xxx_handle` to + clear up possible confusion between 3rd party interop + handles and the imported `interop_xxx_handle`. |====================== diff --git a/sycl/include/sycl/detail/cg.hpp b/sycl/include/sycl/detail/cg.hpp index 8d823c109ee34..98c2980ae94ca 100644 --- a/sycl/include/sycl/detail/cg.hpp +++ b/sycl/include/sycl/detail/cg.hpp @@ -533,40 +533,37 @@ class CGCopyImage : public CG { /// "Semaphore Wait" command group class. class CGSemaphoreWait : public CG { - sycl::detail::pi::PiInteropSemaphoreHandle MInteropSemaphoreHandle; + sycl::detail::pi::PiExternalSemaphore MExternalSemaphore; std::optional MWaitValue; public: - CGSemaphoreWait( - sycl::detail::pi::PiInteropSemaphoreHandle InteropSemaphoreHandle, - std::optional WaitValue, CG::StorageInitHelper CGData, - detail::code_location loc = {}) + CGSemaphoreWait(sycl::detail::pi::PiExternalSemaphore ExternalSemaphore, + std::optional WaitValue, + CG::StorageInitHelper CGData, detail::code_location loc = {}) : CG(SemaphoreWait, std::move(CGData), std::move(loc)), - MInteropSemaphoreHandle(InteropSemaphoreHandle), MWaitValue(WaitValue) { - } + MExternalSemaphore(ExternalSemaphore), MWaitValue(WaitValue) {} - sycl::detail::pi::PiInteropSemaphoreHandle getInteropSemaphoreHandle() const { - return MInteropSemaphoreHandle; + sycl::detail::pi::PiExternalSemaphore getExternalSemaphore() const { + return MExternalSemaphore; } std::optional getWaitValue() const { return MWaitValue; } }; /// "Semaphore Signal" command group class. class CGSemaphoreSignal : public CG { - sycl::detail::pi::PiInteropSemaphoreHandle MInteropSemaphoreHandle; + sycl::detail::pi::PiExternalSemaphore MExternalSemaphore; std::optional MSignalValue; public: - CGSemaphoreSignal( - sycl::detail::pi::PiInteropSemaphoreHandle InteropSemaphoreHandle, - std::optional SignalValue, CG::StorageInitHelper CGData, - detail::code_location loc = {}) + CGSemaphoreSignal(sycl::detail::pi::PiExternalSemaphore ExternalSemaphore, + std::optional SignalValue, + CG::StorageInitHelper CGData, + detail::code_location loc = {}) : CG(SemaphoreSignal, std::move(CGData), std::move(loc)), - MInteropSemaphoreHandle(InteropSemaphoreHandle), - MSignalValue(SignalValue) {} + MExternalSemaphore(ExternalSemaphore), MSignalValue(SignalValue) {} - sycl::detail::pi::PiInteropSemaphoreHandle getInteropSemaphoreHandle() const { - return MInteropSemaphoreHandle; + sycl::detail::pi::PiExternalSemaphore getExternalSemaphore() const { + return MExternalSemaphore; } std::optional getSignalValue() const { return MSignalValue; } }; diff --git a/sycl/include/sycl/detail/pi.def b/sycl/include/sycl/detail/pi.def index f2acd7e897399..a27a968fdebe3 100644 --- a/sycl/include/sycl/detail/pi.def +++ b/sycl/include/sycl/detail/pi.def @@ -207,7 +207,7 @@ _PI_API(piextMemMipmapFree) // Interop _PI_API(piextMemImportOpaqueFD) _PI_API(piextImportExternalMemory) -_PI_API(piextMemReleaseInterop) +_PI_API(piextMemReleaseExternalMemory) _PI_API(piextMemMapExternalArray) _PI_API(piextImportExternalSemaphoreOpaqueFD) _PI_API(piextImportExternalSemaphore) diff --git a/sycl/include/sycl/detail/pi.h b/sycl/include/sycl/detail/pi.h index f541c3e4e89d2..939466e7c0cb2 100644 --- a/sycl/include/sycl/detail/pi.h +++ b/sycl/include/sycl/detail/pi.h @@ -196,6 +196,27 @@ // _pi_virtual_mem_granularity_info enum, _pi_virtual_mem_info enum and // pi_virtual_access_flags bit flags. // 15.55 Added piextEnqueueNativeCommand as well as associated types and enums +// 15.56 Renamed interop related structs/funcs/enums: +// - with keyword "external" over "interop": +// - PI_EXT_ONEAPI_DEVICE_INFO_INTEROP_MEMORY_IMPORT_SUPPORT to +// PI_EXT_ONEAPI_DEVICE_INFO_EXTERNAL_MEMORY_IMPORT_SUPPORT +// - PI_EXT_ONEAPI_DEVICE_INFO_INTEROP_MEMORY_EXPORT_SUPPORT to +// PI_EXT_ONEAPI_DEVICE_INFO_EXTERNAL_MEMORY_EXPORT_SUPPORT +// - PI_EXT_ONEAPI_DEVICE_INFO_INTEROP_SEMAPHORE_IMPORT_SUPPORT to +// PI_EXT_ONEAPI_DEVICE_INFO_EXTERNAL_SEMAPHORE_IMPORT_SUPPORT +// - PI_EXT_ONEAPI_DEVICE_INFO_INTEROP_SEMAPHORE_EXPORT_SUPPORT to +// PI_EXT_ONEAPI_DEVICE_INFO_EXTERNAL_SEMAPHORE_EXPORT_SUPPORT +// - pi_interop_mem_handle to pi_external_mem +// - pi_interop_semaphore_handle to pi_external_semaphore +// - ext_oneapi_interop_memory_import to +// ext_oneapi_external_memory_import +// - ext_oneapi_interop_memory_export to +// ext_oneapi_external_memory_export +// - ext_oneapi_interop_semaphore_import to +// ext_oneapi_external_semaphore_import +// - ext_oneapi_interop_semaphore_export to +// ext_oneapi_external_semaphore_export +// - piextMemReleaseInterop to piextMemReleaseExternalMemory #define _PI_H_VERSION_MAJOR 15 #define _PI_H_VERSION_MINOR 55 @@ -481,10 +502,10 @@ typedef enum { PI_EXT_ONEAPI_DEVICE_INFO_MIPMAP_ANISOTROPY_SUPPORT = 0x20109, PI_EXT_ONEAPI_DEVICE_INFO_MIPMAP_MAX_ANISOTROPY = 0x2010A, PI_EXT_ONEAPI_DEVICE_INFO_MIPMAP_LEVEL_REFERENCE_SUPPORT = 0x2010B, - PI_EXT_ONEAPI_DEVICE_INFO_INTEROP_MEMORY_IMPORT_SUPPORT = 0x2010C, - PI_EXT_ONEAPI_DEVICE_INFO_INTEROP_MEMORY_EXPORT_SUPPORT = 0x2010D, - PI_EXT_ONEAPI_DEVICE_INFO_INTEROP_SEMAPHORE_IMPORT_SUPPORT = 0x2010E, - PI_EXT_ONEAPI_DEVICE_INFO_INTEROP_SEMAPHORE_EXPORT_SUPPORT = 0x2010F, + PI_EXT_ONEAPI_DEVICE_INFO_EXTERNAL_MEMORY_IMPORT_SUPPORT = 0x2010C, + PI_EXT_ONEAPI_DEVICE_INFO_EXTERNAL_MEMORY_EXPORT_SUPPORT = 0x2010D, + PI_EXT_ONEAPI_DEVICE_INFO_EXTERNAL_SEMAPHORE_IMPORT_SUPPORT = 0x2010E, + PI_EXT_ONEAPI_DEVICE_INFO_EXTERNAL_SEMAPHORE_EXPORT_SUPPORT = 0x2010F, PI_EXT_ONEAPI_DEVICE_INFO_MATRIX_COMBINATIONS = 0x20110, @@ -1279,10 +1300,10 @@ using pi_event = _pi_event *; using pi_sampler = _pi_sampler *; using pi_image_handle = pi_uint64; using pi_image_mem_handle = void *; -using pi_interop_mem_handle = pi_uint64; -using pi_interop_semaphore_handle = pi_uint64; using pi_physical_mem = _pi_physical_mem *; using pi_enqueue_native_command_function = void (*)(pi_queue, void *); +using pi_external_mem = pi_uint64; +using pi_external_semaphore = pi_uint64; typedef struct { pi_image_channel_order image_channel_order; @@ -3082,47 +3103,46 @@ __SYCL_EXPORT pi_result piextMemImageGetInfo( /// \param device is the pi_device /// \param size is the size of the external memory /// \param file_descriptor is the file descriptor -/// \param ret_handle is the returned interop memory handle to the external -/// memory +/// \param ret_handle is the returned handle to the external memory __SYCL_EXPORT_DEPRECATED("This function has been deprecated in favor of " "`piextImportExternalMemory`") pi_result piextMemImportOpaqueFD(pi_context context, pi_device device, size_t size, int file_descriptor, - pi_interop_mem_handle *ret_handle); + pi_external_mem *ret_handle); /// API to import external memory /// /// \param context is the pi_context /// \param device is the pi_device -/// \param mem_descriptor is the interop memory descriptor -/// \param ret_handle is the returned interop memory handle to the external -/// memory -__SYCL_EXPORT pi_result -piextImportExternalMemory(pi_context context, pi_device device, - pi_external_mem_descriptor *mem_descriptor, - pi_interop_mem_handle *ret_handle); +/// \param mem_descriptor is the external memory descriptor +/// \param ret_handle is the returned handle to the external memory +__SYCL_EXPORT pi_result piextImportExternalMemory( + pi_context context, pi_device device, + pi_external_mem_descriptor *mem_descriptor, pi_external_mem *ret_handle); -/// API to map an interop memory handle to an image memory handle. +/// API to map an external memory handle to an image memory handle. /// /// \param context is the pi_context /// \param device is the pi_device /// \param image_format format of the image (channel order and data type) /// \param image_desc image descriptor -/// \param mem_handle is the interop memory handle to the external memory +/// \param mem_handle is the external memory handle /// \param ret_mem is the returned image memory handle to the externally /// allocated memory -__SYCL_EXPORT pi_result piextMemMapExternalArray( - pi_context context, pi_device device, pi_image_format *image_format, - pi_image_desc *image_desc, pi_interop_mem_handle mem_handle, - pi_image_mem_handle *ret_mem); +__SYCL_EXPORT pi_result piextMemMapExternalArray(pi_context context, + pi_device device, + pi_image_format *image_format, + pi_image_desc *image_desc, + pi_external_mem mem_handle, + pi_image_mem_handle *ret_mem); -/// API to destroy interop memory. +/// API to destroy external memory. /// /// \param context is the pi_context /// \param device is the pi_device -/// \param memory_handle is the handle to interop memory to be freed -__SYCL_EXPORT pi_result piextMemReleaseInterop( - pi_context context, pi_device device, pi_interop_mem_handle memory_handle); +/// \param memory_handle is the external memory handle to be released +__SYCL_EXPORT pi_result piextMemReleaseExternalMemory( + pi_context context, pi_device device, pi_external_mem memory_handle); /// [DEPRECATED] This function is deprecated in favor of /// `piextImportExternalSemaphore` @@ -3132,41 +3152,37 @@ __SYCL_EXPORT pi_result piextMemReleaseInterop( /// \param context is the pi_context /// \param device is the pi_device /// \param file_descriptor is the file descriptor -/// \param ret_handle is the returned interop semaphore handle to the external -/// semaphore +/// \param ret_ext_sem is the returned external semaphore object __SYCL_EXPORT_DEPRECATED("This function has been deprecated in favor of " "`piextImportExternalSemaphore`") pi_result piextImportExternalSemaphoreOpaqueFD(pi_context context, pi_device device, int file_descriptor, - pi_interop_semaphore_handle *ret_handle); + pi_external_semaphore *ret_ext_sem); /// API to import an external semaphore /// /// \param context is the pi_context /// \param device is the pi_device -/// \param sem_descriptor is the interop semaphore descriptor -/// \param ret_handle is the returned interop semaphore handle to the external -/// semaphore +/// \param sem_descriptor is the external semaphore descriptor +/// \param ret_ext_sem is the returned external semaphore object __SYCL_EXPORT pi_result piextImportExternalSemaphore(pi_context context, pi_device device, pi_external_semaphore_descriptor *sem_descriptor, - pi_interop_semaphore_handle *ret_handle); + pi_external_semaphore *ret_ext_sem); -/// API to destroy the external semaphore handle. +/// API to destroy 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, - pi_interop_semaphore_handle sem_handle); +/// \param ext_sem is external semaphore object to be destroyed +__SYCL_EXPORT pi_result piextDestroyExternalSemaphore( + pi_context context, pi_device device, pi_external_semaphore ext_sem); /// API to instruct the queue with a non-blocking wait on an external semaphore. /// /// \param command_queue is the queue instructed to wait -/// \param sem_handle is the interop semaphore handle +/// \param ext_sem is the external semaphore to wait on /// \param has_wait_value indicates whether the semaphore is capable of setting /// user defined state passed through `wait_value`. /// Otherwise `wait_value` is ignored. @@ -3179,16 +3195,15 @@ piextDestroyExternalSemaphore(pi_context context, pi_device device, /// operation /// \param event is the returned event representing this operation __SYCL_EXPORT pi_result piextWaitExternalSemaphore( - pi_queue command_queue, pi_interop_semaphore_handle sem_handle, - bool has_wait_value, pi_uint64 wait_value, - pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, - pi_event *event); + pi_queue command_queue, pi_external_semaphore ext_sem, bool has_wait_value, + pi_uint64 wait_value, pi_uint32 num_events_in_wait_list, + const pi_event *event_wait_list, pi_event *event); /// API to instruct the queue to signal the external semaphore handle once all /// previous commands have completed execution. /// /// \param command_queue is the queue instructed to signal -/// \param sem_handle is the interop semaphore handle to signal +/// \param ext_sem is the external semaphore to signal /// \param has_signal_value indicates whether the semaphore is capable of /// setting user defined state passed through /// `signal_value`. Otherwise `signal_value` is ignored. @@ -3200,7 +3215,7 @@ __SYCL_EXPORT pi_result piextWaitExternalSemaphore( /// operation /// \param event is the returned event representing this operation __SYCL_EXPORT pi_result piextSignalExternalSemaphore( - pi_queue command_queue, pi_interop_semaphore_handle sem_handle, + pi_queue command_queue, pi_external_semaphore ext_sem, bool has_signal_value, pi_uint64 signal_value, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event); diff --git a/sycl/include/sycl/detail/pi.hpp b/sycl/include/sycl/detail/pi.hpp index 1fe21d36a8aaa..6cd77f96d78cf 100644 --- a/sycl/include/sycl/detail/pi.hpp +++ b/sycl/include/sycl/detail/pi.hpp @@ -140,8 +140,8 @@ using PiPeerAttr = ::pi_peer_attr; using PiImageHandle = ::pi_image_handle; using PiImageMemHandle = ::pi_image_mem_handle; using PiImageCopyFlags = ::pi_image_copy_flags; -using PiInteropMemHandle = ::pi_interop_mem_handle; -using PiInteropSemaphoreHandle = ::pi_interop_semaphore_handle; +using PiExternalMemHandle = ::pi_external_mem; +using PiExternalSemaphore = ::pi_external_semaphore; using PiExternalMemDescriptor = ::pi_external_mem_descriptor; using PiExternalSemaphoreDescriptor = ::pi_external_semaphore_descriptor; using PiImageOffset = ::pi_image_offset_struct; diff --git a/sycl/include/sycl/device_aspect_macros.hpp b/sycl/include/sycl/device_aspect_macros.hpp index 10f61c1e48435..037df09be1355 100644 --- a/sycl/include/sycl/device_aspect_macros.hpp +++ b/sycl/include/sycl/device_aspect_macros.hpp @@ -233,24 +233,24 @@ #define __SYCL_ALL_DEVICES_HAVE_ext_oneapi_bindless_images_2d_usm__ 0 #endif -#ifndef __SYCL_ALL_DEVICES_HAVE_ext_oneapi_interop_memory_import__ -//__SYCL_ASPECT(ext_oneapi_interop_memory_import, 46) -#define __SYCL_ALL_DEVICES_HAVE_ext_oneapi_interop_memory_import__ 0 +#ifndef __SYCL_ALL_DEVICES_HAVE_ext_oneapi_external_memory_import__ +//__SYCL_ASPECT(ext_oneapi_external_memory_import, 46) +#define __SYCL_ALL_DEVICES_HAVE_ext_oneapi_external_memory_import__ 0 #endif -#ifndef __SYCL_ALL_DEVICES_HAVE_ext_oneapi_interop_memory_export__ -//__SYCL_ASPECT(ext_oneapi_interop_memory_export, 47) -#define __SYCL_ALL_DEVICES_HAVE_ext_oneapi_interop_memory_export__ 0 +#ifndef __SYCL_ALL_DEVICES_HAVE_ext_oneapi_external_memory_export__ +//__SYCL_ASPECT(ext_oneapi_external_memory_export, 47) +#define __SYCL_ALL_DEVICES_HAVE_ext_oneapi_external_memory_export__ 0 #endif -#ifndef __SYCL_ALL_DEVICES_HAVE_ext_oneapi_interop_semaphore_import__ -//__SYCL_ASPECT(ext_oneapi_interop_semaphore_import, 48) -#define __SYCL_ALL_DEVICES_HAVE_ext_oneapi_interop_semaphore_import__ 0 +#ifndef __SYCL_ALL_DEVICES_HAVE_ext_oneapi_external_semaphore_import__ +//__SYCL_ASPECT(ext_oneapi_external_semaphore_import, 48) +#define __SYCL_ALL_DEVICES_HAVE_ext_oneapi_external_semaphore_import__ 0 #endif -#ifndef __SYCL_ALL_DEVICES_HAVE_ext_oneapi_interop_semaphore_export__ -//__SYCL_ASPECT(ext_oneapi_interop_semaphore_export, 49) -#define __SYCL_ALL_DEVICES_HAVE_ext_oneapi_interop_semaphore_export__ 0 +#ifndef __SYCL_ALL_DEVICES_HAVE_ext_oneapi_external_semaphore_export__ +//__SYCL_ASPECT(ext_oneapi_external_semaphore_export, 49) +#define __SYCL_ALL_DEVICES_HAVE_ext_oneapi_external_semaphore_export__ 0 #endif #ifndef __SYCL_ALL_DEVICES_HAVE_ext_oneapi_mipmap__ @@ -606,24 +606,24 @@ #define __SYCL_ANY_DEVICE_HAS_ext_oneapi_bindless_images_2d_usm__ 0 #endif -#ifndef __SYCL_ANY_DEVICE_HAS_ext_oneapi_interop_memory_import__ -//__SYCL_ASPECT(ext_oneapi_interop_memory_import, 46) -#define __SYCL_ANY_DEVICE_HAS_ext_oneapi_interop_memory_import__ 0 +#ifndef __SYCL_ANY_DEVICE_HAS_ext_oneapi_external_memory_import__ +//__SYCL_ASPECT(ext_oneapi_external_memory_import, 46) +#define __SYCL_ANY_DEVICE_HAS_ext_oneapi_external_memory_import__ 0 #endif -#ifndef __SYCL_ANY_DEVICE_HAS_ext_oneapi_interop_memory_export__ -//__SYCL_ASPECT(ext_oneapi_interop_memory_export, 47) -#define __SYCL_ANY_DEVICE_HAS_ext_oneapi_interop_memory_export__ 0 +#ifndef __SYCL_ANY_DEVICE_HAS_ext_oneapi_external_memory_export__ +//__SYCL_ASPECT(ext_oneapi_external_memory_export, 47) +#define __SYCL_ANY_DEVICE_HAS_ext_oneapi_external_memory_export__ 0 #endif -#ifndef __SYCL_ANY_DEVICE_HAS_ext_oneapi_interop_semaphore_import__ -//__SYCL_ASPECT(ext_oneapi_interop_semaphore_import, 48) -#define __SYCL_ANY_DEVICE_HAS_ext_oneapi_interop_semaphore_import__ 0 +#ifndef __SYCL_ANY_DEVICE_HAS_ext_oneapi_external_semaphore_import__ +//__SYCL_ASPECT(ext_oneapi_external_semaphore_import, 48) +#define __SYCL_ANY_DEVICE_HAS_ext_oneapi_external_semaphore_import__ 0 #endif -#ifndef __SYCL_ANY_DEVICE_HAS_ext_oneapi_interop_semaphore_export__ -//__SYCL_ASPECT(ext_oneapi_interop_semaphore_export, 49) -#define __SYCL_ANY_DEVICE_HAS_ext_oneapi_interop_semaphore_export__ 0 +#ifndef __SYCL_ANY_DEVICE_HAS_ext_oneapi_external_semaphore_export__ +//__SYCL_ASPECT(ext_oneapi_external_semaphore_export, 49) +#define __SYCL_ANY_DEVICE_HAS_ext_oneapi_external_semaphore_export__ 0 #endif #ifndef __SYCL_ANY_DEVICE_HAS_ext_oneapi_mipmap__ diff --git a/sycl/include/sycl/ext/oneapi/bindless_images.hpp b/sycl/include/sycl/ext/oneapi/bindless_images.hpp index 9e1381abab76b..a3e8f16011557 100644 --- a/sycl/include/sycl/ext/oneapi/bindless_images.hpp +++ b/sycl/include/sycl/ext/oneapi/bindless_images.hpp @@ -13,7 +13,7 @@ #include // for pi_uint64 #include // for device #include // for image_desc... -#include // for interop_me... +#include // for external_m... #include // for image_mem_... #include // for bindless_i... #include // for image_chan... @@ -197,43 +197,41 @@ get_mip_level_mem_handle(const image_mem_handle mipMem, unsigned int level, const sycl::queue &syclQueue); /** - * @brief Import external memory taking an external memory handle (the type - * of which is dependent on the OS & external API) and return an - * interop memory handle + * @brief Import external memory taking an external memory descriptor (the + * type of which is dependent on the OS & external API) and return an + * imported external memory object * - * @tparam ExternalMemHandleType Handle type describing external memory handle - * @param externalMem External memory descriptor - * @param syclDevice The device in which we create our interop memory - * @param syclContext The context in which we create our interop memory - * handle - * @return Interop memory handle to the external memory + * @tparam ResourceType Resource type differentiating external resource types + * @param externalMemDesc External memory descriptor + * @param syclDevice The device in which we create our external memory + * @param syclContext The context in which we create our external memory + * @return Imported opaque external memory */ -template -__SYCL_EXPORT interop_mem_handle import_external_memory( - external_mem_descriptor externalMem, +template +__SYCL_EXPORT external_mem import_external_memory( + external_mem_descriptor externalMemDesc, const sycl::device &syclDevice, const sycl::context &syclContext); /** - * @brief Import external memory taking an external memory handle (the type - * of which is dependent on the OS & external API) and return an - * interop memory handle + * @brief Import external memory taking an external memory descriptor (the + * type of which is dependent on the OS & external API) and return an + * imported external memory object * - * @tparam ExternalMemHandleType Handle type describing external memory handle - * @param externalMem External memory descriptor - * @param syclQueue The queue in which we create our interop memory - * handle - * @return Interop memory handle to the external memory + * @tparam ResourceType Resource type differentiating external resource types + * @param externalMemDesc External memory descriptor + * @param syclQueue The queue in which we create our external memory + * @return Imported opaque external memory */ template -__SYCL_EXPORT interop_mem_handle import_external_memory( - external_mem_descriptor externalMem, +__SYCL_EXPORT external_mem import_external_memory( + external_mem_descriptor externalMemDesc, const sycl::queue &syclQueue); /** * @brief [Deprecated] Maps an interop memory handle to an image memory * handle (which may have a device optimized memory layout) * - * @param memHandle Interop memory handle + * @param memHandle External memory handle * @param desc The image descriptor * @param syclDevice The device in which we create our image memory handle * @param syclContext The conext in which we create our image memory handle @@ -241,7 +239,7 @@ __SYCL_EXPORT interop_mem_handle import_external_memory( */ __SYCL_EXPORT_DEPRECATED("map_external_memory_array is deprecated." "use map_external_image_memory") -image_mem_handle map_external_memory_array(interop_mem_handle memHandle, +image_mem_handle map_external_memory_array(external_mem memHandle, const image_descriptor &desc, const sycl::device &syclDevice, const sycl::context &syclContext); @@ -257,122 +255,109 @@ image_mem_handle map_external_memory_array(interop_mem_handle memHandle, */ __SYCL_EXPORT_DEPRECATED("map_external_memory_array is deprecated." "use map_external_image_memory") -image_mem_handle map_external_memory_array(interop_mem_handle memHandle, +image_mem_handle map_external_memory_array(external_mem memHandle, const image_descriptor &desc, const sycl::queue &syclQueue); /** - * @brief Maps an interop memory handle to an image memory handle (which may + * @brief Maps an external memory object to an image memory handle (which may * have a device optimized memory layout) * - * @param memHandle Interop memory handle + * @param extMem External memory object * @param desc The image descriptor - * @param syclDevice The device in which we create our image memory handle + * @param syclDevice The device in which we create our image memory handle * @param syclContext The conext in which we create our image memory handle * @return Memory handle to externally allocated memory on the device */ __SYCL_EXPORT -image_mem_handle map_external_image_memory(interop_mem_handle memHandle, +image_mem_handle map_external_image_memory(external_mem extMem, const image_descriptor &desc, const sycl::device &syclDevice, const sycl::context &syclContext); /** - * @brief Maps an interop memory handle to an image memory handle (which may + * @brief Maps an external memory handle to an image memory handle (which may * have a device optimized memory layout) * - * @param memHandle Interop memory handle + * @param extMem External memory object * @param desc The image descriptor * @param syclQueue The queue in which we create our image memory handle * @return Memory handle to externally allocated memory on the device */ __SYCL_EXPORT -image_mem_handle map_external_image_memory(interop_mem_handle memHandle, +image_mem_handle map_external_image_memory(external_mem extMem, const image_descriptor &desc, const sycl::queue &syclQueue); /** - * @brief Import external semaphore taking an external semaphore handle (the - * type of which is dependent on the OS & external API) + * @brief Import external semaphore taking an external semaphore descriptor + * (the type of which is dependent on the OS & external API) * - * @tparam ExternalSemaphoreHandleType Handle type describing external - * semaphore handle + * @tparam ResourceType Resource type differentiating external resource types * @param externalSemaphoreDesc External semaphore descriptor - * @param syclDevice The device in which we create our interop semaphore - * handle - * @param syclContext The context in which we create our interop semaphore - * handle - * @return Interop semaphore handle to the external semaphore + * @param syclDevice The device in which we create our external semaphore + * @param syclContext The context in which we create our external semaphore + * @return Imported opaque external semaphore */ -template -__SYCL_EXPORT interop_semaphore_handle import_external_semaphore( - external_semaphore_descriptor - externalSemaphoreDesc, +template +__SYCL_EXPORT external_semaphore import_external_semaphore( + external_semaphore_descriptor externalSemaphoreDesc, const sycl::device &syclDevice, const sycl::context &syclContext); /** - * @brief Import external semaphore taking an external semaphore handle (the - * type of which is dependent on the OS & external API) + * @brief Import external semaphore taking an external semaphore descriptor + * (the type of which is dependent on the OS & external API) * - * @tparam ExternalSemaphoreHandleType Handle type describing external - * semaphore handle + * @tparam ResourceType Resource type differentiating external resource types * @param externalSemaphoreDesc External semaphore descriptor - * @param syclQueue The queue in which we create our interop semaphore - * handle - * @return Interop semaphore handle to the external semaphore + * @param syclQueue The queue in which we create our external semaphore + * @return Imported opaque external semaphore */ template -__SYCL_EXPORT interop_semaphore_handle import_external_semaphore( +__SYCL_EXPORT external_semaphore import_external_semaphore( external_semaphore_descriptor externalSemaphoreDesc, const sycl::queue &syclQueue); /** - * @brief Destroy the external semaphore handle + * @brief Destroy the external semaphore * - * @param semaphoreHandle The interop semaphore handle to destroy - * @param syclDevice The device in which the interop semaphore handle was - * created - * @param syclContext The context in which the interop semaphore handle was - * created + * @param extSemaphore The external semaphore to destroy + * @param syclDevice The device in which the external semaphore was created + * @param syclContext The context in which the external semaphore was + * created */ -__SYCL_EXPORT void -destroy_external_semaphore(interop_semaphore_handle semaphoreHandle, - const sycl::device &syclDevice, - const sycl::context &syclContext); +__SYCL_EXPORT void destroy_external_semaphore(external_semaphore extSemaphore, + const sycl::device &syclDevice, + const sycl::context &syclContext); /** - * @brief Destroy the external semaphore handle + * @brief Destroy the external semaphore * - * @param semaphoreHandle The interop semaphore handle to destroy - * @param syclQueue The queue in which the interop semaphore handle was - * created + * @param extSemaphore The external semaphore to destroy + * @param syclQueue The queue in which the external semaphore was created */ -__SYCL_EXPORT void -destroy_external_semaphore(interop_semaphore_handle semaphoreHandle, - const sycl::queue &syclQueue); +__SYCL_EXPORT void destroy_external_semaphore(external_semaphore extSemaphore, + const sycl::queue &syclQueue); /** * @brief Release external memory * - * @param interopHandle The interop memory handle to release - * @param syclDevice The device in which the interop memory handle was - * created - * @param syclContext The context in which the interop memory handle was - * created + * @param externalMem The external memory to release + * @param syclDevice The device in which the external memory was created + * @param syclContext The context in which the external memory was created */ -__SYCL_EXPORT void release_external_memory(interop_mem_handle interopHandle, +__SYCL_EXPORT void release_external_memory(external_mem externalMem, const sycl::device &syclDevice, const sycl::context &syclContext); /** * @brief Release external memory * - * @param interopHandle The interop memory handle to release - * @param syclQueue The queue in which the interop memory handle was - * created + * @param externalMem The external memory to release + * @param syclQueue The queue in which the external memory was created */ -__SYCL_EXPORT void release_external_memory(interop_mem_handle interopHandle, +__SYCL_EXPORT void release_external_memory(external_mem externalMem, const sycl::queue &syclQueue); /** @@ -1858,7 +1843,7 @@ inline event queue::ext_oneapi_copy( } inline event queue::ext_oneapi_wait_external_semaphore( - sycl::ext::oneapi::experimental::interop_semaphore_handle SemaphoreHandle, + sycl::ext::oneapi::experimental::external_semaphore SemaphoreHandle, event DepEvent, const detail::code_location &CodeLoc) { detail::tls_code_loc_t TlsCodeLocCapture(CodeLoc); return submit( @@ -1870,7 +1855,7 @@ inline event queue::ext_oneapi_wait_external_semaphore( } inline event queue::ext_oneapi_wait_external_semaphore( - sycl::ext::oneapi::experimental::interop_semaphore_handle SemaphoreHandle, + sycl::ext::oneapi::experimental::external_semaphore SemaphoreHandle, const std::vector &DepEvents, const detail::code_location &CodeLoc) { detail::tls_code_loc_t TlsCodeLocCapture(CodeLoc); return submit( @@ -1882,7 +1867,7 @@ inline event queue::ext_oneapi_wait_external_semaphore( } inline event queue::ext_oneapi_wait_external_semaphore( - sycl::ext::oneapi::experimental::interop_semaphore_handle SemaphoreHandle, + sycl::ext::oneapi::experimental::external_semaphore SemaphoreHandle, uint64_t WaitValue, const detail::code_location &CodeLoc) { detail::tls_code_loc_t TlsCodeLocCapture(CodeLoc); return submit( @@ -1893,7 +1878,7 @@ inline event queue::ext_oneapi_wait_external_semaphore( } inline event queue::ext_oneapi_wait_external_semaphore( - sycl::ext::oneapi::experimental::interop_semaphore_handle SemaphoreHandle, + sycl::ext::oneapi::experimental::external_semaphore SemaphoreHandle, uint64_t WaitValue, event DepEvent, const detail::code_location &CodeLoc) { detail::tls_code_loc_t TlsCodeLocCapture(CodeLoc); return submit( @@ -1905,7 +1890,7 @@ inline event queue::ext_oneapi_wait_external_semaphore( } inline event queue::ext_oneapi_wait_external_semaphore( - sycl::ext::oneapi::experimental::interop_semaphore_handle SemaphoreHandle, + sycl::ext::oneapi::experimental::external_semaphore SemaphoreHandle, uint64_t WaitValue, const std::vector &DepEvents, const detail::code_location &CodeLoc) { detail::tls_code_loc_t TlsCodeLocCapture(CodeLoc); @@ -1918,7 +1903,7 @@ inline event queue::ext_oneapi_wait_external_semaphore( } inline event queue::ext_oneapi_signal_external_semaphore( - sycl::ext::oneapi::experimental::interop_semaphore_handle SemaphoreHandle, + sycl::ext::oneapi::experimental::external_semaphore SemaphoreHandle, const detail::code_location &CodeLoc) { detail::tls_code_loc_t TlsCodeLocCapture(CodeLoc); return submit( @@ -1929,7 +1914,7 @@ inline event queue::ext_oneapi_signal_external_semaphore( } inline event queue::ext_oneapi_signal_external_semaphore( - sycl::ext::oneapi::experimental::interop_semaphore_handle SemaphoreHandle, + sycl::ext::oneapi::experimental::external_semaphore SemaphoreHandle, event DepEvent, const detail::code_location &CodeLoc) { detail::tls_code_loc_t TlsCodeLocCapture(CodeLoc); return submit( @@ -1941,7 +1926,7 @@ inline event queue::ext_oneapi_signal_external_semaphore( } inline event queue::ext_oneapi_signal_external_semaphore( - sycl::ext::oneapi::experimental::interop_semaphore_handle SemaphoreHandle, + sycl::ext::oneapi::experimental::external_semaphore SemaphoreHandle, const std::vector &DepEvents, const detail::code_location &CodeLoc) { detail::tls_code_loc_t TlsCodeLocCapture(CodeLoc); return submit( @@ -1953,7 +1938,7 @@ inline event queue::ext_oneapi_signal_external_semaphore( } inline event queue::ext_oneapi_signal_external_semaphore( - sycl::ext::oneapi::experimental::interop_semaphore_handle SemaphoreHandle, + sycl::ext::oneapi::experimental::external_semaphore SemaphoreHandle, uint64_t SignalValue, const detail::code_location &CodeLoc) { detail::tls_code_loc_t TlsCodeLocCapture(CodeLoc); return submit( @@ -1964,7 +1949,7 @@ inline event queue::ext_oneapi_signal_external_semaphore( } inline event queue::ext_oneapi_signal_external_semaphore( - sycl::ext::oneapi::experimental::interop_semaphore_handle SemaphoreHandle, + sycl::ext::oneapi::experimental::external_semaphore SemaphoreHandle, uint64_t SignalValue, event DepEvent, const detail::code_location &CodeLoc) { detail::tls_code_loc_t TlsCodeLocCapture(CodeLoc); @@ -1977,7 +1962,7 @@ inline event queue::ext_oneapi_signal_external_semaphore( } inline event queue::ext_oneapi_signal_external_semaphore( - sycl::ext::oneapi::experimental::interop_semaphore_handle SemaphoreHandle, + sycl::ext::oneapi::experimental::external_semaphore SemaphoreHandle, uint64_t SignalValue, const std::vector &DepEvents, const detail::code_location &CodeLoc) { detail::tls_code_loc_t TlsCodeLocCapture(CodeLoc); diff --git a/sycl/include/sycl/ext/oneapi/bindless_images_interop.hpp b/sycl/include/sycl/ext/oneapi/bindless_images_interop.hpp index 3992f5d93075d..493b766159297 100644 --- a/sycl/include/sycl/ext/oneapi/bindless_images_interop.hpp +++ b/sycl/include/sycl/ext/oneapi/bindless_images_interop.hpp @@ -30,14 +30,14 @@ enum class external_semaphore_handle_type { win32_nt_dx12_fence = 2, }; -/// Opaque interop memory handle type -struct interop_mem_handle { +/// Opaque external memory handle type +struct external_mem { using raw_handle_type = pi_uint64; raw_handle_type raw_handle; }; -/// Opaque interop semaphore handle type -struct interop_semaphore_handle { +/// Imported opaque external semaphore +struct external_semaphore { using raw_handle_type = pi_uint64; raw_handle_type raw_handle; external_semaphore_handle_type handle_type; diff --git a/sycl/include/sycl/handler.hpp b/sycl/include/sycl/handler.hpp index b43d3dcd78e5a..2d6f521c77e28 100644 --- a/sycl/include/sycl/handler.hpp +++ b/sycl/include/sycl/handler.hpp @@ -3332,23 +3332,23 @@ class __SYCL_EXPORT handler { /// Submit a non-blocking device-side wait on an external // semaphore to the queue. - /// An exception is thrown if \p SemaphoreHandle is incomplete, or if the + /// An exception is thrown if \p extSemaphore is incomplete, or if the /// type of semaphore requires an explicit value to wait upon. /// - /// \param SemaphoreHandle is an opaque external interop semaphore handle + /// \param extSemaphore is an opaque external semaphore object void ext_oneapi_wait_external_semaphore( - ext::oneapi::experimental::interop_semaphore_handle SemaphoreHandle); + sycl::ext::oneapi::experimental::external_semaphore extSemaphore); /// Submit a non-blocking device-side wait on an external // semaphore to the queue. - /// An exception is thrown if \p SemaphoreHandle is incomplete, or if the + /// An exception is thrown if \p extSemaphore is incomplete, or if the /// type of semaphore does not support waiting on an explicitly passed value. /// - /// \param SemaphoreHandle is an opaque external interop semaphore handle + /// \param extSemaphore is an opaque external semaphore object /// \param WaitValue is the value that this semaphore will wait upon, until it /// allows any further commands to execute on the queue. void ext_oneapi_wait_external_semaphore( - ext::oneapi::experimental::interop_semaphore_handle SemaphoreHandle, + sycl::ext::oneapi::experimental::external_semaphore extSemaphore, uint64_t WaitValue); /// Instruct the queue to signal the external semaphore once all previous @@ -3356,21 +3356,21 @@ class __SYCL_EXPORT handler { /// An exception is thrown if \p SemaphoreHandle is incomplete, or if the /// type of semaphore requires an explicit value to signal. /// - /// \param SemaphoreHandle is an opaque external interop semaphore handle + /// \param extSemaphore is an opaque external semaphore object void ext_oneapi_signal_external_semaphore( - ext::oneapi::experimental::interop_semaphore_handle SemaphoreHandle); + sycl::ext::oneapi::experimental::external_semaphore extSemaphore); /// Instruct the queue to set the state of the external semaphore to /// \p SignalValue once all previous commands submitted to the queue have /// completed execution. - /// An exception is thrown if \p SemaphoreHandle is incomplete, or if the + /// An exception is thrown if \p extSemaphore is incomplete, or if the /// type of semaphore does not support signalling an explicitly passed value. /// - /// \param SemaphoreHandle is an opaque external interop semaphore handle + /// \param extSemaphore is an opaque external semaphore object. /// \param SignalValue is the value that this semaphore signal, once all /// prior opeartions on the queue complete. void ext_oneapi_signal_external_semaphore( - ext::oneapi::experimental::interop_semaphore_handle SemaphoreHandle, + sycl::ext::oneapi::experimental::external_semaphore extSemaphore, uint64_t SignalValue); private: diff --git a/sycl/include/sycl/info/aspects.def b/sycl/include/sycl/info/aspects.def index 2151776ddb8e7..057678f3e4f86 100644 --- a/sycl/include/sycl/info/aspects.def +++ b/sycl/include/sycl/info/aspects.def @@ -39,10 +39,10 @@ __SYCL_ASPECT(ext_oneapi_bindless_images, 42) __SYCL_ASPECT(ext_oneapi_bindless_images_shared_usm, 43) __SYCL_ASPECT(ext_oneapi_bindless_images_1d_usm, 44) __SYCL_ASPECT(ext_oneapi_bindless_images_2d_usm, 45) -__SYCL_ASPECT(ext_oneapi_interop_memory_import, 46) -__SYCL_ASPECT(ext_oneapi_interop_memory_export, 47) -__SYCL_ASPECT(ext_oneapi_interop_semaphore_import, 48) -__SYCL_ASPECT(ext_oneapi_interop_semaphore_export, 49) +__SYCL_ASPECT(ext_oneapi_external_memory_import, 46) +__SYCL_ASPECT(ext_oneapi_external_memory_export, 47) +__SYCL_ASPECT(ext_oneapi_external_semaphore_import, 48) +__SYCL_ASPECT(ext_oneapi_external_semaphore_export, 49) __SYCL_ASPECT(ext_oneapi_mipmap, 50) __SYCL_ASPECT(ext_oneapi_mipmap_anisotropy, 51) __SYCL_ASPECT(ext_oneapi_mipmap_level_reference, 52) diff --git a/sycl/include/sycl/queue.hpp b/sycl/include/sycl/queue.hpp index 04b6969fe2b12..bceff46f5f0bd 100644 --- a/sycl/include/sycl/queue.hpp +++ b/sycl/include/sycl/queue.hpp @@ -1857,169 +1857,169 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase { const detail::code_location &CodeLoc = detail::code_location::current()); /// Instruct the queue with a non-blocking wait on an external semaphore. - /// An exception is thrown if \p SemaphoreHandle is incomplete, or if the + /// An exception is thrown if \p extSemaphore is incomplete, or if the /// type of semaphore requires an explicit value to wait upon. /// - /// \param SemaphoreHandle is an opaque external interop semaphore handle. + /// \param extSemaphore is an opaque external semaphore object. /// \return an event representing the wait operation. event ext_oneapi_wait_external_semaphore( - sycl::ext::oneapi::experimental::interop_semaphore_handle SemaphoreHandle, + sycl::ext::oneapi::experimental::external_semaphore extSemaphore, const detail::code_location &CodeLoc = detail::code_location::current()) { detail::tls_code_loc_t TlsCodeLocCapture(CodeLoc); return submit( [&](handler &CGH) { - CGH.ext_oneapi_wait_external_semaphore(SemaphoreHandle); + CGH.ext_oneapi_wait_external_semaphore(extSemaphore); }, CodeLoc); } /// Instruct the queue with a non-blocking wait on an external semaphore. - /// An exception is thrown if \p SemaphoreHandle is incomplete, or if the + /// An exception is thrown if \p extSemaphore is incomplete, or if the /// type of semaphore requires an explicit value to wait upon. /// - /// \param SemaphoreHandle is an opaque external interop semaphore handle + /// \param extSemaphore is an opaque external semaphore object /// \param DepEvent is an event that specifies the kernel dependencies. /// \return an event representing the wait operation. event ext_oneapi_wait_external_semaphore( - sycl::ext::oneapi::experimental::interop_semaphore_handle SemaphoreHandle, + sycl::ext::oneapi::experimental::external_semaphore extSemaphore, event DepEvent, const detail::code_location &CodeLoc = detail::code_location::current()); /// Instruct the queue with a non-blocking wait on an external semaphore. - /// An exception is thrown if \p SemaphoreHandle is incomplete, or if the + /// An exception is thrown if \p extSemaphore is incomplete, or if the /// type of semaphore requires an explicit value to wait upon. /// - /// \param SemaphoreHandle is an opaque external interop semaphore handle. + /// \param extSemaphore is an opaque external semaphore object. /// \param DepEvents is a vector of events that specifies the kernel /// dependencies. /// \return an event representing the wait operation. event ext_oneapi_wait_external_semaphore( - sycl::ext::oneapi::experimental::interop_semaphore_handle SemaphoreHandle, + sycl::ext::oneapi::experimental::external_semaphore extSemaphore, const std::vector &DepEvents, const detail::code_location &CodeLoc = detail::code_location::current()); /// Instruct the queue with a non-blocking wait on an external semaphore. - /// An exception is thrown if \p SemaphoreHandle is incomplete, or if the + /// An exception is thrown if \p extSemaphore is incomplete, or if the /// type of semaphore does not support waiting on an explicitly passed value. /// - /// \param SemaphoreHandle is an opaque external interop semaphore handle + /// \param extSemaphore is an opaque external semaphore object /// \param WaitValue is the value that this semaphore will wait upon, until it /// allows any further commands to execute on the queue. /// \return an event representing the wait operation. event ext_oneapi_wait_external_semaphore( - sycl::ext::oneapi::experimental::interop_semaphore_handle SemaphoreHandle, + sycl::ext::oneapi::experimental::external_semaphore extSemaphore, uint64_t WaitValue, const detail::code_location &CodeLoc = detail::code_location::current()); /// Instruct the queue with a non-blocking wait on an external semaphore. - /// An exception is thrown if \p SemaphoreHandle is incomplete, or if the + /// An exception is thrown if \p extSemaphore is incomplete, or if the /// type of semaphore does not support waiting on an explicitly passed value. /// - /// \param SemaphoreHandle is an opaque external interop semaphore handle + /// \param extSemaphore is an opaque external semaphore object /// \param WaitValue is the value that this semaphore will wait upon, until it /// allows any further commands to execute on the queue. /// \param DepEvent is an event that specifies the kernel dependencies. /// \return an event representing the wait operation. event ext_oneapi_wait_external_semaphore( - sycl::ext::oneapi::experimental::interop_semaphore_handle SemaphoreHandle, + sycl::ext::oneapi::experimental::external_semaphore extSemaphore, uint64_t WaitValue, event DepEvent, const detail::code_location &CodeLoc = detail::code_location::current()); /// Instruct the queue with a non-blocking wait on an external semaphore. - /// An exception is thrown if \p SemaphoreHandle is incomplete, or if the + /// An exception is thrown if \p extSemaphore is incomplete, or if the /// type of semaphore does not support waiting on an explicitly passed value. /// - /// \param SemaphoreHandle is an opaque external interop semaphore handle + /// \param extSemaphore is an opaque external semaphore object /// \param WaitValue is the value that this semaphore will wait upon, until it /// allows any further commands to execute on the queue. /// \param DepEvents is a vector of events that specifies the kernel /// dependencies. /// \return an event representing the wait operation. event ext_oneapi_wait_external_semaphore( - sycl::ext::oneapi::experimental::interop_semaphore_handle SemaphoreHandle, + sycl::ext::oneapi::experimental::external_semaphore extSemaphore, uint64_t WaitValue, const std::vector &DepEvents, const detail::code_location &CodeLoc = detail::code_location::current()); /// Instruct the queue to signal the external semaphore once all previous /// commands have completed execution. - /// An exception is thrown if \p SemaphoreHandle is incomplete, or if the + /// An exception is thrown if \p extSemaphore is incomplete, or if the /// type of semaphore requires an explicit value to signal. /// - /// \param SemaphoreHandle is an opaque external interop semaphore handle + /// \param extSemaphore is an opaque external semaphore object /// \return an event representing the signal operation. event ext_oneapi_signal_external_semaphore( - sycl::ext::oneapi::experimental::interop_semaphore_handle SemaphoreHandle, + sycl::ext::oneapi::experimental::external_semaphore extSemaphore, const detail::code_location &CodeLoc = detail::code_location::current()); /// Instruct the queue to signal the external semaphore once all previous /// commands have completed execution. - /// An exception is thrown if \p SemaphoreHandle is incomplete, or if the + /// An exception is thrown if \p extSemaphore is incomplete, or if the /// type of semaphore requires an explicit value to signal. /// - /// \param SemaphoreHandle is an opaque external interop semaphore handle + /// \param extSemaphore is an opaque external semaphore object /// \param DepEvent is an event that specifies the kernel dependencies. /// \return an event representing the signal operation. event ext_oneapi_signal_external_semaphore( - sycl::ext::oneapi::experimental::interop_semaphore_handle SemaphoreHandle, + sycl::ext::oneapi::experimental::external_semaphore extSemaphore, event DepEvent, const detail::code_location &CodeLoc = detail::code_location::current()); /// Instruct the queue to signal the external semaphore once all previous /// commands have completed execution. - /// An exception is thrown if \p SemaphoreHandle is incomplete, or if the + /// An exception is thrown if \p extSemaphore is incomplete, or if the /// type of semaphore requires an explicit value to signal. /// - /// \param SemaphoreHandle is an opaque external interop semaphore handle + /// \param extSemaphore is an opaque external semaphore object /// \param DepEvents is a vector of events that specifies the kernel /// dependencies. /// \return an event representing the signal operation. event ext_oneapi_signal_external_semaphore( - sycl::ext::oneapi::experimental::interop_semaphore_handle SemaphoreHandle, + sycl::ext::oneapi::experimental::external_semaphore extSemaphore, const std::vector &DepEvents, const detail::code_location &CodeLoc = detail::code_location::current()); /// Instruct the queue to signal the external semaphore once all previous /// commands have completed execution. - /// An exception is thrown if \p SemaphoreHandle is incomplete, or if the + /// An exception is thrown if \p extSemaphore is incomplete, or if the /// type of semaphore does not support signalling an explicitly passed value. /// - /// \param SemaphoreHandle is an opaque external interop semaphore handle + /// \param extSemaphore is an opaque external semaphore object /// \param SignalValue is the value that this semaphore signal, once all /// prior opeartions on the queue complete. /// \return an event representing the signal operation. event ext_oneapi_signal_external_semaphore( - sycl::ext::oneapi::experimental::interop_semaphore_handle SemaphoreHandle, + sycl::ext::oneapi::experimental::external_semaphore extSemaphore, uint64_t SignalValue, const detail::code_location &CodeLoc = detail::code_location::current()); /// Instruct the queue to signal the external semaphore once all previous /// commands have completed execution. - /// An exception is thrown if \p SemaphoreHandle is incomplete, or if the + /// An exception is thrown if \p extSemaphore is incomplete, or if the /// type of semaphore does not support signalling an explicitly passed value. /// - /// \param SemaphoreHandle is an opaque external interop semaphore handle + /// \param extSemaphore is an opaque external semaphore object /// \param SignalValue is the value that this semaphore signal, once all /// prior opeartions on the queue complete. /// \param DepEvent is an event that specifies the kernel dependencies. /// \return an event representing the signal operation. event ext_oneapi_signal_external_semaphore( - sycl::ext::oneapi::experimental::interop_semaphore_handle SemaphoreHandle, + sycl::ext::oneapi::experimental::external_semaphore extSemaphore, uint64_t SignalValue, event DepEvent, const detail::code_location &CodeLoc = detail::code_location::current()); /// Instruct the queue to signal the external semaphore once all previous /// commands have completed execution. - /// An exception is thrown if \p SemaphoreHandle is incomplete, or if the + /// An exception is thrown if \p extSemaphore is incomplete, or if the /// type of semaphore does not support signalling an explicitly passed value. /// - /// \param SemaphoreHandle is an opaque external interop semaphore handle + /// \param extSemaphore is an opaque external semaphore object /// \param SignalValue is the value that this semaphore signal, once all /// prior opeartions on the queue complete. /// \param DepEvents is a vector of events that specifies the kernel /// dependencies. /// \return an event representing the signal operation. event ext_oneapi_signal_external_semaphore( - sycl::ext::oneapi::experimental::interop_semaphore_handle SemaphoreHandle, + sycl::ext::oneapi::experimental::external_semaphore SemaphoreHandle, uint64_t SignalValue, const std::vector &DepEvents, const detail::code_location &CodeLoc = detail::code_location::current()); diff --git a/sycl/plugins/cuda/pi_cuda.cpp b/sycl/plugins/cuda/pi_cuda.cpp index 13b44ce9a701d..225c367ae3aa8 100644 --- a/sycl/plugins/cuda/pi_cuda.cpp +++ b/sycl/plugins/cuda/pi_cuda.cpp @@ -458,29 +458,31 @@ __SYCL_EXPORT_DEPRECATED("This function has been deprecated in favor of " "`piextImportExternalMemory`") pi_result piextMemImportOpaqueFD(pi_context Context, pi_device Device, size_t Size, int FileDescriptor, - pi_interop_mem_handle *RetHandle) { + pi_external_mem *RetExtMem) { return pi2ur::piextMemImportOpaqueFD(Context, Device, Size, FileDescriptor, - RetHandle); + RetExtMem); } __SYCL_EXPORT pi_result piextImportExternalMemory( pi_context Context, pi_device Device, pi_external_mem_descriptor *MemDesc, - pi_interop_mem_handle *RetHandle) { - return pi2ur::piextImportExternalMemory(Context, Device, MemDesc, RetHandle); + pi_external_mem *RetExtMem) { + return pi2ur::piextImportExternalMemory(Context, Device, MemDesc, RetExtMem); } -__SYCL_EXPORT pi_result piextMemMapExternalArray( - pi_context Context, pi_device Device, pi_image_format *ImageFormat, - pi_image_desc *ImageDesc, pi_interop_mem_handle MemHandle, - pi_image_mem_handle *RetMem) { +__SYCL_EXPORT pi_result piextMemMapExternalArray(pi_context Context, + pi_device Device, + pi_image_format *ImageFormat, + pi_image_desc *ImageDesc, + pi_external_mem ExtMem, + pi_image_mem_handle *RetMem) { return pi2ur::piextMemMapExternalArray(Context, Device, ImageFormat, - ImageDesc, MemHandle, RetMem); + ImageDesc, ExtMem, RetMem); } -__SYCL_EXPORT pi_result piextMemReleaseInterop(pi_context Context, - pi_device Device, - pi_interop_mem_handle ExtMem) { - return pi2ur::piextMemReleaseInterop(Context, Device, ExtMem); +__SYCL_EXPORT pi_result piextMemReleaseExternalMemory(pi_context Context, + pi_device Device, + pi_external_mem ExtMem) { + return pi2ur::piextMemReleaseExternalMemory(Context, Device, ExtMem); } __SYCL_EXPORT_DEPRECATED("This function has been deprecated in favor of " @@ -488,39 +490,38 @@ __SYCL_EXPORT_DEPRECATED("This function has been deprecated in favor of " pi_result piextImportExternalSemaphoreOpaqueFD(pi_context Context, pi_device Device, int FileDescriptor, - pi_interop_semaphore_handle *RetHandle) { + pi_external_semaphore *RetExtSem) { return pi2ur::piextImportExternalSemaphoreOpaqueFD(Context, Device, - FileDescriptor, RetHandle); + FileDescriptor, RetExtSem); } __SYCL_EXPORT pi_result piextImportExternalSemaphore(pi_context Context, pi_device Device, pi_external_semaphore_descriptor *SemDesc, - pi_interop_semaphore_handle *RetHandle) { + pi_external_semaphore *RetExtSem) { return pi2ur::piextImportExternalSemaphore(Context, Device, SemDesc, - RetHandle); + RetExtSem); } -__SYCL_EXPORT pi_result -piextDestroyExternalSemaphore(pi_context Context, pi_device Device, - pi_interop_semaphore_handle SemHandle) { - return pi2ur::piextDestroyExternalSemaphore(Context, Device, SemHandle); +__SYCL_EXPORT pi_result piextDestroyExternalSemaphore( + pi_context Context, pi_device Device, pi_external_semaphore ExtSem) { + return pi2ur::piextDestroyExternalSemaphore(Context, Device, ExtSem); } __SYCL_EXPORT pi_result piextWaitExternalSemaphore( - pi_queue Queue, pi_interop_semaphore_handle SemHandle, bool HasWaitValue, + pi_queue Queue, pi_external_semaphore ExtSem, bool HasWaitValue, pi_uint64 WaitValue, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *Event) { - return pi2ur::piextWaitExternalSemaphore(Queue, SemHandle, HasWaitValue, + return pi2ur::piextWaitExternalSemaphore(Queue, ExtSem, HasWaitValue, WaitValue, NumEventsInWaitList, EventWaitList, Event); } __SYCL_EXPORT pi_result piextSignalExternalSemaphore( - pi_queue Queue, pi_interop_semaphore_handle SemHandle, bool HasSignalValue, + pi_queue Queue, pi_external_semaphore ExtSem, bool HasSignalValue, pi_uint64 SignalValue, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *Event) { - return pi2ur::piextSignalExternalSemaphore(Queue, SemHandle, HasSignalValue, + return pi2ur::piextSignalExternalSemaphore(Queue, ExtSem, HasSignalValue, SignalValue, NumEventsInWaitList, EventWaitList, Event); } diff --git a/sycl/plugins/hip/pi_hip.cpp b/sycl/plugins/hip/pi_hip.cpp index 074909bcd6736..b452242c52564 100644 --- a/sycl/plugins/hip/pi_hip.cpp +++ b/sycl/plugins/hip/pi_hip.cpp @@ -461,29 +461,31 @@ __SYCL_EXPORT_DEPRECATED("This function has been deprecated in favor of " "`piextImportExternalMemory`") pi_result piextMemImportOpaqueFD(pi_context Context, pi_device Device, size_t Size, int FileDescriptor, - pi_interop_mem_handle *RetHandle) { + pi_external_mem *RetExtMem) { return pi2ur::piextMemImportOpaqueFD(Context, Device, Size, FileDescriptor, - RetHandle); + RetExtMem); } __SYCL_EXPORT pi_result piextImportExternalMemory( pi_context Context, pi_device Device, pi_external_mem_descriptor *MemDesc, - pi_interop_mem_handle *RetHandle) { - return pi2ur::piextImportExternalMemory(Context, Device, MemDesc, RetHandle); + pi_external_mem *RetExtMem) { + return pi2ur::piextImportExternalMemory(Context, Device, MemDesc, RetExtMem); } -__SYCL_EXPORT pi_result piextMemMapExternalArray( - pi_context Context, pi_device Device, pi_image_format *ImageFormat, - pi_image_desc *ImageDesc, pi_interop_mem_handle MemHandle, - pi_image_mem_handle *RetMem) { +__SYCL_EXPORT pi_result piextMemMapExternalArray(pi_context Context, + pi_device Device, + pi_image_format *ImageFormat, + pi_image_desc *ImageDesc, + pi_external_mem ExtMem, + pi_image_mem_handle *RetMem) { return pi2ur::piextMemMapExternalArray(Context, Device, ImageFormat, - ImageDesc, MemHandle, RetMem); + ImageDesc, ExtMem, RetMem); } -__SYCL_EXPORT pi_result piextMemReleaseInterop(pi_context Context, - pi_device Device, - pi_interop_mem_handle ExtMem) { - return pi2ur::piextMemReleaseInterop(Context, Device, ExtMem); +__SYCL_EXPORT pi_result piextMemReleaseExternalMemory(pi_context Context, + pi_device Device, + pi_external_mem ExtMem) { + return pi2ur::piextMemReleaseExternalMemory(Context, Device, ExtMem); } __SYCL_EXPORT_DEPRECATED("This function has been deprecated in favor of " @@ -491,39 +493,38 @@ __SYCL_EXPORT_DEPRECATED("This function has been deprecated in favor of " pi_result piextImportExternalSemaphoreOpaqueFD(pi_context Context, pi_device Device, int FileDescriptor, - pi_interop_semaphore_handle *RetHandle) { + pi_external_semaphore *RetExtSem) { return pi2ur::piextImportExternalSemaphoreOpaqueFD(Context, Device, - FileDescriptor, RetHandle); + FileDescriptor, RetExtSem); } __SYCL_EXPORT pi_result piextImportExternalSemaphore(pi_context Context, pi_device Device, pi_external_semaphore_descriptor *SemDesc, - pi_interop_semaphore_handle *RetHandle) { + pi_external_semaphore *RetExtSem) { return pi2ur::piextImportExternalSemaphore(Context, Device, SemDesc, - RetHandle); + RetExtSem); } -__SYCL_EXPORT pi_result -piextDestroyExternalSemaphore(pi_context Context, pi_device Device, - pi_interop_semaphore_handle SemHandle) { - return pi2ur::piextDestroyExternalSemaphore(Context, Device, SemHandle); +__SYCL_EXPORT pi_result piextDestroyExternalSemaphore( + pi_context Context, pi_device Device, pi_external_semaphore ExtSem) { + return pi2ur::piextDestroyExternalSemaphore(Context, Device, ExtSem); } __SYCL_EXPORT pi_result piextWaitExternalSemaphore( - pi_queue Queue, pi_interop_semaphore_handle SemHandle, bool HasWaitValue, + pi_queue Queue, pi_external_semaphore ExtSem, bool HasWaitValue, pi_uint64 WaitValue, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *Event) { - return pi2ur::piextWaitExternalSemaphore(Queue, SemHandle, HasWaitValue, + return pi2ur::piextWaitExternalSemaphore(Queue, ExtSem, HasWaitValue, WaitValue, NumEventsInWaitList, EventWaitList, Event); } __SYCL_EXPORT pi_result piextSignalExternalSemaphore( - pi_queue Queue, pi_interop_semaphore_handle SemHandle, bool HasSignalValue, + pi_queue Queue, pi_external_semaphore ExtSem, bool HasSignalValue, pi_uint64 SignalValue, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *Event) { - return pi2ur::piextSignalExternalSemaphore(Queue, SemHandle, HasSignalValue, + return pi2ur::piextSignalExternalSemaphore(Queue, ExtSem, HasSignalValue, SignalValue, NumEventsInWaitList, EventWaitList, Event); } diff --git a/sycl/plugins/level_zero/pi_level_zero.cpp b/sycl/plugins/level_zero/pi_level_zero.cpp index 61ddafc09ccdc..486e86b9bcf95 100644 --- a/sycl/plugins/level_zero/pi_level_zero.cpp +++ b/sycl/plugins/level_zero/pi_level_zero.cpp @@ -470,29 +470,31 @@ __SYCL_EXPORT_DEPRECATED("This function has been deprecated in favor of " "`piextImportExternalMemory`") pi_result piextMemImportOpaqueFD(pi_context Context, pi_device Device, size_t Size, int FileDescriptor, - pi_interop_mem_handle *RetHandle) { + pi_external_mem *RetExtMem) { return pi2ur::piextMemImportOpaqueFD(Context, Device, Size, FileDescriptor, - RetHandle); + RetExtMem); } __SYCL_EXPORT pi_result piextImportExternalMemory( pi_context Context, pi_device Device, pi_external_mem_descriptor *MemDesc, - pi_interop_mem_handle *RetHandle) { - return pi2ur::piextImportExternalMemory(Context, Device, MemDesc, RetHandle); + pi_external_mem *RetExtMem) { + return pi2ur::piextImportExternalMemory(Context, Device, MemDesc, RetExtMem); } -__SYCL_EXPORT pi_result piextMemMapExternalArray( - pi_context Context, pi_device Device, pi_image_format *ImageFormat, - pi_image_desc *ImageDesc, pi_interop_mem_handle MemHandle, - pi_image_mem_handle *RetMem) { +__SYCL_EXPORT pi_result piextMemMapExternalArray(pi_context Context, + pi_device Device, + pi_image_format *ImageFormat, + pi_image_desc *ImageDesc, + pi_external_mem ExtMem, + pi_image_mem_handle *RetMem) { return pi2ur::piextMemMapExternalArray(Context, Device, ImageFormat, - ImageDesc, MemHandle, RetMem); + ImageDesc, ExtMem, RetMem); } -__SYCL_EXPORT pi_result piextMemReleaseInterop(pi_context Context, - pi_device Device, - pi_interop_mem_handle ExtMem) { - return pi2ur::piextMemReleaseInterop(Context, Device, ExtMem); +__SYCL_EXPORT pi_result piextMemReleaseExternalMemory(pi_context Context, + pi_device Device, + pi_external_mem ExtMem) { + return pi2ur::piextMemReleaseExternalMemory(Context, Device, ExtMem); } __SYCL_EXPORT_DEPRECATED("This function has been deprecated in favor of " @@ -500,39 +502,38 @@ __SYCL_EXPORT_DEPRECATED("This function has been deprecated in favor of " pi_result piextImportExternalSemaphoreOpaqueFD(pi_context Context, pi_device Device, int FileDescriptor, - pi_interop_semaphore_handle *RetHandle) { + pi_external_semaphore *RetExtSem) { return pi2ur::piextImportExternalSemaphoreOpaqueFD(Context, Device, - FileDescriptor, RetHandle); + FileDescriptor, RetExtSem); } __SYCL_EXPORT pi_result piextImportExternalSemaphore(pi_context Context, pi_device Device, pi_external_semaphore_descriptor *SemDesc, - pi_interop_semaphore_handle *RetHandle) { + pi_external_semaphore *RetExtSem) { return pi2ur::piextImportExternalSemaphore(Context, Device, SemDesc, - RetHandle); + RetExtSem); } -__SYCL_EXPORT pi_result -piextDestroyExternalSemaphore(pi_context Context, pi_device Device, - pi_interop_semaphore_handle SemHandle) { - return pi2ur::piextDestroyExternalSemaphore(Context, Device, SemHandle); +__SYCL_EXPORT pi_result piextDestroyExternalSemaphore( + pi_context Context, pi_device Device, pi_external_semaphore ExtSem) { + return pi2ur::piextDestroyExternalSemaphore(Context, Device, ExtSem); } __SYCL_EXPORT pi_result piextWaitExternalSemaphore( - pi_queue Queue, pi_interop_semaphore_handle SemHandle, bool HasWaitValue, + pi_queue Queue, pi_external_semaphore ExtSem, bool HasWaitValue, pi_uint64 WaitValue, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *Event) { - return pi2ur::piextWaitExternalSemaphore(Queue, SemHandle, HasWaitValue, + return pi2ur::piextWaitExternalSemaphore(Queue, ExtSem, HasWaitValue, WaitValue, NumEventsInWaitList, EventWaitList, Event); } __SYCL_EXPORT pi_result piextSignalExternalSemaphore( - pi_queue Queue, pi_interop_semaphore_handle SemHandle, bool HasSignalValue, + pi_queue Queue, pi_external_semaphore ExtSem, bool HasSignalValue, pi_uint64 SignalValue, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *Event) { - return pi2ur::piextSignalExternalSemaphore(Queue, SemHandle, HasSignalValue, + return pi2ur::piextSignalExternalSemaphore(Queue, ExtSem, HasSignalValue, SignalValue, NumEventsInWaitList, EventWaitList, Event); } diff --git a/sycl/plugins/native_cpu/pi_native_cpu.cpp b/sycl/plugins/native_cpu/pi_native_cpu.cpp index e1f40fcbcd16b..bb492f5a5335c 100644 --- a/sycl/plugins/native_cpu/pi_native_cpu.cpp +++ b/sycl/plugins/native_cpu/pi_native_cpu.cpp @@ -465,29 +465,31 @@ __SYCL_EXPORT_DEPRECATED("This function has been deprecated in favor of " "`piextImportExternalMemory`") pi_result piextMemImportOpaqueFD(pi_context Context, pi_device Device, size_t Size, int FileDescriptor, - pi_interop_mem_handle *RetHandle) { + pi_external_mem *RetExtMem) { return pi2ur::piextMemImportOpaqueFD(Context, Device, Size, FileDescriptor, - RetHandle); + RetExtMem); } __SYCL_EXPORT pi_result piextImportExternalMemory( pi_context Context, pi_device Device, pi_external_mem_descriptor *MemDesc, - pi_interop_mem_handle *RetHandle) { - return pi2ur::piextImportExternalMemory(Context, Device, MemDesc, RetHandle); + pi_external_mem *RetExtMem) { + return pi2ur::piextImportExternalMemory(Context, Device, MemDesc, RetExtMem); } -__SYCL_EXPORT pi_result piextMemMapExternalArray( - pi_context Context, pi_device Device, pi_image_format *ImageFormat, - pi_image_desc *ImageDesc, pi_interop_mem_handle MemHandle, - pi_image_mem_handle *RetMem) { +__SYCL_EXPORT pi_result piextMemMapExternalArray(pi_context Context, + pi_device Device, + pi_image_format *ImageFormat, + pi_image_desc *ImageDesc, + pi_external_mem ExtMem, + pi_image_mem_handle *RetMem) { return pi2ur::piextMemMapExternalArray(Context, Device, ImageFormat, - ImageDesc, MemHandle, RetMem); + ImageDesc, ExtMem, RetMem); } -__SYCL_EXPORT pi_result piextMemReleaseInterop(pi_context Context, - pi_device Device, - pi_interop_mem_handle ExtMem) { - return pi2ur::piextMemReleaseInterop(Context, Device, ExtMem); +__SYCL_EXPORT pi_result piextMemReleaseExternalMemory(pi_context Context, + pi_device Device, + pi_external_mem ExtMem) { + return pi2ur::piextMemReleaseExternalMemory(Context, Device, ExtMem); } __SYCL_EXPORT_DEPRECATED("This function has been deprecated in favor of " @@ -495,39 +497,38 @@ __SYCL_EXPORT_DEPRECATED("This function has been deprecated in favor of " pi_result piextImportExternalSemaphoreOpaqueFD(pi_context Context, pi_device Device, int FileDescriptor, - pi_interop_semaphore_handle *RetHandle) { + pi_external_semaphore *RetExtSem) { return pi2ur::piextImportExternalSemaphoreOpaqueFD(Context, Device, - FileDescriptor, RetHandle); + FileDescriptor, RetExtSem); } __SYCL_EXPORT pi_result piextImportExternalSemaphore(pi_context Context, pi_device Device, pi_external_semaphore_descriptor *SemDesc, - pi_interop_semaphore_handle *RetHandle) { + pi_external_semaphore *RetExtSem) { return pi2ur::piextImportExternalSemaphore(Context, Device, SemDesc, - RetHandle); + RetExtSem); } -__SYCL_EXPORT pi_result -piextDestroyExternalSemaphore(pi_context Context, pi_device Device, - pi_interop_semaphore_handle SemHandle) { - return pi2ur::piextDestroyExternalSemaphore(Context, Device, SemHandle); +__SYCL_EXPORT pi_result piextDestroyExternalSemaphore( + pi_context Context, pi_device Device, pi_external_semaphore ExtSem) { + return pi2ur::piextDestroyExternalSemaphore(Context, Device, ExtSem); } __SYCL_EXPORT pi_result piextWaitExternalSemaphore( - pi_queue Queue, pi_interop_semaphore_handle SemHandle, bool HasWaitValue, + pi_queue Queue, pi_external_semaphore ExtSem, bool HasWaitValue, pi_uint64 WaitValue, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *Event) { - return pi2ur::piextWaitExternalSemaphore(Queue, SemHandle, HasWaitValue, + return pi2ur::piextWaitExternalSemaphore(Queue, ExtSem, HasWaitValue, WaitValue, NumEventsInWaitList, EventWaitList, Event); } __SYCL_EXPORT pi_result piextSignalExternalSemaphore( - pi_queue Queue, pi_interop_semaphore_handle SemHandle, bool HasSignalValue, + pi_queue Queue, pi_external_semaphore ExtSem, bool HasSignalValue, pi_uint64 SignalValue, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *Event) { - return pi2ur::piextSignalExternalSemaphore(Queue, SemHandle, HasSignalValue, + return pi2ur::piextSignalExternalSemaphore(Queue, ExtSem, HasSignalValue, SignalValue, NumEventsInWaitList, EventWaitList, Event); } diff --git a/sycl/plugins/opencl/pi_opencl.cpp b/sycl/plugins/opencl/pi_opencl.cpp index c569adb4a8839..3cd4065954345 100644 --- a/sycl/plugins/opencl/pi_opencl.cpp +++ b/sycl/plugins/opencl/pi_opencl.cpp @@ -438,71 +438,69 @@ pi_result piextMemImageGetInfo(pi_image_mem_handle MemHandle, } [[deprecated("This function has been deprecated in favor of " - "`piextImportExternalMemory`")]] -pi_result piextMemImportOpaqueFD(pi_context Context, pi_device Device, - size_t Size, int FileDescriptor, - pi_interop_mem_handle *RetHandle) { + "`piextImportExternalMemory`")]] pi_result +piextMemImportOpaqueFD(pi_context Context, pi_device Device, size_t Size, + int FileDescriptor, pi_external_mem *RetExtMem) { return pi2ur::piextMemImportOpaqueFD(Context, Device, Size, FileDescriptor, - RetHandle); + RetExtMem); } pi_result piextImportExternalMemory(pi_context Context, pi_device Device, pi_external_mem_descriptor *MemDesc, - pi_interop_mem_handle *RetHandle) { - return pi2ur::piextImportExternalMemory(Context, Device, MemDesc, RetHandle); + pi_external_mem *RetExtMem) { + return pi2ur::piextImportExternalMemory(Context, Device, MemDesc, RetExtMem); } pi_result piextMemMapExternalArray(pi_context Context, pi_device Device, pi_image_format *ImageFormat, pi_image_desc *ImageDesc, - pi_interop_mem_handle MemHandle, + pi_external_mem ExtMem, pi_image_mem_handle *RetMem) { return pi2ur::piextMemMapExternalArray(Context, Device, ImageFormat, - ImageDesc, MemHandle, RetMem); + ImageDesc, ExtMem, RetMem); } -pi_result piextMemReleaseInterop(pi_context Context, pi_device Device, - pi_interop_mem_handle ExtMem) { - return pi2ur::piextMemReleaseInterop(Context, Device, ExtMem); +pi_result piextMemReleaseExternalMemory(pi_context Context, pi_device Device, + pi_external_mem ExtMem) { + return pi2ur::piextMemReleaseExternalMemory(Context, Device, ExtMem); } [[deprecated("This function has been deprecated in favor of " - "`piextImportExternalSemaphore`")]] -pi_result + "`piextImportExternalSemaphore`")]] pi_result piextImportExternalSemaphoreOpaqueFD(pi_context Context, pi_device Device, int FileDescriptor, - pi_interop_semaphore_handle *RetHandle) { + pi_external_semaphore *RetExtSem) { return pi2ur::piextImportExternalSemaphoreOpaqueFD(Context, Device, - FileDescriptor, RetHandle); + FileDescriptor, RetExtSem); } pi_result piextImportExternalSemaphore(pi_context Context, pi_device Device, pi_external_semaphore_descriptor *SemDesc, - pi_interop_semaphore_handle *RetHandle) { + pi_external_semaphore *RetExtSem) { return pi2ur::piextImportExternalSemaphore(Context, Device, SemDesc, - RetHandle); + RetExtSem); } pi_result piextDestroyExternalSemaphore(pi_context Context, pi_device Device, - pi_interop_semaphore_handle SemHandle) { - return pi2ur::piextDestroyExternalSemaphore(Context, Device, SemHandle); + pi_external_semaphore ExtSem) { + return pi2ur::piextDestroyExternalSemaphore(Context, Device, ExtSem); } __SYCL_EXPORT pi_result piextWaitExternalSemaphore( - pi_queue Queue, pi_interop_semaphore_handle SemHandle, bool HasWaitValue, + pi_queue Queue, pi_external_semaphore ExtSem, bool HasWaitValue, pi_uint64 WaitValue, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *Event) { - return pi2ur::piextWaitExternalSemaphore(Queue, SemHandle, HasWaitValue, + return pi2ur::piextWaitExternalSemaphore(Queue, ExtSem, HasWaitValue, WaitValue, NumEventsInWaitList, EventWaitList, Event); } __SYCL_EXPORT pi_result piextSignalExternalSemaphore( - pi_queue Queue, pi_interop_semaphore_handle SemHandle, bool HasSignalValue, + pi_queue Queue, pi_external_semaphore ExtSem, bool HasSignalValue, pi_uint64 SignalValue, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *Event) { - return pi2ur::piextSignalExternalSemaphore(Queue, SemHandle, HasSignalValue, + return pi2ur::piextSignalExternalSemaphore(Queue, ExtSem, HasSignalValue, SignalValue, NumEventsInWaitList, EventWaitList, Event); } diff --git a/sycl/plugins/unified_runtime/CMakeLists.txt b/sycl/plugins/unified_runtime/CMakeLists.txt index c631291f01f22..82d8b5eedacc6 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/oneapi-src/unified-runtime.git") - # commit 00ca0daaa170fa1a5826e1cdcbdc46a4db0a5694 - # Merge: 7b640455 abab204d - # Author: Kenneth Benzie (Benie) - # Date: Tue Jul 2 13:52:21 2024 +0100 - # Merge pull request #1696 from nrspruit/l0_windows_interop - # [L0] Support for Bindless Image Import - set(UNIFIED_RUNTIME_TAG 00ca0daaa170fa1a5826e1cdcbdc46a4db0a5694) + set(UNIFIED_RUNTIME_REPO "git@github.com:DBDuncan/unified-runtime.git") + # commit 2875c7e91e43d002440d26fe0eb50e2fb906ab47 + # Author: Sean Stirling + # Date: Tue, 4 Jun 2024 13:52:21 +0100 + # [PATCH] [Bindless][Exp] Rename interop related structs/funcs with + # "external" + set(UNIFIED_RUNTIME_TAG 2875c7e91e43d002440d26fe0eb50e2fb906ab47) 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 3690c78d61b47..3194e8d4c3bab 100644 --- a/sycl/plugins/unified_runtime/pi2ur.hpp +++ b/sycl/plugins/unified_runtime/pi2ur.hpp @@ -1311,17 +1311,17 @@ inline pi_result piDeviceGetInfo(pi_device Device, pi_device_info ParamName, PI_EXT_ONEAPI_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_3D, UR_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_3D_EXP) PI_TO_UR_MAP_DEVICE_INFO( - PI_EXT_ONEAPI_DEVICE_INFO_INTEROP_MEMORY_IMPORT_SUPPORT, - UR_DEVICE_INFO_INTEROP_MEMORY_IMPORT_SUPPORT_EXP) + PI_EXT_ONEAPI_DEVICE_INFO_EXTERNAL_MEMORY_IMPORT_SUPPORT, + UR_DEVICE_INFO_EXTERNAL_MEMORY_IMPORT_SUPPORT_EXP) PI_TO_UR_MAP_DEVICE_INFO( - PI_EXT_ONEAPI_DEVICE_INFO_INTEROP_MEMORY_EXPORT_SUPPORT, - UR_DEVICE_INFO_INTEROP_MEMORY_EXPORT_SUPPORT_EXP) + PI_EXT_ONEAPI_DEVICE_INFO_EXTERNAL_MEMORY_EXPORT_SUPPORT, + UR_DEVICE_INFO_EXTERNAL_MEMORY_EXPORT_SUPPORT_EXP) PI_TO_UR_MAP_DEVICE_INFO( - PI_EXT_ONEAPI_DEVICE_INFO_INTEROP_SEMAPHORE_IMPORT_SUPPORT, - UR_DEVICE_INFO_INTEROP_SEMAPHORE_IMPORT_SUPPORT_EXP) + PI_EXT_ONEAPI_DEVICE_INFO_EXTERNAL_SEMAPHORE_IMPORT_SUPPORT, + UR_DEVICE_INFO_EXTERNAL_SEMAPHORE_IMPORT_SUPPORT_EXP) PI_TO_UR_MAP_DEVICE_INFO( - PI_EXT_ONEAPI_DEVICE_INFO_INTEROP_SEMAPHORE_EXPORT_SUPPORT, - UR_DEVICE_INFO_INTEROP_SEMAPHORE_EXPORT_SUPPORT_EXP) + PI_EXT_ONEAPI_DEVICE_INFO_EXTERNAL_SEMAPHORE_EXPORT_SUPPORT, + UR_DEVICE_INFO_EXTERNAL_SEMAPHORE_EXPORT_SUPPORT_EXP) PI_TO_UR_MAP_DEVICE_INFO( PI_EXT_ONEAPI_DEVICE_INFO_TIMESTAMP_RECORDING_SUPPORT, UR_DEVICE_INFO_TIMESTAMP_RECORDING_SUPPORT_EXP) @@ -5406,29 +5406,28 @@ inline pi_result piextMemImageGetInfo(pi_image_mem_handle MemHandle, } [[deprecated("This function has been deprecated in favor of " - "`piextImportExternalMemory`")]] -inline pi_result piextMemImportOpaqueFD(pi_context Context, pi_device Device, - size_t Size, int FileDescriptor, - pi_interop_mem_handle *RetHandle) { + "`piextImportExternalMemory`")]] inline pi_result +piextMemImportOpaqueFD(pi_context Context, pi_device Device, size_t Size, + int FileDescriptor, pi_external_mem *RetExtMem) { PI_ASSERT(Context, PI_ERROR_INVALID_CONTEXT); PI_ASSERT(Device, PI_ERROR_INVALID_DEVICE); auto UrContext = reinterpret_cast(Context); auto UrDevice = reinterpret_cast(Device); - auto *UrRetHandle = - reinterpret_cast(RetHandle); + auto *UrRetExtMem = + reinterpret_cast(RetExtMem); ur_exp_file_descriptor_t PosixFD{}; PosixFD.stype = UR_STRUCTURE_TYPE_EXP_FILE_DESCRIPTOR; PosixFD.fd = FileDescriptor; - ur_exp_interop_mem_desc_t InteropMemDesc{}; - InteropMemDesc.stype = UR_STRUCTURE_TYPE_EXP_INTEROP_MEM_DESC; - InteropMemDesc.pNext = &PosixFD; + ur_exp_external_mem_desc_t ExtMemDesc{}; + ExtMemDesc.stype = UR_STRUCTURE_TYPE_EXP_EXTERNAL_MEM_DESC; + ExtMemDesc.pNext = &PosixFD; HANDLE_ERRORS(urBindlessImagesImportExternalMemoryExp( UrContext, UrDevice, Size, UR_EXP_EXTERNAL_MEM_TYPE_OPAQUE_FD, - &InteropMemDesc, UrRetHandle)); + &ExtMemDesc, UrRetExtMem)); return PI_SUCCESS; } @@ -5436,17 +5435,17 @@ inline pi_result piextMemImportOpaqueFD(pi_context Context, pi_device Device, inline pi_result piextImportExternalMemory(pi_context Context, pi_device Device, pi_external_mem_descriptor *MemDescriptor, - pi_interop_mem_handle *RetHandle) { + pi_external_mem *RetExtMem) { PI_ASSERT(Context, PI_ERROR_INVALID_CONTEXT); PI_ASSERT(Device, PI_ERROR_INVALID_DEVICE); auto UrContext = reinterpret_cast(Context); auto UrDevice = reinterpret_cast(Device); - auto *UrRetHandle = - reinterpret_cast(RetHandle); + auto *UrRetExtMem = + reinterpret_cast(RetExtMem); - ur_exp_interop_mem_desc_t InteropMemDesc{}; - InteropMemDesc.stype = UR_STRUCTURE_TYPE_EXP_INTEROP_MEM_DESC; + ur_exp_external_mem_desc_t ExtMemDesc{}; + ExtMemDesc.stype = UR_STRUCTURE_TYPE_EXP_EXTERNAL_MEM_DESC; ur_exp_external_mem_type_t UrExternalMemHandleType; switch (MemDescriptor->handleType) { @@ -5476,7 +5475,7 @@ piextImportExternalMemory(pi_context Context, pi_device Device, case pi_external_mem_handle_type::opaque_fd: { OpaqueFD.stype = UR_STRUCTURE_TYPE_EXP_FILE_DESCRIPTOR; OpaqueFD.fd = MemDescriptor->handle.file_descriptor; - InteropMemDesc.pNext = &OpaqueFD; + ExtMemDesc.pNext = &OpaqueFD; break; } #else @@ -5484,7 +5483,7 @@ piextImportExternalMemory(pi_context Context, pi_device Device, case pi_external_mem_handle_type::win32_nt_dx12_resource: { Win32Handle.stype = UR_STRUCTURE_TYPE_EXP_WIN32_HANDLE; Win32Handle.handle = MemDescriptor->handle.win32_handle; - InteropMemDesc.pNext = &Win32Handle; + ExtMemDesc.pNext = &Win32Handle; break; } #endif @@ -5494,7 +5493,7 @@ piextImportExternalMemory(pi_context Context, pi_device Device, HANDLE_ERRORS(urBindlessImagesImportExternalMemoryExp( UrContext, UrDevice, MemDescriptor->memorySizeBytes, - UrExternalMemHandleType, &InteropMemDesc, UrRetHandle)); + UrExternalMemHandleType, &ExtMemDesc, UrRetExtMem)); return PI_SUCCESS; } @@ -5502,7 +5501,7 @@ piextImportExternalMemory(pi_context Context, pi_device Device, inline pi_result piextMemMapExternalArray(pi_context Context, pi_device Device, pi_image_format *ImageFormat, pi_image_desc *ImageDesc, - pi_interop_mem_handle MemHandle, + pi_external_mem ExtMem, pi_image_mem_handle *RetMem) { PI_ASSERT(Context, PI_ERROR_INVALID_CONTEXT); PI_ASSERT(Device, PI_ERROR_INVALID_DEVICE); @@ -5514,56 +5513,56 @@ inline pi_result piextMemMapExternalArray(pi_context Context, pi_device Device, ur_image_desc_t UrDesc{}; pi2urImageDesc(ImageFormat, ImageDesc, &UrFormat, &UrDesc); - auto UrMemHandle = reinterpret_cast(MemHandle); + auto UrExtMem = reinterpret_cast(ExtMem); ur_exp_image_mem_handle_t *UrRetMem = reinterpret_cast(RetMem); HANDLE_ERRORS(urBindlessImagesMapExternalArrayExp( - UrContext, UrDevice, &UrFormat, &UrDesc, UrMemHandle, UrRetMem)); + UrContext, UrDevice, &UrFormat, &UrDesc, UrExtMem, UrRetMem)); return PI_SUCCESS; } -inline pi_result piextMemReleaseInterop(pi_context Context, pi_device Device, - pi_interop_mem_handle ExtMem) { +inline pi_result piextMemReleaseExternalMemory(pi_context Context, + pi_device Device, + pi_external_mem ExtMem) { PI_ASSERT(Context, PI_ERROR_INVALID_CONTEXT); PI_ASSERT(Device, PI_ERROR_INVALID_DEVICE); auto UrContext = reinterpret_cast(Context); auto UrDevice = reinterpret_cast(Device); - auto UrExtMem = reinterpret_cast(ExtMem); + auto UrExtMem = reinterpret_cast(ExtMem); HANDLE_ERRORS( - urBindlessImagesReleaseInteropExp(UrContext, UrDevice, UrExtMem)); + urBindlessImagesReleaseExternalMemoryExp(UrContext, UrDevice, UrExtMem)); return PI_SUCCESS; } [[deprecated("This function has been deprecated in favor of " - "`piextImportExternalSemaphore`")]] -inline pi_result + "`piextImportExternalSemaphore`")]] inline pi_result piextImportExternalSemaphoreOpaqueFD(pi_context Context, pi_device Device, int FileDescriptor, - pi_interop_semaphore_handle *RetHandle) { + pi_external_semaphore *RetExtSem) { PI_ASSERT(Context, PI_ERROR_INVALID_CONTEXT); PI_ASSERT(Device, PI_ERROR_INVALID_DEVICE); auto UrContext = reinterpret_cast(Context); auto UrDevice = reinterpret_cast(Device); - auto *UrRetHandle = - reinterpret_cast(RetHandle); + auto *UrRetExtSem = + reinterpret_cast(RetExtSem); ur_exp_file_descriptor_t PosixFD{}; PosixFD.stype = UR_STRUCTURE_TYPE_EXP_FILE_DESCRIPTOR; PosixFD.fd = FileDescriptor; - ur_exp_interop_semaphore_desc_t InteropSemDesc{}; - InteropSemDesc.stype = UR_STRUCTURE_TYPE_EXP_INTEROP_SEMAPHORE_DESC; - InteropSemDesc.pNext = &PosixFD; + ur_exp_external_semaphore_desc_t ExtSemDesc{}; + ExtSemDesc.stype = UR_STRUCTURE_TYPE_EXP_EXTERNAL_SEMAPHORE_DESC; + ExtSemDesc.pNext = &PosixFD; HANDLE_ERRORS(urBindlessImagesImportExternalSemaphoreExp( UrContext, UrDevice, UR_EXP_EXTERNAL_SEMAPHORE_TYPE_OPAQUE_FD, - &InteropSemDesc, UrRetHandle)); + &ExtSemDesc, UrRetExtSem)); return PI_SUCCESS; } @@ -5571,17 +5570,17 @@ piextImportExternalSemaphoreOpaqueFD(pi_context Context, pi_device Device, inline pi_result piextImportExternalSemaphore(pi_context Context, pi_device Device, pi_external_semaphore_descriptor *SemDescriptor, - pi_interop_semaphore_handle *RetHandle) { + pi_external_semaphore *RetExtSem) { PI_ASSERT(Context, PI_ERROR_INVALID_CONTEXT); PI_ASSERT(Device, PI_ERROR_INVALID_DEVICE); auto UrContext = reinterpret_cast(Context); auto UrDevice = reinterpret_cast(Device); - auto *UrRetHandle = - reinterpret_cast(RetHandle); + auto *UrRetExtSem = + reinterpret_cast(RetExtSem); - ur_exp_interop_semaphore_desc_t InteropSemDesc{}; - InteropSemDesc.stype = UR_STRUCTURE_TYPE_EXP_INTEROP_SEMAPHORE_DESC; + ur_exp_external_semaphore_desc_t ExtSemDesc{}; + ExtSemDesc.stype = UR_STRUCTURE_TYPE_EXP_EXTERNAL_SEMAPHORE_DESC; ur_exp_external_semaphore_type_t UrExternalSemHandleType; switch (SemDescriptor->handleType) { @@ -5612,7 +5611,7 @@ piextImportExternalSemaphore(pi_context Context, pi_device Device, case pi_external_semaphore_handle_type::opaque_fd: { OpaqueFD.stype = UR_STRUCTURE_TYPE_EXP_FILE_DESCRIPTOR; OpaqueFD.fd = SemDescriptor->handle.file_descriptor; - InteropSemDesc.pNext = &OpaqueFD; + ExtSemDesc.pNext = &OpaqueFD; break; } #else @@ -5620,7 +5619,7 @@ piextImportExternalSemaphore(pi_context Context, pi_device Device, case pi_external_semaphore_handle_type::win32_nt_handle: { Win32Handle.stype = UR_STRUCTURE_TYPE_EXP_WIN32_HANDLE; Win32Handle.handle = SemDescriptor->handle.win32_handle; - InteropSemDesc.pNext = &Win32Handle; + ExtSemDesc.pNext = &Win32Handle; break; } #endif @@ -5629,64 +5628,62 @@ piextImportExternalSemaphore(pi_context Context, pi_device Device, } HANDLE_ERRORS(urBindlessImagesImportExternalSemaphoreExp( - UrContext, UrDevice, UrExternalSemHandleType, &InteropSemDesc, - UrRetHandle)); + UrContext, UrDevice, UrExternalSemHandleType, &ExtSemDesc, UrRetExtSem)); return PI_SUCCESS; } -inline pi_result -piextDestroyExternalSemaphore(pi_context Context, pi_device Device, - pi_interop_semaphore_handle SemHandle) { +inline pi_result piextDestroyExternalSemaphore(pi_context Context, + pi_device Device, + pi_external_semaphore ExtSem) { PI_ASSERT(Context, PI_ERROR_INVALID_CONTEXT); PI_ASSERT(Device, PI_ERROR_INVALID_DEVICE); auto UrContext = reinterpret_cast(Context); auto UrDevice = reinterpret_cast(Device); - auto UrSemHandle = - reinterpret_cast(SemHandle); + auto UrExtSem = reinterpret_cast(ExtSem); HANDLE_ERRORS(urBindlessImagesDestroyExternalSemaphoreExp(UrContext, UrDevice, - UrSemHandle)); + UrExtSem)); return PI_SUCCESS; } -inline pi_result piextWaitExternalSemaphore( - pi_queue Queue, pi_interop_semaphore_handle SemHandle, bool HasWaitValue, - pi_uint64 WaitValue, pi_uint32 NumEventsInWaitList, - const pi_event *EventWaitList, pi_event *Event) { +inline pi_result +piextWaitExternalSemaphore(pi_queue Queue, pi_external_semaphore ExtSem, + bool HasWaitValue, pi_uint64 WaitValue, + pi_uint32 NumEventsInWaitList, + const pi_event *EventWaitList, pi_event *Event) { PI_ASSERT(Queue, PI_ERROR_INVALID_QUEUE); auto UrQueue = reinterpret_cast(Queue); - auto UrSemHandle = - reinterpret_cast(SemHandle); + auto UrExtSem = reinterpret_cast(ExtSem); const ur_event_handle_t *UrEventWaitList = reinterpret_cast(EventWaitList); ur_event_handle_t *UREvent = reinterpret_cast(Event); HANDLE_ERRORS(urBindlessImagesWaitExternalSemaphoreExp( - UrQueue, UrSemHandle, HasWaitValue, WaitValue, NumEventsInWaitList, + UrQueue, UrExtSem, HasWaitValue, WaitValue, NumEventsInWaitList, UrEventWaitList, UREvent)); return PI_SUCCESS; } -inline pi_result piextSignalExternalSemaphore( - pi_queue Queue, pi_interop_semaphore_handle SemHandle, bool HasSignalValue, - pi_uint64 SignalValue, pi_uint32 NumEventsInWaitList, - const pi_event *EventWaitList, pi_event *Event) { +inline pi_result +piextSignalExternalSemaphore(pi_queue Queue, pi_external_semaphore ExtSem, + bool HasSignalValue, pi_uint64 SignalValue, + pi_uint32 NumEventsInWaitList, + const pi_event *EventWaitList, pi_event *Event) { PI_ASSERT(Queue, PI_ERROR_INVALID_QUEUE); auto UrQueue = reinterpret_cast(Queue); - auto UrSemHandle = - reinterpret_cast(SemHandle); + auto UrExtSem = reinterpret_cast(ExtSem); const ur_event_handle_t *UrEventWaitList = reinterpret_cast(EventWaitList); ur_event_handle_t *UREvent = reinterpret_cast(Event); HANDLE_ERRORS(urBindlessImagesSignalExternalSemaphoreExp( - UrQueue, UrSemHandle, HasSignalValue, SignalValue, NumEventsInWaitList, + UrQueue, UrExtSem, HasSignalValue, SignalValue, NumEventsInWaitList, UrEventWaitList, UREvent)); return PI_SUCCESS; diff --git a/sycl/plugins/unified_runtime/pi_unified_runtime.cpp b/sycl/plugins/unified_runtime/pi_unified_runtime.cpp index 59d6b27017eae..a2ebb1a12d7dc 100644 --- a/sycl/plugins/unified_runtime/pi_unified_runtime.cpp +++ b/sycl/plugins/unified_runtime/pi_unified_runtime.cpp @@ -1380,29 +1380,31 @@ __SYCL_EXPORT_DEPRECATED("This function has been deprecated in favor of " "`piextImportExternalMemory`") pi_result piextMemImportOpaqueFD(pi_context Context, pi_device Device, size_t Size, int FileDescriptor, - pi_interop_mem_handle *RetHandle) { + pi_external_mem *RetExtMem) { return pi2ur::piextMemImportOpaqueFD(Context, Device, Size, FileDescriptor, - RetHandle); + RetExtMem); } __SYCL_EXPORT pi_result piextImportExternalMemory( pi_context Context, pi_device Device, pi_external_mem_descriptor *MemDesc, - pi_interop_mem_handle *RetHandle) { - return pi2ur::piextImportExternalMemory(Context, Device, MemDesc, RetHandle); + pi_external_mem *RetExtMem) { + return pi2ur::piextImportExternalMemory(Context, Device, MemDesc, RetExtMem); } -__SYCL_EXPORT pi_result piextMemMapExternalArray( - pi_context Context, pi_device Device, pi_image_format *ImageFormat, - pi_image_desc *ImageDesc, pi_interop_mem_handle MemHandle, - pi_image_mem_handle *RetMem) { +__SYCL_EXPORT pi_result piextMemMapExternalArray(pi_context Context, + pi_device Device, + pi_image_format *ImageFormat, + pi_image_desc *ImageDesc, + pi_external_mem ExtMem, + pi_image_mem_handle *RetMem) { return pi2ur::piextMemMapExternalArray(Context, Device, ImageFormat, - ImageDesc, MemHandle, RetMem); + ImageDesc, ExtMem, RetMem); } -__SYCL_EXPORT pi_result piextMemReleaseInterop(pi_context Context, - pi_device Device, - pi_interop_mem_handle ExtMem) { - return pi2ur::piextMemReleaseInterop(Context, Device, ExtMem); +__SYCL_EXPORT pi_result piextMemReleaseExternalMemory(pi_context Context, + pi_device Device, + pi_external_mem ExtMem) { + return pi2ur::piextMemReleaseExternalMemory(Context, Device, ExtMem); } __SYCL_EXPORT_DEPRECATED("This function has been deprecated in favor of " @@ -1410,39 +1412,38 @@ __SYCL_EXPORT_DEPRECATED("This function has been deprecated in favor of " pi_result piextImportExternalSemaphoreOpaqueFD(pi_context Context, pi_device Device, int FileDescriptor, - pi_interop_semaphore_handle *RetHandle) { + pi_external_semaphore *RetExtSem) { return pi2ur::piextImportExternalSemaphoreOpaqueFD(Context, Device, - FileDescriptor, RetHandle); + FileDescriptor, RetExtSem); } __SYCL_EXPORT pi_result piextImportExternalSemaphore(pi_context Context, pi_device Device, pi_external_semaphore_descriptor *SemDesc, - pi_interop_semaphore_handle *RetHandle) { + pi_external_semaphore *RetExtSem) { return pi2ur::piextImportExternalSemaphore(Context, Device, SemDesc, - RetHandle); + RetExtSem); } -__SYCL_EXPORT pi_result -piextDestroyExternalSemaphore(pi_context Context, pi_device Device, - pi_interop_semaphore_handle SemHandle) { - return pi2ur::piextDestroyExternalSemaphore(Context, Device, SemHandle); +__SYCL_EXPORT pi_result piextDestroyExternalSemaphore( + pi_context Context, pi_device Device, pi_external_semaphore ExtSem) { + return pi2ur::piextDestroyExternalSemaphore(Context, Device, ExtSem); } __SYCL_EXPORT pi_result piextWaitExternalSemaphore( - pi_queue Queue, pi_interop_semaphore_handle SemHandle, bool HasWaitValue, + pi_queue Queue, pi_external_semaphore ExtSem, bool HasWaitValue, pi_uint64 WaitValue, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *Event) { - return pi2ur::piextWaitExternalSemaphore(Queue, SemHandle, HasWaitValue, + return pi2ur::piextWaitExternalSemaphore(Queue, ExtSem, HasWaitValue, WaitValue, NumEventsInWaitList, EventWaitList, Event); } __SYCL_EXPORT pi_result piextSignalExternalSemaphore( - pi_queue Queue, pi_interop_semaphore_handle SemHandle, bool HasSignalValue, + pi_queue Queue, pi_external_semaphore ExtSem, bool HasSignalValue, pi_uint64 SignalValue, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *Event) { - return pi2ur::piextSignalExternalSemaphore(Queue, SemHandle, HasSignalValue, + return pi2ur::piextSignalExternalSemaphore(Queue, ExtSem, HasSignalValue, SignalValue, NumEventsInWaitList, EventWaitList, Event); } diff --git a/sycl/source/detail/bindless_images.cpp b/sycl/source/detail/bindless_images.cpp index a02fa47a0139c..64475f46134c5 100644 --- a/sycl/source/detail/bindless_images.cpp +++ b/sycl/source/detail/bindless_images.cpp @@ -466,8 +466,8 @@ create_image(void *devPtr, size_t pitch, const bindless_image_sampler &sampler, } template <> -__SYCL_EXPORT interop_mem_handle import_external_memory( - external_mem_descriptor externalMem, +__SYCL_EXPORT external_mem import_external_memory( + external_mem_descriptor externalMemDesc, const sycl::device &syclDevice, const sycl::context &syclContext) { std::shared_ptr CtxImpl = sycl::detail::getSyclObjImpl(syclContext); @@ -477,12 +477,12 @@ __SYCL_EXPORT interop_mem_handle import_external_memory( pi_device Device = DevImpl->getHandleRef(); const sycl::detail::PluginPtr &Plugin = CtxImpl->getPlugin(); - pi_interop_mem_handle piInteropMem; + pi_external_mem piExternalMem; pi_external_mem_descriptor piExternalMemDescriptor; - piExternalMemDescriptor.memorySizeBytes = externalMem.size_in_bytes; + piExternalMemDescriptor.memorySizeBytes = externalMemDesc.size_in_bytes; piExternalMemDescriptor.handle.file_descriptor = - externalMem.external_resource.file_descriptor; + externalMemDesc.external_resource.file_descriptor; // For `resource_fd` external memory type, the handle type is always // `opaque_fd`. No need for a switch statement like we have for win32 // resources. @@ -490,21 +490,21 @@ __SYCL_EXPORT interop_mem_handle import_external_memory( Plugin->call( - C, Device, &piExternalMemDescriptor, &piInteropMem); + C, Device, &piExternalMemDescriptor, &piExternalMem); - return interop_mem_handle{piInteropMem}; + return external_mem{piExternalMem}; } template <> -__SYCL_EXPORT interop_mem_handle import_external_memory( - external_mem_descriptor externalMem, +__SYCL_EXPORT external_mem import_external_memory( + external_mem_descriptor externalMemDesc, const sycl::queue &syclQueue) { return import_external_memory( - externalMem, syclQueue.get_device(), syclQueue.get_context()); + externalMemDesc, syclQueue.get_device(), syclQueue.get_context()); } template <> -__SYCL_EXPORT interop_mem_handle import_external_memory( +__SYCL_EXPORT external_mem import_external_memory( external_mem_descriptor externalMem, const sycl::device &syclDevice, const sycl::context &syclContext) { std::shared_ptr CtxImpl = @@ -515,7 +515,7 @@ __SYCL_EXPORT interop_mem_handle import_external_memory( pi_device Device = DevImpl->getHandleRef(); const sycl::detail::PluginPtr &Plugin = CtxImpl->getPlugin(); - pi_interop_mem_handle piInteropMem; + pi_external_mem piExternalMem; pi_external_mem_descriptor piExternalMemDescriptor; piExternalMemDescriptor.memorySizeBytes = externalMem.size_in_bytes; @@ -539,16 +539,16 @@ __SYCL_EXPORT interop_mem_handle import_external_memory( Plugin->call( - C, Device, &piExternalMemDescriptor, &piInteropMem); + C, Device, &piExternalMemDescriptor, &piExternalMem); - return interop_mem_handle{piInteropMem}; + return external_mem{piExternalMem}; } template <> __SYCL_EXPORT_DEPRECATED( "import_external_memory templated by external_mem_fd is deprecated." "Template with resource_fd instead.") -interop_mem_handle import_external_memory( +external_mem import_external_memory( external_mem_descriptor externalMem, const sycl::device &syclDevice, const sycl::context &syclContext) { @@ -563,7 +563,7 @@ template <> __SYCL_EXPORT_DEPRECATED( "import_external_memory templated by external_mem_fd is deprecated." "Template with resource_fd instead.") -interop_mem_handle import_external_memory( +external_mem import_external_memory( external_mem_descriptor externalMem, const sycl::queue &syclQueue) { return import_external_memory( @@ -571,7 +571,7 @@ interop_mem_handle import_external_memory( } template <> -__SYCL_EXPORT interop_mem_handle import_external_memory( +__SYCL_EXPORT external_mem import_external_memory( external_mem_descriptor externalMem, const sycl::queue &syclQueue) { return import_external_memory( @@ -579,7 +579,7 @@ __SYCL_EXPORT interop_mem_handle import_external_memory( } __SYCL_EXPORT -image_mem_handle map_external_image_memory(interop_mem_handle memHandle, +image_mem_handle map_external_image_memory(external_mem extMem, const image_descriptor &desc, const sycl::device &syclDevice, const sycl::context &syclContext) { @@ -597,27 +597,27 @@ image_mem_handle map_external_image_memory(interop_mem_handle memHandle, pi_image_format piFormat; populate_pi_structs(desc, piDesc, piFormat); - pi_interop_mem_handle piInteropMem{memHandle.raw_handle}; + pi_external_mem piExternalMem{extMem.raw_handle}; image_mem_handle retHandle; Plugin->call( - C, Device, &piFormat, &piDesc, piInteropMem, &retHandle.raw_handle); + C, Device, &piFormat, &piDesc, piExternalMem, &retHandle.raw_handle); return image_mem_handle{retHandle}; } __SYCL_EXPORT -image_mem_handle map_external_image_memory(interop_mem_handle memHandle, +image_mem_handle map_external_image_memory(external_mem extMem, const image_descriptor &desc, const sycl::queue &syclQueue) { - return map_external_image_memory(memHandle, desc, syclQueue.get_device(), + return map_external_image_memory(extMem, desc, syclQueue.get_device(), syclQueue.get_context()); } __SYCL_EXPORT_DEPRECATED("map_external_memory_array is deprecated." "use map_external_image_memory") -image_mem_handle map_external_memory_array(interop_mem_handle memHandle, +image_mem_handle map_external_memory_array(external_mem memHandle, const image_descriptor &desc, const sycl::device &syclDevice, const sycl::context &syclContext) { @@ -626,14 +626,14 @@ image_mem_handle map_external_memory_array(interop_mem_handle memHandle, __SYCL_EXPORT_DEPRECATED("map_external_memory_array is deprecated." "use map_external_image_memory") -image_mem_handle map_external_memory_array(interop_mem_handle memHandle, +image_mem_handle map_external_memory_array(external_mem memHandle, const image_descriptor &desc, const sycl::queue &syclQueue) { return map_external_memory_array(memHandle, desc, syclQueue.get_device(), syclQueue.get_context()); } -__SYCL_EXPORT void release_external_memory(interop_mem_handle interopMem, +__SYCL_EXPORT void release_external_memory(external_mem extMem, const sycl::device &syclDevice, const sycl::context &syclContext) { std::shared_ptr CtxImpl = @@ -645,18 +645,18 @@ __SYCL_EXPORT void release_external_memory(interop_mem_handle interopMem, const sycl::detail::PluginPtr &Plugin = CtxImpl->getPlugin(); Plugin->call( - C, Device, (pi_interop_mem_handle)interopMem.raw_handle); + sycl::detail::PiApiKind::piextMemReleaseExternalMemory>( + C, Device, (pi_external_mem)extMem.raw_handle); } -__SYCL_EXPORT void release_external_memory(interop_mem_handle interopMem, +__SYCL_EXPORT void release_external_memory(external_mem extMem, const sycl::queue &syclQueue) { - release_external_memory(interopMem, syclQueue.get_device(), + release_external_memory(extMem, syclQueue.get_device(), syclQueue.get_context()); } template <> -__SYCL_EXPORT interop_semaphore_handle import_external_semaphore( +__SYCL_EXPORT external_semaphore import_external_semaphore( external_semaphore_descriptor externalSemaphoreDesc, const sycl::device &syclDevice, const sycl::context &syclContext) { std::shared_ptr CtxImpl = @@ -667,25 +667,25 @@ __SYCL_EXPORT interop_semaphore_handle import_external_semaphore( sycl::detail::getSyclObjImpl(syclDevice); pi_device Device = DevImpl->getHandleRef(); - pi_interop_semaphore_handle piInteropSemaphore; - pi_external_semaphore_descriptor piInteropSemDesc; + pi_external_semaphore piExternalSemaphore; + pi_external_semaphore_descriptor piExternalSemDesc; // For this specialization of `import_external_semaphore` the handleType is // always `opaque_fd`. - piInteropSemDesc.handleType = pi_external_semaphore_handle_type::opaque_fd; - piInteropSemDesc.handle.file_descriptor = + piExternalSemDesc.handleType = pi_external_semaphore_handle_type::opaque_fd; + piExternalSemDesc.handle.file_descriptor = externalSemaphoreDesc.external_resource.file_descriptor; Plugin->call( - C, Device, &piInteropSemDesc, &piInteropSemaphore); + C, Device, &piExternalSemDesc, &piExternalSemaphore); - return interop_semaphore_handle{piInteropSemaphore, - external_semaphore_handle_type::opaque_fd}; + return external_semaphore{piExternalSemaphore, + external_semaphore_handle_type::opaque_fd}; } template <> -__SYCL_EXPORT interop_semaphore_handle import_external_semaphore( +__SYCL_EXPORT external_semaphore import_external_semaphore( external_semaphore_descriptor externalSemaphoreDesc, const sycl::queue &syclQueue) { return import_external_semaphore( @@ -693,7 +693,7 @@ __SYCL_EXPORT interop_semaphore_handle import_external_semaphore( } template <> -__SYCL_EXPORT interop_semaphore_handle import_external_semaphore( +__SYCL_EXPORT external_semaphore import_external_semaphore( external_semaphore_descriptor externalSemaphoreDesc, const sycl::device &syclDevice, const sycl::context &syclContext) { std::shared_ptr CtxImpl = @@ -704,17 +704,17 @@ __SYCL_EXPORT interop_semaphore_handle import_external_semaphore( sycl::detail::getSyclObjImpl(syclDevice); pi_device Device = DevImpl->getHandleRef(); - pi_interop_semaphore_handle piInteropSemaphore; - pi_external_semaphore_descriptor piInteropSemDesc; + pi_external_semaphore piExternalSemaphore; + pi_external_semaphore_descriptor piExternalSemDesc; // Select appropriate semaphore handle type. switch (externalSemaphoreDesc.handle_type) { case external_semaphore_handle_type::win32_nt_handle: - piInteropSemDesc.handleType = + piExternalSemDesc.handleType = pi_external_semaphore_handle_type::win32_nt_handle; break; case external_semaphore_handle_type::win32_nt_dx12_fence: - piInteropSemDesc.handleType = + piExternalSemDesc.handleType = pi_external_semaphore_handle_type::win32_nt_dx12_fence; break; default: @@ -722,19 +722,19 @@ __SYCL_EXPORT interop_semaphore_handle import_external_semaphore( "Invalid semaphore handle type"); } - piInteropSemDesc.handle.win32_handle = + piExternalSemDesc.handle.win32_handle = externalSemaphoreDesc.external_resource.handle; Plugin->call( - C, Device, &piInteropSemDesc, &piInteropSemaphore); + C, Device, &piExternalSemDesc, &piExternalSemaphore); - return interop_semaphore_handle{piInteropSemaphore, - externalSemaphoreDesc.handle_type}; + return external_semaphore{piExternalSemaphore, + externalSemaphoreDesc.handle_type}; } template <> -__SYCL_EXPORT interop_semaphore_handle import_external_semaphore( +__SYCL_EXPORT external_semaphore import_external_semaphore( external_semaphore_descriptor externalSemaphoreDesc, const sycl::queue &syclQueue) { return import_external_semaphore( @@ -745,7 +745,7 @@ template <> __SYCL_EXPORT_DEPRECATED("import_external_semaphore templated by " "external_semaphore_fd is deprecated." "Template with resource_fd instead.") -interop_semaphore_handle import_external_semaphore( +external_semaphore import_external_semaphore( external_semaphore_descriptor externalSemaphoreDesc, const sycl::device &syclDevice, const sycl::context &syclContext) { external_semaphore_descriptor extSem; @@ -759,7 +759,7 @@ template <> __SYCL_EXPORT_DEPRECATED("import_external_semaphore templated by " "external_semaphore_fd is deprecated." "Template with resource_fd instead.") -interop_semaphore_handle import_external_semaphore( +external_semaphore import_external_semaphore( external_semaphore_descriptor externalSemaphoreDesc, const sycl::queue &syclQueue) { return import_external_semaphore( @@ -767,7 +767,7 @@ interop_semaphore_handle import_external_semaphore( } __SYCL_EXPORT void -destroy_external_semaphore(interop_semaphore_handle semaphoreHandle, +destroy_external_semaphore(external_semaphore externalSemaphore, const sycl::device &syclDevice, const sycl::context &syclContext) { std::shared_ptr CtxImpl = @@ -780,13 +780,13 @@ destroy_external_semaphore(interop_semaphore_handle semaphoreHandle, Plugin->call( - C, Device, (pi_interop_semaphore_handle)semaphoreHandle.raw_handle); + C, Device, (pi_external_semaphore)externalSemaphore.raw_handle); } __SYCL_EXPORT void -destroy_external_semaphore(interop_semaphore_handle semaphoreHandle, +destroy_external_semaphore(external_semaphore externalSemaphore, const sycl::queue &syclQueue) { - destroy_external_semaphore(semaphoreHandle, syclQueue.get_device(), + destroy_external_semaphore(externalSemaphore, syclQueue.get_device(), syclQueue.get_context()); } diff --git a/sycl/source/detail/device_impl.cpp b/sycl/source/detail/device_impl.cpp index e22d87be839ae..956a847f5e46b 100644 --- a/sycl/source/detail/device_impl.cpp +++ b/sycl/source/detail/device_impl.cpp @@ -496,35 +496,37 @@ bool device_impl::has(aspect Aspect) const { sizeof(pi_bool), &support, nullptr) == PI_SUCCESS; return call_successful && support; } - case aspect::ext_oneapi_interop_memory_import: { + case aspect::ext_oneapi_external_memory_import: { pi_bool support = PI_FALSE; bool call_successful = getPlugin()->call_nocheck( - MDevice, PI_EXT_ONEAPI_DEVICE_INFO_INTEROP_MEMORY_IMPORT_SUPPORT, + MDevice, PI_EXT_ONEAPI_DEVICE_INFO_EXTERNAL_MEMORY_IMPORT_SUPPORT, sizeof(pi_bool), &support, nullptr) == PI_SUCCESS; return call_successful && support; } - case aspect::ext_oneapi_interop_memory_export: { + case aspect::ext_oneapi_external_memory_export: { pi_bool support = PI_FALSE; bool call_successful = getPlugin()->call_nocheck( - MDevice, PI_EXT_ONEAPI_DEVICE_INFO_INTEROP_MEMORY_EXPORT_SUPPORT, + MDevice, PI_EXT_ONEAPI_DEVICE_INFO_EXTERNAL_MEMORY_EXPORT_SUPPORT, sizeof(pi_bool), &support, nullptr) == PI_SUCCESS; return call_successful && support; } - case aspect::ext_oneapi_interop_semaphore_import: { + case aspect::ext_oneapi_external_semaphore_import: { pi_bool support = PI_FALSE; bool call_successful = getPlugin()->call_nocheck( - MDevice, PI_EXT_ONEAPI_DEVICE_INFO_INTEROP_SEMAPHORE_IMPORT_SUPPORT, + MDevice, + PI_EXT_ONEAPI_DEVICE_INFO_EXTERNAL_SEMAPHORE_IMPORT_SUPPORT, sizeof(pi_bool), &support, nullptr) == PI_SUCCESS; return call_successful && support; } - case aspect::ext_oneapi_interop_semaphore_export: { + case aspect::ext_oneapi_external_semaphore_export: { pi_bool support = PI_FALSE; bool call_successful = getPlugin()->call_nocheck( - MDevice, PI_EXT_ONEAPI_DEVICE_INFO_INTEROP_SEMAPHORE_EXPORT_SUPPORT, + MDevice, + PI_EXT_ONEAPI_DEVICE_INFO_EXTERNAL_SEMAPHORE_EXPORT_SUPPORT, sizeof(pi_bool), &support, nullptr) == PI_SUCCESS; return call_successful && support; } diff --git a/sycl/source/detail/handler_impl.hpp b/sycl/source/detail/handler_impl.hpp index f0df55d5e069b..29efaa8f7fe5c 100644 --- a/sycl/source/detail/handler_impl.hpp +++ b/sycl/source/detail/handler_impl.hpp @@ -128,7 +128,7 @@ class handler_impl { sycl::detail::pi::PiImageRegion MCopyExtent; // Extra information for semaphore interoperability - sycl::detail::pi::PiInteropSemaphoreHandle MInteropSemaphoreHandle; + sycl::detail::pi::PiExternalSemaphore MExternalSemaphore; std::optional MWaitValue; std::optional MSignalValue; diff --git a/sycl/source/detail/scheduler/commands.cpp b/sycl/source/detail/scheduler/commands.cpp index b9ff259906f95..a125a77f2968b 100644 --- a/sycl/source/detail/scheduler/commands.cpp +++ b/sycl/source/detail/scheduler/commands.cpp @@ -3243,7 +3243,7 @@ pi_int32 ExecCGCommand::enqueueImpQueue() { auto OptWaitValue = SemWait->getWaitValue(); uint64_t WaitValue = OptWaitValue.has_value() ? OptWaitValue.value() : 0; Plugin->call( - MQueue->getHandleRef(), SemWait->getInteropSemaphoreHandle(), + MQueue->getHandleRef(), SemWait->getExternalSemaphore(), OptWaitValue.has_value(), WaitValue, 0, nullptr, nullptr); return PI_SUCCESS; @@ -3258,7 +3258,7 @@ pi_int32 ExecCGCommand::enqueueImpQueue() { uint64_t SignalValue = OptSignalValue.has_value() ? OptSignalValue.value() : 0; Plugin->call( - MQueue->getHandleRef(), SemSignal->getInteropSemaphoreHandle(), + MQueue->getHandleRef(), SemSignal->getExternalSemaphore(), OptSignalValue.has_value(), SignalValue, 0, nullptr, nullptr); return PI_SUCCESS; diff --git a/sycl/source/handler.cpp b/sycl/source/handler.cpp index aee154fa19dbd..60741b5f8a8e4 100644 --- a/sycl/source/handler.cpp +++ b/sycl/source/handler.cpp @@ -485,12 +485,12 @@ event handler::finalize() { break; case detail::CG::SemaphoreWait: CommandGroup.reset(new detail::CGSemaphoreWait( - MImpl->MInteropSemaphoreHandle, MImpl->MWaitValue, std::move(CGData), + MImpl->MExternalSemaphore, MImpl->MWaitValue, std::move(CGData), MCodeLoc)); break; case detail::CG::SemaphoreSignal: CommandGroup.reset(new detail::CGSemaphoreSignal( - MImpl->MInteropSemaphoreHandle, MImpl->MSignalValue, std::move(CGData), + MImpl->MExternalSemaphore, MImpl->MSignalValue, std::move(CGData), MCodeLoc)); break; case detail::CG::None: @@ -1380,14 +1380,14 @@ void handler::ext_oneapi_copy( } void handler::ext_oneapi_wait_external_semaphore( - sycl::ext::oneapi::experimental::interop_semaphore_handle SemaphoreHandle) { + sycl::ext::oneapi::experimental::external_semaphore ExtSemaphore) { throwIfGraphAssociated< ext::oneapi::experimental::detail::UnsupportedGraphFeatures:: sycl_ext_oneapi_bindless_images>(); - if (SemaphoreHandle.handle_type != + if (ExtSemaphore.handle_type != sycl::ext::oneapi::experimental::external_semaphore_handle_type:: opaque_fd && - SemaphoreHandle.handle_type != + ExtSemaphore.handle_type != sycl::ext::oneapi::experimental::external_semaphore_handle_type:: win32_nt_handle) { throw sycl::exception( @@ -1395,19 +1395,19 @@ void handler::ext_oneapi_wait_external_semaphore( "Invalid type of semaphore for this operation. The " "type of semaphore used needs a user passed wait value."); } - MImpl->MInteropSemaphoreHandle = - (sycl::detail::pi::PiInteropSemaphoreHandle)SemaphoreHandle.raw_handle; + MImpl->MExternalSemaphore = + (sycl::detail::pi::PiExternalSemaphore)ExtSemaphore.raw_handle; MImpl->MWaitValue = {}; setType(detail::CG::SemaphoreWait); } void handler::ext_oneapi_wait_external_semaphore( - sycl::ext::oneapi::experimental::interop_semaphore_handle SemaphoreHandle, + sycl::ext::oneapi::experimental::external_semaphore ExtSemaphore, uint64_t WaitValue) { throwIfGraphAssociated< ext::oneapi::experimental::detail::UnsupportedGraphFeatures:: sycl_ext_oneapi_bindless_images>(); - if (SemaphoreHandle.handle_type != + if (ExtSemaphore.handle_type != sycl::ext::oneapi::experimental::external_semaphore_handle_type:: win32_nt_dx12_fence) { throw sycl::exception( @@ -1415,21 +1415,21 @@ void handler::ext_oneapi_wait_external_semaphore( "Invalid type of semaphore for this operation. The " "type of semaphore does not support user passed wait values."); } - MImpl->MInteropSemaphoreHandle = - (sycl::detail::pi::PiInteropSemaphoreHandle)SemaphoreHandle.raw_handle; + MImpl->MExternalSemaphore = + (sycl::detail::pi::PiExternalSemaphore)ExtSemaphore.raw_handle; MImpl->MWaitValue = WaitValue; setType(detail::CG::SemaphoreWait); } void handler::ext_oneapi_signal_external_semaphore( - sycl::ext::oneapi::experimental::interop_semaphore_handle SemaphoreHandle) { + sycl::ext::oneapi::experimental::external_semaphore ExtSemaphore) { throwIfGraphAssociated< ext::oneapi::experimental::detail::UnsupportedGraphFeatures:: sycl_ext_oneapi_bindless_images>(); - if (SemaphoreHandle.handle_type != + if (ExtSemaphore.handle_type != sycl::ext::oneapi::experimental::external_semaphore_handle_type:: opaque_fd && - SemaphoreHandle.handle_type != + ExtSemaphore.handle_type != sycl::ext::oneapi::experimental::external_semaphore_handle_type:: win32_nt_handle) { throw sycl::exception( @@ -1437,19 +1437,19 @@ void handler::ext_oneapi_signal_external_semaphore( "Invalid type of semaphore for this operation. The " "type of semaphore used needs a user passed signal value."); } - MImpl->MInteropSemaphoreHandle = - (sycl::detail::pi::PiInteropSemaphoreHandle)SemaphoreHandle.raw_handle; + MImpl->MExternalSemaphore = + (sycl::detail::pi::PiExternalSemaphore)ExtSemaphore.raw_handle; MImpl->MSignalValue = {}; setType(detail::CG::SemaphoreSignal); } void handler::ext_oneapi_signal_external_semaphore( - sycl::ext::oneapi::experimental::interop_semaphore_handle SemaphoreHandle, + sycl::ext::oneapi::experimental::external_semaphore ExtSemaphore, uint64_t SignalValue) { throwIfGraphAssociated< ext::oneapi::experimental::detail::UnsupportedGraphFeatures:: sycl_ext_oneapi_bindless_images>(); - if (SemaphoreHandle.handle_type != + if (ExtSemaphore.handle_type != sycl::ext::oneapi::experimental::external_semaphore_handle_type:: win32_nt_dx12_fence) { throw sycl::exception( @@ -1457,8 +1457,8 @@ void handler::ext_oneapi_signal_external_semaphore( "Invalid type of semaphore for this operation. The " "type of semaphore does not support user passed signal values."); } - MImpl->MInteropSemaphoreHandle = - (sycl::detail::pi::PiInteropSemaphoreHandle)SemaphoreHandle.raw_handle; + MImpl->MExternalSemaphore = + (sycl::detail::pi::PiExternalSemaphore)ExtSemaphore.raw_handle; MImpl->MSignalValue = SignalValue; setType(detail::CG::SemaphoreSignal); } diff --git a/sycl/test-e2e/bindless_images/image_get_info.cpp b/sycl/test-e2e/bindless_images/image_get_info.cpp index e30eded427da1..6dea576faa451 100644 --- a/sycl/test-e2e/bindless_images/image_get_info.cpp +++ b/sycl/test-e2e/bindless_images/image_get_info.cpp @@ -133,13 +133,13 @@ int main() { // Extension: query for bindless image interop support -- device aspects bool interopMemoryImportSupport = - dev.has(sycl::aspect::ext_oneapi_interop_memory_import); + dev.has(sycl::aspect::ext_oneapi_external_memory_import); bool interopMemoryExportSupport = - dev.has(sycl::aspect::ext_oneapi_interop_memory_export); + dev.has(sycl::aspect::ext_oneapi_external_memory_export); bool interopSemaphoreImportSupport = - dev.has(sycl::aspect::ext_oneapi_interop_semaphore_import); + dev.has(sycl::aspect::ext_oneapi_external_semaphore_import); bool interopSemaphoreExportSupport = - dev.has(sycl::aspect::ext_oneapi_interop_semaphore_export); + dev.has(sycl::aspect::ext_oneapi_external_semaphore_export); #ifdef VERBOSE_PRINT std::cout << "interopMemoryImportSupport: " << interopMemoryImportSupport diff --git a/sycl/test-e2e/bindless_images/vulkan_interop/mipmaps.cpp b/sycl/test-e2e/bindless_images/vulkan_interop/mipmaps.cpp index 91fea94aa6e17..c5ebeae8005ea 100644 --- a/sycl/test-e2e/bindless_images/vulkan_interop/mipmaps.cpp +++ b/sycl/test-e2e/bindless_images/vulkan_interop/mipmaps.cpp @@ -20,7 +20,7 @@ namespace syclexp = sycl::ext::oneapi::experimental; struct handles_t { syclexp::sampled_image_handle imgInput; syclexp::image_mem_handle imgMem; - syclexp::interop_mem_handle inputInteropMemHandle; + syclexp::external_mem inputExternalMem; }; template @@ -42,19 +42,18 @@ handles_t create_handles(sycl::context &ctxt, sycl::device &dev, #endif // Extension: interop mem handle imported from file descriptor - syclexp::interop_mem_handle inputInteropMemHandle = + syclexp::external_mem inputExternalMem = syclexp::import_external_memory(inputExtMemDesc, dev, ctxt); // Extension: interop mem handle imported from file descriptor syclexp::image_mem_handle inputMappedMemHandle = - syclexp::map_external_image_memory(inputInteropMemHandle, desc, dev, - ctxt); + syclexp::map_external_image_memory(inputExternalMem, desc, dev, ctxt); // Extension: create the image and return the handle syclexp::sampled_image_handle imgInput = syclexp::create_image(inputMappedMemHandle, samp, desc, dev, ctxt); - return {imgInput, inputMappedMemHandle, inputInteropMemHandle}; + return {imgInput, inputMappedMemHandle, inputExternalMem}; } template globalSize, sycl::range localSize, syclexp::destroy_image_handle(handles.imgInput, dev, ctxt); syclexp::free_image_mem(handles.imgMem, syclexp::image_type::mipmap, dev, ctxt); - syclexp::release_external_memory(handles.inputInteropMemHandle, dev, ctxt); + syclexp::release_external_memory(handles.inputExternalMem, dev, ctxt); } catch (sycl::exception e) { std::cerr << "\tKernel submission failed! " << e.what() << std::endl; exit(-1); diff --git a/sycl/test-e2e/bindless_images/vulkan_interop/sampled_images.cpp b/sycl/test-e2e/bindless_images/vulkan_interop/sampled_images.cpp index 5c4332809bf12..53f25b82a9b85 100644 --- a/sycl/test-e2e/bindless_images/vulkan_interop/sampled_images.cpp +++ b/sycl/test-e2e/bindless_images/vulkan_interop/sampled_images.cpp @@ -17,7 +17,7 @@ namespace syclexp = sycl::ext::oneapi::experimental; struct handles_t { syclexp::sampled_image_handle imgInput; syclexp::image_mem_handle imgMem; - syclexp::interop_mem_handle inputInteropMemHandle; + syclexp::external_mem inputExternalMem; }; template @@ -37,20 +37,19 @@ handles_t create_test_handles(sycl::context &ctxt, sycl::device &dev, interopHandle, syclexp::external_mem_handle_type::opaque_fd, imgSize}; #endif - // Extension: interop mem handle imported from file descriptor - syclexp::interop_mem_handle inputInteropMemHandle = + // Extension: external memory imported from file descriptor + syclexp::external_mem inputExternalMem = syclexp::import_external_memory(inputExtMemDesc, dev, ctxt); - // Extension: interop mem handle imported from file descriptor + // Extension: mapped memory handle from external memory syclexp::image_mem_handle inputMappedMemHandle = - syclexp::map_external_image_memory(inputInteropMemHandle, desc, dev, - ctxt); + syclexp::map_external_image_memory(inputExternalMem, desc, dev, ctxt); // Extension: create the image and return the handle syclexp::sampled_image_handle imgInput = syclexp::create_image(inputMappedMemHandle, samp, desc, dev, ctxt); - return {imgInput, inputMappedMemHandle, inputInteropMemHandle}; + return {imgInput, inputMappedMemHandle, inputExternalMem}; } template global_size, sycl_done_semaphore_handle, img_size, desc); // Extension: wait for imported semaphore - q.ext_oneapi_wait_external_semaphore( - handles.sycl_wait_interop_semaphore_handle); + q.ext_oneapi_wait_external_semaphore(handles.sycl_wait_external_semaphore); try { q.submit([&](sycl::handler &cgh) { @@ -246,7 +239,7 @@ void run_ndim_test(sycl::range global_size, // Extension: signal imported semaphore q.submit([&](sycl::handler &cgh) { cgh.ext_oneapi_signal_external_semaphore( - handles.sycl_done_interop_semaphore_handle); + handles.sycl_done_external_semaphore); }); // Wait for kernel completion before destroying external objects diff --git a/sycl/test/abi/pi_cuda_symbol_check.dump b/sycl/test/abi/pi_cuda_symbol_check.dump index 4808f55c487cd..3dcd20c5fbdc2 100644 --- a/sycl/test/abi/pi_cuda_symbol_check.dump +++ b/sycl/test/abi/pi_cuda_symbol_check.dump @@ -141,7 +141,7 @@ piextMemImportOpaqueFD piextMemMapExternalArray piextMemMipmapFree piextMemMipmapGetLevel -piextMemReleaseInterop +piextMemReleaseExternalMemory piextMemSampledImageCreate piextMemSampledImageHandleDestroy piextMemUnsampledImageCreate diff --git a/sycl/test/abi/pi_hip_symbol_check.dump b/sycl/test/abi/pi_hip_symbol_check.dump index 2c421ad2fec55..e9e0ff4de00cf 100644 --- a/sycl/test/abi/pi_hip_symbol_check.dump +++ b/sycl/test/abi/pi_hip_symbol_check.dump @@ -141,7 +141,7 @@ piextMemImportOpaqueFD piextMemMapExternalArray piextMemMipmapFree piextMemMipmapGetLevel -piextMemReleaseInterop +piextMemReleaseExternalMemory piextMemSampledImageCreate piextMemSampledImageHandleDestroy piextMemUnsampledImageCreate diff --git a/sycl/test/abi/pi_level_zero_symbol_check.dump b/sycl/test/abi/pi_level_zero_symbol_check.dump index 7e8fc7500f4a4..fec7f113fdbd6 100644 --- a/sycl/test/abi/pi_level_zero_symbol_check.dump +++ b/sycl/test/abi/pi_level_zero_symbol_check.dump @@ -140,7 +140,7 @@ piextMemImportOpaqueFD piextMemMapExternalArray piextMemMipmapFree piextMemMipmapGetLevel -piextMemReleaseInterop +piextMemReleaseExternalMemory piextMemSampledImageCreate piextMemSampledImageHandleDestroy piextMemUnsampledImageCreate diff --git a/sycl/test/abi/pi_nativecpu_symbol_check.dump b/sycl/test/abi/pi_nativecpu_symbol_check.dump index 10f19aac80652..231f3b93b3d9b 100644 --- a/sycl/test/abi/pi_nativecpu_symbol_check.dump +++ b/sycl/test/abi/pi_nativecpu_symbol_check.dump @@ -141,7 +141,7 @@ piextMemImportOpaqueFD piextMemMapExternalArray piextMemMipmapFree piextMemMipmapGetLevel -piextMemReleaseInterop +piextMemReleaseExternalMemory piextMemSampledImageCreate piextMemSampledImageHandleDestroy piextMemUnsampledImageCreate diff --git a/sycl/test/abi/pi_opencl_symbol_check.dump b/sycl/test/abi/pi_opencl_symbol_check.dump index c0e1b76c4d04f..86c013e711868 100644 --- a/sycl/test/abi/pi_opencl_symbol_check.dump +++ b/sycl/test/abi/pi_opencl_symbol_check.dump @@ -143,7 +143,7 @@ piextMemImportOpaqueFD piextMemMapExternalArray piextMemMipmapFree piextMemMipmapGetLevel -piextMemReleaseInterop +piextMemReleaseExternalMemory piextMemSampledImageCreate piextMemSampledImageHandleDestroy piextMemUnsampledImageCreate diff --git a/sycl/test/abi/sycl_symbols_linux.dump b/sycl/test/abi/sycl_symbols_linux.dump index c8d713a57c1e7..0610753a36a07 100644 --- a/sycl/test/abi/sycl_symbols_linux.dump +++ b/sycl/test/abi/sycl_symbols_linux.dump @@ -3033,32 +3033,32 @@ _ZN4sycl3_V13ext6oneapi12experimental22get_image_channel_typeENS3_16image_mem_ha _ZN4sycl3_V13ext6oneapi12experimental22get_image_channel_typeENS3_16image_mem_handleERKNS0_6deviceERKNS0_7contextE _ZN4sycl3_V13ext6oneapi12experimental22get_image_num_channelsENS3_16image_mem_handleERKNS0_5queueE _ZN4sycl3_V13ext6oneapi12experimental22get_image_num_channelsENS3_16image_mem_handleERKNS0_6deviceERKNS0_7contextE -_ZN4sycl3_V13ext6oneapi12experimental22import_external_memoryINS3_11resource_fdEEENS3_18interop_mem_handleENS3_23external_mem_descriptorIT_EERKNS0_5queueE -_ZN4sycl3_V13ext6oneapi12experimental22import_external_memoryINS3_11resource_fdEEENS3_18interop_mem_handleENS3_23external_mem_descriptorIT_EERKNS0_6deviceERKNS0_7contextE -_ZN4sycl3_V13ext6oneapi12experimental22import_external_memoryINS3_15external_mem_fdEEENS3_18interop_mem_handleENS3_23external_mem_descriptorIT_EERKNS0_5queueE -_ZN4sycl3_V13ext6oneapi12experimental22import_external_memoryINS3_15external_mem_fdEEENS3_18interop_mem_handleENS3_23external_mem_descriptorIT_EERKNS0_6deviceERKNS0_7contextE -_ZN4sycl3_V13ext6oneapi12experimental22import_external_memoryINS3_21resource_win32_handleEEENS3_18interop_mem_handleENS3_23external_mem_descriptorIT_EERKNS0_5queueE -_ZN4sycl3_V13ext6oneapi12experimental22import_external_memoryINS3_21resource_win32_handleEEENS3_18interop_mem_handleENS3_23external_mem_descriptorIT_EERKNS0_6deviceERKNS0_7contextE +_ZN4sycl3_V13ext6oneapi12experimental22import_external_memoryINS3_11resource_fdEEENS3_12external_memENS3_23external_mem_descriptorIT_EERKNS0_5queueE +_ZN4sycl3_V13ext6oneapi12experimental22import_external_memoryINS3_11resource_fdEEENS3_12external_memENS3_23external_mem_descriptorIT_EERKNS0_6deviceERKNS0_7contextE +_ZN4sycl3_V13ext6oneapi12experimental22import_external_memoryINS3_15external_mem_fdEEENS3_12external_memENS3_23external_mem_descriptorIT_EERKNS0_5queueE +_ZN4sycl3_V13ext6oneapi12experimental22import_external_memoryINS3_15external_mem_fdEEENS3_12external_memENS3_23external_mem_descriptorIT_EERKNS0_6deviceERKNS0_7contextE +_ZN4sycl3_V13ext6oneapi12experimental22import_external_memoryINS3_21resource_win32_handleEEENS3_12external_memENS3_23external_mem_descriptorIT_EERKNS0_5queueE +_ZN4sycl3_V13ext6oneapi12experimental22import_external_memoryINS3_21resource_win32_handleEEENS3_12external_memENS3_23external_mem_descriptorIT_EERKNS0_6deviceERKNS0_7contextE _ZN4sycl3_V13ext6oneapi12experimental23prepare_for_device_copyEPKvmRKNS0_5queueE _ZN4sycl3_V13ext6oneapi12experimental23prepare_for_device_copyEPKvmRKNS0_7contextE -_ZN4sycl3_V13ext6oneapi12experimental23release_external_memoryENS3_18interop_mem_handleERKNS0_5queueE -_ZN4sycl3_V13ext6oneapi12experimental23release_external_memoryENS3_18interop_mem_handleERKNS0_6deviceERKNS0_7contextE +_ZN4sycl3_V13ext6oneapi12experimental23release_external_memoryENS3_12external_memERKNS0_5queueE +_ZN4sycl3_V13ext6oneapi12experimental23release_external_memoryENS3_12external_memERKNS0_6deviceERKNS0_7contextE _ZN4sycl3_V13ext6oneapi12experimental24get_mip_level_mem_handleENS3_16image_mem_handleEjRKNS0_5queueE _ZN4sycl3_V13ext6oneapi12experimental24get_mip_level_mem_handleENS3_16image_mem_handleEjRKNS0_6deviceERKNS0_7contextE _ZN4sycl3_V13ext6oneapi12experimental24release_from_device_copyEPKvRKNS0_5queueE _ZN4sycl3_V13ext6oneapi12experimental24release_from_device_copyEPKvRKNS0_7contextE -_ZN4sycl3_V13ext6oneapi12experimental25import_external_semaphoreINS3_11resource_fdEEENS3_24interop_semaphore_handleENS3_29external_semaphore_descriptorIT_EERKNS0_5queueE -_ZN4sycl3_V13ext6oneapi12experimental25import_external_semaphoreINS3_11resource_fdEEENS3_24interop_semaphore_handleENS3_29external_semaphore_descriptorIT_EERKNS0_6deviceERKNS0_7contextE -_ZN4sycl3_V13ext6oneapi12experimental25import_external_semaphoreINS3_21external_semaphore_fdEEENS3_24interop_semaphore_handleENS3_29external_semaphore_descriptorIT_EERKNS0_5queueE -_ZN4sycl3_V13ext6oneapi12experimental25import_external_semaphoreINS3_21external_semaphore_fdEEENS3_24interop_semaphore_handleENS3_29external_semaphore_descriptorIT_EERKNS0_6deviceERKNS0_7contextE -_ZN4sycl3_V13ext6oneapi12experimental25import_external_semaphoreINS3_21resource_win32_handleEEENS3_24interop_semaphore_handleENS3_29external_semaphore_descriptorIT_EERKNS0_5queueE -_ZN4sycl3_V13ext6oneapi12experimental25import_external_semaphoreINS3_21resource_win32_handleEEENS3_24interop_semaphore_handleENS3_29external_semaphore_descriptorIT_EERKNS0_6deviceERKNS0_7contextE -_ZN4sycl3_V13ext6oneapi12experimental25map_external_image_memoryENS3_18interop_mem_handleERKNS3_16image_descriptorERKNS0_5queueE -_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_V13ext6oneapi12experimental25import_external_semaphoreINS3_11resource_fdEEENS3_18external_semaphoreENS3_29external_semaphore_descriptorIT_EERKNS0_5queueE +_ZN4sycl3_V13ext6oneapi12experimental25import_external_semaphoreINS3_11resource_fdEEENS3_18external_semaphoreENS3_29external_semaphore_descriptorIT_EERKNS0_6deviceERKNS0_7contextE +_ZN4sycl3_V13ext6oneapi12experimental25import_external_semaphoreINS3_21external_semaphore_fdEEENS3_18external_semaphoreENS3_29external_semaphore_descriptorIT_EERKNS0_5queueE +_ZN4sycl3_V13ext6oneapi12experimental25import_external_semaphoreINS3_21external_semaphore_fdEEENS3_18external_semaphoreENS3_29external_semaphore_descriptorIT_EERKNS0_6deviceERKNS0_7contextE +_ZN4sycl3_V13ext6oneapi12experimental25import_external_semaphoreINS3_21resource_win32_handleEEENS3_18external_semaphoreENS3_29external_semaphore_descriptorIT_EERKNS0_5queueE +_ZN4sycl3_V13ext6oneapi12experimental25import_external_semaphoreINS3_21resource_win32_handleEEENS3_18external_semaphoreENS3_29external_semaphore_descriptorIT_EERKNS0_6deviceERKNS0_7contextE +_ZN4sycl3_V13ext6oneapi12experimental25map_external_image_memoryENS3_12external_memERKNS3_16image_descriptorERKNS0_5queueE +_ZN4sycl3_V13ext6oneapi12experimental25map_external_image_memoryENS3_12external_memERKNS3_16image_descriptorERKNS0_6deviceERKNS0_7contextE +_ZN4sycl3_V13ext6oneapi12experimental25map_external_memory_arrayENS3_12external_memERKNS3_16image_descriptorERKNS0_5queueE +_ZN4sycl3_V13ext6oneapi12experimental25map_external_memory_arrayENS3_12external_memERKNS3_16image_descriptorERKNS0_6deviceERKNS0_7contextE +_ZN4sycl3_V13ext6oneapi12experimental26destroy_external_semaphoreENS3_18external_semaphoreERKNS0_5queueE +_ZN4sycl3_V13ext6oneapi12experimental26destroy_external_semaphoreENS3_18external_semaphoreERKNS0_6deviceERKNS0_7contextE _ZN4sycl3_V13ext6oneapi12experimental4node12update_rangeILi1EEEvNS0_5rangeIXT_EEE _ZN4sycl3_V13ext6oneapi12experimental4node12update_rangeILi2EEEvNS0_5rangeIXT_EEE _ZN4sycl3_V13ext6oneapi12experimental4node12update_rangeILi3EEEvNS0_5rangeIXT_EEE @@ -3529,10 +3529,10 @@ _ZN4sycl3_V17handler28setStateExplicitKernelBundleEv _ZN4sycl3_V17handler30memcpyFromHostOnlyDeviceGlobalEPvPKvbmm _ZN4sycl3_V17handler30verifyUsedKernelBundleInternalENS0_6detail11string_viewE _ZN4sycl3_V17handler32verifyDeviceHasProgressGuaranteeENS0_3ext6oneapi12experimental26forward_progress_guaranteeENS4_15execution_scopeES6_ -_ZN4sycl3_V17handler34ext_oneapi_wait_external_semaphoreENS0_3ext6oneapi12experimental24interop_semaphore_handleE -_ZN4sycl3_V17handler34ext_oneapi_wait_external_semaphoreENS0_3ext6oneapi12experimental24interop_semaphore_handleEm -_ZN4sycl3_V17handler36ext_oneapi_signal_external_semaphoreENS0_3ext6oneapi12experimental24interop_semaphore_handleE -_ZN4sycl3_V17handler36ext_oneapi_signal_external_semaphoreENS0_3ext6oneapi12experimental24interop_semaphore_handleEm +_ZN4sycl3_V17handler34ext_oneapi_wait_external_semaphoreENS0_3ext6oneapi12experimental18external_semaphoreE +_ZN4sycl3_V17handler34ext_oneapi_wait_external_semaphoreENS0_3ext6oneapi12experimental18external_semaphoreEm +_ZN4sycl3_V17handler36ext_oneapi_signal_external_semaphoreENS0_3ext6oneapi12experimental18external_semaphoreE +_ZN4sycl3_V17handler36ext_oneapi_signal_external_semaphoreENS0_3ext6oneapi12experimental18external_semaphoreEm _ZN4sycl3_V17handler6memcpyEPvPKvm _ZN4sycl3_V17handler6memsetEPvim _ZN4sycl3_V17handler8finalizeEv diff --git a/sycl/test/abi/sycl_symbols_windows.dump b/sycl/test/abi/sycl_symbols_windows.dump index 5d8d912d62f30..84a44000c75fc 100644 --- a/sycl/test/abi/sycl_symbols_windows.dump +++ b/sycl/test/abi/sycl_symbols_windows.dump @@ -442,18 +442,18 @@ ??$has_property@Vuse_primary_context@cuda@context@property@_V1@sycl@@@image_plain@detail@_V1@sycl@@IEBA_NXZ ??$has_property@Vuse_primary_context@cuda@context@property@_V1@sycl@@@sampler@_V1@sycl@@QEBA_NXZ ??$has_property@Vuse_primary_context@cuda@context@property@_V1@sycl@@@stream@_V1@sycl@@QEBA_NXZ -??$import_external_memory@Uexternal_mem_fd@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUinterop_mem_handle@01234@U?$external_mem_descriptor@Uexternal_mem_fd@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVdevice@34@AEBVcontext@34@@Z -??$import_external_memory@Uexternal_mem_fd@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUinterop_mem_handle@01234@U?$external_mem_descriptor@Uexternal_mem_fd@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVqueue@34@@Z -??$import_external_memory@Uresource_fd@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUinterop_mem_handle@01234@U?$external_mem_descriptor@Uresource_fd@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVdevice@34@AEBVcontext@34@@Z -??$import_external_memory@Uresource_fd@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUinterop_mem_handle@01234@U?$external_mem_descriptor@Uresource_fd@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVqueue@34@@Z -??$import_external_memory@Uresource_win32_handle@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUinterop_mem_handle@01234@U?$external_mem_descriptor@Uresource_win32_handle@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVdevice@34@AEBVcontext@34@@Z -??$import_external_memory@Uresource_win32_handle@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUinterop_mem_handle@01234@U?$external_mem_descriptor@Uresource_win32_handle@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVqueue@34@@Z -??$import_external_semaphore@Uexternal_semaphore_fd@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUinterop_semaphore_handle@01234@U?$external_semaphore_descriptor@Uexternal_semaphore_fd@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVdevice@34@AEBVcontext@34@@Z -??$import_external_semaphore@Uexternal_semaphore_fd@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUinterop_semaphore_handle@01234@U?$external_semaphore_descriptor@Uexternal_semaphore_fd@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVqueue@34@@Z -??$import_external_semaphore@Uresource_fd@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUinterop_semaphore_handle@01234@U?$external_semaphore_descriptor@Uresource_fd@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVdevice@34@AEBVcontext@34@@Z -??$import_external_semaphore@Uresource_fd@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUinterop_semaphore_handle@01234@U?$external_semaphore_descriptor@Uresource_fd@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVqueue@34@@Z -??$import_external_semaphore@Uresource_win32_handle@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUinterop_semaphore_handle@01234@U?$external_semaphore_descriptor@Uresource_win32_handle@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVdevice@34@AEBVcontext@34@@Z -??$import_external_semaphore@Uresource_win32_handle@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUinterop_semaphore_handle@01234@U?$external_semaphore_descriptor@Uresource_win32_handle@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVqueue@34@@Z +??$import_external_memory@Uexternal_mem_fd@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUexternal_mem@01234@U?$external_mem_descriptor@Uexternal_mem_fd@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVdevice@34@AEBVcontext@34@@Z +??$import_external_memory@Uexternal_mem_fd@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUexternal_mem@01234@U?$external_mem_descriptor@Uexternal_mem_fd@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVqueue@34@@Z +??$import_external_memory@Uresource_fd@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUexternal_mem@01234@U?$external_mem_descriptor@Uresource_fd@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVdevice@34@AEBVcontext@34@@Z +??$import_external_memory@Uresource_fd@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUexternal_mem@01234@U?$external_mem_descriptor@Uresource_fd@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVqueue@34@@Z +??$import_external_memory@Uresource_win32_handle@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUexternal_mem@01234@U?$external_mem_descriptor@Uresource_win32_handle@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVdevice@34@AEBVcontext@34@@Z +??$import_external_memory@Uresource_win32_handle@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUexternal_mem@01234@U?$external_mem_descriptor@Uresource_win32_handle@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVqueue@34@@Z +??$import_external_semaphore@Uexternal_semaphore_fd@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUexternal_semaphore@01234@U?$external_semaphore_descriptor@Uexternal_semaphore_fd@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVdevice@34@AEBVcontext@34@@Z +??$import_external_semaphore@Uexternal_semaphore_fd@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUexternal_semaphore@01234@U?$external_semaphore_descriptor@Uexternal_semaphore_fd@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVqueue@34@@Z +??$import_external_semaphore@Uresource_fd@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUexternal_semaphore@01234@U?$external_semaphore_descriptor@Uresource_fd@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVdevice@34@AEBVcontext@34@@Z +??$import_external_semaphore@Uresource_fd@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUexternal_semaphore@01234@U?$external_semaphore_descriptor@Uresource_fd@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVqueue@34@@Z +??$import_external_semaphore@Uresource_win32_handle@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUexternal_semaphore@01234@U?$external_semaphore_descriptor@Uresource_win32_handle@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVdevice@34@AEBVcontext@34@@Z +??$import_external_semaphore@Uresource_win32_handle@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUexternal_semaphore@01234@U?$external_semaphore_descriptor@Uresource_win32_handle@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVqueue@34@@Z ??$update_nd_range@$00@node@experimental@oneapi@ext@_V1@sycl@@QEAAXV?$nd_range@$00@45@@Z ??$update_nd_range@$01@node@experimental@oneapi@ext@_V1@sycl@@QEAAXV?$nd_range@$01@45@@Z ??$update_nd_range@$02@node@experimental@oneapi@ext@_V1@sycl@@QEAAXV?$nd_range@$02@45@@Z @@ -3961,8 +3961,8 @@ ?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_external_semaphore@experimental@oneapi@ext@_V1@sycl@@YAXUexternal_semaphore@12345@AEBVdevice@45@AEBVcontext@45@@Z +?destroy_external_semaphore@experimental@oneapi@ext@_V1@sycl@@YAXUexternal_semaphore@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 @@ -4056,27 +4056,27 @@ ?ext_oneapi_owner_before@?$OwnerLessBase@Vstream@_V1@sycl@@@detail@_V1@sycl@@QEBA_NAEBVstream@34@@Z ?ext_oneapi_prod@queue@_V1@sycl@@QEAAXXZ ?ext_oneapi_set_external_event@queue@_V1@sycl@@QEAAXAEBVevent@23@@Z -?ext_oneapi_signal_external_semaphore@handler@_V1@sycl@@QEAAXUinterop_semaphore_handle@experimental@oneapi@ext@23@@Z -?ext_oneapi_signal_external_semaphore@handler@_V1@sycl@@QEAAXUinterop_semaphore_handle@experimental@oneapi@ext@23@_K@Z -?ext_oneapi_signal_external_semaphore@queue@_V1@sycl@@QEAA?AVevent@23@Uinterop_semaphore_handle@experimental@oneapi@ext@23@AEBUcode_location@detail@23@@Z -?ext_oneapi_signal_external_semaphore@queue@_V1@sycl@@QEAA?AVevent@23@Uinterop_semaphore_handle@experimental@oneapi@ext@23@AEBV?$vector@Vevent@_V1@sycl@@V?$allocator@Vevent@_V1@sycl@@@std@@@std@@AEBUcode_location@detail@23@@Z -?ext_oneapi_signal_external_semaphore@queue@_V1@sycl@@QEAA?AVevent@23@Uinterop_semaphore_handle@experimental@oneapi@ext@23@V423@AEBUcode_location@detail@23@@Z -?ext_oneapi_signal_external_semaphore@queue@_V1@sycl@@QEAA?AVevent@23@Uinterop_semaphore_handle@experimental@oneapi@ext@23@_KAEBUcode_location@detail@23@@Z -?ext_oneapi_signal_external_semaphore@queue@_V1@sycl@@QEAA?AVevent@23@Uinterop_semaphore_handle@experimental@oneapi@ext@23@_KAEBV?$vector@Vevent@_V1@sycl@@V?$allocator@Vevent@_V1@sycl@@@std@@@std@@AEBUcode_location@detail@23@@Z -?ext_oneapi_signal_external_semaphore@queue@_V1@sycl@@QEAA?AVevent@23@Uinterop_semaphore_handle@experimental@oneapi@ext@23@_KV423@AEBUcode_location@detail@23@@Z +?ext_oneapi_signal_external_semaphore@handler@_V1@sycl@@QEAAXUexternal_semaphore@experimental@oneapi@ext@23@@Z +?ext_oneapi_signal_external_semaphore@handler@_V1@sycl@@QEAAXUexternal_semaphore@experimental@oneapi@ext@23@_K@Z +?ext_oneapi_signal_external_semaphore@queue@_V1@sycl@@QEAA?AVevent@23@Uexternal_semaphore@experimental@oneapi@ext@23@AEBUcode_location@detail@23@@Z +?ext_oneapi_signal_external_semaphore@queue@_V1@sycl@@QEAA?AVevent@23@Uexternal_semaphore@experimental@oneapi@ext@23@AEBV?$vector@Vevent@_V1@sycl@@V?$allocator@Vevent@_V1@sycl@@@std@@@std@@AEBUcode_location@detail@23@@Z +?ext_oneapi_signal_external_semaphore@queue@_V1@sycl@@QEAA?AVevent@23@Uexternal_semaphore@experimental@oneapi@ext@23@V423@AEBUcode_location@detail@23@@Z +?ext_oneapi_signal_external_semaphore@queue@_V1@sycl@@QEAA?AVevent@23@Uexternal_semaphore@experimental@oneapi@ext@23@_KAEBUcode_location@detail@23@@Z +?ext_oneapi_signal_external_semaphore@queue@_V1@sycl@@QEAA?AVevent@23@Uexternal_semaphore@experimental@oneapi@ext@23@_KAEBV?$vector@Vevent@_V1@sycl@@V?$allocator@Vevent@_V1@sycl@@@std@@@std@@AEBUcode_location@detail@23@@Z +?ext_oneapi_signal_external_semaphore@queue@_V1@sycl@@QEAA?AVevent@23@Uexternal_semaphore@experimental@oneapi@ext@23@_KV423@AEBUcode_location@detail@23@@Z ?ext_oneapi_submit_barrier@queue@_V1@sycl@@QEAA?AVevent@23@AEBUcode_location@detail@23@@Z ?ext_oneapi_submit_barrier@queue@_V1@sycl@@QEAA?AVevent@23@AEBV?$vector@Vevent@_V1@sycl@@V?$allocator@Vevent@_V1@sycl@@@std@@@std@@AEBUcode_location@detail@23@@Z ?ext_oneapi_supports_cl_c_feature@device@_V1@sycl@@QEAA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z ?ext_oneapi_supports_cl_c_version@device@_V1@sycl@@QEBA_NAEBUcl_version@experimental@oneapi@ext@23@@Z ?ext_oneapi_supports_cl_extension@device@_V1@sycl@@QEBA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEAUcl_version@experimental@oneapi@ext@23@@Z -?ext_oneapi_wait_external_semaphore@handler@_V1@sycl@@QEAAXUinterop_semaphore_handle@experimental@oneapi@ext@23@@Z -?ext_oneapi_wait_external_semaphore@handler@_V1@sycl@@QEAAXUinterop_semaphore_handle@experimental@oneapi@ext@23@_K@Z -?ext_oneapi_wait_external_semaphore@queue@_V1@sycl@@QEAA?AVevent@23@Uinterop_semaphore_handle@experimental@oneapi@ext@23@AEBUcode_location@detail@23@@Z -?ext_oneapi_wait_external_semaphore@queue@_V1@sycl@@QEAA?AVevent@23@Uinterop_semaphore_handle@experimental@oneapi@ext@23@AEBV?$vector@Vevent@_V1@sycl@@V?$allocator@Vevent@_V1@sycl@@@std@@@std@@AEBUcode_location@detail@23@@Z -?ext_oneapi_wait_external_semaphore@queue@_V1@sycl@@QEAA?AVevent@23@Uinterop_semaphore_handle@experimental@oneapi@ext@23@V423@AEBUcode_location@detail@23@@Z -?ext_oneapi_wait_external_semaphore@queue@_V1@sycl@@QEAA?AVevent@23@Uinterop_semaphore_handle@experimental@oneapi@ext@23@_KAEBUcode_location@detail@23@@Z -?ext_oneapi_wait_external_semaphore@queue@_V1@sycl@@QEAA?AVevent@23@Uinterop_semaphore_handle@experimental@oneapi@ext@23@_KAEBV?$vector@Vevent@_V1@sycl@@V?$allocator@Vevent@_V1@sycl@@@std@@@std@@AEBUcode_location@detail@23@@Z -?ext_oneapi_wait_external_semaphore@queue@_V1@sycl@@QEAA?AVevent@23@Uinterop_semaphore_handle@experimental@oneapi@ext@23@_KV423@AEBUcode_location@detail@23@@Z +?ext_oneapi_wait_external_semaphore@handler@_V1@sycl@@QEAAXUexternal_semaphore@experimental@oneapi@ext@23@@Z +?ext_oneapi_wait_external_semaphore@handler@_V1@sycl@@QEAAXUexternal_semaphore@experimental@oneapi@ext@23@_K@Z +?ext_oneapi_wait_external_semaphore@queue@_V1@sycl@@QEAA?AVevent@23@Uexternal_semaphore@experimental@oneapi@ext@23@AEBUcode_location@detail@23@@Z +?ext_oneapi_wait_external_semaphore@queue@_V1@sycl@@QEAA?AVevent@23@Uexternal_semaphore@experimental@oneapi@ext@23@AEBV?$vector@Vevent@_V1@sycl@@V?$allocator@Vevent@_V1@sycl@@@std@@@std@@AEBUcode_location@detail@23@@Z +?ext_oneapi_wait_external_semaphore@queue@_V1@sycl@@QEAA?AVevent@23@Uexternal_semaphore@experimental@oneapi@ext@23@V423@AEBUcode_location@detail@23@@Z +?ext_oneapi_wait_external_semaphore@queue@_V1@sycl@@QEAA?AVevent@23@Uexternal_semaphore@experimental@oneapi@ext@23@_KAEBUcode_location@detail@23@@Z +?ext_oneapi_wait_external_semaphore@queue@_V1@sycl@@QEAA?AVevent@23@Uexternal_semaphore@experimental@oneapi@ext@23@_KAEBV?$vector@Vevent@_V1@sycl@@V?$allocator@Vevent@_V1@sycl@@@std@@@std@@AEBUcode_location@detail@23@@Z +?ext_oneapi_wait_external_semaphore@queue@_V1@sycl@@QEAA?AVevent@23@Uexternal_semaphore@experimental@oneapi@ext@23@_KV423@AEBUcode_location@detail@23@@Z ?extractArgsAndReqs@handler@_V1@sycl@@AEAAXXZ ?extractArgsAndReqsFromLambda@handler@_V1@sycl@@AEAAXPEAD_KPEBUkernel_param_desc_t@detail@23@_N@Z ?finalize@handler@_V1@sycl@@AEAA?AVevent@23@XZ @@ -4346,10 +4346,10 @@ ?malloc_shared@_V1@sycl@@YAPEAX_KAEBVqueue@12@AEBUcode_location@detail@12@@Z ?malloc_shared@_V1@sycl@@YAPEAX_KAEBVqueue@12@AEBVproperty_list@12@AEBUcode_location@detail@12@@Z ?map@physical_mem@experimental@oneapi@ext@_V1@sycl@@QEBAPEAX_K0W4address_access_mode@23456@0@Z -?map_external_image_memory@experimental@oneapi@ext@_V1@sycl@@YA?AUimage_mem_handle@12345@Uinterop_mem_handle@12345@AEBUimage_descriptor@12345@AEBVdevice@45@AEBVcontext@45@@Z -?map_external_image_memory@experimental@oneapi@ext@_V1@sycl@@YA?AUimage_mem_handle@12345@Uinterop_mem_handle@12345@AEBUimage_descriptor@12345@AEBVqueue@45@@Z -?map_external_memory_array@experimental@oneapi@ext@_V1@sycl@@YA?AUimage_mem_handle@12345@Uinterop_mem_handle@12345@AEBUimage_descriptor@12345@AEBVdevice@45@AEBVcontext@45@@Z -?map_external_memory_array@experimental@oneapi@ext@_V1@sycl@@YA?AUimage_mem_handle@12345@Uinterop_mem_handle@12345@AEBUimage_descriptor@12345@AEBVqueue@45@@Z +?map_external_image_memory@experimental@oneapi@ext@_V1@sycl@@YA?AUimage_mem_handle@12345@Uexternal_mem@12345@AEBUimage_descriptor@12345@AEBVdevice@45@AEBVcontext@45@@Z +?map_external_image_memory@experimental@oneapi@ext@_V1@sycl@@YA?AUimage_mem_handle@12345@Uexternal_mem@12345@AEBUimage_descriptor@12345@AEBVqueue@45@@Z +?map_external_memory_array@experimental@oneapi@ext@_V1@sycl@@YA?AUimage_mem_handle@12345@Uexternal_mem@12345@AEBUimage_descriptor@12345@AEBVdevice@45@AEBVcontext@45@@Z +?map_external_memory_array@experimental@oneapi@ext@_V1@sycl@@YA?AUimage_mem_handle@12345@Uexternal_mem@12345@AEBUimage_descriptor@12345@AEBVqueue@45@@Z ?markBufferAsInternal@detail@_V1@sycl@@YAXAEBV?$shared_ptr@Vbuffer_impl@detail@_V1@sycl@@@std@@@Z ?mem_advise@experimental@oneapi@ext@_V1@sycl@@YAXVqueue@45@PEAX_KHAEBUcode_location@detail@45@@Z ?mem_advise@handler@_V1@sycl@@QEAAXPEBX_KH@Z @@ -4400,8 +4400,8 @@ ?reduGetMaxWGSize@detail@_V1@sycl@@YA_KV?$shared_ptr@Vqueue_impl@detail@_V1@sycl@@@std@@_K@Z ?reduGetPreferredWGSize@detail@_V1@sycl@@YA_KAEAV?$shared_ptr@Vqueue_impl@detail@_V1@sycl@@@std@@_K@Z ?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_memory@experimental@oneapi@ext@_V1@sycl@@YAXUexternal_mem@12345@AEBVdevice@45@AEBVcontext@45@@Z +?release_external_memory@experimental@oneapi@ext@_V1@sycl@@YAXUexternal_mem@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 4e41a88c14544..ef334165ec565 100644 --- a/sycl/unittests/helpers/PiMockPlugin.hpp +++ b/sycl/unittests/helpers/PiMockPlugin.hpp @@ -503,11 +503,9 @@ inline pi_result mock_piextMemUnsampledImageCreate( } [[deprecated("This function has been deprecated in favor of " - "`piextImportExternalMemory`")]] -inline pi_result + "`piextImportExternalMemory`")]] inline pi_result mock_piextMemImportOpaqueFD(pi_context context, pi_device device, size_t size, - int file_descriptor, - pi_interop_mem_handle *ret_handle) { + int file_descriptor, pi_external_mem *ret_ext_mem) { return PI_SUCCESS; } @@ -515,74 +513,60 @@ inline pi_result mock_piextMemMapExternalArray(pi_context context, pi_device device, pi_image_format *image_format, pi_image_desc *image_desc, - pi_interop_mem_handle mem_handle, + pi_external_mem ext_mem, pi_image_mem_handle *ret_mem) { return PI_SUCCESS; } -inline pi_result mock_piextMemReleaseInterop(pi_context context, - pi_device device, - pi_interop_mem_handle ext_mem) { +inline pi_result mock_piextMemReleaseExternalMemory(pi_context context, + pi_device device, + pi_external_mem ext_mem) { return PI_SUCCESS; } [[deprecated("This function has been deprecated in favor of " - "`piextImportExternalSemaphore`")]] -inline pi_result mock_piextImportExternalSemaphoreOpaqueFD( - pi_context context, pi_device device, int file_descriptor, - pi_interop_semaphore_handle *ret_handle) { + "`piextImportExternalSemaphore`")]] inline pi_result +mock_piextImportExternalSemaphoreOpaqueFD(pi_context context, pi_device device, + int file_descriptor, + pi_external_semaphore *ret_ext_sem) { return PI_SUCCESS; } inline pi_result mock_piextImportExternalSemaphore( pi_context context, pi_device device, pi_external_semaphore_descriptor *sem_descriptor, - pi_interop_semaphore_handle *ret_handle) { + pi_external_semaphore *ret_handle) { return PI_SUCCESS; } inline pi_result mock_piextImportExternalMemory(pi_context context, pi_device device, pi_external_mem_descriptor *mem_descriptor, - pi_interop_mem_handle *ret_handle) { + pi_external_mem *ret_handle) { return PI_SUCCESS; } inline pi_result mock_piextDestroyExternalSemaphore(pi_context context, pi_device device, - pi_interop_semaphore_handle sem_handle) { + pi_external_semaphore ext_sem) { return PI_SUCCESS; } inline pi_result mock_piextWaitExternalSemaphore( - pi_queue command_queue, pi_interop_semaphore_handle sem_handle, - bool has_wait_value, uint64_t wait_value, pi_uint32 num_events_in_wait_list, + pi_queue command_queue, pi_external_semaphore ext_sem, bool has_wait_value, + uint64_t wait_value, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event) { return PI_SUCCESS; } inline pi_result mock_piextSignalExternalSemaphore( - pi_queue command_queue, pi_interop_semaphore_handle sem_handle, + pi_queue command_queue, pi_external_semaphore ext_sem, bool has_signal_value, uint64_t signal_value, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event) { return PI_SUCCESS; } -inline pi_result mock_piextMemUnsampledImageCreateInterop( - pi_context context, pi_device device, pi_image_format *image_format, - pi_image_desc *desc, pi_interop_mem_handle ext_mem_handle, - pi_image_handle *ret_img_handle) { - return PI_SUCCESS; -} - -inline pi_result mock_piextMemSampledImageCreateInterop( - pi_context context, pi_device device, pi_image_format *image_format, - pi_image_desc *desc, pi_sampler sampler, - pi_interop_mem_handle ext_mem_handle, pi_image_handle *ret_img_handle) { - return PI_SUCCESS; -} - inline pi_result mock_piextMemSampledImageCreate( pi_context context, pi_device device, pi_image_mem_handle img_mem, pi_image_format *image_format, pi_image_desc *desc, pi_sampler sampler, From 2756ec662ac5d4edb841b8136d1b03ba5c071cbd Mon Sep 17 00:00:00 2001 From: Duncan Brawley Date: Mon, 8 Jul 2024 13:04:48 +0100 Subject: [PATCH 02/27] Update UR commit --- sycl/plugins/unified_runtime/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sycl/plugins/unified_runtime/CMakeLists.txt b/sycl/plugins/unified_runtime/CMakeLists.txt index 52087cfb41cf7..977bda633e7f6 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -100,12 +100,12 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) endfunction() set(UNIFIED_RUNTIME_REPO "git@github.com:DBDuncan/unified-runtime.git") - # commit 2875c7e91e43d002440d26fe0eb50e2fb906ab47 + # commit b7c174f80c77cc607a1239023a628b73684b69bd # Author: Sean Stirling # Date: Tue, 4 Jun 2024 13:52:21 +0100 # [PATCH] [Bindless][Exp] Rename interop related structs/funcs with # "external" - set(UNIFIED_RUNTIME_TAG 2875c7e91e43d002440d26fe0eb50e2fb906ab47) + set(UNIFIED_RUNTIME_TAG b7c174f80c77cc607a1239023a628b73684b69bd) fetch_adapter_source(level_zero ${UNIFIED_RUNTIME_REPO} From 3bcd83783059c78fd8422ee335f7160f19f01840 Mon Sep 17 00:00:00 2001 From: Duncan Brawley Date: Mon, 8 Jul 2024 18:03:06 +0100 Subject: [PATCH 03/27] Update UR commit --- sycl/plugins/unified_runtime/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sycl/plugins/unified_runtime/CMakeLists.txt b/sycl/plugins/unified_runtime/CMakeLists.txt index 977bda633e7f6..45e12b3ee28c2 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -100,12 +100,12 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) endfunction() set(UNIFIED_RUNTIME_REPO "git@github.com:DBDuncan/unified-runtime.git") - # commit b7c174f80c77cc607a1239023a628b73684b69bd + # commit 4c2cee156988da9ba7d5de6e2f44f8d0f248dd83 # Author: Sean Stirling # Date: Tue, 4 Jun 2024 13:52:21 +0100 # [PATCH] [Bindless][Exp] Rename interop related structs/funcs with # "external" - set(UNIFIED_RUNTIME_TAG b7c174f80c77cc607a1239023a628b73684b69bd) + set(UNIFIED_RUNTIME_TAG 4c2cee156988da9ba7d5de6e2f44f8d0f248dd83) fetch_adapter_source(level_zero ${UNIFIED_RUNTIME_REPO} From c7ba9b06538e81c60d31ae8148e7f528b0e5301e Mon Sep 17 00:00:00 2001 From: Duncan Brawley Date: Tue, 9 Jul 2024 13:05:16 +0100 Subject: [PATCH 04/27] Update UR repo link --- sycl/plugins/unified_runtime/CMakeLists.txt | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/sycl/plugins/unified_runtime/CMakeLists.txt b/sycl/plugins/unified_runtime/CMakeLists.txt index f3052cc6ccfc2..218286ac79714 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -99,7 +99,7 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) CACHE PATH "Path to external '${name}' adapter source dir" FORCE) endfunction() - set(UNIFIED_RUNTIME_REPO "git@github.com:DBDuncan/unified-runtime.git") + set(UNIFIED_RUNTIME_REPO "https://github.com/DBDuncan/unified-runtime.git") # commit 4c2cee156988da9ba7d5de6e2f44f8d0f248dd83 # Author: Sean Stirling # Date: Tue, 4 Jun 2024 13:52:21 +0100 @@ -109,13 +109,7 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) fetch_adapter_source(level_zero ${UNIFIED_RUNTIME_REPO} - # commit f404f4deab8182aafa03caf27438ea7b62d1a24a (HEAD, origin/main, origin/HEAD) - # Merge: 4a60029d 686cf44d - # Author: Neil R. Spruit - # Date: Mon Jul 8 13:33:20 2024 -0700 - # Merge pull request #1806 from againull/review/againull/fix_overflow - # [UR][L0] Fix undefined behavior caused by shifting more than bits count - f404f4deab8182aafa03caf27438ea7b62d1a24a + ${UNIFIED_RUNTIME_TAG} ) fetch_adapter_source(opencl From 9057dd0356a5fb5936736f4e6db6fd43470efb0c Mon Sep 17 00:00:00 2001 From: Duncan Brawley Date: Tue, 9 Jul 2024 16:27:59 +0100 Subject: [PATCH 05/27] Update pi major and minor versions --- sycl/include/sycl/detail/pi.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sycl/include/sycl/detail/pi.h b/sycl/include/sycl/detail/pi.h index ed96ad727454d..65973cfbb6661 100644 --- a/sycl/include/sycl/detail/pi.h +++ b/sycl/include/sycl/detail/pi.h @@ -199,7 +199,7 @@ // 16.56 Replaced piextUSMEnqueueMemset with piextUSMEnqueueFill // 16.57 Added mappings to UR launch properties extension // (piextEnqueueKernelLaunchCustom) -// 16.58 Renamed interop related structs/funcs/enums: +// 17.58 Renamed interop related structs/funcs/enums: // - with keyword "external" over "interop": // - PI_EXT_ONEAPI_DEVICE_INFO_INTEROP_MEMORY_IMPORT_SUPPORT to // PI_EXT_ONEAPI_DEVICE_INFO_EXTERNAL_MEMORY_IMPORT_SUPPORT @@ -221,8 +221,8 @@ // ext_oneapi_external_semaphore_export // - piextMemReleaseInterop to piextMemReleaseExternalMemory -#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) From b62170dc3a73879d6d3c5a7253dc19f7c37403d4 Mon Sep 17 00:00:00 2001 From: Duncan Brawley Date: Tue, 9 Jul 2024 16:52:20 +0100 Subject: [PATCH 06/27] Update UR commit --- sycl/plugins/unified_runtime/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sycl/plugins/unified_runtime/CMakeLists.txt b/sycl/plugins/unified_runtime/CMakeLists.txt index 218286ac79714..071242ca388ff 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -100,12 +100,12 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) endfunction() set(UNIFIED_RUNTIME_REPO "https://github.com/DBDuncan/unified-runtime.git") - # commit 4c2cee156988da9ba7d5de6e2f44f8d0f248dd83 + # commit 4095b4ac5421c21db6aacedcad158f1e807f7add # Author: Sean Stirling # Date: Tue, 4 Jun 2024 13:52:21 +0100 # [PATCH] [Bindless][Exp] Rename interop related structs/funcs with # "external" - set(UNIFIED_RUNTIME_TAG 4c2cee156988da9ba7d5de6e2f44f8d0f248dd83) + set(UNIFIED_RUNTIME_TAG 4095b4ac5421c21db6aacedcad158f1e807f7add) fetch_adapter_source(level_zero ${UNIFIED_RUNTIME_REPO} From a9d2d9f0cd4320a7e32993dbae6aab586e8439cf Mon Sep 17 00:00:00 2001 From: Duncan Brawley Date: Wed, 10 Jul 2024 13:37:33 +0100 Subject: [PATCH 07/27] Fix some minor renaming mistakes --- .../sycl_ext_oneapi_bindless_images.asciidoc | 4 ++-- sycl/include/sycl/ext/oneapi/bindless_images.hpp | 13 ++++++------- sycl/include/sycl/handler.hpp | 2 +- 3 files changed, 9 insertions(+), 10 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 7d7b232306a84..c9422e2bac1dd 100644 --- a/sycl/doc/extensions/experimental/sycl_ext_oneapi_bindless_images.asciidoc +++ b/sycl/doc/extensions/experimental/sycl_ext_oneapi_bindless_images.asciidoc @@ -1549,7 +1549,7 @@ The device aspect descriptors for these queries are: importing external memory resources. |`aspect::ext_oneapi_external_memory_export` | Indicates if the device supports exporting internal memory resources. -|`aspect::ext_oneapi_external_semaphore_import`` | Indicates if the device +|`aspect::ext_oneapi_external_semaphore_import` | Indicates if the device supports importing external semaphore resources. |`aspect::ext_oneapi_external_semaphore_export` | Indicates if the device supports exporting internal event resources. @@ -1692,7 +1692,7 @@ behaviour. Once a user has finished operating on imported memory, they must ensure that they destroy the imported memory handle through `release_external_memory`. -`release_external_memory` can only accept `external_mems` that were +`release_external_memory` can only accept `external_mem` objects that were created through `import_external_memory`. ```cpp diff --git a/sycl/include/sycl/ext/oneapi/bindless_images.hpp b/sycl/include/sycl/ext/oneapi/bindless_images.hpp index a3e8f16011557..5f41953bc5753 100644 --- a/sycl/include/sycl/ext/oneapi/bindless_images.hpp +++ b/sycl/include/sycl/ext/oneapi/bindless_images.hpp @@ -222,10 +222,10 @@ __SYCL_EXPORT external_mem import_external_memory( * @param syclQueue The queue in which we create our external memory * @return Imported opaque external memory */ -template -__SYCL_EXPORT external_mem import_external_memory( - external_mem_descriptor externalMemDesc, - const sycl::queue &syclQueue); +template +__SYCL_EXPORT external_mem +import_external_memory(external_mem_descriptor externalMemDesc, + const sycl::queue &syclQueue); /** * @brief [Deprecated] Maps an interop memory handle to an image memory @@ -313,10 +313,9 @@ __SYCL_EXPORT external_semaphore import_external_semaphore( * @param syclQueue The queue in which we create our external semaphore * @return Imported opaque external semaphore */ -template +template __SYCL_EXPORT external_semaphore import_external_semaphore( - external_semaphore_descriptor - externalSemaphoreDesc, + external_semaphore_descriptor externalSemaphoreDesc, const sycl::queue &syclQueue); /** diff --git a/sycl/include/sycl/handler.hpp b/sycl/include/sycl/handler.hpp index 37bde5cf5738d..149f4754af15e 100644 --- a/sycl/include/sycl/handler.hpp +++ b/sycl/include/sycl/handler.hpp @@ -3266,7 +3266,7 @@ class __SYCL_EXPORT handler { /// Instruct the queue to signal the external semaphore once all previous /// commands submitted to the queue have completed execution. - /// An exception is thrown if \p SemaphoreHandle is incomplete, or if the + /// An exception is thrown if \p extSemaphore is incomplete, or if the /// type of semaphore requires an explicit value to signal. /// /// \param extSemaphore is an opaque external semaphore object From 4cc3633e6f2833b652fd36cfdadbb5c33a307684 Mon Sep 17 00:00:00 2001 From: "chedy.najjar" Date: Fri, 12 Jul 2024 17:02:53 +0100 Subject: [PATCH 08/27] update UR tag --- sycl/plugins/unified_runtime/CMakeLists.txt | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/sycl/plugins/unified_runtime/CMakeLists.txt b/sycl/plugins/unified_runtime/CMakeLists.txt index 2daf0401a293b..74712d6d2499d 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/oneapi-src/unified-runtime.git") - # commit 167ddf9320dba95c9324e373fb863baeb46e09f1 - # Merge: 76c6bf9a 0cd10f63 - # Author: Kenneth Benzie (Benie) - # Date: Thu Jul 11 15:12:38 2024 +0100 - # Merge pull request #1747 from AllanZyne/review/yang/misalign_access - # [DeviceSanitizer] Support detecting misaligned access error - set(UNIFIED_RUNTIME_TAG 167ddf9320dba95c9324e373fb863baeb46e09f1) + set(UNIFIED_RUNTIME_REPO "https://github.com/DBDuncan/unified-runtime.git") + # commit 4095b4ac5421c21db6aacedcad158f1e807f7add + # Author: Sean Stirling + # Date: Tue, 4 Jun 2024 13:52:21 +0100 + # [PATCH] [Bindless][Exp] Rename interop related structs/funcs with + # "external" + set(UNIFIED_RUNTIME_TAG d1a7c662d77b9bd9aacfc4ffaa56113806267e75) fetch_adapter_source(level_zero ${UNIFIED_RUNTIME_REPO} From 83f757077961a20e066169876b4b7e69be9295d8 Mon Sep 17 00:00:00 2001 From: Duncan Brawley Date: Mon, 15 Jul 2024 17:43:18 +0100 Subject: [PATCH 09/27] Update UR commit --- sycl/plugins/unified_runtime/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sycl/plugins/unified_runtime/CMakeLists.txt b/sycl/plugins/unified_runtime/CMakeLists.txt index 74712d6d2499d..bb9af7a5b5a68 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -100,12 +100,12 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) endfunction() set(UNIFIED_RUNTIME_REPO "https://github.com/DBDuncan/unified-runtime.git") - # commit 4095b4ac5421c21db6aacedcad158f1e807f7add + # commit c799e69d1f2114dbaa28bff4aae47f4b1e93ad17 # Author: Sean Stirling # Date: Tue, 4 Jun 2024 13:52:21 +0100 # [PATCH] [Bindless][Exp] Rename interop related structs/funcs with # "external" - set(UNIFIED_RUNTIME_TAG d1a7c662d77b9bd9aacfc4ffaa56113806267e75) + set(UNIFIED_RUNTIME_TAG c799e69d1f2114dbaa28bff4aae47f4b1e93ad17) fetch_adapter_source(level_zero ${UNIFIED_RUNTIME_REPO} From 365c4bbbd07a6fab6648de58b8194204866ca02d Mon Sep 17 00:00:00 2001 From: Duncan Brawley Date: Tue, 16 Jul 2024 14:53:00 +0100 Subject: [PATCH 10/27] Fix windows symbols --- sycl/test/abi/sycl_symbols_windows.dump | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/sycl/test/abi/sycl_symbols_windows.dump b/sycl/test/abi/sycl_symbols_windows.dump index 55bcdd8c860a3..3a885c997d939 100644 --- a/sycl/test/abi/sycl_symbols_windows.dump +++ b/sycl/test/abi/sycl_symbols_windows.dump @@ -251,16 +251,18 @@ ??$get_profiling_info@Ucommand_end@event_profiling@info@_V1@sycl@@@event@_V1@sycl@@QEBA_KXZ ??$get_profiling_info@Ucommand_start@event_profiling@info@_V1@sycl@@@event@_V1@sycl@@QEBA_KXZ ??$get_profiling_info@Ucommand_submit@event_profiling@info@_V1@sycl@@@event@_V1@sycl@@QEBA_KXZ -??$import_external_memory@Uresource_fd@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUinterop_mem_handle@01234@U?$external_mem_descriptor@Uresource_fd@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVdevice@34@AEBVcontext@34@@Z -??$import_external_memory@Uresource_fd@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUinterop_mem_handle@01234@U?$external_mem_descriptor@Uresource_fd@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVqueue@34@@Z -??$import_external_memory@Uresource_win32_handle@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUinterop_mem_handle@01234@U?$external_mem_descriptor@Uresource_win32_handle@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVdevice@34@AEBVcontext@34@@Z -??$import_external_memory@Uresource_win32_handle@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUinterop_mem_handle@01234@U?$external_mem_descriptor@Uresource_win32_handle@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVqueue@34@@Z -??$import_external_semaphore@Uexternal_semaphore_fd@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUinterop_semaphore_handle@01234@U?$external_semaphore_descriptor@Uexternal_semaphore_fd@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVdevice@34@AEBVcontext@34@@Z -??$import_external_semaphore@Uexternal_semaphore_fd@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUinterop_semaphore_handle@01234@U?$external_semaphore_descriptor@Uexternal_semaphore_fd@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVqueue@34@@Z -??$import_external_semaphore@Uresource_fd@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUinterop_semaphore_handle@01234@U?$external_semaphore_descriptor@Uresource_fd@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVdevice@34@AEBVcontext@34@@Z -??$import_external_semaphore@Uresource_fd@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUinterop_semaphore_handle@01234@U?$external_semaphore_descriptor@Uresource_fd@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVqueue@34@@Z -??$import_external_semaphore@Uresource_win32_handle@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUinterop_semaphore_handle@01234@U?$external_semaphore_descriptor@Uresource_win32_handle@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVdevice@34@AEBVcontext@34@@Z -??$import_external_semaphore@Uresource_win32_handle@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUinterop_semaphore_handle@01234@U?$external_semaphore_descriptor@Uresource_win32_handle@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVqueue@34@@Z +??$import_external_memory@Uexternal_mem_fd@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUexternal_mem@01234@U?$external_mem_descriptor@Uexternal_mem_fd@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVdevice@34@AEBVcontext@34@@Z +??$import_external_memory@Uexternal_mem_fd@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUexternal_mem@01234@U?$external_mem_descriptor@Uexternal_mem_fd@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVqueue@34@@Z +??$import_external_memory@Uresource_fd@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUexternal_mem@01234@U?$external_mem_descriptor@Uresource_fd@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVdevice@34@AEBVcontext@34@@Z +??$import_external_memory@Uresource_fd@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUexternal_mem@01234@U?$external_mem_descriptor@Uresource_fd@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVqueue@34@@Z +??$import_external_memory@Uresource_win32_handle@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUexternal_mem@01234@U?$external_mem_descriptor@Uresource_win32_handle@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVdevice@34@AEBVcontext@34@@Z +??$import_external_memory@Uresource_win32_handle@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUexternal_mem@01234@U?$external_mem_descriptor@Uresource_win32_handle@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVqueue@34@@Z +??$import_external_semaphore@Uexternal_semaphore_fd@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUexternal_semaphore@01234@U?$external_semaphore_descriptor@Uexternal_semaphore_fd@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVdevice@34@AEBVcontext@34@@Z +??$import_external_semaphore@Uexternal_semaphore_fd@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUexternal_semaphore@01234@U?$external_semaphore_descriptor@Uexternal_semaphore_fd@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVqueue@34@@Z +??$import_external_semaphore@Uresource_fd@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUexternal_semaphore@01234@U?$external_semaphore_descriptor@Uresource_fd@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVdevice@34@AEBVcontext@34@@Z +??$import_external_semaphore@Uresource_fd@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUexternal_semaphore@01234@U?$external_semaphore_descriptor@Uresource_fd@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVqueue@34@@Z +??$import_external_semaphore@Uresource_win32_handle@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUexternal_semaphore@01234@U?$external_semaphore_descriptor@Uresource_win32_handle@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVdevice@34@AEBVcontext@34@@Z +??$import_external_semaphore@Uresource_win32_handle@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUexternal_semaphore@01234@U?$external_semaphore_descriptor@Uresource_win32_handle@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVqueue@34@@Z ??$update_nd_range@$00@node@experimental@oneapi@ext@_V1@sycl@@QEAAXV?$nd_range@$00@45@@Z ??$update_nd_range@$01@node@experimental@oneapi@ext@_V1@sycl@@QEAAXV?$nd_range@$01@45@@Z ??$update_nd_range@$02@node@experimental@oneapi@ext@_V1@sycl@@QEAAXV?$nd_range@$02@45@@Z From 1f02f9845e41ddd6493b616fe17d7db6b51c1320 Mon Sep 17 00:00:00 2001 From: Duncan Brawley Date: Tue, 16 Jul 2024 17:39:54 +0100 Subject: [PATCH 11/27] Update UR commit --- sycl/plugins/unified_runtime/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sycl/plugins/unified_runtime/CMakeLists.txt b/sycl/plugins/unified_runtime/CMakeLists.txt index bb9af7a5b5a68..1b68f910ca339 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -100,12 +100,12 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) endfunction() set(UNIFIED_RUNTIME_REPO "https://github.com/DBDuncan/unified-runtime.git") - # commit c799e69d1f2114dbaa28bff4aae47f4b1e93ad17 + # commit e895655df92cd3a5811ef0f29348ede2a970f6c4 # Author: Sean Stirling # Date: Tue, 4 Jun 2024 13:52:21 +0100 # [PATCH] [Bindless][Exp] Rename interop related structs/funcs with # "external" - set(UNIFIED_RUNTIME_TAG c799e69d1f2114dbaa28bff4aae47f4b1e93ad17) + set(UNIFIED_RUNTIME_TAG e895655df92cd3a5811ef0f29348ede2a970f6c4) fetch_adapter_source(level_zero ${UNIFIED_RUNTIME_REPO} From c2bf7e39798c6e79ecf7a4d10c285667507b9838 Mon Sep 17 00:00:00 2001 From: Duncan Brawley Date: Wed, 17 Jul 2024 14:50:35 +0100 Subject: [PATCH 12/27] Update UR commit --- sycl/plugins/unified_runtime/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sycl/plugins/unified_runtime/CMakeLists.txt b/sycl/plugins/unified_runtime/CMakeLists.txt index 1b68f910ca339..a8328cdd4589b 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -100,12 +100,12 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) endfunction() set(UNIFIED_RUNTIME_REPO "https://github.com/DBDuncan/unified-runtime.git") - # commit e895655df92cd3a5811ef0f29348ede2a970f6c4 + # commit 32c7b498e68247756a2d4d68d524c9054c6874de # Author: Sean Stirling # Date: Tue, 4 Jun 2024 13:52:21 +0100 # [PATCH] [Bindless][Exp] Rename interop related structs/funcs with # "external" - set(UNIFIED_RUNTIME_TAG e895655df92cd3a5811ef0f29348ede2a970f6c4) + set(UNIFIED_RUNTIME_TAG 32c7b498e68247756a2d4d68d524c9054c6874de) fetch_adapter_source(level_zero ${UNIFIED_RUNTIME_REPO} From 25926f5b07f859300b6cc2b45a34a69050bf085c Mon Sep 17 00:00:00 2001 From: Duncan Brawley Date: Wed, 17 Jul 2024 15:32:52 +0100 Subject: [PATCH 13/27] Format code --- sycl/source/detail/cg.hpp | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/sycl/source/detail/cg.hpp b/sycl/source/detail/cg.hpp index 87ce00d4f1825..5656fe3c9cae5 100644 --- a/sycl/source/detail/cg.hpp +++ b/sycl/source/detail/cg.hpp @@ -618,13 +618,11 @@ class CGSemaphoreWait : public CG { std::optional MWaitValue; public: - CGSemaphoreWait( - sycl::detail::pi::PiExternalSemaphore ExternalSemaphore, - std::optional WaitValue, CG::StorageInitHelper CGData, - detail::code_location loc = {}) + CGSemaphoreWait(sycl::detail::pi::PiExternalSemaphore ExternalSemaphore, + std::optional WaitValue, + CG::StorageInitHelper CGData, detail::code_location loc = {}) : CG(CGType::SemaphoreWait, std::move(CGData), std::move(loc)), - MExternalSemaphore(ExternalSemaphore), MWaitValue(WaitValue) { - } + MExternalSemaphore(ExternalSemaphore), MWaitValue(WaitValue) {} sycl::detail::pi::PiExternalSemaphore getExternalSemaphore() const { return MExternalSemaphore; @@ -638,13 +636,12 @@ class CGSemaphoreSignal : public CG { std::optional MSignalValue; public: - CGSemaphoreSignal( - sycl::detail::pi::PiExternalSemaphore ExternalSemaphore, - std::optional SignalValue, CG::StorageInitHelper CGData, - detail::code_location loc = {}) + CGSemaphoreSignal(sycl::detail::pi::PiExternalSemaphore ExternalSemaphore, + std::optional SignalValue, + CG::StorageInitHelper CGData, + detail::code_location loc = {}) : CG(CGType::SemaphoreSignal, std::move(CGData), std::move(loc)), - MExternalSemaphore(ExternalSemaphore), - MSignalValue(SignalValue) {} + MExternalSemaphore(ExternalSemaphore), MSignalValue(SignalValue) {} sycl::detail::pi::PiExternalSemaphore getExternalSemaphore() const { return MExternalSemaphore; From efd793b088de3be4bed906ba7c48cbb863d9ea68 Mon Sep 17 00:00:00 2001 From: Duncan Brawley Date: Thu, 18 Jul 2024 17:49:29 +0100 Subject: [PATCH 14/27] Update UR commit --- sycl/plugins/unified_runtime/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sycl/plugins/unified_runtime/CMakeLists.txt b/sycl/plugins/unified_runtime/CMakeLists.txt index a8328cdd4589b..d11c13a7d2811 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -100,12 +100,12 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) endfunction() set(UNIFIED_RUNTIME_REPO "https://github.com/DBDuncan/unified-runtime.git") - # commit 32c7b498e68247756a2d4d68d524c9054c6874de + # commit 8270ca319f76ff7c0bcf04d0e2e7ec0ac8b2efec # Author: Sean Stirling # Date: Tue, 4 Jun 2024 13:52:21 +0100 # [PATCH] [Bindless][Exp] Rename interop related structs/funcs with # "external" - set(UNIFIED_RUNTIME_TAG 32c7b498e68247756a2d4d68d524c9054c6874de) + set(UNIFIED_RUNTIME_TAG 8270ca319f76ff7c0bcf04d0e2e7ec0ac8b2efec) fetch_adapter_source(level_zero ${UNIFIED_RUNTIME_REPO} From bb1d52ce283de9f08c93e71b5ae4be5280a569ea Mon Sep 17 00:00:00 2001 From: Duncan Brawley Date: Thu, 18 Jul 2024 17:50:02 +0100 Subject: [PATCH 15/27] Update linux dump test symbols --- sycl/test/abi/sycl_symbols_linux.dump | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/sycl/test/abi/sycl_symbols_linux.dump b/sycl/test/abi/sycl_symbols_linux.dump index 8f02d15948b1d..ba49e59f02376 100644 --- a/sycl/test/abi/sycl_symbols_linux.dump +++ b/sycl/test/abi/sycl_symbols_linux.dump @@ -3029,8 +3029,6 @@ _ZN4sycl3_V13ext6oneapi12experimental22get_image_num_channelsENS3_16image_mem_ha _ZN4sycl3_V13ext6oneapi12experimental22get_image_num_channelsENS3_16image_mem_handleERKNS0_6deviceERKNS0_7contextE _ZN4sycl3_V13ext6oneapi12experimental22import_external_memoryINS3_11resource_fdEEENS3_12external_memENS3_23external_mem_descriptorIT_EERKNS0_5queueE _ZN4sycl3_V13ext6oneapi12experimental22import_external_memoryINS3_11resource_fdEEENS3_12external_memENS3_23external_mem_descriptorIT_EERKNS0_6deviceERKNS0_7contextE -_ZN4sycl3_V13ext6oneapi12experimental22import_external_memoryINS3_15external_mem_fdEEENS3_12external_memENS3_23external_mem_descriptorIT_EERKNS0_5queueE -_ZN4sycl3_V13ext6oneapi12experimental22import_external_memoryINS3_15external_mem_fdEEENS3_12external_memENS3_23external_mem_descriptorIT_EERKNS0_6deviceERKNS0_7contextE _ZN4sycl3_V13ext6oneapi12experimental22import_external_memoryINS3_21resource_win32_handleEEENS3_12external_memENS3_23external_mem_descriptorIT_EERKNS0_5queueE _ZN4sycl3_V13ext6oneapi12experimental22import_external_memoryINS3_21resource_win32_handleEEENS3_12external_memENS3_23external_mem_descriptorIT_EERKNS0_6deviceERKNS0_7contextE _ZN4sycl3_V13ext6oneapi12experimental23prepare_for_device_copyEPKvmRKNS0_5queueE @@ -3043,16 +3041,12 @@ _ZN4sycl3_V13ext6oneapi12experimental24release_from_device_copyEPKvRKNS0_5queueE _ZN4sycl3_V13ext6oneapi12experimental24release_from_device_copyEPKvRKNS0_7contextE _ZN4sycl3_V13ext6oneapi12experimental25import_external_semaphoreINS3_11resource_fdEEENS3_18external_semaphoreENS3_29external_semaphore_descriptorIT_EERKNS0_5queueE _ZN4sycl3_V13ext6oneapi12experimental25import_external_semaphoreINS3_11resource_fdEEENS3_18external_semaphoreENS3_29external_semaphore_descriptorIT_EERKNS0_6deviceERKNS0_7contextE -_ZN4sycl3_V13ext6oneapi12experimental25import_external_semaphoreINS3_21external_semaphore_fdEEENS3_18external_semaphoreENS3_29external_semaphore_descriptorIT_EERKNS0_5queueE -_ZN4sycl3_V13ext6oneapi12experimental25import_external_semaphoreINS3_21external_semaphore_fdEEENS3_18external_semaphoreENS3_29external_semaphore_descriptorIT_EERKNS0_6deviceERKNS0_7contextE _ZN4sycl3_V13ext6oneapi12experimental25import_external_semaphoreINS3_21resource_win32_handleEEENS3_18external_semaphoreENS3_29external_semaphore_descriptorIT_EERKNS0_5queueE _ZN4sycl3_V13ext6oneapi12experimental25import_external_semaphoreINS3_21resource_win32_handleEEENS3_18external_semaphoreENS3_29external_semaphore_descriptorIT_EERKNS0_6deviceERKNS0_7contextE _ZN4sycl3_V13ext6oneapi12experimental25map_external_image_memoryENS3_12external_memERKNS3_16image_descriptorERKNS0_5queueE _ZN4sycl3_V13ext6oneapi12experimental25map_external_image_memoryENS3_12external_memERKNS3_16image_descriptorERKNS0_6deviceERKNS0_7contextE -_ZN4sycl3_V13ext6oneapi12experimental25map_external_memory_arrayENS3_12external_memERKNS3_16image_descriptorERKNS0_5queueE -_ZN4sycl3_V13ext6oneapi12experimental25map_external_memory_arrayENS3_12external_memERKNS3_16image_descriptorERKNS0_6deviceERKNS0_7contextE -_ZN4sycl3_V13ext6oneapi12experimental26destroy_external_semaphoreENS3_18external_semaphoreERKNS0_5queueE -_ZN4sycl3_V13ext6oneapi12experimental26destroy_external_semaphoreENS3_18external_semaphoreERKNS0_6deviceERKNS0_7contextE +_ZN4sycl3_V13ext6oneapi12experimental26release_external_semaphoreENS3_18external_semaphoreERKNS0_5queueE +_ZN4sycl3_V13ext6oneapi12experimental26release_external_semaphoreENS3_18external_semaphoreERKNS0_6deviceERKNS0_7contextE _ZN4sycl3_V13ext6oneapi12experimental4node12update_rangeILi1EEEvNS0_5rangeIXT_EEE _ZN4sycl3_V13ext6oneapi12experimental4node12update_rangeILi2EEEvNS0_5rangeIXT_EEE _ZN4sycl3_V13ext6oneapi12experimental4node12update_rangeILi3EEEvNS0_5rangeIXT_EEE @@ -3512,6 +3506,7 @@ _ZN4sycl3_V17handler22ext_oneapi_fill2d_implEPvmPKvmmm _ZN4sycl3_V17handler22memcpyFromDeviceGlobalEPvPKvbmm _ZN4sycl3_V17handler22setHandlerKernelBundleENS0_6kernelE _ZN4sycl3_V17handler22setHandlerKernelBundleERKSt10shared_ptrINS0_6detail18kernel_bundle_implEE +_ZN4sycl3_V17handler22setKernelClusterLaunchENS0_5rangeILi3EEEi _ZN4sycl3_V17handler22setKernelIsCooperativeEb _ZN4sycl3_V17handler24GetRangeRoundingSettingsERmS2_S2_ _ZN4sycl3_V17handler24ext_intel_read_host_pipeENS0_6detail11string_viewEPvmb @@ -3519,17 +3514,16 @@ _ZN4sycl3_V17handler24ext_oneapi_memcpy2d_implEPvmPKvmmm _ZN4sycl3_V17handler24ext_oneapi_memset2d_implEPvmimm _ZN4sycl3_V17handler24registerDynamicParameterERNS0_3ext6oneapi12experimental6detail22dynamic_parameter_baseEi _ZN4sycl3_V17handler25ext_intel_write_host_pipeENS0_6detail11string_viewEPvmb -_ZN4sycl3_V17handler26setNDRangeDescriptorPaddedENS0_5rangeILi3EEEbi +_ZN4sycl3_V17handler26associateWithHandlerCommonESt10shared_ptrINS0_6detail16AccessorImplHostEEi _ZN4sycl3_V17handler26setNDRangeDescriptorPaddedENS0_5rangeILi3EEENS0_2idILi3EEEi _ZN4sycl3_V17handler26setNDRangeDescriptorPaddedENS0_5rangeILi3EEES3_NS0_2idILi3EEEi -_ZN4sycl3_V17handler26associateWithHandlerCommonESt10shared_ptrINS0_6detail16AccessorImplHostEEi +_ZN4sycl3_V17handler26setNDRangeDescriptorPaddedENS0_5rangeILi3EEEbi _ZN4sycl3_V17handler27addLifetimeSharedPtrStorageESt10shared_ptrIKvE -_ZN4sycl3_V17handler22setKernelClusterLaunchENS0_5rangeILi3EEEi _ZN4sycl3_V17handler27computeFallbackKernelBoundsEmm _ZN4sycl3_V17handler28extractArgsAndReqsFromLambdaEPcmPKNS0_6detail19kernel_param_desc_tEb _ZN4sycl3_V17handler28memcpyToHostOnlyDeviceGlobalEPKvS3_mbmm -_ZN4sycl3_V17handler28setStateExplicitKernelBundleEv _ZN4sycl3_V17handler28setArgsToAssociatedAccessorsEv +_ZN4sycl3_V17handler28setStateExplicitKernelBundleEv _ZN4sycl3_V17handler30memcpyFromHostOnlyDeviceGlobalEPvPKvbmm _ZN4sycl3_V17handler30verifyUsedKernelBundleInternalENS0_6detail11string_viewE _ZN4sycl3_V17handler32verifyDeviceHasProgressGuaranteeENS0_3ext6oneapi12experimental26forward_progress_guaranteeENS4_15execution_scopeES6_ From b5f5a536d0ca100d4998510f00fa9018ffd29792 Mon Sep 17 00:00:00 2001 From: Duncan Brawley Date: Thu, 18 Jul 2024 17:50:38 +0100 Subject: [PATCH 16/27] Fix 'external_semaphore_handle' not being renamed to 'external_semaphore' --- .../sycl_ext_oneapi_bindless_images.asciidoc | 88 +++++++++---------- 1 file changed, 44 insertions(+), 44 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 7d1d66ebaf507..a5cc702946738 100644 --- a/sycl/doc/extensions/experimental/sycl_ext_oneapi_bindless_images.asciidoc +++ b/sycl/doc/extensions/experimental/sycl_ext_oneapi_bindless_images.asciidoc @@ -1765,27 +1765,27 @@ compatible with the `resource_fd` resource type. ```cpp namespace sycl::ext::oneapi::experimental { -struct external_semaphore_handle { +struct external_semaphore { using raw_handle_type = /* Implementation defined */; raw_handle_type raw_handle; }; template -external_semaphore_handle import_external_semaphore( +external_semaphore import_external_semaphore( external_semaphore_descriptor externalSemaphoreDescriptor, const sycl::device &syclDevice, const sycl::context &syclContext); template -external_semaphore_handle import_external_semaphore( +external_semaphore import_external_semaphore( external_semaphore_descriptor externalSemaphoreDescriptor, const sycl::queue &syclQueue); } ``` -The resulting `external_semaphore_handle` can then be used in a SYCL command +The resulting `external_semaphore` can then be used in a SYCL command group, to either wait until the semaphore signalled, or signal the semaphore. If the type of semaphore imported supports setting the state of discrete @@ -1801,77 +1801,77 @@ namespace sycl { class handler { public: void ext_oneapi_wait_external_semaphore( - ext::oneapi::experimental::external_semaphore_handle - external_semaphore_handle); + ext::oneapi::experimental::external_semaphore + external_semaphore); void ext_oneapi_wait_external_semaphore( - ext::oneapi::experimental::external_semaphore_handle - external_semaphore_handle, + ext::oneapi::experimental::external_semaphore + external_semaphore, uint64_t wait_value); void ext_oneapi_signal_external_semaphore( - ext::oneapi::experimental::external_semaphore_handle - external_semaphore_handle); + ext::oneapi::experimental::external_semaphore + external_semaphore); void ext_oneapi_signal_external_semaphore( - ext::oneapi::experimental::external_semaphore_handle - external_semaphore_handle, + ext::oneapi::experimental::external_semaphore + external_semaphore, uint64_t signal_value); }; class queue { public: event ext_oneapi_wait_external_semaphore( - ext::oneapi::experimental::external_semaphore_handle - external_semaphore_handle); + ext::oneapi::experimental::external_semaphore + external_semaphore); event ext_oneapi_wait_external_semaphore( - ext::oneapi::experimental::external_semaphore_handle - external_semaphore_handle, + ext::oneapi::experimental::external_semaphore + external_semaphore, event DepEvent); event ext_oneapi_wait_external_semaphore( - ext::oneapi::experimental::external_semaphore_handle - external_semaphore_handle, + ext::oneapi::experimental::external_semaphore + external_semaphore, const std::vector &DepEvents); event ext_oneapi_wait_external_semaphore( - ext::oneapi::experimental::external_semaphore_handle - external_semaphore_handle, + ext::oneapi::experimental::external_semaphore + external_semaphore, uint64_t wait_value); event ext_oneapi_wait_external_semaphore( - ext::oneapi::experimental::external_semaphore_handle - external_semaphore_handle, + ext::oneapi::experimental::external_semaphore + external_semaphore, uint64_t wait_value, event DepEvent); event ext_oneapi_wait_external_semaphore( - ext::oneapi::experimental::external_semaphore_handle - external_semaphore_handle, + ext::oneapi::experimental::external_semaphore + external_semaphore, uint64_t wait_value, const std::vector &DepEvents); event ext_oneapi_signal_external_semaphore( - ext::oneapi::experimental::external_semaphore_handle - external_semaphore_handle); + ext::oneapi::experimental::external_semaphore + external_semaphore); event ext_oneapi_signal_external_semaphore( - ext::oneapi::experimental::external_semaphore_handle - external_semaphore_handle, + ext::oneapi::experimental::external_semaphore + external_semaphore, event DepEvent); event ext_oneapi_signal_external_semaphore( - ext::oneapi::experimental::external_semaphore_handle - external_semaphore_handle, + ext::oneapi::experimental::external_semaphore + external_semaphore, const std::vector &DepEvents); event ext_oneapi_signal_external_semaphore( - ext::oneapi::experimental::external_semaphore_handle - external_semaphore_handle, + ext::oneapi::experimental::external_semaphore + external_semaphore, uint64_t signal_value); event ext_oneapi_signal_external_semaphore( - ext::oneapi::experimental::external_semaphore_handle - external_semaphore_handle, + ext::oneapi::experimental::external_semaphore + external_semaphore, uint64_t signal_value, event DepEvent); event ext_oneapi_signal_external_semaphore( - ext::oneapi::experimental::external_semaphore_handle - external_semaphore_handle, + ext::oneapi::experimental::external_semaphore + external_semaphore, uint64_t signal_value, const std::vector &DepEvents); }; @@ -2505,13 +2505,13 @@ sycl::ext::oneapi::experimental::external_semaphore_descriptor< try { // Extension: import external semaphores - sycl::ext::oneapi::experimental::external_semaphore_handle - wait_external_semaphore_handle = + sycl::ext::oneapi::experimental::external_semaphore + wait_external_semaphore = sycl::ext::oneapi::experimental::import_external_semaphore( wait_external_semaphore_desc, queue); - sycl::ext::oneapi::experimental::external_semaphore_handle - done_external_semaphore_handle = + sycl::ext::oneapi::experimental::external_semaphore + done_external_semaphore = sycl::ext::oneapi::experimental::import_external_semaphore( done_external_semaphore_desc, queue); @@ -2543,7 +2543,7 @@ try { output_mapped_mem_handle, desc, queue); // Extension: wait for imported semaphore - q.ext_oneapi_wait_external_semaphore(wait_external_semaphore_handle) + q.ext_oneapi_wait_external_semaphore(wait_external_semaphore) // Submit our kernel that depends on imported "wait_semaphore_file_descriptor" q.submit([&](sycl::handler &cgh) { @@ -2568,7 +2568,7 @@ try { }); // Extension: signal imported semaphore - q.ext_oneapi_signal_external_semaphore(done_external_semaphore_handle) + q.ext_oneapi_signal_external_semaphore(done_external_semaphore) // The external API can now use the semaphore it exported to // "done_semaphore_file_descriptor" to schedule its own command submissions @@ -2581,9 +2581,9 @@ try { sycl::ext::oneapi::experimental::release_external_memory( output_external_mem, queue); sycl::ext::oneapi::experimental::release_external_semaphore( - wait_external_semaphore_handle, queue); + wait_external_semaphore, queue); sycl::ext::oneapi::experimental::release_external_semaphore( - done_external_semaphore_handle, queue); + done_external_semaphore, queue); sycl::ext::oneapi::experimental::destroy_image_handle(img_input, queue); sycl::ext::oneapi::experimental::destroy_image_handle(img_output, queue); } catch (sycl::exception e) { From 72db0f7417860b6816c476b007dad8a24a8e2ee5 Mon Sep 17 00:00:00 2001 From: Duncan Brawley Date: Fri, 19 Jul 2024 13:02:59 +0100 Subject: [PATCH 17/27] Update sycl windows symbols test --- sycl/test/abi/sycl_symbols_windows.dump | 36 +++++++++++-------------- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/sycl/test/abi/sycl_symbols_windows.dump b/sycl/test/abi/sycl_symbols_windows.dump index db086ef1aace2..ad4cda4ba6af0 100644 --- a/sycl/test/abi/sycl_symbols_windows.dump +++ b/sycl/test/abi/sycl_symbols_windows.dump @@ -251,14 +251,10 @@ ??$get_profiling_info@Ucommand_end@event_profiling@info@_V1@sycl@@@event@_V1@sycl@@QEBA_KXZ ??$get_profiling_info@Ucommand_start@event_profiling@info@_V1@sycl@@@event@_V1@sycl@@QEBA_KXZ ??$get_profiling_info@Ucommand_submit@event_profiling@info@_V1@sycl@@@event@_V1@sycl@@QEBA_KXZ -??$import_external_memory@Uexternal_mem_fd@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUexternal_mem@01234@U?$external_mem_descriptor@Uexternal_mem_fd@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVdevice@34@AEBVcontext@34@@Z -??$import_external_memory@Uexternal_mem_fd@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUexternal_mem@01234@U?$external_mem_descriptor@Uexternal_mem_fd@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVqueue@34@@Z ??$import_external_memory@Uresource_fd@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUexternal_mem@01234@U?$external_mem_descriptor@Uresource_fd@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVdevice@34@AEBVcontext@34@@Z ??$import_external_memory@Uresource_fd@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUexternal_mem@01234@U?$external_mem_descriptor@Uresource_fd@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVqueue@34@@Z ??$import_external_memory@Uresource_win32_handle@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUexternal_mem@01234@U?$external_mem_descriptor@Uresource_win32_handle@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVdevice@34@AEBVcontext@34@@Z ??$import_external_memory@Uresource_win32_handle@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUexternal_mem@01234@U?$external_mem_descriptor@Uresource_win32_handle@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVqueue@34@@Z -??$import_external_semaphore@Uexternal_semaphore_fd@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUexternal_semaphore@01234@U?$external_semaphore_descriptor@Uexternal_semaphore_fd@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVdevice@34@AEBVcontext@34@@Z -??$import_external_semaphore@Uexternal_semaphore_fd@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUexternal_semaphore@01234@U?$external_semaphore_descriptor@Uexternal_semaphore_fd@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVqueue@34@@Z ??$import_external_semaphore@Uresource_fd@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUexternal_semaphore@01234@U?$external_semaphore_descriptor@Uresource_fd@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVdevice@34@AEBVcontext@34@@Z ??$import_external_semaphore@Uresource_fd@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUexternal_semaphore@01234@U?$external_semaphore_descriptor@Uresource_fd@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVqueue@34@@Z ??$import_external_semaphore@Uresource_win32_handle@experimental@oneapi@ext@_V1@sycl@@@experimental@oneapi@ext@_V1@sycl@@YA?AUexternal_semaphore@01234@U?$external_semaphore_descriptor@Uresource_win32_handle@experimental@oneapi@ext@_V1@sycl@@@01234@AEBVdevice@34@AEBVcontext@34@@Z @@ -629,15 +625,17 @@ ??_Fqueue@_V1@sycl@@QEAAXXZ ?AccessTargetMask@handler@_V1@sycl@@0HB ?Clear@exception_list@_V1@sycl@@AEAAXXZ -?clearArgs@handler@_V1@sycl@@AEAAXXZ ?DirSep@OSUtil@detail@_V1@sycl@@2QEBDEB ?DisableRangeRounding@handler@_V1@sycl@@AEAA_NXZ ?GDBMethodsAnchor@SampledImageAccessorBaseHost@detail@_V1@sycl@@IEAAXXZ ?GDBMethodsAnchor@UnsampledImageAccessorBaseHost@detail@_V1@sycl@@IEAAXXZ ?GetRangeRoundingSettings@handler@_V1@sycl@@AEAAXAEA_K00@Z +?HasAssociatedAccessor@handler@_V1@sycl@@AEBA_NPEAVAccessorImplHost@detail@23@W4target@access@23@@Z ?PushBack@exception_list@_V1@sycl@@AEAAX$$QEAVexception_ptr@std@@@Z ?PushBack@exception_list@_V1@sycl@@AEAAXAEBVexception_ptr@std@@@Z ?RangeRoundingTrace@handler@_V1@sycl@@AEAA_NXZ +?SetHostTask@handler@_V1@sycl@@AEAAX$$QEAV?$function@$$A6AXVinterop_handle@_V1@sycl@@@Z@std@@@Z +?SetHostTask@handler@_V1@sycl@@AEAAX$$QEAV?$function@$$A6AXXZ@std@@@Z ?__abs_diff_impl@_V1@sycl@@YA?AV?$vec@C$00@12@V312@0@Z ?__abs_diff_impl@_V1@sycl@@YA?AV?$vec@C$01@12@V312@0@Z ?__abs_diff_impl@_V1@sycl@@YA?AV?$vec@C$02@12@V312@0@Z @@ -3675,6 +3673,8 @@ ?add@device_global_map@detail@_V1@sycl@@YAXPEBXPEBD@Z ?add@host_pipe_map@detail@_V1@sycl@@YAXPEBXPEBD@Z ?add@modifiable_command_graph@detail@experimental@oneapi@ext@_V1@sycl@@QEAA?AVnode@34567@AEBVproperty_list@67@@Z +?addAccessorReq@handler@_V1@sycl@@AEAAXV?$shared_ptr@VAccessorImplHost@detail@_V1@sycl@@@std@@@Z +?addArg@handler@_V1@sycl@@AEAAXW4kernel_param_kind_t@detail@23@PEAXHH@Z ?addCounterInit@detail@_V1@sycl@@YAXAEAVhandler@23@AEAV?$shared_ptr@Vqueue_impl@detail@_V1@sycl@@@std@@AEAV?$shared_ptr@H@6@@Z ?addGraphLeafDependencies@modifiable_command_graph@detail@experimental@oneapi@ext@_V1@sycl@@IEAAXVnode@34567@@Z ?addHostAccessorAndWait@detail@_V1@sycl@@YAXPEAVAccessorImplHost@123@@Z @@ -3682,12 +3682,10 @@ ?addHostUnsampledImageAccessorAndWait@detail@_V1@sycl@@YAXPEAVUnsampledImageAccessorImplHost@123@@Z ?addImpl@modifiable_command_graph@detail@experimental@oneapi@ext@_V1@sycl@@IEAA?AVnode@34567@AEBV?$vector@Vnode@experimental@oneapi@ext@_V1@sycl@@V?$allocator@Vnode@experimental@oneapi@ext@_V1@sycl@@@std@@@std@@@Z ?addImpl@modifiable_command_graph@detail@experimental@oneapi@ext@_V1@sycl@@IEAA?AVnode@34567@V?$function@$$A6AXAEAVhandler@_V1@sycl@@@Z@std@@AEBV?$vector@Vnode@experimental@oneapi@ext@_V1@sycl@@V?$allocator@Vnode@experimental@oneapi@ext@_V1@sycl@@@std@@@std@@@Z +?addLifetimeSharedPtrStorage@handler@_V1@sycl@@AEAAXV?$shared_ptr@$$CBX@std@@@Z ?addOrReplaceAccessorProperties@buffer_plain@detail@_V1@sycl@@IEAAXAEBVproperty_list@34@@Z ?addReduction@handler@_V1@sycl@@AEAAXAEBV?$shared_ptr@$$CBX@std@@@Z ?addStream@handler@_V1@sycl@@AEAAXAEBV?$shared_ptr@Vstream_impl@detail@_V1@sycl@@@std@@@Z -?addArg@handler@_V1@sycl@@AEAAXW4kernel_param_kind_t@detail@23@PEAXHH@Z -?addLifetimeSharedPtrStorage@handler@_V1@sycl@@AEAAXV?$shared_ptr@$$CBX@std@@@Z -?addAccessorReq@handler@_V1@sycl@@AEAAXV?$shared_ptr@VAccessorImplHost@detail@_V1@sycl@@@std@@@Z ?alignedAlloc@OSUtil@detail@_V1@sycl@@SAPEAX_K0@Z ?alignedFree@OSUtil@detail@_V1@sycl@@SAXPEAX@Z ?aligned_alloc@_V1@sycl@@YAPEAX_K0AEBVdevice@12@AEBVcontext@12@W4alloc@usm@12@AEBUcode_location@detail@12@@Z @@ -3725,6 +3723,7 @@ ?build_impl@detail@_V1@sycl@@YA?AV?$shared_ptr@Vkernel_bundle_impl@detail@_V1@sycl@@@std@@AEBV?$kernel_bundle@$0A@@23@AEBV?$vector@Vdevice@_V1@sycl@@V?$allocator@Vdevice@_V1@sycl@@@std@@@5@AEBVproperty_list@23@@Z ?cancel_fusion@fusion_wrapper@experimental@codeplay@ext@_V1@sycl@@QEAAXXZ ?category@exception@_V1@sycl@@QEBAAEBVerror_category@std@@XZ +?clearArgs@handler@_V1@sycl@@AEAAXXZ ?code@exception@_V1@sycl@@QEBAAEBVerror_code@std@@XZ ?compile_impl@detail@_V1@sycl@@YA?AV?$shared_ptr@Vkernel_bundle_impl@detail@_V1@sycl@@@std@@AEBV?$kernel_bundle@$0A@@23@AEBV?$vector@Vdevice@_V1@sycl@@V?$allocator@Vdevice@_V1@sycl@@@std@@@5@AEBVproperty_list@23@@Z ?complete_fusion@fusion_wrapper@experimental@codeplay@ext@_V1@sycl@@QEAA?AVevent@56@AEBVproperty_list@56@@Z @@ -3750,8 +3749,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@@YAXUexternal_semaphore@12345@AEBVdevice@45@AEBVcontext@45@@Z -?destroy_external_semaphore@experimental@oneapi@ext@_V1@sycl@@YAXUexternal_semaphore@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 @@ -4058,7 +4055,6 @@ ?get_width@stream@_V1@sycl@@QEBA_KXZ ?get_work_item_buffer_size@stream@_V1@sycl@@QEBA_KXZ ?gpu_selector_v@_V1@sycl@@YAHAEBVdevice@12@@Z -?HasAssociatedAccessor@handler@_V1@sycl@@AEBA_NPEAVAccessorImplHost@detail@23@W4target@access@23@@Z ?handleRelease@buffer_plain@detail@_V1@sycl@@IEBAXXZ ?has@device@_V1@sycl@@QEBA_NW4aspect@23@@Z ?has@platform@_V1@sycl@@QEBA_NW4aspect@23@@Z @@ -4137,8 +4133,6 @@ ?map@physical_mem@experimental@oneapi@ext@_V1@sycl@@QEBAPEAX_K0W4address_access_mode@23456@0@Z ?map_external_image_memory@experimental@oneapi@ext@_V1@sycl@@YA?AUimage_mem_handle@12345@Uexternal_mem@12345@AEBUimage_descriptor@12345@AEBVdevice@45@AEBVcontext@45@@Z ?map_external_image_memory@experimental@oneapi@ext@_V1@sycl@@YA?AUimage_mem_handle@12345@Uexternal_mem@12345@AEBUimage_descriptor@12345@AEBVqueue@45@@Z -?map_external_memory_array@experimental@oneapi@ext@_V1@sycl@@YA?AUimage_mem_handle@12345@Uexternal_mem@12345@AEBUimage_descriptor@12345@AEBVdevice@45@AEBVcontext@45@@Z -?map_external_memory_array@experimental@oneapi@ext@_V1@sycl@@YA?AUimage_mem_handle@12345@Uexternal_mem@12345@AEBUimage_descriptor@12345@AEBVqueue@45@@Z ?markBufferAsInternal@detail@_V1@sycl@@YAXAEBV?$shared_ptr@Vbuffer_impl@detail@_V1@sycl@@@std@@@Z ?mem_advise@experimental@oneapi@ext@_V1@sycl@@YAXVqueue@45@PEAX_KHAEBUcode_location@detail@45@@Z ?mem_advise@handler@_V1@sycl@@QEAAXPEBX_KH@Z @@ -4191,6 +4185,8 @@ ?registerDynamicParameter@handler@_V1@sycl@@AEAAXAEAVdynamic_parameter_base@detail@experimental@oneapi@ext@23@H@Z ?release_external_memory@experimental@oneapi@ext@_V1@sycl@@YAXUexternal_mem@12345@AEBVdevice@45@AEBVcontext@45@@Z ?release_external_memory@experimental@oneapi@ext@_V1@sycl@@YAXUexternal_mem@12345@AEBVqueue@45@@Z +?release_external_semaphore@experimental@oneapi@ext@_V1@sycl@@YAXUexternal_semaphore@12345@AEBVdevice@45@AEBVcontext@45@@Z +?release_external_semaphore@experimental@oneapi@ext@_V1@sycl@@YAXUexternal_semaphore@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 @@ -4212,23 +4208,21 @@ ?setArgHelper@handler@_V1@sycl@@AEAAXH$$QEAVraw_kernel_arg@experimental@oneapi@ext@23@@Z ?setArgHelper@handler@_V1@sycl@@AEAAXH$$QEAVsampler@23@@Z ?setArgsHelper@handler@_V1@sycl@@AEAAXH@Z +?setArgsToAssociatedAccessors@handler@_V1@sycl@@AEAAXXZ ?setHandlerKernelBundle@handler@_V1@sycl@@AEAAXAEBV?$shared_ptr@Vkernel_bundle_impl@detail@_V1@sycl@@@std@@@Z ?setHandlerKernelBundle@handler@_V1@sycl@@AEAAXVkernel@23@@Z ?setKernelCacheConfig@handler@_V1@sycl@@AEAAXW4_pi_kernel_cache_config@@@Z +?setKernelClusterLaunch@handler@_V1@sycl@@AEAAXV?$range@$02@23@H@Z ?setKernelIsCooperative@handler@_V1@sycl@@AEAAX_N@Z ?setLocalAccessorArgHelper@handler@_V1@sycl@@AEAAXHAEAVLocalAccessorBaseHost@detail@23@@Z +?setNDRangeDescriptorPadded@handler@_V1@sycl@@AEAAXV?$range@$02@23@0V?$id@$02@23@H@Z +?setNDRangeDescriptorPadded@handler@_V1@sycl@@AEAAXV?$range@$02@23@V?$id@$02@23@H@Z +?setNDRangeDescriptorPadded@handler@_V1@sycl@@AEAAXV?$range@$02@23@_NH@Z ?setNDRangeUsed@handler@_V1@sycl@@AEAAX_N@Z ?setStateExplicitKernelBundle@handler@_V1@sycl@@AEAAXXZ ?setStateSpecConstSet@handler@_V1@sycl@@AEAAXXZ -?setUserFacingNodeType@handler@_V1@sycl@@AEAAXW4node_type@experimental@oneapi@ext@23@@Z -?setNDRangeDescriptorPadded@handler@_V1@sycl@@AEAAXV?$range@$02@23@V?$id@$02@23@H@Z -?setKernelClusterLaunch@handler@_V1@sycl@@AEAAXV?$range@$02@23@H@Z -?setArgsToAssociatedAccessors@handler@_V1@sycl@@AEAAXXZ ?setType@handler@_V1@sycl@@AEAAXW4CGType@detail@23@@Z -?setNDRangeDescriptorPadded@handler@_V1@sycl@@AEAAXV?$range@$02@23@_NH@Z -?SetHostTask@handler@_V1@sycl@@AEAAX$$QEAV?$function@$$A6AXVinterop_handle@_V1@sycl@@@Z@std@@@Z -?SetHostTask@handler@_V1@sycl@@AEAAX$$QEAV?$function@$$A6AXXZ@std@@@Z -?setNDRangeDescriptorPadded@handler@_V1@sycl@@AEAAXV?$range@$02@23@0V?$id@$02@23@H@Z +?setUserFacingNodeType@handler@_V1@sycl@@AEAAXW4node_type@experimental@oneapi@ext@23@@Z ?set_access_mode@experimental@oneapi@ext@_V1@sycl@@YAXPEBX_KW4address_access_mode@12345@AEBVcontext@45@@Z ?set_arg@handler@_V1@sycl@@QEAAXH$$QEAVraw_kernel_arg@experimental@oneapi@ext@23@@Z ?set_final_data_internal@buffer_plain@detail@_V1@sycl@@IEAAXAEBV?$function@$$A6AXAEBV?$function@$$A6AXPEAX@Z@std@@@Z@std@@@Z From e219959f17a5d2eedf52d0c5312ff83050581566 Mon Sep 17 00:00:00 2001 From: Duncan Brawley Date: Fri, 19 Jul 2024 18:12:49 +0100 Subject: [PATCH 18/27] Update UR commit --- sycl/plugins/unified_runtime/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sycl/plugins/unified_runtime/CMakeLists.txt b/sycl/plugins/unified_runtime/CMakeLists.txt index d11c13a7d2811..2f27a20ce3f44 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -100,12 +100,12 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) endfunction() set(UNIFIED_RUNTIME_REPO "https://github.com/DBDuncan/unified-runtime.git") - # commit 8270ca319f76ff7c0bcf04d0e2e7ec0ac8b2efec + # commit 706e87b056cb68cca82eade90c5fe5cc7f9b7416 # Author: Sean Stirling # Date: Tue, 4 Jun 2024 13:52:21 +0100 # [PATCH] [Bindless][Exp] Rename interop related structs/funcs with # "external" - set(UNIFIED_RUNTIME_TAG 8270ca319f76ff7c0bcf04d0e2e7ec0ac8b2efec) + set(UNIFIED_RUNTIME_TAG 706e87b056cb68cca82eade90c5fe5cc7f9b7416) fetch_adapter_source(level_zero ${UNIFIED_RUNTIME_REPO} From 78f47671b2a2b4a153a745d0d78af692f0d11bbc Mon Sep 17 00:00:00 2001 From: Duncan Brawley Date: Mon, 22 Jul 2024 15:46:48 +0100 Subject: [PATCH 19/27] Update UR commit --- sycl/plugins/unified_runtime/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sycl/plugins/unified_runtime/CMakeLists.txt b/sycl/plugins/unified_runtime/CMakeLists.txt index 2f27a20ce3f44..a41d100a2de75 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -100,12 +100,12 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) endfunction() set(UNIFIED_RUNTIME_REPO "https://github.com/DBDuncan/unified-runtime.git") - # commit 706e87b056cb68cca82eade90c5fe5cc7f9b7416 + # commit 8bf7f4865382bab2ce76873c63625845dc438b03 # Author: Sean Stirling # Date: Tue, 4 Jun 2024 13:52:21 +0100 # [PATCH] [Bindless][Exp] Rename interop related structs/funcs with # "external" - set(UNIFIED_RUNTIME_TAG 706e87b056cb68cca82eade90c5fe5cc7f9b7416) + set(UNIFIED_RUNTIME_TAG 8bf7f4865382bab2ce76873c63625845dc438b03) fetch_adapter_source(level_zero ${UNIFIED_RUNTIME_REPO} From 996c2de1d5b8150e9a3e4c199e043ef50f383358 Mon Sep 17 00:00:00 2001 From: Duncan Brawley Date: Mon, 22 Jul 2024 15:58:24 +0100 Subject: [PATCH 20/27] Update UR commit to fix formatting mistake --- sycl/plugins/unified_runtime/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sycl/plugins/unified_runtime/CMakeLists.txt b/sycl/plugins/unified_runtime/CMakeLists.txt index a41d100a2de75..7951d9317398f 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -100,12 +100,12 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) endfunction() set(UNIFIED_RUNTIME_REPO "https://github.com/DBDuncan/unified-runtime.git") - # commit 8bf7f4865382bab2ce76873c63625845dc438b03 + # commit 9d6b7d8cf02487d0242455382109200dfae10194 # Author: Sean Stirling # Date: Tue, 4 Jun 2024 13:52:21 +0100 # [PATCH] [Bindless][Exp] Rename interop related structs/funcs with # "external" - set(UNIFIED_RUNTIME_TAG 8bf7f4865382bab2ce76873c63625845dc438b03) + set(UNIFIED_RUNTIME_TAG 9d6b7d8cf02487d0242455382109200dfae10194) fetch_adapter_source(level_zero ${UNIFIED_RUNTIME_REPO} From 7f7579ef780be84f0c1a94185e603c7adfe96cbb Mon Sep 17 00:00:00 2001 From: Duncan Brawley Date: Wed, 24 Jul 2024 12:50:23 +0100 Subject: [PATCH 21/27] Update UR commit --- sycl/plugins/unified_runtime/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sycl/plugins/unified_runtime/CMakeLists.txt b/sycl/plugins/unified_runtime/CMakeLists.txt index 7951d9317398f..65f1789123255 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -100,12 +100,12 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) endfunction() set(UNIFIED_RUNTIME_REPO "https://github.com/DBDuncan/unified-runtime.git") - # commit 9d6b7d8cf02487d0242455382109200dfae10194 + # commit 9e875039ecef963d9ff741623a39b1319e5397c7 # Author: Sean Stirling # Date: Tue, 4 Jun 2024 13:52:21 +0100 # [PATCH] [Bindless][Exp] Rename interop related structs/funcs with # "external" - set(UNIFIED_RUNTIME_TAG 9d6b7d8cf02487d0242455382109200dfae10194) + set(UNIFIED_RUNTIME_TAG 9e875039ecef963d9ff741623a39b1319e5397c7) fetch_adapter_source(level_zero ${UNIFIED_RUNTIME_REPO} From 54084b4be961d71283316efc4e14ffc1edc93053 Mon Sep 17 00:00:00 2001 From: Duncan Brawley Date: Wed, 24 Jul 2024 12:50:55 +0100 Subject: [PATCH 22/27] Update test variable naming to use 'external' instead of 'interop' --- sycl/test-e2e/bindless_images/image_get_info.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sycl/test-e2e/bindless_images/image_get_info.cpp b/sycl/test-e2e/bindless_images/image_get_info.cpp index 7bee9ebba2ae6..6e5f170c08356 100644 --- a/sycl/test-e2e/bindless_images/image_get_info.cpp +++ b/sycl/test-e2e/bindless_images/image_get_info.cpp @@ -129,15 +129,15 @@ int main() { #endif // Extension: query for bindless image interop support -- device aspects - bool interopMemoryImportSupport = + bool externalMemoryImportSupport = dev.has(sycl::aspect::ext_oneapi_external_memory_import); - bool interopSemaphoreImportSupport = + bool externalSemaphoreImportSupport = dev.has(sycl::aspect::ext_oneapi_external_semaphore_import); #ifdef VERBOSE_PRINT - std::cout << "interopMemoryImportSupport: " << interopMemoryImportSupport - << "\ninteropSemaphoreImportSupport: " - << interopSemaphoreImportSupport << "\n"; + std::cout << "externalMemoryImportSupport: " << externalMemoryImportSupport + << "\nexternalSemaphoreImportSupport: " + << externalSemaphoreImportSupport << "\n"; #endif // Extension: query for bindless image array support - device aspect From 75e1507e0debc36baae1cbaf1b7b51450ddef9fb Mon Sep 17 00:00:00 2001 From: Duncan Brawley Date: Wed, 24 Jul 2024 16:50:27 +0100 Subject: [PATCH 23/27] Rerun CI From 6f3ff20f6a52825cb270a47a377031a1a2024179 Mon Sep 17 00:00:00 2001 From: Duncan Brawley Date: Wed, 24 Jul 2024 17:04:19 +0100 Subject: [PATCH 24/27] Update UR commit --- sycl/plugins/unified_runtime/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sycl/plugins/unified_runtime/CMakeLists.txt b/sycl/plugins/unified_runtime/CMakeLists.txt index 65f1789123255..30288bfc2c2ce 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -100,12 +100,12 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) endfunction() set(UNIFIED_RUNTIME_REPO "https://github.com/DBDuncan/unified-runtime.git") - # commit 9e875039ecef963d9ff741623a39b1319e5397c7 + # commit 572c22f8fc7297eeca66ec47554027cf8b17abf4 # Author: Sean Stirling # Date: Tue, 4 Jun 2024 13:52:21 +0100 # [PATCH] [Bindless][Exp] Rename interop related structs/funcs with # "external" - set(UNIFIED_RUNTIME_TAG 9e875039ecef963d9ff741623a39b1319e5397c7) + set(UNIFIED_RUNTIME_TAG 572c22f8fc7297eeca66ec47554027cf8b17abf4) fetch_adapter_source(level_zero ${UNIFIED_RUNTIME_REPO} From acc086e5e5f3f0c0a9aacfc9c2431eb60f9ec4d9 Mon Sep 17 00:00:00 2001 From: Duncan Brawley Date: Wed, 24 Jul 2024 17:27:10 +0100 Subject: [PATCH 25/27] Update UR commit --- sycl/plugins/unified_runtime/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sycl/plugins/unified_runtime/CMakeLists.txt b/sycl/plugins/unified_runtime/CMakeLists.txt index 30288bfc2c2ce..f4c28c002ff64 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -100,12 +100,12 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) endfunction() set(UNIFIED_RUNTIME_REPO "https://github.com/DBDuncan/unified-runtime.git") - # commit 572c22f8fc7297eeca66ec47554027cf8b17abf4 + # commit 2987e19af8a276dd6368a2cc3a5b367b6c1e03c4 # Author: Sean Stirling # Date: Tue, 4 Jun 2024 13:52:21 +0100 # [PATCH] [Bindless][Exp] Rename interop related structs/funcs with # "external" - set(UNIFIED_RUNTIME_TAG 572c22f8fc7297eeca66ec47554027cf8b17abf4) + set(UNIFIED_RUNTIME_TAG 2987e19af8a276dd6368a2cc3a5b367b6c1e03c4) fetch_adapter_source(level_zero ${UNIFIED_RUNTIME_REPO} From d5154334f746604325e99851cb135d209b9d8c54 Mon Sep 17 00:00:00 2001 From: Duncan Brawley Date: Mon, 29 Jul 2024 14:12:36 +0100 Subject: [PATCH 26/27] Update UR commit --- sycl/cmake/modules/FetchUnifiedRuntime.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sycl/cmake/modules/FetchUnifiedRuntime.cmake b/sycl/cmake/modules/FetchUnifiedRuntime.cmake index 0d5ec73b3192e..74550c0f56951 100644 --- a/sycl/cmake/modules/FetchUnifiedRuntime.cmake +++ b/sycl/cmake/modules/FetchUnifiedRuntime.cmake @@ -113,12 +113,12 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) endfunction() set(UNIFIED_RUNTIME_REPO "https://github.com/DBDuncan/unified-runtime.git") - # commit 2987e19af8a276dd6368a2cc3a5b367b6c1e03c4 + # commit 3d9c39977b4aed390e3d8c8f978f28e89a582164 # Author: Sean Stirling # Date: Tue, 4 Jun 2024 13:52:21 +0100 # [PATCH] [Bindless][Exp] Rename interop related structs/funcs with # "external" - set(UNIFIED_RUNTIME_TAG 2987e19af8a276dd6368a2cc3a5b367b6c1e03c4) + set(UNIFIED_RUNTIME_TAG 3d9c39977b4aed390e3d8c8f978f28e89a582164) set(UMF_BUILD_EXAMPLES OFF CACHE INTERNAL "EXAMPLES") # Due to the use of dependentloadflag and no installer for UMF and hwloc we need From fd54d861dfc2fe8941e8acf75370da3f604e6ae1 Mon Sep 17 00:00:00 2001 From: Duncan Brawley Date: Mon, 29 Jul 2024 17:04:25 +0100 Subject: [PATCH 27/27] Update UR commit --- 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 0e1dd2f24801c..6da3439a84003 100644 --- a/sycl/cmake/modules/FetchUnifiedRuntime.cmake +++ b/sycl/cmake/modules/FetchUnifiedRuntime.cmake @@ -115,13 +115,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/DBDuncan/unified-runtime.git") - # commit 3d9c39977b4aed390e3d8c8f978f28e89a582164 - # Author: Sean Stirling - # Date: Tue, 4 Jun 2024 13:52:21 +0100 - # [PATCH] [Bindless][Exp] Rename interop related structs/funcs with - # "external" - set(UNIFIED_RUNTIME_TAG 3d9c39977b4aed390e3d8c8f978f28e89a582164) + set(UNIFIED_RUNTIME_REPO "https://github.com/oneapi-src/unified-runtime.git") + # commit bc1a28ede0df7f837047b632e00437587672c134 + # Author: Omar Ahmed + # Date: Mon Jul 29 16:44:58 2024 +0100 + # Merge pull request #1819 from DBDuncan/sean/rename-interop-to-external + # [Bindless][Exp] Rename interop related structs/funcs with "external" + set(UNIFIED_RUNTIME_TAG bc1a28ede0df7f837047b632e00437587672c134) set(UMF_BUILD_EXAMPLES OFF CACHE INTERNAL "EXAMPLES") # Due to the use of dependentloadflag and no installer for UMF and hwloc we need