From c9a2557c09348996bc57b9a18d1a5b31e4045710 Mon Sep 17 00:00:00 2001 From: "Neil R. Spruit" Date: Tue, 19 Aug 2025 11:42:28 -0700 Subject: [PATCH] [UR][L0] Remove Driver Exp Implementation of External Semaphore Signed-off-by: Neil R. Spruit --- .../source/adapters/level_zero/image.cpp | 98 ++-------- .../adapters/level_zero/image_common.cpp | 176 ++++++------------ .../source/adapters/level_zero/platform.cpp | 40 ---- .../source/adapters/level_zero/platform.hpp | 22 --- .../level_zero/v2/command_list_manager.cpp | 6 +- 5 files changed, 73 insertions(+), 269 deletions(-) diff --git a/unified-runtime/source/adapters/level_zero/image.cpp b/unified-runtime/source/adapters/level_zero/image.cpp index 414b9bba3d6d9..33b49c0665467 100644 --- a/unified-runtime/source/adapters/level_zero/image.cpp +++ b/unified-runtime/source/adapters/level_zero/image.cpp @@ -136,44 +136,15 @@ ur_result_t urBindlessImagesWaitExternalSemaphoreExp( const auto &ZeCommandList = CommandList->first; const auto &WaitList = (*Event)->WaitList; - if (UrPlatform->ZeExternalSemaphoreExt.LoaderExtension) { - ze_external_semaphore_wait_params_ext_t WaitParams = { - ZE_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_WAIT_PARAMS_EXT, nullptr, 0}; - WaitParams.value = hasValue ? waitValue : 0; - ze_external_semaphore_ext_handle_t hExtSemaphore = - reinterpret_cast(hSemaphore); - ZE2UR_CALL(UrPlatform->ZeExternalSemaphoreExt - .zexCommandListAppendWaitExternalSemaphoresExp, - (ZeCommandList, 1, &hExtSemaphore, &WaitParams, ZeEvent, - WaitList.Length, WaitList.ZeEventList)); - } else { - ze_command_list_handle_t translatedCommandList; - ZE2UR_CALL(zelLoaderTranslateHandle, - (ZEL_HANDLE_COMMAND_LIST, ZeCommandList, - (void **)&translatedCommandList)); - ze_event_handle_t translatedEvent = ZeEvent; - if (ZeEvent) { - ZE2UR_CALL(zelLoaderTranslateHandle, - (ZEL_HANDLE_EVENT, ZeEvent, (void **)&translatedEvent)); - } - std::vector EventHandles(WaitList.Length + 1, nullptr); - if (WaitList.Length > 0) { - for (size_t i = 0; i < WaitList.Length; i++) { - ze_event_handle_t ZeEvent = WaitList.ZeEventList[i]; - ZE2UR_CALL(zelLoaderTranslateHandle, - (ZEL_HANDLE_EVENT, ZeEvent, (void **)&EventHandles[i + 1])); - } - } - ze_intel_external_semaphore_wait_params_exp_t WaitParams = { - ZE_INTEL_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_WAIT_PARAMS_EXP, nullptr, 0}; - WaitParams.value = hasValue ? waitValue : 0; - const ze_intel_external_semaphore_exp_handle_t hExtSemaphore = - reinterpret_cast(hSemaphore); - ZE2UR_CALL(UrPlatform->ZeExternalSemaphoreExt - .zexExpCommandListAppendWaitExternalSemaphoresExp, - (translatedCommandList, 1, &hExtSemaphore, &WaitParams, - translatedEvent, WaitList.Length, EventHandles.data())); - } + ze_external_semaphore_wait_params_ext_t WaitParams = { + ZE_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_WAIT_PARAMS_EXT, nullptr, 0}; + WaitParams.value = hasValue ? waitValue : 0; + ze_external_semaphore_ext_handle_t hExtSemaphore = + reinterpret_cast(hSemaphore); + ZE2UR_CALL(UrPlatform->ZeExternalSemaphoreExt + .zexCommandListAppendWaitExternalSemaphoresExp, + (ZeCommandList, 1, &hExtSemaphore, &WaitParams, ZeEvent, + WaitList.Length, WaitList.ZeEventList)); return UR_RESULT_SUCCESS; } @@ -221,47 +192,16 @@ ur_result_t urBindlessImagesSignalExternalSemaphoreExp( const auto &ZeCommandList = CommandList->first; const auto &WaitList = (*Event)->WaitList; - if (UrPlatform->ZeExternalSemaphoreExt.LoaderExtension) { - ze_external_semaphore_signal_params_ext_t SignalParams = { - ZE_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_EXT, nullptr, 0}; - SignalParams.value = hasValue ? signalValue : 0; - ze_external_semaphore_ext_handle_t hExtSemaphore = - reinterpret_cast(hSemaphore); - - ZE2UR_CALL(UrPlatform->ZeExternalSemaphoreExt - .zexCommandListAppendSignalExternalSemaphoresExp, - (ZeCommandList, 1, &hExtSemaphore, &SignalParams, ZeEvent, - WaitList.Length, WaitList.ZeEventList)); - } else { - ze_intel_external_semaphore_signal_params_exp_t SignalParams = { - ZE_INTEL_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_EXP, nullptr, - 0}; - SignalParams.value = hasValue ? signalValue : 0; - const ze_intel_external_semaphore_exp_handle_t hExtSemaphore = - reinterpret_cast(hSemaphore); - - ze_command_list_handle_t translatedCommandList; - ZE2UR_CALL(zelLoaderTranslateHandle, - (ZEL_HANDLE_COMMAND_LIST, ZeCommandList, - (void **)&translatedCommandList)); - ze_event_handle_t translatedEvent = ZeEvent; - if (ZeEvent) { - ZE2UR_CALL(zelLoaderTranslateHandle, - (ZEL_HANDLE_EVENT, ZeEvent, (void **)&translatedEvent)); - } - std::vector EventHandles(WaitList.Length + 1, nullptr); - if (WaitList.Length > 0) { - for (size_t i = 0; i < WaitList.Length; i++) { - ze_event_handle_t ZeEvent = WaitList.ZeEventList[i]; - ZE2UR_CALL(zelLoaderTranslateHandle, - (ZEL_HANDLE_EVENT, ZeEvent, (void **)&EventHandles[i + 1])); - } - } - ZE2UR_CALL(UrPlatform->ZeExternalSemaphoreExt - .zexExpCommandListAppendSignalExternalSemaphoresExp, - (translatedCommandList, 1, &hExtSemaphore, &SignalParams, - translatedEvent, WaitList.Length, EventHandles.data())); - } + ze_external_semaphore_signal_params_ext_t SignalParams = { + ZE_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_EXT, nullptr, 0}; + SignalParams.value = hasValue ? signalValue : 0; + ze_external_semaphore_ext_handle_t hExtSemaphore = + reinterpret_cast(hSemaphore); + + ZE2UR_CALL(UrPlatform->ZeExternalSemaphoreExt + .zexCommandListAppendSignalExternalSemaphoresExp, + (ZeCommandList, 1, &hExtSemaphore, &SignalParams, ZeEvent, + WaitList.Length, WaitList.ZeEventList)); return UR_RESULT_SUCCESS; } diff --git a/unified-runtime/source/adapters/level_zero/image_common.cpp b/unified-runtime/source/adapters/level_zero/image_common.cpp index 9b76788b6a65e..531a270e9fdc5 100644 --- a/unified-runtime/source/adapters/level_zero/image_common.cpp +++ b/unified-runtime/source/adapters/level_zero/image_common.cpp @@ -1356,126 +1356,60 @@ ur_result_t urBindlessImagesImportExternalSemaphoreExp( " {} function not supported!", __FUNCTION__); return UR_RESULT_ERROR_UNSUPPORTED_FEATURE; } - if (UrPlatform->ZeExternalSemaphoreExt.LoaderExtension) { - ze_external_semaphore_ext_desc_t SemDesc = { - ZE_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_EXT_DESC, nullptr, - ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_OPAQUE_FD}; - ze_external_semaphore_ext_handle_t ExtSemaphoreHandle; - ze_external_semaphore_fd_ext_desc_t FDExpDesc = { - ZE_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_FD_EXT_DESC, nullptr, 0}; - ze_external_semaphore_win32_ext_desc_t Win32ExpDesc = { - ZE_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_WIN32_EXT_DESC, nullptr, nullptr, - nullptr}; - void *pNext = const_cast(pExternalSemaphoreDesc->pNext); - while (pNext != nullptr) { - const ur_base_desc_t *BaseDesc = - static_cast(pNext); - if (BaseDesc->stype == UR_STRUCTURE_TYPE_EXP_FILE_DESCRIPTOR) { - auto FileDescriptor = - static_cast(pNext); - FDExpDesc.fd = FileDescriptor->fd; - SemDesc.pNext = &FDExpDesc; - switch (semHandleType) { - case UR_EXP_EXTERNAL_SEMAPHORE_TYPE_OPAQUE_FD: - SemDesc.flags = ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_OPAQUE_FD; - break; - case UR_EXP_EXTERNAL_SEMAPHORE_TYPE_TIMELINE_FD: - SemDesc.flags = - ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_VK_TIMELINE_SEMAPHORE_FD; - break; - default: - return UR_RESULT_ERROR_INVALID_VALUE; - } - } else if (BaseDesc->stype == UR_STRUCTURE_TYPE_EXP_WIN32_HANDLE) { - SemDesc.pNext = &Win32ExpDesc; - auto Win32Handle = static_cast(pNext); - switch (semHandleType) { - case UR_EXP_EXTERNAL_SEMAPHORE_TYPE_WIN32_NT: - SemDesc.flags = ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_OPAQUE_WIN32; - break; - case UR_EXP_EXTERNAL_SEMAPHORE_TYPE_WIN32_NT_DX12_FENCE: - SemDesc.flags = ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_D3D12_FENCE; - break; - case UR_EXP_EXTERNAL_SEMAPHORE_TYPE_TIMELINE_WIN32_NT: - SemDesc.flags = - ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_VK_TIMELINE_SEMAPHORE_WIN32; - break; - default: - return UR_RESULT_ERROR_INVALID_VALUE; - } - Win32ExpDesc.handle = Win32Handle->handle; + ze_external_semaphore_ext_desc_t SemDesc = { + ZE_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_EXT_DESC, nullptr, + ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_OPAQUE_FD}; + ze_external_semaphore_ext_handle_t ExtSemaphoreHandle; + ze_external_semaphore_fd_ext_desc_t FDExpDesc = { + ZE_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_FD_EXT_DESC, nullptr, 0}; + ze_external_semaphore_win32_ext_desc_t Win32ExpDesc = { + ZE_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_WIN32_EXT_DESC, nullptr, nullptr, + nullptr}; + void *pNext = const_cast(pExternalSemaphoreDesc->pNext); + while (pNext != nullptr) { + const ur_base_desc_t *BaseDesc = static_cast(pNext); + if (BaseDesc->stype == UR_STRUCTURE_TYPE_EXP_FILE_DESCRIPTOR) { + auto FileDescriptor = + static_cast(pNext); + FDExpDesc.fd = FileDescriptor->fd; + SemDesc.pNext = &FDExpDesc; + switch (semHandleType) { + case UR_EXP_EXTERNAL_SEMAPHORE_TYPE_OPAQUE_FD: + SemDesc.flags = ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_OPAQUE_FD; + break; + case UR_EXP_EXTERNAL_SEMAPHORE_TYPE_TIMELINE_FD: + SemDesc.flags = ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_VK_TIMELINE_SEMAPHORE_FD; + break; + default: + return UR_RESULT_ERROR_INVALID_VALUE; } - pNext = const_cast(BaseDesc->pNext); - } - ZE2UR_CALL(UrPlatform->ZeExternalSemaphoreExt.zexImportExternalSemaphoreExp, - (hDevice->ZeDevice, &SemDesc, &ExtSemaphoreHandle)); - *phExternalSemaphoreHandle = - (ur_exp_external_semaphore_handle_t)ExtSemaphoreHandle; - - } else { - ze_intel_external_semaphore_exp_desc_t SemDesc = { - ZE_INTEL_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_EXP_DESC, nullptr, - ZE_EXTERNAL_SEMAPHORE_EXP_FLAGS_OPAQUE_FD}; - ze_intel_external_semaphore_exp_handle_t ExtSemaphoreHandle; - ze_intel_external_semaphore_desc_fd_exp_desc_t FDExpDesc = { - ZE_INTEL_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_FD_EXP_DESC, nullptr, 0}; - _ze_intel_external_semaphore_win32_exp_desc_t Win32ExpDesc = { - ZE_INTEL_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_WIN32_EXP_DESC, nullptr, - nullptr, nullptr}; - void *pNext = const_cast(pExternalSemaphoreDesc->pNext); - while (pNext != nullptr) { - const ur_base_desc_t *BaseDesc = - static_cast(pNext); - if (BaseDesc->stype == UR_STRUCTURE_TYPE_EXP_FILE_DESCRIPTOR) { - auto FileDescriptor = - static_cast(pNext); - FDExpDesc.fd = FileDescriptor->fd; - SemDesc.pNext = &FDExpDesc; - switch (semHandleType) { - case UR_EXP_EXTERNAL_SEMAPHORE_TYPE_OPAQUE_FD: - SemDesc.flags = ZE_EXTERNAL_SEMAPHORE_EXP_FLAGS_OPAQUE_FD; - break; - case UR_EXP_EXTERNAL_SEMAPHORE_TYPE_TIMELINE_FD: - SemDesc.flags = ZE_EXTERNAL_SEMAPHORE_EXP_FLAGS_TIMELINE_SEMAPHORE_FD; - break; - default: - return UR_RESULT_ERROR_INVALID_VALUE; - } - } else if (BaseDesc->stype == UR_STRUCTURE_TYPE_EXP_WIN32_HANDLE) { - SemDesc.pNext = &Win32ExpDesc; - auto Win32Handle = static_cast(pNext); - switch (semHandleType) { - case UR_EXP_EXTERNAL_SEMAPHORE_TYPE_WIN32_NT: - SemDesc.flags = ZE_EXTERNAL_SEMAPHORE_EXP_FLAGS_OPAQUE_WIN32; - break; - case UR_EXP_EXTERNAL_SEMAPHORE_TYPE_WIN32_NT_DX12_FENCE: - SemDesc.flags = ZE_EXTERNAL_SEMAPHORE_EXP_FLAGS_D3D12_FENCE; - break; - case UR_EXP_EXTERNAL_SEMAPHORE_TYPE_TIMELINE_WIN32_NT: - SemDesc.flags = - ZE_EXTERNAL_SEMAPHORE_EXP_FLAGS_TIMELINE_SEMAPHORE_WIN32; - break; - default: - return UR_RESULT_ERROR_INVALID_VALUE; - } - Win32ExpDesc.handle = Win32Handle->handle; + } else if (BaseDesc->stype == UR_STRUCTURE_TYPE_EXP_WIN32_HANDLE) { + SemDesc.pNext = &Win32ExpDesc; + auto Win32Handle = static_cast(pNext); + switch (semHandleType) { + case UR_EXP_EXTERNAL_SEMAPHORE_TYPE_WIN32_NT: + SemDesc.flags = ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_OPAQUE_WIN32; + break; + case UR_EXP_EXTERNAL_SEMAPHORE_TYPE_WIN32_NT_DX12_FENCE: + SemDesc.flags = ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_D3D12_FENCE; + break; + case UR_EXP_EXTERNAL_SEMAPHORE_TYPE_TIMELINE_WIN32_NT: + SemDesc.flags = + ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_VK_TIMELINE_SEMAPHORE_WIN32; + break; + default: + return UR_RESULT_ERROR_INVALID_VALUE; } - pNext = const_cast(BaseDesc->pNext); + Win32ExpDesc.handle = Win32Handle->handle; } - - ze_device_handle_t translatedDevice; - ZE2UR_CALL(zelLoaderTranslateHandle, (ZEL_HANDLE_DEVICE, hDevice->ZeDevice, - (void **)&translatedDevice)); - // If the L0 loader is not aware of the extension, the handles need to be - // translated - ZE2UR_CALL( - UrPlatform->ZeExternalSemaphoreExt.zexExpImportExternalSemaphoreExp, - (translatedDevice, &SemDesc, &ExtSemaphoreHandle)); - - *phExternalSemaphoreHandle = - (ur_exp_external_semaphore_handle_t)ExtSemaphoreHandle; + pNext = const_cast(BaseDesc->pNext); } + ZE2UR_CALL(UrPlatform->ZeExternalSemaphoreExt.zexImportExternalSemaphoreExp, + (hDevice->ZeDevice, &SemDesc, &ExtSemaphoreHandle)); + *phExternalSemaphoreHandle = + (ur_exp_external_semaphore_handle_t)ExtSemaphoreHandle; + return UR_RESULT_SUCCESS; } @@ -1488,15 +1422,9 @@ ur_result_t urBindlessImagesReleaseExternalSemaphoreExp( " {} function not supported!", __FUNCTION__); return UR_RESULT_ERROR_UNSUPPORTED_FEATURE; } - if (UrPlatform->ZeExternalSemaphoreExt.LoaderExtension) { - ZE2UR_CALL( - UrPlatform->ZeExternalSemaphoreExt.zexDeviceReleaseExternalSemaphoreExp, - ((ze_external_semaphore_ext_handle_t)hExternalSemaphore)); - } else { - ZE2UR_CALL(UrPlatform->ZeExternalSemaphoreExt - .zexExpDeviceReleaseExternalSemaphoreExp, - ((ze_intel_external_semaphore_exp_handle_t)hExternalSemaphore)); - } + ZE2UR_CALL( + UrPlatform->ZeExternalSemaphoreExt.zexDeviceReleaseExternalSemaphoreExp, + ((ze_external_semaphore_ext_handle_t)hExternalSemaphore)); return UR_RESULT_SUCCESS; } diff --git a/unified-runtime/source/adapters/level_zero/platform.cpp b/unified-runtime/source/adapters/level_zero/platform.cpp index 32b89a6a72d5d..3eed2d8757233 100644 --- a/unified-runtime/source/adapters/level_zero/platform.cpp +++ b/unified-runtime/source/adapters/level_zero/platform.cpp @@ -218,7 +218,6 @@ ur_result_t ur_platform_handle_t_::initialize() { (ZeDriver, &Count, ZeExtensions.data())); bool MutableCommandListSpecExtensionSupported = false; - bool ZeIntelExternalSemaphoreExtensionSupported = false; bool ZeExternalSemaphoreExtensionSupported = false; bool ZeImmediateCommandListAppendExtensionFound = false; for (auto &extension : ZeExtensions) { @@ -260,13 +259,6 @@ ur_result_t ur_platform_handle_t_::initialize() { MutableCommandListSpecExtensionSupported = true; } } - // Check if extension is available for Exp External Sempahores - if (strncmp(extension.name, ZE_INTEL_EXTERNAL_SEMAPHORE_EXP_NAME, - strlen(ZE_INTEL_EXTERNAL_SEMAPHORE_EXP_NAME) + 1) == 0) { - if (extension.version == ZE_EXTERNAL_SEMAPHORE_EXP_VERSION_1_0) { - ZeIntelExternalSemaphoreExtensionSupported = true; - } - } // Check if extension is available for Spec External Sempahores if (strncmp(extension.name, ZE_EXTERNAL_SEMAPHORES_EXTENSION_NAME, strlen(ZE_EXTERNAL_SEMAPHORES_EXTENSION_NAME) + 1) == 0) { @@ -380,38 +372,6 @@ ur_result_t ur_platform_handle_t_::initialize() { .zexCommandListAppendSignalExternalSemaphoresExp != nullptr; ZeExternalSemaphoreExt.Supported |= ZeExternalSemaphoreExt.zexDeviceReleaseExternalSemaphoreExp != nullptr; - ZeExternalSemaphoreExt.LoaderExtension = true; - } else if (ZeIntelExternalSemaphoreExtensionSupported) { - ZeExternalSemaphoreExt.Supported |= - (ZE_CALL_NOCHECK( - zeDriverGetExtensionFunctionAddress, - (ZeDriver, "zeIntelDeviceImportExternalSemaphoreExp", - reinterpret_cast( - &ZeExternalSemaphoreExt.zexExpImportExternalSemaphoreExp))) == - 0); - ZeExternalSemaphoreExt.Supported |= - (ZE_CALL_NOCHECK( - zeDriverGetExtensionFunctionAddress, - (ZeDriver, "zeIntelCommandListAppendWaitExternalSemaphoresExp", - reinterpret_cast( - &ZeExternalSemaphoreExt - .zexExpCommandListAppendWaitExternalSemaphoresExp))) == - 0); - ZeExternalSemaphoreExt.Supported |= - (ZE_CALL_NOCHECK( - zeDriverGetExtensionFunctionAddress, - (ZeDriver, "zeIntelCommandListAppendSignalExternalSemaphoresExp", - reinterpret_cast( - &ZeExternalSemaphoreExt - .zexExpCommandListAppendSignalExternalSemaphoresExp))) == - 0); - ZeExternalSemaphoreExt.Supported |= - (ZE_CALL_NOCHECK( - zeDriverGetExtensionFunctionAddress, - (ZeDriver, "zeIntelDeviceReleaseExternalSemaphoreExp", - reinterpret_cast( - &ZeExternalSemaphoreExt - .zexExpDeviceReleaseExternalSemaphoreExp))) == 0); } // Check if mutable command list extension is supported and initialize diff --git a/unified-runtime/source/adapters/level_zero/platform.hpp b/unified-runtime/source/adapters/level_zero/platform.hpp index 5f767120cef14..2eec89ae86d2a 100644 --- a/unified-runtime/source/adapters/level_zero/platform.hpp +++ b/unified-runtime/source/adapters/level_zero/platform.hpp @@ -133,12 +133,6 @@ struct ur_platform_handle_t_ : ur::handle_base, // Structure with function pointers for External Semaphore Extension. struct ZeExternalSemaphoreExtension { bool Supported = false; - // If LoaderExtension is true, the L0 loader is aware of the External - // Semaphore Extension. If it is false, the extension has to be loaded - // directly from the driver using zeDriverGetExtensionFunctionAddress. If it - // is loaded directly from the driver, any handles passed to it must be - // translated using zelLoaderTranslateHandle. - bool LoaderExtension = false; // Spec Functions ze_pfnDeviceImportExternalSemaphoreExt_t zexImportExternalSemaphoreExp = nullptr; @@ -148,22 +142,6 @@ struct ur_platform_handle_t_ : ur::handle_base, zexCommandListAppendSignalExternalSemaphoresExp = nullptr; ze_pfnDeviceReleaseExternalSemaphoreExt_t zexDeviceReleaseExternalSemaphoreExp = nullptr; - // Driver EXP Functions - ze_result_t (*zexExpImportExternalSemaphoreExp)( - ze_device_handle_t, const ze_intel_external_semaphore_exp_desc_t *, - ze_intel_external_semaphore_exp_handle_t *); - ze_result_t (*zexExpCommandListAppendWaitExternalSemaphoresExp)( - ze_command_list_handle_t, unsigned int, - const ze_intel_external_semaphore_exp_handle_t *, - const ze_intel_external_semaphore_wait_params_exp_t *, - ze_event_handle_t, uint32_t, ze_event_handle_t *); - ze_result_t (*zexExpCommandListAppendSignalExternalSemaphoresExp)( - ze_command_list_handle_t, size_t, - const ze_intel_external_semaphore_exp_handle_t *, - const ze_intel_external_semaphore_signal_params_exp_t *, - ze_event_handle_t, uint32_t, ze_event_handle_t *); - ze_result_t (*zexExpDeviceReleaseExternalSemaphoreExp)( - ze_intel_external_semaphore_exp_handle_t); } ZeExternalSemaphoreExt; struct ZeCommandListImmediateAppendExtension { diff --git a/unified-runtime/source/adapters/level_zero/v2/command_list_manager.cpp b/unified-runtime/source/adapters/level_zero/v2/command_list_manager.cpp index 9f5fa7e31a07a..04ddafa1115be 100644 --- a/unified-runtime/source/adapters/level_zero/v2/command_list_manager.cpp +++ b/unified-runtime/source/adapters/level_zero/v2/command_list_manager.cpp @@ -911,8 +911,7 @@ ur_result_t ur_command_list_manager::bindlessImagesWaitExternalSemaphoreExp( uint64_t waitValue, uint32_t numEventsInWaitList, const ur_event_handle_t *phEventWaitList, ur_event_handle_t phEvent) { auto hPlatform = hContext->getPlatform(); - if (!hPlatform->ZeExternalSemaphoreExt.Supported == false || - !hPlatform->ZeExternalSemaphoreExt.LoaderExtension) { + if (!hPlatform->ZeExternalSemaphoreExt.Supported == false) { UR_LOG_LEGACY(ERR, logger::LegacyMessage("[UR][L0] {} function not supported!"), "{} function not supported!", __FUNCTION__); @@ -942,8 +941,7 @@ ur_result_t ur_command_list_manager::bindlessImagesSignalExternalSemaphoreExp( uint64_t signalValue, uint32_t numEventsInWaitList, const ur_event_handle_t *phEventWaitList, ur_event_handle_t phEvent) { auto hPlatform = hContext->getPlatform(); - if (!hPlatform->ZeExternalSemaphoreExt.Supported == false || - !hPlatform->ZeExternalSemaphoreExt.LoaderExtension) { + if (!hPlatform->ZeExternalSemaphoreExt.Supported == false) { UR_LOG_LEGACY(ERR, logger::LegacyMessage("[UR][L0] {} function not supported!"), "{} function not supported!", __FUNCTION__);