Skip to content

Commit 59896f1

Browse files
committed
Fix urKernelCreateWithNativeHandle to properly init L0 before use
Signed-off-by: Neil R. Spruit <[email protected]>
1 parent 49b0315 commit 59896f1

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

cmake/FetchLevelZero.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ if (NOT DEFINED LEVEL_ZERO_LIBRARY OR NOT DEFINED LEVEL_ZERO_INCLUDE_DIR)
4343
set(UR_LEVEL_ZERO_LOADER_REPO "https://github.com/nrspruit/level-zero.git")
4444
endif()
4545
if (UR_LEVEL_ZERO_LOADER_TAG STREQUAL "")
46-
set(UR_LEVEL_ZERO_LOADER_TAG aec89b8c7244ce03306127a4c72ce554aaa19143)
46+
set(UR_LEVEL_ZERO_LOADER_TAG 399cd159d00f08685f1a1281fec4ea732d8021cb)
4747
endif()
4848

4949
# Disable due to a bug https://github.com/oneapi-src/level-zero/issues/104

test/adapters/level_zero/urKernelCreateWithNativeHandle.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ TEST_P(urLevelZeroKernelNativeHandleTest, OwnedHandleRelease) {
2424

2525
auto kernel_name =
2626
uur::KernelsEnvironment::instance->GetEntryPointNames("foo")[0];
27-
27+
ze_init_driver_type_desc_t desc = {ZE_STRUCTURE_TYPE_INIT_DRIVER_TYPE_DESC};
28+
desc.flags = ZE_INIT_DRIVER_TYPE_FLAG_GPU;
29+
desc.pNext = nullptr;
30+
uint32_t pCount = 0;
31+
zeInitDrivers(&pCount, nullptr, &desc);
2832
ze_module_desc_t moduleDesc{};
2933
moduleDesc.stype = ZE_STRUCTURE_TYPE_MODULE_DESC;
3034
moduleDesc.format = ZE_MODULE_FORMAT_IL_SPIRV;

0 commit comments

Comments
 (0)