From e777ffb1f39e7e1829e71663ab7ff6c5fb10b2a9 Mon Sep 17 00:00:00 2001 From: "Neil R. Spruit" Date: Mon, 3 Nov 2025 09:31:20 -0800 Subject: [PATCH] [UR][CI] Update to v1.25.2 L0 with fixed L0 api symbols - Due to symbol conflicts in the L0 gpu driver, zeCommandListAppendLaunchKernelWithArguments can only be used from the spec definition and the driver exp cannot be used as of the update to v1.14 supported symbols. Signed-off-by: Neil R. Spruit --- devops/dependencies.json | 6 +++--- unified-runtime/cmake/FetchLevelZero.cmake | 4 ++-- .../source/adapters/level_zero/platform.cpp | 17 ++++++++--------- .../source/adapters/level_zero/platform.hpp | 6 +++--- .../level_zero/v2/command_list_manager.cpp | 2 +- 5 files changed, 17 insertions(+), 18 deletions(-) diff --git a/devops/dependencies.json b/devops/dependencies.json index 47cf5c9335792..ac9447c2bdc2e 100644 --- a/devops/dependencies.json +++ b/devops/dependencies.json @@ -19,9 +19,9 @@ "root": "{DEPS_ROOT}/opencl/runtime/linux/oclgpu" }, "level_zero": { - "github_tag": "v1.24.3", - "version": "v1.24.3", - "url": "https://github.com/oneapi-src/level-zero/releases/tag/v1.24.3", + "github_tag": "v1.25.2", + "version": "v1.25.2", + "url": "https://github.com/oneapi-src/level-zero/releases/tag/v1.25.2", "root": "{DEPS_ROOT}/opencl/runtime/linux/oclgpu" }, "tbb": { diff --git a/unified-runtime/cmake/FetchLevelZero.cmake b/unified-runtime/cmake/FetchLevelZero.cmake index 9919032fffbca..36711da0b93cd 100644 --- a/unified-runtime/cmake/FetchLevelZero.cmake +++ b/unified-runtime/cmake/FetchLevelZero.cmake @@ -13,7 +13,7 @@ find_package(PkgConfig QUIET) # so try using that to find the install and if it's not available # just try to search for the path. if(PkgConfig_FOUND) - pkg_check_modules(level-zero level-zero>=1.25.0) + pkg_check_modules(level-zero level-zero>=1.25.2) if(level-zero_FOUND) set(LEVEL_ZERO_INCLUDE_DIR "${level-zero_INCLUDEDIR}/level_zero") set(LEVEL_ZERO_LIBRARY_SRC "${level-zero_LIBDIR}") @@ -50,7 +50,7 @@ if(NOT LEVEL_ZERO_LIB_NAME AND NOT LEVEL_ZERO_LIBRARY) set(UR_LEVEL_ZERO_LOADER_REPO "https://github.com/oneapi-src/level-zero.git") # Remember to update the pkg_check_modules minimum version above when updating the # clone tag - set(UR_LEVEL_ZERO_LOADER_TAG v1.25.0) + set(UR_LEVEL_ZERO_LOADER_TAG v1.25.2) # Disable due to a bug https://github.com/oneapi-src/level-zero/issues/104 set(CMAKE_INCLUDE_CURRENT_DIR OFF) diff --git a/unified-runtime/source/adapters/level_zero/platform.cpp b/unified-runtime/source/adapters/level_zero/platform.cpp index 949cdc9d9f0dd..b58ebb0ba7d12 100644 --- a/unified-runtime/source/adapters/level_zero/platform.cpp +++ b/unified-runtime/source/adapters/level_zero/platform.cpp @@ -526,15 +526,14 @@ ur_result_t ur_platform_handle_t_::initialize() { ZeMemGetPitchFor2dImageExt.Supported = ZeMemGetPitchFor2dImageExt.zeMemGetPitchFor2dImage != nullptr; - ZE_CALL_NOCHECK(zeDriverGetExtensionFunctionAddress, - (ZeDriver, "zeCommandListAppendLaunchKernelWithArguments", - reinterpret_cast( - &ZeCommandListAppendLaunchKernelWithArgumentsExt - .zeCommandListAppendLaunchKernelWithArguments))); - - ZeCommandListAppendLaunchKernelWithArgumentsExt.Supported = - ZeCommandListAppendLaunchKernelWithArgumentsExt - .zeCommandListAppendLaunchKernelWithArguments != nullptr; + if (this->isDriverVersionNewerOrSimilar(1, 14, 36035)) { + ZeCommandListAppendLaunchKernelWithArgumentsExt + .zeCommandListAppendLaunchKernelWithArgumentsFunctionPtr = + zeCommandListAppendLaunchKernelWithArguments; + ZeCommandListAppendLaunchKernelWithArgumentsExt.Supported = true; + } else { + ZeCommandListAppendLaunchKernelWithArgumentsExt.Supported = false; + } // Check if the driver supports zeCommandListAppendLaunchKernelWithArguments() // with cooperative mode (version >= 1.6.35005) diff --git a/unified-runtime/source/adapters/level_zero/platform.hpp b/unified-runtime/source/adapters/level_zero/platform.hpp index 16689a7c58167..022e81f5d53b7 100644 --- a/unified-runtime/source/adapters/level_zero/platform.hpp +++ b/unified-runtime/source/adapters/level_zero/platform.hpp @@ -166,9 +166,9 @@ struct ur_platform_handle_t_ : ur::handle_base, struct ZeCommandListAppendLaunchKernelWithArgumentsExtension { bool Supported = false; bool DriverSupportsCooperativeKernelLaunchWithArgs = false; - ze_result_t (*zeCommandListAppendLaunchKernelWithArguments)( + ze_result_t (*zeCommandListAppendLaunchKernelWithArgumentsFunctionPtr)( ze_command_list_handle_t, ze_kernel_handle_t, const ze_group_count_t, - const ze_group_size_t, void **, void *, ze_event_handle_t, uint32_t, - ze_event_handle_t *); + const ze_group_size_t, void **, const void *, ze_event_handle_t, + uint32_t, ze_event_handle_t *); } ZeCommandListAppendLaunchKernelWithArgumentsExt; }; 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 21fc6b562d6fd..acbea577bae06 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 @@ -178,7 +178,7 @@ ur_result_t ur_command_list_manager::appendKernelLaunchLocked( ze_group_size_t groupSize = {WG[0], WG[1], WG[2]}; ZE2UR_CALL(hContext->getPlatform() ->ZeCommandListAppendLaunchKernelWithArgumentsExt - .zeCommandListAppendLaunchKernelWithArguments, + .zeCommandListAppendLaunchKernelWithArgumentsFunctionPtr, (getZeCommandList(), hZeKernel, zeThreadGroupDimensions, groupSize, hKernel->kernelArgs.data(), pNext, zeSignalEvent, waitListView.num, waitListView.handles));