From b10c6b4703343816e4702632227c456e5ba256a3 Mon Sep 17 00:00:00 2001 From: Mateusz Jablonski Date: Thu, 20 Feb 2025 17:44:38 +0000 Subject: [PATCH] feature: add global driver dispatch as prework for DDI handles extension support As per DDI handles extension, global ddi table pointers will be included in every L0 handle. This change is focused on initialization of the global objects and reuse of them within zeGet...ProcAddrTable functions to avoid duplication of per component ddi table definitions Related-To: NEO-13121, NEO-13917 Signed-off-by: Mateusz Jablonski --- level_zero/CMakeLists.txt | 3 +- level_zero/api/core/ze_core_loader.cpp | 436 +++++++-------- level_zero/api/sysman/ze_sysman_loader.cpp | 356 ++++++------ level_zero/api/tools/ze_tools_loader.cpp | 164 +++--- level_zero/core/source/global_teardown.cpp | 7 + .../test/common/ult_config_listener_l0.cpp | 9 +- .../os_interface/global_teardown_tests.cpp | 20 + .../unit_tests/sources/loader/test_loader.cpp | 3 +- level_zero/ddi/CMakeLists.txt | 15 + level_zero/ddi/ze_ddi_tables.cpp | 529 ++++++++++++++++++ level_zero/ddi/ze_ddi_tables.h | 94 +++- .../experimental/source/tracing/tracing_imp.h | 3 +- .../unit_tests/sources/loader/test_loader.cpp | 3 +- 13 files changed, 1137 insertions(+), 505 deletions(-) create mode 100644 level_zero/ddi/CMakeLists.txt create mode 100644 level_zero/ddi/ze_ddi_tables.cpp diff --git a/level_zero/CMakeLists.txt b/level_zero/CMakeLists.txt index d16f0e6441..f29e0c1225 100644 --- a/level_zero/CMakeLists.txt +++ b/level_zero/CMakeLists.txt @@ -208,7 +208,6 @@ if(BUILD_WITH_L0) endif() include_directories(${CMAKE_CURRENT_SOURCE_DIR}/core/source/cmdlist${BRANCH_DIR_SUFFIX}) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/core/source/cmdlist/cmdlist_extended${BRANCH_DIR_SUFFIX}) - include_directories(ddi) # Create our shared library/DLL configure_file(ze_intel_gpu_version.h.in ${NEO_BUILD_DIR}/ze_intel_gpu_version.h) @@ -343,6 +342,7 @@ if(BUILD_WITH_L0) hide_subdir(api) add_subdirectory_unique(source) + hide_subdir(ddi) hide_subdir(experimental) hide_subdir(include) set(L0_RELEASE_LIB_NAME "${TARGET_NAME_L0}_lib") @@ -360,6 +360,7 @@ if(BUILD_WITH_L0) ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt ) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/api "${NEO_BUILD_DIR}/${LIB_NAME}/api") + add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/ddi "${NEO_BUILD_DIR}/${LIB_NAME}/ddi") add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/core/source "${NEO_BUILD_DIR}/${LIB_NAME}/core/source") add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/experimental "${NEO_BUILD_DIR}/${LIB_NAME}/experimental") add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/include "${NEO_BUILD_DIR}/${LIB_NAME}/include") diff --git a/level_zero/api/core/ze_core_loader.cpp b/level_zero/api/core/ze_core_loader.cpp index 0ad4456807..084edc7f38 100644 --- a/level_zero/api/core/ze_core_loader.cpp +++ b/level_zero/api/core/ze_core_loader.cpp @@ -7,7 +7,7 @@ #include "shared/source/utilities/io_functions.h" -#include "level_zero/api/extensions/public/ze_exp_ext.h" +#include "level_zero/ddi/ze_ddi_tables.h" #include "level_zero/experimental/source/tracing/tracing_barrier_imp.h" #include "level_zero/experimental/source/tracing/tracing_cmdlist_imp.h" #include "level_zero/experimental/source/tracing/tracing_cmdqueue_imp.h" @@ -25,9 +25,6 @@ #include #include -#include "ze_core_all_api_entrypoints.h" -#include "ze_ddi_tables.h" - #include ze_gpu_driver_dditable_t driverDdiTable; @@ -38,17 +35,17 @@ zeGetDriverProcAddrTable( ze_driver_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; driverDdiTable.enableTracing = NEO::IoFunctions::getEnvToBool("ZET_ENABLE_API_TRACING_EXP"); ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnGet, L0::zeDriverGet, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetApiVersion, L0::zeDriverGetApiVersion, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetProperties, L0::zeDriverGetProperties, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetIpcProperties, L0::zeDriverGetIpcProperties, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetExtensionProperties, L0::zeDriverGetExtensionProperties, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetExtensionFunctionAddress, L0::zeDriverGetExtensionFunctionAddress, version, ZE_API_VERSION_1_1); - fillDdiEntry(pDdiTable->pfnGetLastErrorDescription, L0::zeDriverGetLastErrorDescription, version, ZE_API_VERSION_1_6); + fillDdiEntry(pDdiTable->pfnGet, L0::globalDriverDispatch.coreDriver.pfnGet, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetApiVersion, L0::globalDriverDispatch.coreDriver.pfnGetApiVersion, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetProperties, L0::globalDriverDispatch.coreDriver.pfnGetProperties, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetIpcProperties, L0::globalDriverDispatch.coreDriver.pfnGetIpcProperties, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetExtensionProperties, L0::globalDriverDispatch.coreDriver.pfnGetExtensionProperties, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetExtensionFunctionAddress, L0::globalDriverDispatch.coreDriver.pfnGetExtensionFunctionAddress, version, ZE_API_VERSION_1_1); + fillDdiEntry(pDdiTable->pfnGetLastErrorDescription, L0::globalDriverDispatch.coreDriver.pfnGetLastErrorDescription, version, ZE_API_VERSION_1_6); driverDdiTable.coreDdiTable.Driver = *pDdiTable; if (driverDdiTable.enableTracing) { fillDdiEntry(pDdiTable->pfnGet, zeDriverGetTracing, version, ZE_API_VERSION_1_0); @@ -66,23 +63,23 @@ zeGetMemProcAddrTable( ze_mem_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; driverDdiTable.enableTracing = NEO::IoFunctions::getEnvToBool("ZET_ENABLE_API_TRACING_EXP"); ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnAllocShared, L0::zeMemAllocShared, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnAllocDevice, L0::zeMemAllocDevice, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnAllocHost, L0::zeMemAllocHost, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnFree, L0::zeMemFree, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetAllocProperties, L0::zeMemGetAllocProperties, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetAddressRange, L0::zeMemGetAddressRange, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetIpcHandle, L0::zeMemGetIpcHandle, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnOpenIpcHandle, L0::zeMemOpenIpcHandle, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnCloseIpcHandle, L0::zeMemCloseIpcHandle, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnFreeExt, L0::zeMemFreeExt, version, ZE_API_VERSION_1_3); - fillDdiEntry(pDdiTable->pfnPutIpcHandle, L0::zeMemPutIpcHandle, version, ZE_API_VERSION_1_6); - fillDdiEntry(pDdiTable->pfnGetPitchFor2dImage, L0::zeMemGetPitchFor2dImage, version, ZE_API_VERSION_1_9); + fillDdiEntry(pDdiTable->pfnAllocShared, L0::globalDriverDispatch.coreMem.pfnAllocShared, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnAllocDevice, L0::globalDriverDispatch.coreMem.pfnAllocDevice, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnAllocHost, L0::globalDriverDispatch.coreMem.pfnAllocHost, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnFree, L0::globalDriverDispatch.coreMem.pfnFree, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetAllocProperties, L0::globalDriverDispatch.coreMem.pfnGetAllocProperties, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetAddressRange, L0::globalDriverDispatch.coreMem.pfnGetAddressRange, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetIpcHandle, L0::globalDriverDispatch.coreMem.pfnGetIpcHandle, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnOpenIpcHandle, L0::globalDriverDispatch.coreMem.pfnOpenIpcHandle, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnCloseIpcHandle, L0::globalDriverDispatch.coreMem.pfnCloseIpcHandle, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnFreeExt, L0::globalDriverDispatch.coreMem.pfnFreeExt, version, ZE_API_VERSION_1_3); + fillDdiEntry(pDdiTable->pfnPutIpcHandle, L0::globalDriverDispatch.coreMem.pfnPutIpcHandle, version, ZE_API_VERSION_1_6); + fillDdiEntry(pDdiTable->pfnGetPitchFor2dImage, L0::globalDriverDispatch.coreMem.pfnGetPitchFor2dImage, version, ZE_API_VERSION_1_9); driverDdiTable.coreDdiTable.Mem = *pDdiTable; if (driverDdiTable.enableTracing) { fillDdiEntry(pDdiTable->pfnAllocShared, zeMemAllocSharedTracing, version, ZE_API_VERSION_1_0); @@ -104,21 +101,21 @@ zeGetContextProcAddrTable( ze_context_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; driverDdiTable.enableTracing = NEO::IoFunctions::getEnvToBool("ZET_ENABLE_API_TRACING_EXP"); ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnCreate, L0::zeContextCreate, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnDestroy, L0::zeContextDestroy, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetStatus, L0::zeContextGetStatus, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnSystemBarrier, L0::zeContextSystemBarrier, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnMakeMemoryResident, L0::zeContextMakeMemoryResident, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnEvictMemory, L0::zeContextEvictMemory, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnMakeImageResident, L0::zeContextMakeImageResident, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnEvictImage, L0::zeContextEvictImage, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnCreateEx, L0::zeContextCreateEx, version, ZE_API_VERSION_1_1); + fillDdiEntry(pDdiTable->pfnCreate, L0::globalDriverDispatch.coreContext.pfnCreate, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnDestroy, L0::globalDriverDispatch.coreContext.pfnDestroy, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetStatus, L0::globalDriverDispatch.coreContext.pfnGetStatus, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnSystemBarrier, L0::globalDriverDispatch.coreContext.pfnSystemBarrier, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnMakeMemoryResident, L0::globalDriverDispatch.coreContext.pfnMakeMemoryResident, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnEvictMemory, L0::globalDriverDispatch.coreContext.pfnEvictMemory, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnMakeImageResident, L0::globalDriverDispatch.coreContext.pfnMakeImageResident, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnEvictImage, L0::globalDriverDispatch.coreContext.pfnEvictImage, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnCreateEx, L0::globalDriverDispatch.coreContext.pfnCreateEx, version, ZE_API_VERSION_1_1); driverDdiTable.coreDdiTable.Context = *pDdiTable; if (driverDdiTable.enableTracing) { @@ -140,14 +137,14 @@ zeGetPhysicalMemProcAddrTable( ze_physical_mem_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; driverDdiTable.enableTracing = NEO::IoFunctions::getEnvToBool("ZET_ENABLE_API_TRACING_EXP"); ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnCreate, L0::zePhysicalMemCreate, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnDestroy, L0::zePhysicalMemDestroy, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnCreate, L0::globalDriverDispatch.corePhysicalMem.pfnCreate, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnDestroy, L0::globalDriverDispatch.corePhysicalMem.pfnDestroy, version, ZE_API_VERSION_1_0); driverDdiTable.coreDdiTable.PhysicalMem = *pDdiTable; if (driverDdiTable.enableTracing) { @@ -163,18 +160,18 @@ zeGetVirtualMemProcAddrTable( ze_virtual_mem_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; driverDdiTable.enableTracing = NEO::IoFunctions::getEnvToBool("ZET_ENABLE_API_TRACING_EXP"); ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnReserve, L0::zeVirtualMemReserve, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnFree, L0::zeVirtualMemFree, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnQueryPageSize, L0::zeVirtualMemQueryPageSize, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnMap, L0::zeVirtualMemMap, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnUnmap, L0::zeVirtualMemUnmap, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnSetAccessAttribute, L0::zeVirtualMemSetAccessAttribute, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetAccessAttribute, L0::zeVirtualMemGetAccessAttribute, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnReserve, L0::globalDriverDispatch.coreVirtualMem.pfnReserve, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnFree, L0::globalDriverDispatch.coreVirtualMem.pfnFree, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnQueryPageSize, L0::globalDriverDispatch.coreVirtualMem.pfnQueryPageSize, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnMap, L0::globalDriverDispatch.coreVirtualMem.pfnMap, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnUnmap, L0::globalDriverDispatch.coreVirtualMem.pfnUnmap, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnSetAccessAttribute, L0::globalDriverDispatch.coreVirtualMem.pfnSetAccessAttribute, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetAccessAttribute, L0::globalDriverDispatch.coreVirtualMem.pfnGetAccessAttribute, version, ZE_API_VERSION_1_0); driverDdiTable.coreDdiTable.VirtualMem = *pDdiTable; if (driverDdiTable.enableTracing) { @@ -195,18 +192,17 @@ zeGetGlobalProcAddrTable( ze_global_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version) || - ZE_MINOR_VERSION(driverDdiTable.version) > ZE_MINOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; driverDdiTable.enableTracing = NEO::IoFunctions::getEnvToBool("ZET_ENABLE_API_TRACING_EXP"); ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnInit, L0::zeInit, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnInit, L0::globalDriverDispatch.coreGlobal.pfnInit, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnInitDrivers, L0::globalDriverDispatch.coreGlobal.pfnInitDrivers, version, ZE_API_VERSION_1_10); driverDdiTable.coreDdiTable.Global = *pDdiTable; if (driverDdiTable.enableTracing) { fillDdiEntry(pDdiTable->pfnInit, zeInitTracing, version, ZE_API_VERSION_1_0); } - fillDdiEntry(pDdiTable->pfnInitDrivers, L0::zeInitDrivers, version, ZE_API_VERSION_1_10); return result; } @@ -216,30 +212,30 @@ zeGetDeviceProcAddrTable( ze_device_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; driverDdiTable.enableTracing = NEO::IoFunctions::getEnvToBool("ZET_ENABLE_API_TRACING_EXP"); ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnGet, L0::zeDeviceGet, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetCommandQueueGroupProperties, L0::zeDeviceGetCommandQueueGroupProperties, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetSubDevices, L0::zeDeviceGetSubDevices, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetProperties, L0::zeDeviceGetProperties, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetComputeProperties, L0::zeDeviceGetComputeProperties, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetModuleProperties, L0::zeDeviceGetModuleProperties, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetMemoryProperties, L0::zeDeviceGetMemoryProperties, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetMemoryAccessProperties, L0::zeDeviceGetMemoryAccessProperties, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetCacheProperties, L0::zeDeviceGetCacheProperties, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetImageProperties, L0::zeDeviceGetImageProperties, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetP2PProperties, L0::zeDeviceGetP2PProperties, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnCanAccessPeer, L0::zeDeviceCanAccessPeer, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetStatus, L0::zeDeviceGetStatus, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetExternalMemoryProperties, L0::zeDeviceGetExternalMemoryProperties, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetGlobalTimestamps, L0::zeDeviceGetGlobalTimestamps, version, ZE_API_VERSION_1_1); - fillDdiEntry(pDdiTable->pfnReserveCacheExt, L0::zeDeviceReserveCacheExt, version, ZE_API_VERSION_1_2); - fillDdiEntry(pDdiTable->pfnSetCacheAdviceExt, L0::zeDeviceSetCacheAdviceExt, version, ZE_API_VERSION_1_2); - fillDdiEntry(pDdiTable->pfnPciGetPropertiesExt, L0::zeDevicePciGetPropertiesExt, version, ZE_API_VERSION_1_3); - fillDdiEntry(pDdiTable->pfnGetRootDevice, L0::zeDeviceGetRootDevice, version, ZE_API_VERSION_1_7); + fillDdiEntry(pDdiTable->pfnGet, L0::globalDriverDispatch.coreDevice.pfnGet, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetCommandQueueGroupProperties, L0::globalDriverDispatch.coreDevice.pfnGetCommandQueueGroupProperties, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetSubDevices, L0::globalDriverDispatch.coreDevice.pfnGetSubDevices, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetProperties, L0::globalDriverDispatch.coreDevice.pfnGetProperties, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetComputeProperties, L0::globalDriverDispatch.coreDevice.pfnGetComputeProperties, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetModuleProperties, L0::globalDriverDispatch.coreDevice.pfnGetModuleProperties, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetMemoryProperties, L0::globalDriverDispatch.coreDevice.pfnGetMemoryProperties, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetMemoryAccessProperties, L0::globalDriverDispatch.coreDevice.pfnGetMemoryAccessProperties, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetCacheProperties, L0::globalDriverDispatch.coreDevice.pfnGetCacheProperties, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetImageProperties, L0::globalDriverDispatch.coreDevice.pfnGetImageProperties, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetP2PProperties, L0::globalDriverDispatch.coreDevice.pfnGetP2PProperties, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnCanAccessPeer, L0::globalDriverDispatch.coreDevice.pfnCanAccessPeer, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetStatus, L0::globalDriverDispatch.coreDevice.pfnGetStatus, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetExternalMemoryProperties, L0::globalDriverDispatch.coreDevice.pfnGetExternalMemoryProperties, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetGlobalTimestamps, L0::globalDriverDispatch.coreDevice.pfnGetGlobalTimestamps, version, ZE_API_VERSION_1_1); + fillDdiEntry(pDdiTable->pfnReserveCacheExt, L0::globalDriverDispatch.coreDevice.pfnReserveCacheExt, version, ZE_API_VERSION_1_2); + fillDdiEntry(pDdiTable->pfnSetCacheAdviceExt, L0::globalDriverDispatch.coreDevice.pfnSetCacheAdviceExt, version, ZE_API_VERSION_1_2); + fillDdiEntry(pDdiTable->pfnPciGetPropertiesExt, L0::globalDriverDispatch.coreDevice.pfnPciGetPropertiesExt, version, ZE_API_VERSION_1_3); + fillDdiEntry(pDdiTable->pfnGetRootDevice, L0::globalDriverDispatch.coreDevice.pfnGetRootDevice, version, ZE_API_VERSION_1_7); driverDdiTable.coreDdiTable.Device = *pDdiTable; if (driverDdiTable.enableTracing) { fillDdiEntry(pDdiTable->pfnGet, zeDeviceGetTracing, version, ZE_API_VERSION_1_0); @@ -266,11 +262,11 @@ zeGetDeviceExpProcAddrTable( ze_device_exp_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnGetFabricVertexExp, L0::zeDeviceGetFabricVertexExp, version, ZE_API_VERSION_1_4); + fillDdiEntry(pDdiTable->pfnGetFabricVertexExp, L0::globalDriverDispatch.coreDeviceExp.pfnGetFabricVertexExp, version, ZE_API_VERSION_1_4); driverDdiTable.coreDdiTable.DeviceExp = *pDdiTable; return result; } @@ -281,17 +277,17 @@ zeGetCommandQueueProcAddrTable( ze_command_queue_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; driverDdiTable.enableTracing = NEO::IoFunctions::getEnvToBool("ZET_ENABLE_API_TRACING_EXP"); ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnCreate, L0::zeCommandQueueCreate, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnDestroy, L0::zeCommandQueueDestroy, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnExecuteCommandLists, L0::zeCommandQueueExecuteCommandLists, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnSynchronize, L0::zeCommandQueueSynchronize, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetOrdinal, L0::zeCommandQueueGetOrdinal, version, ZE_API_VERSION_1_9); - fillDdiEntry(pDdiTable->pfnGetIndex, L0::zeCommandQueueGetIndex, version, ZE_API_VERSION_1_9); + fillDdiEntry(pDdiTable->pfnCreate, L0::globalDriverDispatch.coreCommandQueue.pfnCreate, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnDestroy, L0::globalDriverDispatch.coreCommandQueue.pfnDestroy, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnExecuteCommandLists, L0::globalDriverDispatch.coreCommandQueue.pfnExecuteCommandLists, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnSynchronize, L0::globalDriverDispatch.coreCommandQueue.pfnSynchronize, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetOrdinal, L0::globalDriverDispatch.coreCommandQueue.pfnGetOrdinal, version, ZE_API_VERSION_1_9); + fillDdiEntry(pDdiTable->pfnGetIndex, L0::globalDriverDispatch.coreCommandQueue.pfnGetIndex, version, ZE_API_VERSION_1_9); driverDdiTable.coreDdiTable.CommandQueue = *pDdiTable; if (driverDdiTable.enableTracing) { @@ -309,46 +305,45 @@ zeGetCommandListProcAddrTable( ze_command_list_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version) || - ZE_MINOR_VERSION(driverDdiTable.version) > ZE_MINOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; driverDdiTable.enableTracing = NEO::IoFunctions::getEnvToBool("ZET_ENABLE_API_TRACING_EXP"); ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnAppendBarrier, L0::zeCommandListAppendBarrier, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnAppendMemoryRangesBarrier, L0::zeCommandListAppendMemoryRangesBarrier, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnCreate, L0::zeCommandListCreate, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnCreateImmediate, L0::zeCommandListCreateImmediate, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnDestroy, L0::zeCommandListDestroy, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnClose, L0::zeCommandListClose, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnReset, L0::zeCommandListReset, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnAppendMemoryCopy, L0::zeCommandListAppendMemoryCopy, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnAppendMemoryCopyRegion, L0::zeCommandListAppendMemoryCopyRegion, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnAppendMemoryFill, L0::zeCommandListAppendMemoryFill, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnAppendImageCopy, L0::zeCommandListAppendImageCopy, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnAppendImageCopyRegion, L0::zeCommandListAppendImageCopyRegion, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnAppendImageCopyToMemory, L0::zeCommandListAppendImageCopyToMemory, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnAppendImageCopyFromMemory, L0::zeCommandListAppendImageCopyFromMemory, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnAppendMemoryPrefetch, L0::zeCommandListAppendMemoryPrefetch, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnAppendMemAdvise, L0::zeCommandListAppendMemAdvise, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnAppendSignalEvent, L0::zeCommandListAppendSignalEvent, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnAppendWaitOnEvents, L0::zeCommandListAppendWaitOnEvents, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnAppendEventReset, L0::zeCommandListAppendEventReset, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnAppendLaunchKernel, L0::zeCommandListAppendLaunchKernel, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnAppendLaunchCooperativeKernel, L0::zeCommandListAppendLaunchCooperativeKernel, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnAppendLaunchKernelIndirect, L0::zeCommandListAppendLaunchKernelIndirect, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnAppendLaunchMultipleKernelsIndirect, L0::zeCommandListAppendLaunchMultipleKernelsIndirect, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnAppendWriteGlobalTimestamp, L0::zeCommandListAppendWriteGlobalTimestamp, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnAppendMemoryCopyFromContext, L0::zeCommandListAppendMemoryCopyFromContext, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnAppendQueryKernelTimestamps, L0::zeCommandListAppendQueryKernelTimestamps, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnHostSynchronize, L0::zeCommandListHostSynchronize, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnAppendImageCopyToMemoryExt, L0::zeCommandListAppendImageCopyToMemoryExt, version, ZE_API_VERSION_1_3); - fillDdiEntry(pDdiTable->pfnAppendImageCopyFromMemoryExt, L0::zeCommandListAppendImageCopyFromMemoryExt, version, ZE_API_VERSION_1_3); - fillDdiEntry(pDdiTable->pfnGetDeviceHandle, L0::zeCommandListGetDeviceHandle, version, ZE_API_VERSION_1_9); - fillDdiEntry(pDdiTable->pfnGetContextHandle, L0::zeCommandListGetContextHandle, version, ZE_API_VERSION_1_9); - fillDdiEntry(pDdiTable->pfnGetOrdinal, L0::zeCommandListGetOrdinal, version, ZE_API_VERSION_1_9); - fillDdiEntry(pDdiTable->pfnImmediateGetIndex, L0::zeCommandListImmediateGetIndex, version, ZE_API_VERSION_1_9); - fillDdiEntry(pDdiTable->pfnIsImmediate, L0::zeCommandListIsImmediate, version, ZE_API_VERSION_1_9); + fillDdiEntry(pDdiTable->pfnAppendBarrier, L0::globalDriverDispatch.coreCommandList.pfnAppendBarrier, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnAppendMemoryRangesBarrier, L0::globalDriverDispatch.coreCommandList.pfnAppendMemoryRangesBarrier, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnCreate, L0::globalDriverDispatch.coreCommandList.pfnCreate, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnCreateImmediate, L0::globalDriverDispatch.coreCommandList.pfnCreateImmediate, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnDestroy, L0::globalDriverDispatch.coreCommandList.pfnDestroy, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnClose, L0::globalDriverDispatch.coreCommandList.pfnClose, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnReset, L0::globalDriverDispatch.coreCommandList.pfnReset, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnAppendMemoryCopy, L0::globalDriverDispatch.coreCommandList.pfnAppendMemoryCopy, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnAppendMemoryCopyRegion, L0::globalDriverDispatch.coreCommandList.pfnAppendMemoryCopyRegion, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnAppendMemoryFill, L0::globalDriverDispatch.coreCommandList.pfnAppendMemoryFill, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnAppendImageCopy, L0::globalDriverDispatch.coreCommandList.pfnAppendImageCopy, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnAppendImageCopyRegion, L0::globalDriverDispatch.coreCommandList.pfnAppendImageCopyRegion, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnAppendImageCopyToMemory, L0::globalDriverDispatch.coreCommandList.pfnAppendImageCopyToMemory, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnAppendImageCopyFromMemory, L0::globalDriverDispatch.coreCommandList.pfnAppendImageCopyFromMemory, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnAppendMemoryPrefetch, L0::globalDriverDispatch.coreCommandList.pfnAppendMemoryPrefetch, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnAppendMemAdvise, L0::globalDriverDispatch.coreCommandList.pfnAppendMemAdvise, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnAppendSignalEvent, L0::globalDriverDispatch.coreCommandList.pfnAppendSignalEvent, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnAppendWaitOnEvents, L0::globalDriverDispatch.coreCommandList.pfnAppendWaitOnEvents, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnAppendEventReset, L0::globalDriverDispatch.coreCommandList.pfnAppendEventReset, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnAppendLaunchKernel, L0::globalDriverDispatch.coreCommandList.pfnAppendLaunchKernel, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnAppendLaunchCooperativeKernel, L0::globalDriverDispatch.coreCommandList.pfnAppendLaunchCooperativeKernel, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnAppendLaunchKernelIndirect, L0::globalDriverDispatch.coreCommandList.pfnAppendLaunchKernelIndirect, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnAppendLaunchMultipleKernelsIndirect, L0::globalDriverDispatch.coreCommandList.pfnAppendLaunchMultipleKernelsIndirect, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnAppendWriteGlobalTimestamp, L0::globalDriverDispatch.coreCommandList.pfnAppendWriteGlobalTimestamp, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnAppendMemoryCopyFromContext, L0::globalDriverDispatch.coreCommandList.pfnAppendMemoryCopyFromContext, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnAppendQueryKernelTimestamps, L0::globalDriverDispatch.coreCommandList.pfnAppendQueryKernelTimestamps, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnHostSynchronize, L0::globalDriverDispatch.coreCommandList.pfnHostSynchronize, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnAppendImageCopyToMemoryExt, L0::globalDriverDispatch.coreCommandList.pfnAppendImageCopyToMemoryExt, version, ZE_API_VERSION_1_3); + fillDdiEntry(pDdiTable->pfnAppendImageCopyFromMemoryExt, L0::globalDriverDispatch.coreCommandList.pfnAppendImageCopyFromMemoryExt, version, ZE_API_VERSION_1_3); + fillDdiEntry(pDdiTable->pfnGetDeviceHandle, L0::globalDriverDispatch.coreCommandList.pfnGetDeviceHandle, version, ZE_API_VERSION_1_9); + fillDdiEntry(pDdiTable->pfnGetContextHandle, L0::globalDriverDispatch.coreCommandList.pfnGetContextHandle, version, ZE_API_VERSION_1_9); + fillDdiEntry(pDdiTable->pfnGetOrdinal, L0::globalDriverDispatch.coreCommandList.pfnGetOrdinal, version, ZE_API_VERSION_1_9); + fillDdiEntry(pDdiTable->pfnImmediateGetIndex, L0::globalDriverDispatch.coreCommandList.pfnImmediateGetIndex, version, ZE_API_VERSION_1_9); + fillDdiEntry(pDdiTable->pfnIsImmediate, L0::globalDriverDispatch.coreCommandList.pfnIsImmediate, version, ZE_API_VERSION_1_9); driverDdiTable.coreDdiTable.CommandList = *pDdiTable; if (driverDdiTable.enableTracing) { fillDdiEntry(pDdiTable->pfnAppendBarrier, zeCommandListAppendBarrierTracing, version, ZE_API_VERSION_1_0); @@ -387,18 +382,17 @@ zeGetCommandListExpProcAddrTable( ze_command_list_exp_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version) || - ZE_MINOR_VERSION(driverDdiTable.version) > ZE_MINOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnImmediateAppendCommandListsExp, L0::zeCommandListImmediateAppendCommandListsExp, version, ZE_API_VERSION_1_9); - fillDdiEntry(pDdiTable->pfnGetNextCommandIdExp, L0::zeCommandListGetNextCommandIdExp, version, ZE_API_VERSION_1_9); - fillDdiEntry(pDdiTable->pfnUpdateMutableCommandsExp, L0::zeCommandListUpdateMutableCommandsExp, version, ZE_API_VERSION_1_9); - fillDdiEntry(pDdiTable->pfnUpdateMutableCommandSignalEventExp, L0::zeCommandListUpdateMutableCommandSignalEventExp, version, ZE_API_VERSION_1_9); - fillDdiEntry(pDdiTable->pfnUpdateMutableCommandWaitEventsExp, L0::zeCommandListUpdateMutableCommandWaitEventsExp, version, ZE_API_VERSION_1_9); - fillDdiEntry(pDdiTable->pfnGetNextCommandIdWithKernelsExp, L0::zeCommandListGetNextCommandIdWithKernelsExp, version, ZE_API_VERSION_1_10); - fillDdiEntry(pDdiTable->pfnUpdateMutableCommandKernelsExp, L0::zeCommandListUpdateMutableCommandKernelsExp, version, ZE_API_VERSION_1_10); + fillDdiEntry(pDdiTable->pfnImmediateAppendCommandListsExp, L0::globalDriverDispatch.coreCommandListExp.pfnImmediateAppendCommandListsExp, version, ZE_API_VERSION_1_9); + fillDdiEntry(pDdiTable->pfnGetNextCommandIdExp, L0::globalDriverDispatch.coreCommandListExp.pfnGetNextCommandIdExp, version, ZE_API_VERSION_1_9); + fillDdiEntry(pDdiTable->pfnUpdateMutableCommandsExp, L0::globalDriverDispatch.coreCommandListExp.pfnUpdateMutableCommandsExp, version, ZE_API_VERSION_1_9); + fillDdiEntry(pDdiTable->pfnUpdateMutableCommandSignalEventExp, L0::globalDriverDispatch.coreCommandListExp.pfnUpdateMutableCommandSignalEventExp, version, ZE_API_VERSION_1_9); + fillDdiEntry(pDdiTable->pfnUpdateMutableCommandWaitEventsExp, L0::globalDriverDispatch.coreCommandListExp.pfnUpdateMutableCommandWaitEventsExp, version, ZE_API_VERSION_1_9); + fillDdiEntry(pDdiTable->pfnGetNextCommandIdWithKernelsExp, L0::globalDriverDispatch.coreCommandListExp.pfnGetNextCommandIdWithKernelsExp, version, ZE_API_VERSION_1_10); + fillDdiEntry(pDdiTable->pfnUpdateMutableCommandKernelsExp, L0::globalDriverDispatch.coreCommandListExp.pfnUpdateMutableCommandKernelsExp, version, ZE_API_VERSION_1_10); return result; } @@ -408,16 +402,16 @@ zeGetFenceProcAddrTable( ze_fence_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; driverDdiTable.enableTracing = NEO::IoFunctions::getEnvToBool("ZET_ENABLE_API_TRACING_EXP"); ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnCreate, L0::zeFenceCreate, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnDestroy, L0::zeFenceDestroy, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnHostSynchronize, L0::zeFenceHostSynchronize, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnQueryStatus, L0::zeFenceQueryStatus, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnReset, L0::zeFenceReset, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnCreate, L0::globalDriverDispatch.coreFence.pfnCreate, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnDestroy, L0::globalDriverDispatch.coreFence.pfnDestroy, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnHostSynchronize, L0::globalDriverDispatch.coreFence.pfnHostSynchronize, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnQueryStatus, L0::globalDriverDispatch.coreFence.pfnQueryStatus, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnReset, L0::globalDriverDispatch.coreFence.pfnReset, version, ZE_API_VERSION_1_0); driverDdiTable.coreDdiTable.Fence = *pDdiTable; if (driverDdiTable.enableTracing) { fillDdiEntry(pDdiTable->pfnCreate, zeFenceCreateTracing, version, ZE_API_VERSION_1_0); @@ -435,18 +429,18 @@ zeGetEventPoolProcAddrTable( ze_event_pool_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; driverDdiTable.enableTracing = NEO::IoFunctions::getEnvToBool("ZET_ENABLE_API_TRACING_EXP"); ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnCreate, L0::zeEventPoolCreate, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnDestroy, L0::zeEventPoolDestroy, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetIpcHandle, L0::zeEventPoolGetIpcHandle, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnOpenIpcHandle, L0::zeEventPoolOpenIpcHandle, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnCloseIpcHandle, L0::zeEventPoolCloseIpcHandle, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetContextHandle, L0::zeEventPoolGetContextHandle, version, ZE_API_VERSION_1_9); - fillDdiEntry(pDdiTable->pfnGetFlags, L0::zeEventPoolGetFlags, version, ZE_API_VERSION_1_9); + fillDdiEntry(pDdiTable->pfnCreate, L0::globalDriverDispatch.coreEventPool.pfnCreate, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnDestroy, L0::globalDriverDispatch.coreEventPool.pfnDestroy, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetIpcHandle, L0::globalDriverDispatch.coreEventPool.pfnGetIpcHandle, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnOpenIpcHandle, L0::globalDriverDispatch.coreEventPool.pfnOpenIpcHandle, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnCloseIpcHandle, L0::globalDriverDispatch.coreEventPool.pfnCloseIpcHandle, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetContextHandle, L0::globalDriverDispatch.coreEventPool.pfnGetContextHandle, version, ZE_API_VERSION_1_9); + fillDdiEntry(pDdiTable->pfnGetFlags, L0::globalDriverDispatch.coreEventPool.pfnGetFlags, version, ZE_API_VERSION_1_9); driverDdiTable.coreDdiTable.EventPool = *pDdiTable; if (driverDdiTable.enableTracing) { fillDdiEntry(pDdiTable->pfnCreate, zeEventPoolCreateTracing, version, ZE_API_VERSION_1_0); @@ -464,22 +458,22 @@ zeGetEventProcAddrTable( ze_event_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; driverDdiTable.enableTracing = NEO::IoFunctions::getEnvToBool("ZET_ENABLE_API_TRACING_EXP"); ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnCreate, L0::zeEventCreate, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnDestroy, L0::zeEventDestroy, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnHostSignal, L0::zeEventHostSignal, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnHostSynchronize, L0::zeEventHostSynchronize, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnQueryStatus, L0::zeEventQueryStatus, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnHostReset, L0::zeEventHostReset, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnQueryKernelTimestamp, L0::zeEventQueryKernelTimestamp, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnQueryKernelTimestampsExt, L0::zeEventQueryKernelTimestampsExt, version, ZE_API_VERSION_1_6); - fillDdiEntry(pDdiTable->pfnGetEventPool, L0::zeEventGetEventPool, version, ZE_API_VERSION_1_9); - fillDdiEntry(pDdiTable->pfnGetSignalScope, L0::zeEventGetSignalScope, version, ZE_API_VERSION_1_9); - fillDdiEntry(pDdiTable->pfnGetWaitScope, L0::zeEventGetWaitScope, version, ZE_API_VERSION_1_9); + fillDdiEntry(pDdiTable->pfnCreate, L0::globalDriverDispatch.coreEvent.pfnCreate, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnDestroy, L0::globalDriverDispatch.coreEvent.pfnDestroy, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnHostSignal, L0::globalDriverDispatch.coreEvent.pfnHostSignal, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnHostSynchronize, L0::globalDriverDispatch.coreEvent.pfnHostSynchronize, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnQueryStatus, L0::globalDriverDispatch.coreEvent.pfnQueryStatus, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnHostReset, L0::globalDriverDispatch.coreEvent.pfnHostReset, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnQueryKernelTimestamp, L0::globalDriverDispatch.coreEvent.pfnQueryKernelTimestamp, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnQueryKernelTimestampsExt, L0::globalDriverDispatch.coreEvent.pfnQueryKernelTimestampsExt, version, ZE_API_VERSION_1_6); + fillDdiEntry(pDdiTable->pfnGetEventPool, L0::globalDriverDispatch.coreEvent.pfnGetEventPool, version, ZE_API_VERSION_1_9); + fillDdiEntry(pDdiTable->pfnGetSignalScope, L0::globalDriverDispatch.coreEvent.pfnGetSignalScope, version, ZE_API_VERSION_1_9); + fillDdiEntry(pDdiTable->pfnGetWaitScope, L0::globalDriverDispatch.coreEvent.pfnGetWaitScope, version, ZE_API_VERSION_1_9); driverDdiTable.coreDdiTable.Event = *pDdiTable; if (driverDdiTable.enableTracing) { fillDdiEntry(pDdiTable->pfnCreate, zeEventCreateTracing, version, ZE_API_VERSION_1_0); @@ -499,11 +493,11 @@ zeGetEventExpProcAddrTable( ze_event_exp_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnQueryTimestampsExp, L0::zeEventQueryTimestampsExp, version, ZE_API_VERSION_1_2); + fillDdiEntry(pDdiTable->pfnQueryTimestampsExp, L0::globalDriverDispatch.coreEventExp.pfnQueryTimestampsExp, version, ZE_API_VERSION_1_2); return result; } @@ -514,16 +508,16 @@ zeGetImageProcAddrTable( ze_image_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; driverDdiTable.enableTracing = NEO::IoFunctions::getEnvToBool("ZET_ENABLE_API_TRACING_EXP"); ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnGetProperties, L0::zeImageGetProperties, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnCreate, L0::zeImageCreate, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnDestroy, L0::zeImageDestroy, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetAllocPropertiesExt, L0::zeImageGetAllocPropertiesExt, version, ZE_API_VERSION_1_3); - fillDdiEntry(pDdiTable->pfnViewCreateExt, L0::zeImageViewCreateExt, version, ZE_API_VERSION_1_5); + fillDdiEntry(pDdiTable->pfnGetProperties, L0::globalDriverDispatch.coreImage.pfnGetProperties, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnCreate, L0::globalDriverDispatch.coreImage.pfnCreate, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnDestroy, L0::globalDriverDispatch.coreImage.pfnDestroy, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetAllocPropertiesExt, L0::globalDriverDispatch.coreImage.pfnGetAllocPropertiesExt, version, ZE_API_VERSION_1_3); + fillDdiEntry(pDdiTable->pfnViewCreateExt, L0::globalDriverDispatch.coreImage.pfnViewCreateExt, version, ZE_API_VERSION_1_5); driverDdiTable.coreDdiTable.Image = *pDdiTable; if (driverDdiTable.enableTracing) { fillDdiEntry(pDdiTable->pfnGetProperties, zeImageGetPropertiesTracing, version, ZE_API_VERSION_1_0); @@ -539,20 +533,20 @@ zeGetModuleProcAddrTable( ze_module_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; driverDdiTable.enableTracing = NEO::IoFunctions::getEnvToBool("ZET_ENABLE_API_TRACING_EXP"); ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnCreate, L0::zeModuleCreate, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnDestroy, L0::zeModuleDestroy, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnDynamicLink, L0::zeModuleDynamicLink, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetNativeBinary, L0::zeModuleGetNativeBinary, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetGlobalPointer, L0::zeModuleGetGlobalPointer, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetKernelNames, L0::zeModuleGetKernelNames, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetFunctionPointer, L0::zeModuleGetFunctionPointer, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetProperties, L0::zeModuleGetProperties, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnInspectLinkageExt, L0::zeModuleInspectLinkageExt, version, ZE_API_VERSION_1_3); + fillDdiEntry(pDdiTable->pfnCreate, L0::globalDriverDispatch.coreModule.pfnCreate, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnDestroy, L0::globalDriverDispatch.coreModule.pfnDestroy, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnDynamicLink, L0::globalDriverDispatch.coreModule.pfnDynamicLink, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetNativeBinary, L0::globalDriverDispatch.coreModule.pfnGetNativeBinary, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetGlobalPointer, L0::globalDriverDispatch.coreModule.pfnGetGlobalPointer, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetKernelNames, L0::globalDriverDispatch.coreModule.pfnGetKernelNames, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetFunctionPointer, L0::globalDriverDispatch.coreModule.pfnGetFunctionPointer, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetProperties, L0::globalDriverDispatch.coreModule.pfnGetProperties, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnInspectLinkageExt, L0::globalDriverDispatch.coreModule.pfnInspectLinkageExt, version, ZE_API_VERSION_1_3); driverDdiTable.coreDdiTable.Module = *pDdiTable; if (driverDdiTable.enableTracing) { fillDdiEntry(pDdiTable->pfnCreate, zeModuleCreateTracing, version, ZE_API_VERSION_1_0); @@ -573,13 +567,13 @@ zeGetModuleBuildLogProcAddrTable( ze_module_build_log_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; driverDdiTable.enableTracing = NEO::IoFunctions::getEnvToBool("ZET_ENABLE_API_TRACING_EXP"); ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnDestroy, L0::zeModuleBuildLogDestroy, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetString, L0::zeModuleBuildLogGetString, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnDestroy, L0::globalDriverDispatch.coreModuleBuildLog.pfnDestroy, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetString, L0::globalDriverDispatch.coreModuleBuildLog.pfnGetString, version, ZE_API_VERSION_1_0); driverDdiTable.coreDdiTable.ModuleBuildLog = *pDdiTable; if (driverDdiTable.enableTracing) { fillDdiEntry(pDdiTable->pfnDestroy, zeModuleBuildLogDestroyTracing, version, ZE_API_VERSION_1_0); @@ -594,23 +588,23 @@ zeGetKernelProcAddrTable( ze_kernel_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; driverDdiTable.enableTracing = NEO::IoFunctions::getEnvToBool("ZET_ENABLE_API_TRACING_EXP"); ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnCreate, L0::zeKernelCreate, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnDestroy, L0::zeKernelDestroy, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnSetGroupSize, L0::zeKernelSetGroupSize, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnSuggestGroupSize, L0::zeKernelSuggestGroupSize, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnSuggestMaxCooperativeGroupCount, L0::zeKernelSuggestMaxCooperativeGroupCount, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnSetArgumentValue, L0::zeKernelSetArgumentValue, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnSetIndirectAccess, L0::zeKernelSetIndirectAccess, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetIndirectAccess, L0::zeKernelGetIndirectAccess, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetSourceAttributes, L0::zeKernelGetSourceAttributes, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetProperties, L0::zeKernelGetProperties, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnSetCacheConfig, L0::zeKernelSetCacheConfig, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetName, L0::zeKernelGetName, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnCreate, L0::globalDriverDispatch.coreKernel.pfnCreate, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnDestroy, L0::globalDriverDispatch.coreKernel.pfnDestroy, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnSetGroupSize, L0::globalDriverDispatch.coreKernel.pfnSetGroupSize, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnSuggestGroupSize, L0::globalDriverDispatch.coreKernel.pfnSuggestGroupSize, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnSuggestMaxCooperativeGroupCount, L0::globalDriverDispatch.coreKernel.pfnSuggestMaxCooperativeGroupCount, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnSetArgumentValue, L0::globalDriverDispatch.coreKernel.pfnSetArgumentValue, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnSetIndirectAccess, L0::globalDriverDispatch.coreKernel.pfnSetIndirectAccess, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetIndirectAccess, L0::globalDriverDispatch.coreKernel.pfnGetIndirectAccess, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetSourceAttributes, L0::globalDriverDispatch.coreKernel.pfnGetSourceAttributes, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetProperties, L0::globalDriverDispatch.coreKernel.pfnGetProperties, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnSetCacheConfig, L0::globalDriverDispatch.coreKernel.pfnSetCacheConfig, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetName, L0::globalDriverDispatch.coreKernel.pfnGetName, version, ZE_API_VERSION_1_0); driverDdiTable.coreDdiTable.Kernel = *pDdiTable; if (driverDdiTable.enableTracing) { fillDdiEntry(pDdiTable->pfnCreate, zeKernelCreateTracing, version, ZE_API_VERSION_1_0); @@ -635,13 +629,13 @@ zeGetSamplerProcAddrTable( ze_sampler_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; driverDdiTable.enableTracing = NEO::IoFunctions::getEnvToBool("ZET_ENABLE_API_TRACING_EXP"); ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnCreate, L0::zeSamplerCreate, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnDestroy, L0::zeSamplerDestroy, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnCreate, L0::globalDriverDispatch.coreSampler.pfnCreate, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnDestroy, L0::globalDriverDispatch.coreSampler.pfnDestroy, version, ZE_API_VERSION_1_0); driverDdiTable.coreDdiTable.Sampler = *pDdiTable; if (driverDdiTable.enableTracing) { fillDdiEntry(pDdiTable->pfnCreate, zeSamplerCreateTracing, version, ZE_API_VERSION_1_0); @@ -656,13 +650,13 @@ zeGetKernelExpProcAddrTable( ze_kernel_exp_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnSetGlobalOffsetExp, L0::zeKernelSetGlobalOffsetExp, version, ZE_API_VERSION_1_1); - fillDdiEntry(pDdiTable->pfnSchedulingHintExp, L0::zeKernelSchedulingHintExp, version, ZE_API_VERSION_1_2); - fillDdiEntry(pDdiTable->pfnGetBinaryExp, L0::zeKernelGetBinaryExp, version, ZE_API_VERSION_1_11); + fillDdiEntry(pDdiTable->pfnSetGlobalOffsetExp, L0::globalDriverDispatch.coreKernelExp.pfnSetGlobalOffsetExp, version, ZE_API_VERSION_1_1); + fillDdiEntry(pDdiTable->pfnSchedulingHintExp, L0::globalDriverDispatch.coreKernelExp.pfnSchedulingHintExp, version, ZE_API_VERSION_1_2); + fillDdiEntry(pDdiTable->pfnGetBinaryExp, L0::globalDriverDispatch.coreKernelExp.pfnGetBinaryExp, version, ZE_API_VERSION_1_11); driverDdiTable.coreDdiTable.KernelExp = *pDdiTable; return result; } @@ -673,14 +667,14 @@ zeGetMemExpProcAddrTable( ze_mem_exp_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnGetIpcHandleFromFileDescriptorExp, L0::zeMemGetIpcHandleFromFileDescriptorExp, version, ZE_API_VERSION_1_6); - fillDdiEntry(pDdiTable->pfnGetFileDescriptorFromIpcHandleExp, L0::zeMemGetFileDescriptorFromIpcHandleExp, version, ZE_API_VERSION_1_6); - fillDdiEntry(pDdiTable->pfnSetAtomicAccessAttributeExp, L0::zeMemSetAtomicAccessAttributeExp, version, ZE_API_VERSION_1_7); - fillDdiEntry(pDdiTable->pfnGetAtomicAccessAttributeExp, L0::zeMemGetAtomicAccessAttributeExp, version, ZE_API_VERSION_1_7); + fillDdiEntry(pDdiTable->pfnGetIpcHandleFromFileDescriptorExp, L0::globalDriverDispatch.coreMemExp.pfnGetIpcHandleFromFileDescriptorExp, version, ZE_API_VERSION_1_6); + fillDdiEntry(pDdiTable->pfnGetFileDescriptorFromIpcHandleExp, L0::globalDriverDispatch.coreMemExp.pfnGetFileDescriptorFromIpcHandleExp, version, ZE_API_VERSION_1_6); + fillDdiEntry(pDdiTable->pfnSetAtomicAccessAttributeExp, L0::globalDriverDispatch.coreMemExp.pfnSetAtomicAccessAttributeExp, version, ZE_API_VERSION_1_7); + fillDdiEntry(pDdiTable->pfnGetAtomicAccessAttributeExp, L0::globalDriverDispatch.coreMemExp.pfnGetAtomicAccessAttributeExp, version, ZE_API_VERSION_1_7); driverDdiTable.coreDdiTable.MemExp = *pDdiTable; return result; } @@ -691,13 +685,13 @@ zeGetImageExpProcAddrTable( ze_image_exp_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnGetMemoryPropertiesExp, L0::zeImageGetMemoryPropertiesExp, version, ZE_API_VERSION_1_2); - fillDdiEntry(pDdiTable->pfnViewCreateExp, L0::zeImageViewCreateExp, version, ZE_API_VERSION_1_2); - fillDdiEntry(pDdiTable->pfnGetDeviceOffsetExp, L0::zeImageGetDeviceOffsetExp, version, ZE_API_VERSION_1_9); + fillDdiEntry(pDdiTable->pfnGetMemoryPropertiesExp, L0::globalDriverDispatch.coreImageExp.pfnGetMemoryPropertiesExp, version, ZE_API_VERSION_1_2); + fillDdiEntry(pDdiTable->pfnViewCreateExp, L0::globalDriverDispatch.coreImageExp.pfnViewCreateExp, version, ZE_API_VERSION_1_2); + fillDdiEntry(pDdiTable->pfnGetDeviceOffsetExp, L0::globalDriverDispatch.coreImageExp.pfnGetDeviceOffsetExp, version, ZE_API_VERSION_1_9); driverDdiTable.coreDdiTable.ImageExp = *pDdiTable; return result; } @@ -709,14 +703,14 @@ zeGetFabricVertexExpProcAddrTable( if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnGetExp, L0::zeFabricVertexGetExp, version, ZE_API_VERSION_1_4); - fillDdiEntry(pDdiTable->pfnGetSubVerticesExp, L0::zeFabricVertexGetSubVerticesExp, version, ZE_API_VERSION_1_4); - fillDdiEntry(pDdiTable->pfnGetPropertiesExp, L0::zeFabricVertexGetPropertiesExp, version, ZE_API_VERSION_1_4); - fillDdiEntry(pDdiTable->pfnGetDeviceExp, L0::zeFabricVertexGetDeviceExp, version, ZE_API_VERSION_1_4); + fillDdiEntry(pDdiTable->pfnGetExp, L0::globalDriverDispatch.coreFabricVertexExp.pfnGetExp, version, ZE_API_VERSION_1_4); + fillDdiEntry(pDdiTable->pfnGetSubVerticesExp, L0::globalDriverDispatch.coreFabricVertexExp.pfnGetSubVerticesExp, version, ZE_API_VERSION_1_4); + fillDdiEntry(pDdiTable->pfnGetPropertiesExp, L0::globalDriverDispatch.coreFabricVertexExp.pfnGetPropertiesExp, version, ZE_API_VERSION_1_4); + fillDdiEntry(pDdiTable->pfnGetDeviceExp, L0::globalDriverDispatch.coreFabricVertexExp.pfnGetDeviceExp, version, ZE_API_VERSION_1_4); driverDdiTable.coreDdiTable.FabricVertexExp = *pDdiTable; return result; } @@ -728,13 +722,13 @@ zeGetFabricEdgeExpProcAddrTable( if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnGetExp, L0::zeFabricEdgeGetExp, version, ZE_API_VERSION_1_4); - fillDdiEntry(pDdiTable->pfnGetVerticesExp, L0::zeFabricEdgeGetVerticesExp, version, ZE_API_VERSION_1_4); - fillDdiEntry(pDdiTable->pfnGetPropertiesExp, L0::zeFabricEdgeGetPropertiesExp, version, ZE_API_VERSION_1_4); + fillDdiEntry(pDdiTable->pfnGetExp, L0::globalDriverDispatch.coreFabricEdgeExp.pfnGetExp, version, ZE_API_VERSION_1_4); + fillDdiEntry(pDdiTable->pfnGetVerticesExp, L0::globalDriverDispatch.coreFabricEdgeExp.pfnGetVerticesExp, version, ZE_API_VERSION_1_4); + fillDdiEntry(pDdiTable->pfnGetPropertiesExp, L0::globalDriverDispatch.coreFabricEdgeExp.pfnGetPropertiesExp, version, ZE_API_VERSION_1_4); driverDdiTable.coreDdiTable.FabricEdgeExp = *pDdiTable; return result; } @@ -746,11 +740,11 @@ zeGetDriverExpProcAddrTable( if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnRTASFormatCompatibilityCheckExp, L0::zeDriverRTASFormatCompatibilityCheckExp, version, ZE_API_VERSION_1_7); + fillDdiEntry(pDdiTable->pfnRTASFormatCompatibilityCheckExp, L0::globalDriverDispatch.coreDriverExp.pfnRTASFormatCompatibilityCheckExp, version, ZE_API_VERSION_1_7); driverDdiTable.coreDdiTable.DriverExp = *pDdiTable; return result; } @@ -762,14 +756,14 @@ zeGetRTASParallelOperationExpProcAddrTable( if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnCreateExp, L0::zeRTASParallelOperationCreateExp, version, ZE_API_VERSION_1_7); - fillDdiEntry(pDdiTable->pfnGetPropertiesExp, L0::zeRTASParallelOperationGetPropertiesExp, version, ZE_API_VERSION_1_7); - fillDdiEntry(pDdiTable->pfnJoinExp, L0::zeRTASParallelOperationJoinExp, version, ZE_API_VERSION_1_7); - fillDdiEntry(pDdiTable->pfnDestroyExp, L0::zeRTASParallelOperationDestroyExp, version, ZE_API_VERSION_1_7); + fillDdiEntry(pDdiTable->pfnCreateExp, L0::globalDriverDispatch.coreRTASParallelOperationExp.pfnCreateExp, version, ZE_API_VERSION_1_7); + fillDdiEntry(pDdiTable->pfnGetPropertiesExp, L0::globalDriverDispatch.coreRTASParallelOperationExp.pfnGetPropertiesExp, version, ZE_API_VERSION_1_7); + fillDdiEntry(pDdiTable->pfnJoinExp, L0::globalDriverDispatch.coreRTASParallelOperationExp.pfnJoinExp, version, ZE_API_VERSION_1_7); + fillDdiEntry(pDdiTable->pfnDestroyExp, L0::globalDriverDispatch.coreRTASParallelOperationExp.pfnDestroyExp, version, ZE_API_VERSION_1_7); driverDdiTable.coreDdiTable.RTASParallelOperationExp = *pDdiTable; return result; } @@ -781,14 +775,14 @@ zeGetRTASBuilderExpProcAddrTable( if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnCreateExp, L0::zeRTASBuilderCreateExp, version, ZE_API_VERSION_1_7); - fillDdiEntry(pDdiTable->pfnGetBuildPropertiesExp, L0::zeRTASBuilderGetBuildPropertiesExp, version, ZE_API_VERSION_1_7); - fillDdiEntry(pDdiTable->pfnBuildExp, L0::zeRTASBuilderBuildExp, version, ZE_API_VERSION_1_7); - fillDdiEntry(pDdiTable->pfnDestroyExp, L0::zeRTASBuilderDestroyExp, version, ZE_API_VERSION_1_7); + fillDdiEntry(pDdiTable->pfnCreateExp, L0::globalDriverDispatch.coreRTASBuilderExp.pfnCreateExp, version, ZE_API_VERSION_1_7); + fillDdiEntry(pDdiTable->pfnGetBuildPropertiesExp, L0::globalDriverDispatch.coreRTASBuilderExp.pfnGetBuildPropertiesExp, version, ZE_API_VERSION_1_7); + fillDdiEntry(pDdiTable->pfnBuildExp, L0::globalDriverDispatch.coreRTASBuilderExp.pfnBuildExp, version, ZE_API_VERSION_1_7); + fillDdiEntry(pDdiTable->pfnDestroyExp, L0::globalDriverDispatch.coreRTASBuilderExp.pfnDestroyExp, version, ZE_API_VERSION_1_7); driverDdiTable.coreDdiTable.RTASBuilderExp = *pDdiTable; return result; } diff --git a/level_zero/api/sysman/ze_sysman_loader.cpp b/level_zero/api/sysman/ze_sysman_loader.cpp index 4312536e95..d2a786aa56 100644 --- a/level_zero/api/sysman/ze_sysman_loader.cpp +++ b/level_zero/api/sysman/ze_sysman_loader.cpp @@ -5,6 +5,7 @@ * */ +#include "level_zero/ddi/ze_ddi_tables.h" #include #include #include @@ -12,58 +13,53 @@ #include #include -#include "ze_ddi_tables.h" -#include "zes_sysman_all_api_entrypoints.h" - -extern ze_gpu_driver_dditable_t driverDdiTable; - ZE_DLLEXPORT ze_result_t ZE_APICALL zesGetDeviceProcAddrTable( ze_api_version_t version, zes_device_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.sysman.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnGetProperties, L0::zesDeviceGetProperties, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetState, L0::zesDeviceGetState, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnReset, L0::zesDeviceReset, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnProcessesGetState, L0::zesDeviceProcessesGetState, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnPciGetProperties, L0::zesDevicePciGetProperties, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnPciGetState, L0::zesDevicePciGetState, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnPciGetBars, L0::zesDevicePciGetBars, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnPciGetStats, L0::zesDevicePciGetStats, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnEnumDiagnosticTestSuites, L0::zesDeviceEnumDiagnosticTestSuites, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnEnumEngineGroups, L0::zesDeviceEnumEngineGroups, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnEventRegister, L0::zesDeviceEventRegister, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnEnumFabricPorts, L0::zesDeviceEnumFabricPorts, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnEnumFans, L0::zesDeviceEnumFans, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnEnumFirmwares, L0::zesDeviceEnumFirmwares, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnEnumFrequencyDomains, L0::zesDeviceEnumFrequencyDomains, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnEnumLeds, L0::zesDeviceEnumLeds, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnEnumMemoryModules, L0::zesDeviceEnumMemoryModules, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnEnumPerformanceFactorDomains, L0::zesDeviceEnumPerformanceFactorDomains, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnEnumPowerDomains, L0::zesDeviceEnumPowerDomains, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnEnumPsus, L0::zesDeviceEnumPsus, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnEnumRasErrorSets, L0::zesDeviceEnumRasErrorSets, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnEnumSchedulers, L0::zesDeviceEnumSchedulers, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnEnumStandbyDomains, L0::zesDeviceEnumStandbyDomains, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnEnumTemperatureSensors, L0::zesDeviceEnumTemperatureSensors, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetCardPowerDomain, L0::zesDeviceGetCardPowerDomain, version, ZE_API_VERSION_1_3); - fillDdiEntry(pDdiTable->pfnEccAvailable, L0::zesDeviceEccAvailable, version, ZE_API_VERSION_1_4); - fillDdiEntry(pDdiTable->pfnEccConfigurable, L0::zesDeviceEccConfigurable, version, ZE_API_VERSION_1_4); - fillDdiEntry(pDdiTable->pfnGetEccState, L0::zesDeviceGetEccState, version, ZE_API_VERSION_1_4); - fillDdiEntry(pDdiTable->pfnSetEccState, L0::zesDeviceSetEccState, version, ZE_API_VERSION_1_4); - fillDdiEntry(pDdiTable->pfnGet, L0::zesDeviceGet, version, ZE_API_VERSION_1_5); - fillDdiEntry(pDdiTable->pfnSetOverclockWaiver, L0::zesDeviceSetOverclockWaiver, version, ZE_API_VERSION_1_5); - fillDdiEntry(pDdiTable->pfnGetOverclockDomains, L0::zesDeviceGetOverclockDomains, version, ZE_API_VERSION_1_5); - fillDdiEntry(pDdiTable->pfnGetOverclockControls, L0::zesDeviceGetOverclockControls, version, ZE_API_VERSION_1_5); - fillDdiEntry(pDdiTable->pfnResetOverclockSettings, L0::zesDeviceResetOverclockSettings, version, ZE_API_VERSION_1_5); - fillDdiEntry(pDdiTable->pfnReadOverclockState, L0::zesDeviceReadOverclockState, version, ZE_API_VERSION_1_5); - fillDdiEntry(pDdiTable->pfnEnumOverclockDomains, L0::zesDeviceEnumOverclockDomains, version, ZE_API_VERSION_1_5); - fillDdiEntry(pDdiTable->pfnResetExt, L0::zesDeviceResetExt, version, ZE_API_VERSION_1_7); + fillDdiEntry(pDdiTable->pfnGetProperties, L0::globalDriverDispatch.sysmanDevice.pfnGetProperties, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetState, L0::globalDriverDispatch.sysmanDevice.pfnGetState, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnReset, L0::globalDriverDispatch.sysmanDevice.pfnReset, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnProcessesGetState, L0::globalDriverDispatch.sysmanDevice.pfnProcessesGetState, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnPciGetProperties, L0::globalDriverDispatch.sysmanDevice.pfnPciGetProperties, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnPciGetState, L0::globalDriverDispatch.sysmanDevice.pfnPciGetState, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnPciGetBars, L0::globalDriverDispatch.sysmanDevice.pfnPciGetBars, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnPciGetStats, L0::globalDriverDispatch.sysmanDevice.pfnPciGetStats, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnEnumDiagnosticTestSuites, L0::globalDriverDispatch.sysmanDevice.pfnEnumDiagnosticTestSuites, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnEnumEngineGroups, L0::globalDriverDispatch.sysmanDevice.pfnEnumEngineGroups, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnEventRegister, L0::globalDriverDispatch.sysmanDevice.pfnEventRegister, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnEnumFabricPorts, L0::globalDriverDispatch.sysmanDevice.pfnEnumFabricPorts, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnEnumFans, L0::globalDriverDispatch.sysmanDevice.pfnEnumFans, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnEnumFirmwares, L0::globalDriverDispatch.sysmanDevice.pfnEnumFirmwares, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnEnumFrequencyDomains, L0::globalDriverDispatch.sysmanDevice.pfnEnumFrequencyDomains, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnEnumLeds, L0::globalDriverDispatch.sysmanDevice.pfnEnumLeds, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnEnumMemoryModules, L0::globalDriverDispatch.sysmanDevice.pfnEnumMemoryModules, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnEnumPerformanceFactorDomains, L0::globalDriverDispatch.sysmanDevice.pfnEnumPerformanceFactorDomains, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnEnumPowerDomains, L0::globalDriverDispatch.sysmanDevice.pfnEnumPowerDomains, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnEnumPsus, L0::globalDriverDispatch.sysmanDevice.pfnEnumPsus, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnEnumRasErrorSets, L0::globalDriverDispatch.sysmanDevice.pfnEnumRasErrorSets, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnEnumSchedulers, L0::globalDriverDispatch.sysmanDevice.pfnEnumSchedulers, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnEnumStandbyDomains, L0::globalDriverDispatch.sysmanDevice.pfnEnumStandbyDomains, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnEnumTemperatureSensors, L0::globalDriverDispatch.sysmanDevice.pfnEnumTemperatureSensors, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetCardPowerDomain, L0::globalDriverDispatch.sysmanDevice.pfnGetCardPowerDomain, version, ZE_API_VERSION_1_3); + fillDdiEntry(pDdiTable->pfnEccAvailable, L0::globalDriverDispatch.sysmanDevice.pfnEccAvailable, version, ZE_API_VERSION_1_4); + fillDdiEntry(pDdiTable->pfnEccConfigurable, L0::globalDriverDispatch.sysmanDevice.pfnEccConfigurable, version, ZE_API_VERSION_1_4); + fillDdiEntry(pDdiTable->pfnGetEccState, L0::globalDriverDispatch.sysmanDevice.pfnGetEccState, version, ZE_API_VERSION_1_4); + fillDdiEntry(pDdiTable->pfnSetEccState, L0::globalDriverDispatch.sysmanDevice.pfnSetEccState, version, ZE_API_VERSION_1_4); + fillDdiEntry(pDdiTable->pfnGet, L0::globalDriverDispatch.sysmanDevice.pfnGet, version, ZE_API_VERSION_1_5); + fillDdiEntry(pDdiTable->pfnSetOverclockWaiver, L0::globalDriverDispatch.sysmanDevice.pfnSetOverclockWaiver, version, ZE_API_VERSION_1_5); + fillDdiEntry(pDdiTable->pfnGetOverclockDomains, L0::globalDriverDispatch.sysmanDevice.pfnGetOverclockDomains, version, ZE_API_VERSION_1_5); + fillDdiEntry(pDdiTable->pfnGetOverclockControls, L0::globalDriverDispatch.sysmanDevice.pfnGetOverclockControls, version, ZE_API_VERSION_1_5); + fillDdiEntry(pDdiTable->pfnResetOverclockSettings, L0::globalDriverDispatch.sysmanDevice.pfnResetOverclockSettings, version, ZE_API_VERSION_1_5); + fillDdiEntry(pDdiTable->pfnReadOverclockState, L0::globalDriverDispatch.sysmanDevice.pfnReadOverclockState, version, ZE_API_VERSION_1_5); + fillDdiEntry(pDdiTable->pfnEnumOverclockDomains, L0::globalDriverDispatch.sysmanDevice.pfnEnumOverclockDomains, version, ZE_API_VERSION_1_5); + fillDdiEntry(pDdiTable->pfnResetExt, L0::globalDriverDispatch.sysmanDevice.pfnResetExt, version, ZE_API_VERSION_1_7); return result; } @@ -74,11 +70,11 @@ zesGetGlobalProcAddrTable( zes_global_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.sysman.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnInit, L0::zesInit, version, ZE_API_VERSION_1_5); + fillDdiEntry(pDdiTable->pfnInit, L0::globalDriverDispatch.sysmanGlobal.pfnInit, version, ZE_API_VERSION_1_5); return result; } @@ -89,15 +85,15 @@ zesGetDriverProcAddrTable( zes_driver_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.sysman.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnEventListen, L0::zesDriverEventListen, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnEventListenEx, L0::zesDriverEventListenEx, version, ZE_API_VERSION_1_1); - fillDdiEntry(pDdiTable->pfnGet, L0::zesDriverGet, version, ZE_API_VERSION_1_5); - fillDdiEntry(pDdiTable->pfnGetExtensionProperties, L0::zesDriverGetExtensionProperties, version, ZE_API_VERSION_1_8); - fillDdiEntry(pDdiTable->pfnGetExtensionFunctionAddress, L0::zesDriverGetExtensionFunctionAddress, version, ZE_API_VERSION_1_8); + fillDdiEntry(pDdiTable->pfnEventListen, L0::globalDriverDispatch.sysmanDriver.pfnEventListen, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnEventListenEx, L0::globalDriverDispatch.sysmanDriver.pfnEventListenEx, version, ZE_API_VERSION_1_1); + fillDdiEntry(pDdiTable->pfnGet, L0::globalDriverDispatch.sysmanDriver.pfnGet, version, ZE_API_VERSION_1_5); + fillDdiEntry(pDdiTable->pfnGetExtensionProperties, L0::globalDriverDispatch.sysmanDriver.pfnGetExtensionProperties, version, ZE_API_VERSION_1_8); + fillDdiEntry(pDdiTable->pfnGetExtensionFunctionAddress, L0::globalDriverDispatch.sysmanDriver.pfnGetExtensionFunctionAddress, version, ZE_API_VERSION_1_8); return result; } @@ -107,13 +103,13 @@ zesGetDiagnosticsProcAddrTable( zes_diagnostics_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.sysman.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnGetProperties, L0::zesDiagnosticsGetProperties, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetTests, L0::zesDiagnosticsGetTests, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnRunTests, L0::zesDiagnosticsRunTests, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetProperties, L0::globalDriverDispatch.sysmanDiagnostics.pfnGetProperties, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetTests, L0::globalDriverDispatch.sysmanDiagnostics.pfnGetTests, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnRunTests, L0::globalDriverDispatch.sysmanDiagnostics.pfnRunTests, version, ZE_API_VERSION_1_0); return result; } @@ -124,14 +120,14 @@ zesGetEngineProcAddrTable( zes_engine_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.sysman.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnGetProperties, L0::zesEngineGetProperties, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetActivity, L0::zesEngineGetActivity, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetActivityExt, L0::zesEngineGetActivityExt, version, ZE_API_VERSION_1_7); + fillDdiEntry(pDdiTable->pfnGetProperties, L0::globalDriverDispatch.sysmanEngine.pfnGetProperties, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetActivity, L0::globalDriverDispatch.sysmanEngine.pfnGetActivity, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetActivityExt, L0::globalDriverDispatch.sysmanEngine.pfnGetActivityExt, version, ZE_API_VERSION_1_7); return result; } @@ -142,18 +138,18 @@ zesGetFabricPortProcAddrTable( zes_fabric_port_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.sysman.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnGetProperties, L0::zesFabricPortGetProperties, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetLinkType, L0::zesFabricPortGetLinkType, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetConfig, L0::zesFabricPortGetConfig, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnSetConfig, L0::zesFabricPortSetConfig, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetState, L0::zesFabricPortGetState, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetThroughput, L0::zesFabricPortGetThroughput, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetFabricErrorCounters, L0::zesFabricPortGetFabricErrorCounters, version, ZE_API_VERSION_1_7); - fillDdiEntry(pDdiTable->pfnGetMultiPortThroughput, L0::zesFabricPortGetMultiPortThroughput, version, ZE_API_VERSION_1_7); + fillDdiEntry(pDdiTable->pfnGetProperties, L0::globalDriverDispatch.sysmanFabricPort.pfnGetProperties, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetLinkType, L0::globalDriverDispatch.sysmanFabricPort.pfnGetLinkType, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetConfig, L0::globalDriverDispatch.sysmanFabricPort.pfnGetConfig, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnSetConfig, L0::globalDriverDispatch.sysmanFabricPort.pfnSetConfig, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetState, L0::globalDriverDispatch.sysmanFabricPort.pfnGetState, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetThroughput, L0::globalDriverDispatch.sysmanFabricPort.pfnGetThroughput, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetFabricErrorCounters, L0::globalDriverDispatch.sysmanFabricPort.pfnGetFabricErrorCounters, version, ZE_API_VERSION_1_7); + fillDdiEntry(pDdiTable->pfnGetMultiPortThroughput, L0::globalDriverDispatch.sysmanFabricPort.pfnGetMultiPortThroughput, version, ZE_API_VERSION_1_7); return result; } @@ -164,16 +160,16 @@ zesGetFanProcAddrTable( zes_fan_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.sysman.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnGetProperties, L0::zesFanGetProperties, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetConfig, L0::zesFanGetConfig, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnSetDefaultMode, L0::zesFanSetDefaultMode, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnSetFixedSpeedMode, L0::zesFanSetFixedSpeedMode, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnSetSpeedTableMode, L0::zesFanSetSpeedTableMode, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetState, L0::zesFanGetState, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetProperties, L0::globalDriverDispatch.sysmanFan.pfnGetProperties, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetConfig, L0::globalDriverDispatch.sysmanFan.pfnGetConfig, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnSetDefaultMode, L0::globalDriverDispatch.sysmanFan.pfnSetDefaultMode, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnSetFixedSpeedMode, L0::globalDriverDispatch.sysmanFan.pfnSetFixedSpeedMode, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnSetSpeedTableMode, L0::globalDriverDispatch.sysmanFan.pfnSetSpeedTableMode, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetState, L0::globalDriverDispatch.sysmanFan.pfnGetState, version, ZE_API_VERSION_1_0); return result; } @@ -184,14 +180,14 @@ zesGetFirmwareProcAddrTable( zes_firmware_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.sysman.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnGetProperties, L0::zesFirmwareGetProperties, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnFlash, L0::zesFirmwareFlash, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetFlashProgress, L0::zesFirmwareGetFlashProgress, version, ZE_API_VERSION_1_8); - fillDdiEntry(pDdiTable->pfnGetConsoleLogs, L0::zesFirmwareGetConsoleLogs, version, ZE_API_VERSION_1_9); + fillDdiEntry(pDdiTable->pfnGetProperties, L0::globalDriverDispatch.sysmanFirmware.pfnGetProperties, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnFlash, L0::globalDriverDispatch.sysmanFirmware.pfnFlash, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetFlashProgress, L0::globalDriverDispatch.sysmanFirmware.pfnGetFlashProgress, version, ZE_API_VERSION_1_8); + fillDdiEntry(pDdiTable->pfnGetConsoleLogs, L0::globalDriverDispatch.sysmanFirmware.pfnGetConsoleLogs, version, ZE_API_VERSION_1_9); return result; } @@ -202,28 +198,28 @@ zesGetFrequencyProcAddrTable( zes_frequency_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.sysman.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnGetProperties, L0::zesFrequencyGetProperties, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetAvailableClocks, L0::zesFrequencyGetAvailableClocks, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetRange, L0::zesFrequencyGetRange, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnSetRange, L0::zesFrequencySetRange, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetState, L0::zesFrequencyGetState, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetThrottleTime, L0::zesFrequencyGetThrottleTime, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnOcGetCapabilities, L0::zesFrequencyOcGetCapabilities, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnOcGetFrequencyTarget, L0::zesFrequencyOcGetFrequencyTarget, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnOcSetFrequencyTarget, L0::zesFrequencyOcSetFrequencyTarget, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnOcGetVoltageTarget, L0::zesFrequencyOcGetVoltageTarget, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnOcSetVoltageTarget, L0::zesFrequencyOcSetVoltageTarget, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnOcSetMode, L0::zesFrequencyOcSetMode, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnOcGetMode, L0::zesFrequencyOcGetMode, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnOcGetIccMax, L0::zesFrequencyOcGetIccMax, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnOcSetIccMax, L0::zesFrequencyOcSetIccMax, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnOcGetTjMax, L0::zesFrequencyOcGetTjMax, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnOcSetTjMax, L0::zesFrequencyOcSetTjMax, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetProperties, L0::globalDriverDispatch.sysmanFrequency.pfnGetProperties, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetAvailableClocks, L0::globalDriverDispatch.sysmanFrequency.pfnGetAvailableClocks, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetRange, L0::globalDriverDispatch.sysmanFrequency.pfnGetRange, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnSetRange, L0::globalDriverDispatch.sysmanFrequency.pfnSetRange, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetState, L0::globalDriverDispatch.sysmanFrequency.pfnGetState, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetThrottleTime, L0::globalDriverDispatch.sysmanFrequency.pfnGetThrottleTime, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnOcGetCapabilities, L0::globalDriverDispatch.sysmanFrequency.pfnOcGetCapabilities, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnOcGetFrequencyTarget, L0::globalDriverDispatch.sysmanFrequency.pfnOcGetFrequencyTarget, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnOcSetFrequencyTarget, L0::globalDriverDispatch.sysmanFrequency.pfnOcSetFrequencyTarget, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnOcGetVoltageTarget, L0::globalDriverDispatch.sysmanFrequency.pfnOcGetVoltageTarget, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnOcSetVoltageTarget, L0::globalDriverDispatch.sysmanFrequency.pfnOcSetVoltageTarget, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnOcSetMode, L0::globalDriverDispatch.sysmanFrequency.pfnOcSetMode, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnOcGetMode, L0::globalDriverDispatch.sysmanFrequency.pfnOcGetMode, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnOcGetIccMax, L0::globalDriverDispatch.sysmanFrequency.pfnOcGetIccMax, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnOcSetIccMax, L0::globalDriverDispatch.sysmanFrequency.pfnOcSetIccMax, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnOcGetTjMax, L0::globalDriverDispatch.sysmanFrequency.pfnOcGetTjMax, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnOcSetTjMax, L0::globalDriverDispatch.sysmanFrequency.pfnOcSetTjMax, version, ZE_API_VERSION_1_0); return result; } @@ -234,14 +230,14 @@ zesGetLedProcAddrTable( zes_led_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.sysman.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnGetProperties, L0::zesLedGetProperties, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetState, L0::zesLedGetState, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnSetState, L0::zesLedSetState, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnSetColor, L0::zesLedSetColor, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetProperties, L0::globalDriverDispatch.sysmanLed.pfnGetProperties, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetState, L0::globalDriverDispatch.sysmanLed.pfnGetState, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnSetState, L0::globalDriverDispatch.sysmanLed.pfnSetState, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnSetColor, L0::globalDriverDispatch.sysmanLed.pfnSetColor, version, ZE_API_VERSION_1_0); return result; } @@ -252,13 +248,13 @@ zesGetMemoryProcAddrTable( zes_memory_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.sysman.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnGetProperties, L0::zesMemoryGetProperties, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetState, L0::zesMemoryGetState, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetBandwidth, L0::zesMemoryGetBandwidth, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetProperties, L0::globalDriverDispatch.sysmanMemory.pfnGetProperties, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetState, L0::globalDriverDispatch.sysmanMemory.pfnGetState, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetBandwidth, L0::globalDriverDispatch.sysmanMemory.pfnGetBandwidth, version, ZE_API_VERSION_1_0); return result; } @@ -269,13 +265,13 @@ zesGetPerformanceFactorProcAddrTable( zes_performance_factor_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.sysman.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnGetProperties, L0::zesPerformanceFactorGetProperties, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetConfig, L0::zesPerformanceFactorGetConfig, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnSetConfig, L0::zesPerformanceFactorSetConfig, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetProperties, L0::globalDriverDispatch.sysmanPerformanceFactor.pfnGetProperties, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetConfig, L0::globalDriverDispatch.sysmanPerformanceFactor.pfnGetConfig, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnSetConfig, L0::globalDriverDispatch.sysmanPerformanceFactor.pfnSetConfig, version, ZE_API_VERSION_1_0); return result; } @@ -286,18 +282,18 @@ zesGetPowerProcAddrTable( zes_power_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.sysman.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnGetProperties, L0::zesPowerGetProperties, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetEnergyCounter, L0::zesPowerGetEnergyCounter, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetLimits, L0::zesPowerGetLimits, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnSetLimits, L0::zesPowerSetLimits, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetEnergyThreshold, L0::zesPowerGetEnergyThreshold, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnSetEnergyThreshold, L0::zesPowerSetEnergyThreshold, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetLimitsExt, L0::zesPowerGetLimitsExt, version, ZE_API_VERSION_1_4); - fillDdiEntry(pDdiTable->pfnSetLimitsExt, L0::zesPowerSetLimitsExt, version, ZE_API_VERSION_1_4); + fillDdiEntry(pDdiTable->pfnGetProperties, L0::globalDriverDispatch.sysmanPower.pfnGetProperties, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetEnergyCounter, L0::globalDriverDispatch.sysmanPower.pfnGetEnergyCounter, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetLimits, L0::globalDriverDispatch.sysmanPower.pfnGetLimits, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnSetLimits, L0::globalDriverDispatch.sysmanPower.pfnSetLimits, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetEnergyThreshold, L0::globalDriverDispatch.sysmanPower.pfnGetEnergyThreshold, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnSetEnergyThreshold, L0::globalDriverDispatch.sysmanPower.pfnSetEnergyThreshold, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetLimitsExt, L0::globalDriverDispatch.sysmanPower.pfnGetLimitsExt, version, ZE_API_VERSION_1_4); + fillDdiEntry(pDdiTable->pfnSetLimitsExt, L0::globalDriverDispatch.sysmanPower.pfnSetLimitsExt, version, ZE_API_VERSION_1_4); return result; } @@ -308,12 +304,12 @@ zesGetPsuProcAddrTable( zes_psu_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.sysman.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnGetProperties, L0::zesPsuGetProperties, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetState, L0::zesPsuGetState, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetProperties, L0::globalDriverDispatch.sysmanPsu.pfnGetProperties, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetState, L0::globalDriverDispatch.sysmanPsu.pfnGetState, version, ZE_API_VERSION_1_0); return result; } @@ -324,14 +320,14 @@ zesGetRasProcAddrTable( zes_ras_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.sysman.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnGetProperties, L0::zesRasGetProperties, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetConfig, L0::zesRasGetConfig, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnSetConfig, L0::zesRasSetConfig, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetState, L0::zesRasGetState, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetProperties, L0::globalDriverDispatch.sysmanRas.pfnGetProperties, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetConfig, L0::globalDriverDispatch.sysmanRas.pfnGetConfig, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnSetConfig, L0::globalDriverDispatch.sysmanRas.pfnSetConfig, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetState, L0::globalDriverDispatch.sysmanRas.pfnGetState, version, ZE_API_VERSION_1_0); return result; } @@ -342,12 +338,12 @@ zesGetRasExpProcAddrTable( zes_ras_exp_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.sysman.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnGetStateExp, L0::zesRasGetStateExp, version, ZE_API_VERSION_1_7); - fillDdiEntry(pDdiTable->pfnClearStateExp, L0::zesRasClearStateExp, version, ZE_API_VERSION_1_7); + fillDdiEntry(pDdiTable->pfnGetStateExp, L0::globalDriverDispatch.sysmanRasExp.pfnGetStateExp, version, ZE_API_VERSION_1_7); + fillDdiEntry(pDdiTable->pfnClearStateExp, L0::globalDriverDispatch.sysmanRasExp.pfnClearStateExp, version, ZE_API_VERSION_1_7); return result; } @@ -356,12 +352,11 @@ ZE_DLLEXPORT ze_result_t ZE_APICALL zesGetDriverExpProcAddrTable( ze_api_version_t version, zes_driver_exp_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version) || - ZE_MINOR_VERSION(driverDdiTable.version) > ZE_MINOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.sysman.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnGetDeviceByUuidExp, L0::zesDriverGetDeviceByUuidExp, version, ZE_API_VERSION_1_9); + fillDdiEntry(pDdiTable->pfnGetDeviceByUuidExp, L0::globalDriverDispatch.sysmanDriverExp.pfnGetDeviceByUuidExp, version, ZE_API_VERSION_1_9); return result; } @@ -371,14 +366,13 @@ ZE_DLLEXPORT ze_result_t ZE_APICALL zesGetDeviceExpProcAddrTable( zes_device_exp_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version) || - ZE_MINOR_VERSION(driverDdiTable.version) > ZE_MINOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.sysman.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnGetSubDevicePropertiesExp, L0::zesDeviceGetSubDevicePropertiesExp, version, ZE_API_VERSION_1_9); - fillDdiEntry(pDdiTable->pfnEnumActiveVFExp, L0::zesDeviceEnumActiveVFExp, version, ZE_API_VERSION_1_9); - fillDdiEntry(pDdiTable->pfnEnumEnabledVFExp, L0::zesDeviceEnumEnabledVFExp, version, ZE_API_VERSION_1_11); + fillDdiEntry(pDdiTable->pfnGetSubDevicePropertiesExp, L0::globalDriverDispatch.sysmanDeviceExp.pfnGetSubDevicePropertiesExp, version, ZE_API_VERSION_1_9); + fillDdiEntry(pDdiTable->pfnEnumActiveVFExp, L0::globalDriverDispatch.sysmanDeviceExp.pfnEnumActiveVFExp, version, ZE_API_VERSION_1_9); + fillDdiEntry(pDdiTable->pfnEnumEnabledVFExp, L0::globalDriverDispatch.sysmanDeviceExp.pfnEnumEnabledVFExp, version, ZE_API_VERSION_1_11); return result; } @@ -389,20 +383,19 @@ zesGetVFManagementExpProcAddrTable( zes_vf_management_exp_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version) || - ZE_MINOR_VERSION(driverDdiTable.version) > ZE_MINOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.sysman.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnGetVFPropertiesExp, L0::zesVFManagementGetVFPropertiesExp, version, ZE_API_VERSION_1_9); - fillDdiEntry(pDdiTable->pfnGetVFMemoryUtilizationExp, L0::zesVFManagementGetVFMemoryUtilizationExp, version, ZE_API_VERSION_1_9); - fillDdiEntry(pDdiTable->pfnGetVFEngineUtilizationExp, L0::zesVFManagementGetVFEngineUtilizationExp, version, ZE_API_VERSION_1_9); - fillDdiEntry(pDdiTable->pfnSetVFTelemetryModeExp, L0::zesVFManagementSetVFTelemetryModeExp, version, ZE_API_VERSION_1_9); - fillDdiEntry(pDdiTable->pfnSetVFTelemetrySamplingIntervalExp, L0::zesVFManagementSetVFTelemetrySamplingIntervalExp, version, ZE_API_VERSION_1_9); - fillDdiEntry(pDdiTable->pfnGetVFCapabilitiesExp, L0::zesVFManagementGetVFCapabilitiesExp, version, ZE_API_VERSION_1_11); - fillDdiEntry(pDdiTable->pfnGetVFMemoryUtilizationExp2, L0::zesVFManagementGetVFMemoryUtilizationExp2, version, ZE_API_VERSION_1_11); - fillDdiEntry(pDdiTable->pfnGetVFEngineUtilizationExp2, L0::zesVFManagementGetVFEngineUtilizationExp2, version, ZE_API_VERSION_1_11); - fillDdiEntry(pDdiTable->pfnGetVFCapabilitiesExp2, L0::zesVFManagementGetVFCapabilitiesExp2, version, ZE_API_VERSION_1_12); + fillDdiEntry(pDdiTable->pfnGetVFPropertiesExp, L0::globalDriverDispatch.sysmanVFManagementExp.pfnGetVFPropertiesExp, version, ZE_API_VERSION_1_9); + fillDdiEntry(pDdiTable->pfnGetVFMemoryUtilizationExp, L0::globalDriverDispatch.sysmanVFManagementExp.pfnGetVFMemoryUtilizationExp, version, ZE_API_VERSION_1_9); + fillDdiEntry(pDdiTable->pfnGetVFEngineUtilizationExp, L0::globalDriverDispatch.sysmanVFManagementExp.pfnGetVFEngineUtilizationExp, version, ZE_API_VERSION_1_9); + fillDdiEntry(pDdiTable->pfnSetVFTelemetryModeExp, L0::globalDriverDispatch.sysmanVFManagementExp.pfnSetVFTelemetryModeExp, version, ZE_API_VERSION_1_9); + fillDdiEntry(pDdiTable->pfnSetVFTelemetrySamplingIntervalExp, L0::globalDriverDispatch.sysmanVFManagementExp.pfnSetVFTelemetrySamplingIntervalExp, version, ZE_API_VERSION_1_9); + fillDdiEntry(pDdiTable->pfnGetVFCapabilitiesExp, L0::globalDriverDispatch.sysmanVFManagementExp.pfnGetVFCapabilitiesExp, version, ZE_API_VERSION_1_11); + fillDdiEntry(pDdiTable->pfnGetVFMemoryUtilizationExp2, L0::globalDriverDispatch.sysmanVFManagementExp.pfnGetVFMemoryUtilizationExp2, version, ZE_API_VERSION_1_11); + fillDdiEntry(pDdiTable->pfnGetVFEngineUtilizationExp2, L0::globalDriverDispatch.sysmanVFManagementExp.pfnGetVFEngineUtilizationExp2, version, ZE_API_VERSION_1_11); + fillDdiEntry(pDdiTable->pfnGetVFCapabilitiesExp2, L0::globalDriverDispatch.sysmanVFManagementExp.pfnGetVFCapabilitiesExp2, version, ZE_API_VERSION_1_12); return result; } @@ -412,13 +405,12 @@ ZE_DLLEXPORT ze_result_t ZE_APICALL zesGetFirmwareExpProcAddrTable( zes_firmware_exp_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version) || - ZE_MINOR_VERSION(driverDdiTable.version) > ZE_MINOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.sysman.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnGetSecurityVersionExp, L0::zesFirmwareGetSecurityVersionExp, version, ZE_API_VERSION_1_9); - fillDdiEntry(pDdiTable->pfnSetSecurityVersionExp, L0::zesFirmwareSetSecurityVersionExp, version, ZE_API_VERSION_1_9); + fillDdiEntry(pDdiTable->pfnGetSecurityVersionExp, L0::globalDriverDispatch.sysmanFirmwareExp.pfnGetSecurityVersionExp, version, ZE_API_VERSION_1_9); + fillDdiEntry(pDdiTable->pfnSetSecurityVersionExp, L0::globalDriverDispatch.sysmanFirmwareExp.pfnSetSecurityVersionExp, version, ZE_API_VERSION_1_9); return result; } @@ -429,18 +421,18 @@ zesGetSchedulerProcAddrTable( zes_scheduler_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.sysman.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnGetProperties, L0::zesSchedulerGetProperties, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetCurrentMode, L0::zesSchedulerGetCurrentMode, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetTimeoutModeProperties, L0::zesSchedulerGetTimeoutModeProperties, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetTimesliceModeProperties, L0::zesSchedulerGetTimesliceModeProperties, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnSetTimeoutMode, L0::zesSchedulerSetTimeoutMode, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnSetTimesliceMode, L0::zesSchedulerSetTimesliceMode, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnSetExclusiveMode, L0::zesSchedulerSetExclusiveMode, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnSetComputeUnitDebugMode, L0::zesSchedulerSetComputeUnitDebugMode, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetProperties, L0::globalDriverDispatch.sysmanScheduler.pfnGetProperties, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetCurrentMode, L0::globalDriverDispatch.sysmanScheduler.pfnGetCurrentMode, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetTimeoutModeProperties, L0::globalDriverDispatch.sysmanScheduler.pfnGetTimeoutModeProperties, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetTimesliceModeProperties, L0::globalDriverDispatch.sysmanScheduler.pfnGetTimesliceModeProperties, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnSetTimeoutMode, L0::globalDriverDispatch.sysmanScheduler.pfnSetTimeoutMode, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnSetTimesliceMode, L0::globalDriverDispatch.sysmanScheduler.pfnSetTimesliceMode, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnSetExclusiveMode, L0::globalDriverDispatch.sysmanScheduler.pfnSetExclusiveMode, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnSetComputeUnitDebugMode, L0::globalDriverDispatch.sysmanScheduler.pfnSetComputeUnitDebugMode, version, ZE_API_VERSION_1_0); return result; } @@ -451,13 +443,13 @@ zesGetStandbyProcAddrTable( zes_standby_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.sysman.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnGetProperties, L0::zesStandbyGetProperties, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetMode, L0::zesStandbyGetMode, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnSetMode, L0::zesStandbySetMode, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetProperties, L0::globalDriverDispatch.sysmanStandby.pfnGetProperties, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetMode, L0::globalDriverDispatch.sysmanStandby.pfnGetMode, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnSetMode, L0::globalDriverDispatch.sysmanStandby.pfnSetMode, version, ZE_API_VERSION_1_0); return result; } @@ -468,14 +460,14 @@ zesGetTemperatureProcAddrTable( zes_temperature_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.sysman.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnGetProperties, L0::zesTemperatureGetProperties, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetConfig, L0::zesTemperatureGetConfig, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnSetConfig, L0::zesTemperatureSetConfig, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetState, L0::zesTemperatureGetState, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetProperties, L0::globalDriverDispatch.sysmanTemperature.pfnGetProperties, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetConfig, L0::globalDriverDispatch.sysmanTemperature.pfnGetConfig, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnSetConfig, L0::globalDriverDispatch.sysmanTemperature.pfnSetConfig, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetState, L0::globalDriverDispatch.sysmanTemperature.pfnGetState, version, ZE_API_VERSION_1_0); return result; } @@ -487,19 +479,19 @@ zesGetOverclockProcAddrTable( ) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.sysman.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnGetDomainProperties, L0::zesOverclockGetDomainProperties, version, ZE_API_VERSION_1_5); - fillDdiEntry(pDdiTable->pfnGetDomainVFProperties, L0::zesOverclockGetDomainVFProperties, version, ZE_API_VERSION_1_5); - fillDdiEntry(pDdiTable->pfnGetDomainControlProperties, L0::zesOverclockGetDomainControlProperties, version, ZE_API_VERSION_1_5); - fillDdiEntry(pDdiTable->pfnGetControlCurrentValue, L0::zesOverclockGetControlCurrentValue, version, ZE_API_VERSION_1_5); - fillDdiEntry(pDdiTable->pfnGetControlPendingValue, L0::zesOverclockGetControlPendingValue, version, ZE_API_VERSION_1_5); - fillDdiEntry(pDdiTable->pfnSetControlUserValue, L0::zesOverclockSetControlUserValue, version, ZE_API_VERSION_1_5); - fillDdiEntry(pDdiTable->pfnGetControlState, L0::zesOverclockGetControlState, version, ZE_API_VERSION_1_5); - fillDdiEntry(pDdiTable->pfnGetVFPointValues, L0::zesOverclockGetVFPointValues, version, ZE_API_VERSION_1_5); - fillDdiEntry(pDdiTable->pfnSetVFPointValues, L0::zesOverclockSetVFPointValues, version, ZE_API_VERSION_1_5); + fillDdiEntry(pDdiTable->pfnGetDomainProperties, L0::globalDriverDispatch.sysmanOverclock.pfnGetDomainProperties, version, ZE_API_VERSION_1_5); + fillDdiEntry(pDdiTable->pfnGetDomainVFProperties, L0::globalDriverDispatch.sysmanOverclock.pfnGetDomainVFProperties, version, ZE_API_VERSION_1_5); + fillDdiEntry(pDdiTable->pfnGetDomainControlProperties, L0::globalDriverDispatch.sysmanOverclock.pfnGetDomainControlProperties, version, ZE_API_VERSION_1_5); + fillDdiEntry(pDdiTable->pfnGetControlCurrentValue, L0::globalDriverDispatch.sysmanOverclock.pfnGetControlCurrentValue, version, ZE_API_VERSION_1_5); + fillDdiEntry(pDdiTable->pfnGetControlPendingValue, L0::globalDriverDispatch.sysmanOverclock.pfnGetControlPendingValue, version, ZE_API_VERSION_1_5); + fillDdiEntry(pDdiTable->pfnSetControlUserValue, L0::globalDriverDispatch.sysmanOverclock.pfnSetControlUserValue, version, ZE_API_VERSION_1_5); + fillDdiEntry(pDdiTable->pfnGetControlState, L0::globalDriverDispatch.sysmanOverclock.pfnGetControlState, version, ZE_API_VERSION_1_5); + fillDdiEntry(pDdiTable->pfnGetVFPointValues, L0::globalDriverDispatch.sysmanOverclock.pfnGetVFPointValues, version, ZE_API_VERSION_1_5); + fillDdiEntry(pDdiTable->pfnSetVFPointValues, L0::globalDriverDispatch.sysmanOverclock.pfnSetVFPointValues, version, ZE_API_VERSION_1_5); return result; } diff --git a/level_zero/api/tools/ze_tools_loader.cpp b/level_zero/api/tools/ze_tools_loader.cpp index d26ff0a600..87941d8298 100644 --- a/level_zero/api/tools/ze_tools_loader.cpp +++ b/level_zero/api/tools/ze_tools_loader.cpp @@ -5,8 +5,7 @@ * */ -#include "level_zero/api/driver_experimental/tracing/zet_tracing.h" -#include "level_zero/api/extensions/public/ze_exp_ext.h" +#include "level_zero/ddi/ze_ddi_tables.h" #include #include #include @@ -14,11 +13,6 @@ #include #include -#include "ze_ddi_tables.h" -#include "zet_tools_all_api_entrypoints.h" - -extern ze_gpu_driver_dditable_t driverDdiTable; - ZE_DLLEXPORT ze_result_t ZE_APICALL zetGetContextProcAddrTable( ze_api_version_t version, @@ -26,9 +20,9 @@ zetGetContextProcAddrTable( ze_result_t result = ZE_RESULT_SUCCESS; if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.tools.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; - fillDdiEntry(pDdiTable->pfnActivateMetricGroups, L0::zetContextActivateMetricGroups, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnActivateMetricGroups, L0::globalDriverDispatch.toolsContext.pfnActivateMetricGroups, version, ZE_API_VERSION_1_0); return result; } @@ -38,13 +32,13 @@ zetGetMetricStreamerProcAddrTable( zet_metric_streamer_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.tools.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnOpen, L0::zetMetricStreamerOpen, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnClose, L0::zetMetricStreamerClose, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnReadData, L0::zetMetricStreamerReadData, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnOpen, L0::globalDriverDispatch.toolsMetricStreamer.pfnOpen, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnClose, L0::globalDriverDispatch.toolsMetricStreamer.pfnClose, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnReadData, L0::globalDriverDispatch.toolsMetricStreamer.pfnReadData, version, ZE_API_VERSION_1_0); return result; } @@ -55,14 +49,14 @@ zetGetTracerExpProcAddrTable( zet_tracer_exp_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.tools.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnCreate, L0::zetTracerExpCreate, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnDestroy, L0::zetTracerExpDestroy, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnSetPrologues, L0::zetTracerExpSetPrologues, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnSetEpilogues, L0::zetTracerExpSetEpilogues, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnSetEnabled, L0::zetTracerExpSetEnabled, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnCreate, L0::globalDriverDispatch.toolsTracerExp.pfnCreate, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnDestroy, L0::globalDriverDispatch.toolsTracerExp.pfnDestroy, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnSetPrologues, L0::globalDriverDispatch.toolsTracerExp.pfnSetPrologues, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnSetEpilogues, L0::globalDriverDispatch.toolsTracerExp.pfnSetEpilogues, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnSetEnabled, L0::globalDriverDispatch.toolsTracerExp.pfnSetEnabled, version, ZE_API_VERSION_1_0); return result; } @@ -72,13 +66,13 @@ zetGetCommandListProcAddrTable( zet_command_list_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.tools.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnAppendMetricStreamerMarker, L0::zetCommandListAppendMetricStreamerMarker, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnAppendMetricQueryBegin, L0::zetCommandListAppendMetricQueryBegin, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnAppendMetricQueryEnd, L0::zetCommandListAppendMetricQueryEnd, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnAppendMetricMemoryBarrier, L0::zetCommandListAppendMetricMemoryBarrier, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnAppendMetricStreamerMarker, L0::globalDriverDispatch.toolsCommandList.pfnAppendMetricStreamerMarker, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnAppendMetricQueryBegin, L0::globalDriverDispatch.toolsCommandList.pfnAppendMetricQueryBegin, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnAppendMetricQueryEnd, L0::globalDriverDispatch.toolsCommandList.pfnAppendMetricQueryEnd, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnAppendMetricMemoryBarrier, L0::globalDriverDispatch.toolsCommandList.pfnAppendMetricMemoryBarrier, version, ZE_API_VERSION_1_0); return result; } @@ -88,10 +82,10 @@ zetGetModuleProcAddrTable( zet_module_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.tools.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnGetDebugInfo, L0::zetModuleGetDebugInfo, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetDebugInfo, L0::globalDriverDispatch.toolsModule.pfnGetDebugInfo, version, ZE_API_VERSION_1_0); return result; } @@ -101,10 +95,10 @@ zetGetKernelProcAddrTable( zet_kernel_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.tools.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnGetProfileInfo, L0::zetKernelGetProfileInfo, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetProfileInfo, L0::globalDriverDispatch.toolsKernel.pfnGetProfileInfo, version, ZE_API_VERSION_1_0); return result; } @@ -114,12 +108,12 @@ zetGetMetricGroupProcAddrTable( zet_metric_group_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.tools.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnGet, L0::zetMetricGroupGet, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetProperties, L0::zetMetricGroupGetProperties, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnCalculateMetricValues, L0::zetMetricGroupCalculateMetricValues, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGet, L0::globalDriverDispatch.toolsMetricGroup.pfnGet, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetProperties, L0::globalDriverDispatch.toolsMetricGroup.pfnGetProperties, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnCalculateMetricValues, L0::globalDriverDispatch.toolsMetricGroup.pfnCalculateMetricValues, version, ZE_API_VERSION_1_0); return result; } @@ -129,12 +123,12 @@ zetGetMetricProcAddrTable( zet_metric_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.tools.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnGet, L0::zetMetricGet, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetProperties, L0::zetMetricGetProperties, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGet, L0::globalDriverDispatch.toolsMetric.pfnGet, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetProperties, L0::globalDriverDispatch.toolsMetric.pfnGetProperties, version, ZE_API_VERSION_1_0); return result; } @@ -144,11 +138,11 @@ zetGetMetricQueryPoolProcAddrTable( zet_metric_query_pool_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.tools.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnCreate, L0::zetMetricQueryPoolCreate, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnDestroy, L0::zetMetricQueryPoolDestroy, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnCreate, L0::globalDriverDispatch.toolsMetricQueryPool.pfnCreate, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnDestroy, L0::globalDriverDispatch.toolsMetricQueryPool.pfnDestroy, version, ZE_API_VERSION_1_0); return result; } @@ -158,14 +152,14 @@ zetGetMetricQueryProcAddrTable( zet_metric_query_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.tools.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnCreate, L0::zetMetricQueryCreate, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnDestroy, L0::zetMetricQueryDestroy, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnReset, L0::zetMetricQueryReset, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetData, L0::zetMetricQueryGetData, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnCreate, L0::globalDriverDispatch.toolsMetricQuery.pfnCreate, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnDestroy, L0::globalDriverDispatch.toolsMetricQuery.pfnDestroy, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnReset, L0::globalDriverDispatch.toolsMetricQuery.pfnReset, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetData, L0::globalDriverDispatch.toolsMetricQuery.pfnGetData, version, ZE_API_VERSION_1_0); return result; } @@ -175,11 +169,11 @@ zetGetDeviceProcAddrTable( zet_device_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.tools.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnGetDebugProperties, L0::zetDeviceGetDebugProperties, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetDebugProperties, L0::globalDriverDispatch.toolsDevice.pfnGetDebugProperties, version, ZE_API_VERSION_1_0); return result; } @@ -189,22 +183,22 @@ zetGetDebugProcAddrTable( zet_debug_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.tools.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnAttach, L0::zetDebugAttach, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnDetach, L0::zetDebugDetach, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnReadEvent, L0::zetDebugReadEvent, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnAcknowledgeEvent, L0::zetDebugAcknowledgeEvent, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnInterrupt, L0::zetDebugInterrupt, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnResume, L0::zetDebugResume, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnReadMemory, L0::zetDebugReadMemory, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnWriteMemory, L0::zetDebugWriteMemory, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetRegisterSetProperties, L0::zetDebugGetRegisterSetProperties, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnReadRegisters, L0::zetDebugReadRegisters, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnWriteRegisters, L0::zetDebugWriteRegisters, version, ZE_API_VERSION_1_0); - fillDdiEntry(pDdiTable->pfnGetThreadRegisterSetProperties, L0::zetDebugGetThreadRegisterSetProperties, version, ZE_API_VERSION_1_5); + fillDdiEntry(pDdiTable->pfnAttach, L0::globalDriverDispatch.toolsDebug.pfnAttach, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnDetach, L0::globalDriverDispatch.toolsDebug.pfnDetach, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnReadEvent, L0::globalDriverDispatch.toolsDebug.pfnReadEvent, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnAcknowledgeEvent, L0::globalDriverDispatch.toolsDebug.pfnAcknowledgeEvent, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnInterrupt, L0::globalDriverDispatch.toolsDebug.pfnInterrupt, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnResume, L0::globalDriverDispatch.toolsDebug.pfnResume, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnReadMemory, L0::globalDriverDispatch.toolsDebug.pfnReadMemory, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnWriteMemory, L0::globalDriverDispatch.toolsDebug.pfnWriteMemory, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetRegisterSetProperties, L0::globalDriverDispatch.toolsDebug.pfnGetRegisterSetProperties, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnReadRegisters, L0::globalDriverDispatch.toolsDebug.pfnReadRegisters, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnWriteRegisters, L0::globalDriverDispatch.toolsDebug.pfnWriteRegisters, version, ZE_API_VERSION_1_0); + fillDdiEntry(pDdiTable->pfnGetThreadRegisterSetProperties, L0::globalDriverDispatch.toolsDebug.pfnGetThreadRegisterSetProperties, version, ZE_API_VERSION_1_5); return result; } @@ -215,19 +209,19 @@ zetGetMetricGroupExpProcAddrTable( zet_metric_group_exp_dditable_t *pDdiTable) { if (nullptr == pDdiTable) return ZE_RESULT_ERROR_INVALID_ARGUMENT; - if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version)) + if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.tools.version) != ZE_MAJOR_VERSION(version)) return ZE_RESULT_ERROR_UNSUPPORTED_VERSION; ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnCalculateMultipleMetricValuesExp, L0::zetMetricGroupCalculateMultipleMetricValuesExp, version, ZE_API_VERSION_1_5); - fillDdiEntry(pDdiTable->pfnGetGlobalTimestampsExp, L0::zetMetricGroupGetGlobalTimestampsExp, version, ZE_API_VERSION_1_5); - fillDdiEntry(pDdiTable->pfnGetExportDataExp, L0::zetMetricGroupGetExportDataExp, version, ZE_API_VERSION_1_6); - fillDdiEntry(pDdiTable->pfnCalculateMetricExportDataExp, L0::zetDriverCalculateMetricExportDataExp, version, ZE_API_VERSION_1_6); - fillDdiEntry(pDdiTable->pfnCreateExp, L0::zetMetricGroupCreateExp, version, ZE_API_VERSION_1_9); - fillDdiEntry(pDdiTable->pfnAddMetricExp, L0::zetMetricGroupAddMetricExp, version, ZE_API_VERSION_1_9); - fillDdiEntry(pDdiTable->pfnRemoveMetricExp, L0::zetMetricGroupRemoveMetricExp, version, ZE_API_VERSION_1_9); - fillDdiEntry(pDdiTable->pfnCloseExp, L0::zetMetricGroupCloseExp, version, ZE_API_VERSION_1_9); - fillDdiEntry(pDdiTable->pfnDestroyExp, L0::zetMetricGroupDestroyExp, version, ZE_API_VERSION_1_9); + fillDdiEntry(pDdiTable->pfnCalculateMultipleMetricValuesExp, L0::globalDriverDispatch.toolsMetricGroupExp.pfnCalculateMultipleMetricValuesExp, version, ZE_API_VERSION_1_5); + fillDdiEntry(pDdiTable->pfnGetGlobalTimestampsExp, L0::globalDriverDispatch.toolsMetricGroupExp.pfnGetGlobalTimestampsExp, version, ZE_API_VERSION_1_5); + fillDdiEntry(pDdiTable->pfnGetExportDataExp, L0::globalDriverDispatch.toolsMetricGroupExp.pfnGetExportDataExp, version, ZE_API_VERSION_1_6); + fillDdiEntry(pDdiTable->pfnCalculateMetricExportDataExp, L0::globalDriverDispatch.toolsMetricGroupExp.pfnCalculateMetricExportDataExp, version, ZE_API_VERSION_1_6); + fillDdiEntry(pDdiTable->pfnCreateExp, L0::globalDriverDispatch.toolsMetricGroupExp.pfnCreateExp, version, ZE_API_VERSION_1_9); + fillDdiEntry(pDdiTable->pfnAddMetricExp, L0::globalDriverDispatch.toolsMetricGroupExp.pfnAddMetricExp, version, ZE_API_VERSION_1_9); + fillDdiEntry(pDdiTable->pfnRemoveMetricExp, L0::globalDriverDispatch.toolsMetricGroupExp.pfnRemoveMetricExp, version, ZE_API_VERSION_1_9); + fillDdiEntry(pDdiTable->pfnCloseExp, L0::globalDriverDispatch.toolsMetricGroupExp.pfnCloseExp, version, ZE_API_VERSION_1_9); + fillDdiEntry(pDdiTable->pfnDestroyExp, L0::globalDriverDispatch.toolsMetricGroupExp.pfnDestroyExp, version, ZE_API_VERSION_1_9); return result; } @@ -241,10 +235,10 @@ zetGetMetricProgrammableExpProcAddrTable( return ZE_RESULT_ERROR_INVALID_ARGUMENT; ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnGetExp, L0::zetMetricProgrammableGetExp, version, ZE_API_VERSION_1_9); - fillDdiEntry(pDdiTable->pfnGetPropertiesExp, L0::zetMetricProgrammableGetPropertiesExp, version, ZE_API_VERSION_1_9); - fillDdiEntry(pDdiTable->pfnGetParamInfoExp, L0::zetMetricProgrammableGetParamInfoExp, version, ZE_API_VERSION_1_9); - fillDdiEntry(pDdiTable->pfnGetParamValueInfoExp, L0::zetMetricProgrammableGetParamValueInfoExp, version, ZE_API_VERSION_1_9); + fillDdiEntry(pDdiTable->pfnGetExp, L0::globalDriverDispatch.toolsMetricProgrammableExp.pfnGetExp, version, ZE_API_VERSION_1_9); + fillDdiEntry(pDdiTable->pfnGetPropertiesExp, L0::globalDriverDispatch.toolsMetricProgrammableExp.pfnGetPropertiesExp, version, ZE_API_VERSION_1_9); + fillDdiEntry(pDdiTable->pfnGetParamInfoExp, L0::globalDriverDispatch.toolsMetricProgrammableExp.pfnGetParamInfoExp, version, ZE_API_VERSION_1_9); + fillDdiEntry(pDdiTable->pfnGetParamValueInfoExp, L0::globalDriverDispatch.toolsMetricProgrammableExp.pfnGetParamValueInfoExp, version, ZE_API_VERSION_1_9); return result; } @@ -258,8 +252,8 @@ zetGetMetricExpProcAddrTable( return ZE_RESULT_ERROR_INVALID_ARGUMENT; ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnCreateFromProgrammableExp, L0::zetMetricCreateFromProgrammableExp, version, ZE_API_VERSION_1_9); - fillDdiEntry(pDdiTable->pfnDestroyExp, L0::zetMetricDestroyExp, version, ZE_API_VERSION_1_9); + fillDdiEntry(pDdiTable->pfnCreateFromProgrammableExp, L0::globalDriverDispatch.toolsMetricExp.pfnCreateFromProgrammableExp, version, ZE_API_VERSION_1_9); + fillDdiEntry(pDdiTable->pfnDestroyExp, L0::globalDriverDispatch.toolsMetricExp.pfnDestroyExp, version, ZE_API_VERSION_1_9); return result; } @@ -273,12 +267,12 @@ zetGetMetricTracerExpProcAddrTable( ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnCreateExp, L0::zetMetricTracerCreateExp, version, ZE_API_VERSION_1_11); - fillDdiEntry(pDdiTable->pfnDestroyExp, L0::zetMetricTracerDestroyExp, version, ZE_API_VERSION_1_11); - fillDdiEntry(pDdiTable->pfnEnableExp, L0::zetMetricTracerEnableExp, version, ZE_API_VERSION_1_11); - fillDdiEntry(pDdiTable->pfnDisableExp, L0::zetMetricTracerDisableExp, version, ZE_API_VERSION_1_11); - fillDdiEntry(pDdiTable->pfnReadDataExp, L0::zetMetricTracerReadDataExp, version, ZE_API_VERSION_1_11); - fillDdiEntry(pDdiTable->pfnDecodeExp, L0::zetMetricTracerDecodeExp, version, ZE_API_VERSION_1_11); + fillDdiEntry(pDdiTable->pfnCreateExp, L0::globalDriverDispatch.toolsMetricTracerExp.pfnCreateExp, version, ZE_API_VERSION_1_11); + fillDdiEntry(pDdiTable->pfnDestroyExp, L0::globalDriverDispatch.toolsMetricTracerExp.pfnDestroyExp, version, ZE_API_VERSION_1_11); + fillDdiEntry(pDdiTable->pfnEnableExp, L0::globalDriverDispatch.toolsMetricTracerExp.pfnEnableExp, version, ZE_API_VERSION_1_11); + fillDdiEntry(pDdiTable->pfnDisableExp, L0::globalDriverDispatch.toolsMetricTracerExp.pfnDisableExp, version, ZE_API_VERSION_1_11); + fillDdiEntry(pDdiTable->pfnReadDataExp, L0::globalDriverDispatch.toolsMetricTracerExp.pfnReadDataExp, version, ZE_API_VERSION_1_11); + fillDdiEntry(pDdiTable->pfnDecodeExp, L0::globalDriverDispatch.toolsMetricTracerExp.pfnDecodeExp, version, ZE_API_VERSION_1_11); return result; } @@ -293,9 +287,9 @@ zetGetMetricDecoderExpProcAddrTable( ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnCreateExp, L0::zetMetricDecoderCreateExp, version, ZE_API_VERSION_1_11); - fillDdiEntry(pDdiTable->pfnDestroyExp, L0::zetMetricDecoderDestroyExp, version, ZE_API_VERSION_1_11); - fillDdiEntry(pDdiTable->pfnGetDecodableMetricsExp, L0::zetMetricDecoderGetDecodableMetricsExp, version, ZE_API_VERSION_1_11); + fillDdiEntry(pDdiTable->pfnCreateExp, L0::globalDriverDispatch.toolsMetricDecoderExp.pfnCreateExp, version, ZE_API_VERSION_1_11); + fillDdiEntry(pDdiTable->pfnDestroyExp, L0::globalDriverDispatch.toolsMetricDecoderExp.pfnDestroyExp, version, ZE_API_VERSION_1_11); + fillDdiEntry(pDdiTable->pfnGetDecodableMetricsExp, L0::globalDriverDispatch.toolsMetricDecoderExp.pfnGetDecodableMetricsExp, version, ZE_API_VERSION_1_11); return result; } @@ -310,8 +304,8 @@ zetGetDeviceExpProcAddrTable( ze_result_t result = ZE_RESULT_SUCCESS; - fillDdiEntry(pDdiTable->pfnGetConcurrentMetricGroupsExp, L0::zetDeviceGetConcurrentMetricGroupsExp, version, ZE_API_VERSION_1_11); - fillDdiEntry(pDdiTable->pfnCreateMetricGroupsFromMetricsExp, L0::zetDeviceCreateMetricGroupsFromMetricsExp, version, ZE_API_VERSION_1_11); + fillDdiEntry(pDdiTable->pfnGetConcurrentMetricGroupsExp, L0::globalDriverDispatch.toolsDeviceExp.pfnGetConcurrentMetricGroupsExp, version, ZE_API_VERSION_1_11); + fillDdiEntry(pDdiTable->pfnCreateMetricGroupsFromMetricsExp, L0::globalDriverDispatch.toolsDeviceExp.pfnCreateMetricGroupsFromMetricsExp, version, ZE_API_VERSION_1_11); return result; } \ No newline at end of file diff --git a/level_zero/core/source/global_teardown.cpp b/level_zero/core/source/global_teardown.cpp index f52af48ee4..bb1cced6b0 100644 --- a/level_zero/core/source/global_teardown.cpp +++ b/level_zero/core/source/global_teardown.cpp @@ -11,6 +11,7 @@ #include "level_zero/core/source/driver/driver.h" #include "level_zero/core/source/driver/driver_handle_imp.h" +#include "level_zero/ddi/ze_ddi_tables.h" #include "level_zero/sysman/source/driver/sysman_driver_handle_imp.h" namespace L0 { @@ -19,6 +20,9 @@ decltype(&zelLoaderTranslateHandle) loaderTranslateHandleFunc = nullptr; decltype(&zelSetDriverTeardown) setDriverTeardownFunc = nullptr; void globalDriverSetup() { + globalDriverDispatch.core.isValidFlag = true; + globalDriverDispatch.tools.isValidFlag = true; + globalDriverDispatch.sysman.isValidFlag = true; if (!globalDriverHandles) { globalDriverHandles = new std::vector<_ze_driver_handle_t *>; } @@ -64,5 +68,8 @@ void globalDriverTeardown() { delete Sysman::globalSysmanDriver; Sysman::globalSysmanDriver = nullptr; } + globalDriverDispatch.core.isValidFlag = false; + globalDriverDispatch.tools.isValidFlag = false; + globalDriverDispatch.sysman.isValidFlag = false; } } // namespace L0 diff --git a/level_zero/core/test/common/ult_config_listener_l0.cpp b/level_zero/core/test/common/ult_config_listener_l0.cpp index 8a60a1e674..e01c2b4440 100644 --- a/level_zero/core/test/common/ult_config_listener_l0.cpp +++ b/level_zero/core/test/common/ult_config_listener_l0.cpp @@ -9,16 +9,21 @@ #include "level_zero/core/source/driver/driver.h" #include "level_zero/core/source/driver/driver_handle_imp.h" +#include "level_zero/ddi/ze_ddi_tables.h" #include "level_zero/sysman/source/driver/sysman_driver_handle_imp.h" void L0::UltConfigListenerL0::OnTestStart(const ::testing::TestInfo &testInfo) { BaseUltConfigListener::OnTestStart(testInfo); - + globalDriverDispatch.core.isValidFlag = true; + globalDriverDispatch.tools.isValidFlag = true; + globalDriverDispatch.sysman.isValidFlag = true; globalDriverHandles->clear(); } void L0::UltConfigListenerL0::OnTestEnd(const ::testing::TestInfo &testInfo) { - + globalDriverDispatch.core.isValidFlag = false; + globalDriverDispatch.tools.isValidFlag = false; + globalDriverDispatch.sysman.isValidFlag = false; EXPECT_TRUE(globalDriverHandles->empty()); EXPECT_EQ(nullptr, L0::Sysman::globalSysmanDriver); diff --git a/level_zero/core/test/unit_tests/os_interface/global_teardown_tests.cpp b/level_zero/core/test/unit_tests/os_interface/global_teardown_tests.cpp index 34e3d815c7..1054af20c1 100644 --- a/level_zero/core/test/unit_tests/os_interface/global_teardown_tests.cpp +++ b/level_zero/core/test/unit_tests/os_interface/global_teardown_tests.cpp @@ -16,6 +16,7 @@ #include "level_zero/core/source/driver/driver_handle_imp.h" #include "level_zero/core/source/driver/driver_imp.h" #include "level_zero/core/source/global_teardown.h" +#include "level_zero/ddi/ze_ddi_tables.h" #include "level_zero/sysman/source/driver/sysman_driver_handle_imp.h" namespace L0 { @@ -191,5 +192,24 @@ TEST_F(GlobalTearDownTests, givenForkedProcessWhenGlobalTearDownFunctionCalledTh delete tempDriver; } +TEST_F(GlobalTearDownTests, givenGlobalDriverDispatchWhenGlobalSetupAndTeardownAreCalledThenPerApiValidFlagsAreChanged) { + VariableBackup globalDispatchBackup{&globalDriverDispatch}; + + globalDriverDispatch.core.isValidFlag = false; + globalDriverDispatch.tools.isValidFlag = false; + globalDriverDispatch.sysman.isValidFlag = false; + + globalDriverSetup(); + + EXPECT_TRUE(globalDriverDispatch.core.isValidFlag); + EXPECT_TRUE(globalDriverDispatch.tools.isValidFlag); + EXPECT_TRUE(globalDriverDispatch.sysman.isValidFlag); + + globalDriverTeardown(); + + EXPECT_FALSE(globalDriverDispatch.core.isValidFlag); + EXPECT_FALSE(globalDriverDispatch.tools.isValidFlag); + EXPECT_FALSE(globalDriverDispatch.sysman.isValidFlag); +} } // namespace ult } // namespace L0 diff --git a/level_zero/core/test/unit_tests/sources/loader/test_loader.cpp b/level_zero/core/test/unit_tests/sources/loader/test_loader.cpp index 92119046b2..e586519a0f 100644 --- a/level_zero/core/test/unit_tests/sources/loader/test_loader.cpp +++ b/level_zero/core/test/unit_tests/sources/loader/test_loader.cpp @@ -7,10 +7,9 @@ #include "shared/test/common/test_macros/test.h" +#include "level_zero/ddi/ze_ddi_tables.h" #include -#include "ze_ddi_tables.h" - namespace L0 { namespace ult { diff --git a/level_zero/ddi/CMakeLists.txt b/level_zero/ddi/CMakeLists.txt new file mode 100644 index 0000000000..d6718ee63c --- /dev/null +++ b/level_zero/ddi/CMakeLists.txt @@ -0,0 +1,15 @@ +# +# Copyright (C) 2025 Intel Corporation +# +# SPDX-License-Identifier: MIT +# + +target_sources(${L0_STATIC_LIB_NAME} + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/ze_ddi_tables.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ze_ddi_tables.h +) + +add_subdirectories() + diff --git a/level_zero/ddi/ze_ddi_tables.cpp b/level_zero/ddi/ze_ddi_tables.cpp new file mode 100644 index 0000000000..e5cb8c9229 --- /dev/null +++ b/level_zero/ddi/ze_ddi_tables.cpp @@ -0,0 +1,529 @@ +/* + * Copyright (C) 2025 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +#include "level_zero/ddi/ze_ddi_tables.h" + +#include "level_zero/api/core/ze_core_all_api_entrypoints.h" +#include "level_zero/api/driver_experimental/tracing/zet_tracing.h" +#include "level_zero/api/extensions/public/ze_exp_ext.h" +#include "level_zero/api/sysman/zes_sysman_all_api_entrypoints.h" +#include "level_zero/api/tools/zet_tools_all_api_entrypoints.h" + +namespace L0 { + +DriverDispatch globalDriverDispatch; + +DriverDispatch::DriverDispatch() { + this->core.version = ZE_API_VERSION_1_12; + this->core.RTASBuilderExp = &this->coreRTASBuilderExp; + this->core.RTASParallelOperationExp = &this->coreRTASParallelOperationExp; + this->core.Global = &this->coreGlobal; + this->core.Driver = &this->coreDriver; + this->core.DriverExp = &this->coreDriverExp; + this->core.Device = &this->coreDevice; + this->core.DeviceExp = &this->coreDeviceExp; + this->core.Context = &this->coreContext; + this->core.CommandQueue = &this->coreCommandQueue; + this->core.CommandList = &this->coreCommandList; + this->core.CommandListExp = &this->coreCommandListExp; + this->core.Image = &this->coreImage; + this->core.ImageExp = &this->coreImageExp; + this->core.Mem = &this->coreMem; + this->core.MemExp = &this->coreMemExp; + this->core.Fence = &this->coreFence; + this->core.EventPool = &this->coreEventPool; + this->core.Event = &this->coreEvent; + this->core.EventExp = &this->coreEventExp; + this->core.Module = &this->coreModule; + this->core.ModuleBuildLog = &this->coreModuleBuildLog; + this->core.Kernel = &this->coreKernel; + this->core.KernelExp = &this->coreKernelExp; + this->core.Sampler = &this->coreSampler; + this->core.PhysicalMem = &this->corePhysicalMem; + this->core.VirtualMem = &this->coreVirtualMem; + this->core.FabricVertexExp = &this->coreFabricVertexExp; + this->core.FabricEdgeExp = &this->coreFabricEdgeExp; + + this->tools.version = ZE_API_VERSION_1_12; + this->tools.MetricProgrammableExp = &this->toolsMetricProgrammableExp; + this->tools.MetricTracerExp = &this->toolsMetricTracerExp; + this->tools.MetricDecoderExp = &this->toolsMetricDecoderExp; + this->tools.Device = &this->toolsDevice; + this->tools.DeviceExp = &this->toolsDeviceExp; + this->tools.Context = &this->toolsContext; + this->tools.CommandList = &this->toolsCommandList; + this->tools.Module = &this->toolsModule; + this->tools.Kernel = &this->toolsKernel; + this->tools.Metric = &this->toolsMetric; + this->tools.MetricExp = &this->toolsMetricExp; + this->tools.MetricGroup = &this->toolsMetricGroup; + this->tools.MetricGroupExp = &this->toolsMetricGroupExp; + this->tools.MetricStreamer = &this->toolsMetricStreamer; + this->tools.MetricQueryPool = &this->toolsMetricQueryPool; + this->tools.MetricQuery = &this->toolsMetricQuery; + this->tools.TracerExp = &this->toolsTracerExp; + this->tools.Debug = &this->toolsDebug; + + this->sysman.version = ZE_API_VERSION_1_12; + this->sysman.Global = &this->sysmanGlobal; + this->sysman.Device = &this->sysmanDevice; + this->sysman.DeviceExp = &this->sysmanDeviceExp; + this->sysman.Driver = &this->sysmanDriver; + this->sysman.DriverExp = &this->sysmanDriverExp; + this->sysman.Overclock = &this->sysmanOverclock; + this->sysman.Scheduler = &this->sysmanScheduler; + this->sysman.PerformanceFactor = &this->sysmanPerformanceFactor; + this->sysman.Power = &this->sysmanPower; + this->sysman.Frequency = &this->sysmanFrequency; + this->sysman.Engine = &this->sysmanEngine; + this->sysman.Standby = &this->sysmanStandby; + this->sysman.Firmware = &this->sysmanFirmware; + this->sysman.FirmwareExp = &this->sysmanFirmwareExp; + this->sysman.Memory = &this->sysmanMemory; + this->sysman.FabricPort = &this->sysmanFabricPort; + this->sysman.Temperature = &this->sysmanTemperature; + this->sysman.Psu = &this->sysmanPsu; + this->sysman.Fan = &this->sysmanFan; + this->sysman.Led = &this->sysmanLed; + this->sysman.Ras = &this->sysmanRas; + this->sysman.RasExp = &this->sysmanRasExp; + this->sysman.Diagnostics = &this->sysmanDiagnostics; + this->sysman.VFManagementExp = &this->sysmanVFManagementExp; + + this->coreRTASBuilderExp.pfnCreateExp = L0::zeRTASBuilderCreateExp; + this->coreRTASBuilderExp.pfnGetBuildPropertiesExp = L0::zeRTASBuilderGetBuildPropertiesExp; + this->coreRTASBuilderExp.pfnBuildExp = L0::zeRTASBuilderBuildExp; + this->coreRTASBuilderExp.pfnDestroyExp = L0::zeRTASBuilderDestroyExp; + this->coreRTASParallelOperationExp.pfnCreateExp = L0::zeRTASParallelOperationCreateExp; + this->coreRTASParallelOperationExp.pfnGetPropertiesExp = L0::zeRTASParallelOperationGetPropertiesExp; + this->coreRTASParallelOperationExp.pfnJoinExp = L0::zeRTASParallelOperationJoinExp; + this->coreRTASParallelOperationExp.pfnDestroyExp = L0::zeRTASParallelOperationDestroyExp; + this->coreGlobal.pfnInit = L0::zeInit; + this->coreGlobal.pfnInitDrivers = L0::zeInitDrivers; + this->coreDriver.pfnGet = L0::zeDriverGet; + this->coreDriver.pfnGetApiVersion = L0::zeDriverGetApiVersion; + this->coreDriver.pfnGetProperties = L0::zeDriverGetProperties; + this->coreDriver.pfnGetIpcProperties = L0::zeDriverGetIpcProperties; + this->coreDriver.pfnGetExtensionProperties = L0::zeDriverGetExtensionProperties; + this->coreDriver.pfnGetExtensionFunctionAddress = L0::zeDriverGetExtensionFunctionAddress; + this->coreDriver.pfnGetLastErrorDescription = L0::zeDriverGetLastErrorDescription; + this->coreDriverExp.pfnRTASFormatCompatibilityCheckExp = L0::zeDriverRTASFormatCompatibilityCheckExp; + this->coreDevice.pfnGet = L0::zeDeviceGet; + this->coreDevice.pfnGetSubDevices = L0::zeDeviceGetSubDevices; + this->coreDevice.pfnGetProperties = L0::zeDeviceGetProperties; + this->coreDevice.pfnGetComputeProperties = L0::zeDeviceGetComputeProperties; + this->coreDevice.pfnGetModuleProperties = L0::zeDeviceGetModuleProperties; + this->coreDevice.pfnGetCommandQueueGroupProperties = L0::zeDeviceGetCommandQueueGroupProperties; + this->coreDevice.pfnGetMemoryProperties = L0::zeDeviceGetMemoryProperties; + this->coreDevice.pfnGetMemoryAccessProperties = L0::zeDeviceGetMemoryAccessProperties; + this->coreDevice.pfnGetCacheProperties = L0::zeDeviceGetCacheProperties; + this->coreDevice.pfnGetImageProperties = L0::zeDeviceGetImageProperties; + this->coreDevice.pfnGetExternalMemoryProperties = L0::zeDeviceGetExternalMemoryProperties; + this->coreDevice.pfnGetP2PProperties = L0::zeDeviceGetP2PProperties; + this->coreDevice.pfnCanAccessPeer = L0::zeDeviceCanAccessPeer; + this->coreDevice.pfnGetStatus = L0::zeDeviceGetStatus; + this->coreDevice.pfnGetGlobalTimestamps = L0::zeDeviceGetGlobalTimestamps; + this->coreDevice.pfnReserveCacheExt = L0::zeDeviceReserveCacheExt; + this->coreDevice.pfnSetCacheAdviceExt = L0::zeDeviceSetCacheAdviceExt; + this->coreDevice.pfnPciGetPropertiesExt = L0::zeDevicePciGetPropertiesExt; + this->coreDevice.pfnGetRootDevice = L0::zeDeviceGetRootDevice; + this->coreDevice.pfnImportExternalSemaphoreExt = nullptr; + this->coreDevice.pfnReleaseExternalSemaphoreExt = nullptr; + this->coreDeviceExp.pfnGetFabricVertexExp = L0::zeDeviceGetFabricVertexExp; + this->coreContext.pfnCreate = L0::zeContextCreate; + this->coreContext.pfnDestroy = L0::zeContextDestroy; + this->coreContext.pfnGetStatus = L0::zeContextGetStatus; + this->coreContext.pfnSystemBarrier = L0::zeContextSystemBarrier; + this->coreContext.pfnMakeMemoryResident = L0::zeContextMakeMemoryResident; + this->coreContext.pfnEvictMemory = L0::zeContextEvictMemory; + this->coreContext.pfnMakeImageResident = L0::zeContextMakeImageResident; + this->coreContext.pfnEvictImage = L0::zeContextEvictImage; + this->coreContext.pfnCreateEx = L0::zeContextCreateEx; + this->coreCommandQueue.pfnCreate = L0::zeCommandQueueCreate; + this->coreCommandQueue.pfnDestroy = L0::zeCommandQueueDestroy; + this->coreCommandQueue.pfnExecuteCommandLists = L0::zeCommandQueueExecuteCommandLists; + this->coreCommandQueue.pfnSynchronize = L0::zeCommandQueueSynchronize; + this->coreCommandQueue.pfnGetOrdinal = L0::zeCommandQueueGetOrdinal; + this->coreCommandQueue.pfnGetIndex = L0::zeCommandQueueGetIndex; + this->coreCommandList.pfnCreate = L0::zeCommandListCreate; + this->coreCommandList.pfnCreateImmediate = L0::zeCommandListCreateImmediate; + this->coreCommandList.pfnDestroy = L0::zeCommandListDestroy; + this->coreCommandList.pfnClose = L0::zeCommandListClose; + this->coreCommandList.pfnReset = L0::zeCommandListReset; + this->coreCommandList.pfnAppendWriteGlobalTimestamp = L0::zeCommandListAppendWriteGlobalTimestamp; + this->coreCommandList.pfnAppendBarrier = L0::zeCommandListAppendBarrier; + this->coreCommandList.pfnAppendMemoryRangesBarrier = L0::zeCommandListAppendMemoryRangesBarrier; + this->coreCommandList.pfnAppendMemoryCopy = L0::zeCommandListAppendMemoryCopy; + this->coreCommandList.pfnAppendMemoryFill = L0::zeCommandListAppendMemoryFill; + this->coreCommandList.pfnAppendMemoryCopyRegion = L0::zeCommandListAppendMemoryCopyRegion; + this->coreCommandList.pfnAppendMemoryCopyFromContext = L0::zeCommandListAppendMemoryCopyFromContext; + this->coreCommandList.pfnAppendImageCopy = L0::zeCommandListAppendImageCopy; + this->coreCommandList.pfnAppendImageCopyRegion = L0::zeCommandListAppendImageCopyRegion; + this->coreCommandList.pfnAppendImageCopyToMemory = L0::zeCommandListAppendImageCopyToMemory; + this->coreCommandList.pfnAppendImageCopyFromMemory = L0::zeCommandListAppendImageCopyFromMemory; + this->coreCommandList.pfnAppendMemoryPrefetch = L0::zeCommandListAppendMemoryPrefetch; + this->coreCommandList.pfnAppendMemAdvise = L0::zeCommandListAppendMemAdvise; + this->coreCommandList.pfnAppendSignalEvent = L0::zeCommandListAppendSignalEvent; + this->coreCommandList.pfnAppendWaitOnEvents = L0::zeCommandListAppendWaitOnEvents; + this->coreCommandList.pfnAppendEventReset = L0::zeCommandListAppendEventReset; + this->coreCommandList.pfnAppendQueryKernelTimestamps = L0::zeCommandListAppendQueryKernelTimestamps; + this->coreCommandList.pfnAppendLaunchKernel = L0::zeCommandListAppendLaunchKernel; + this->coreCommandList.pfnAppendLaunchCooperativeKernel = L0::zeCommandListAppendLaunchCooperativeKernel; + this->coreCommandList.pfnAppendLaunchKernelIndirect = L0::zeCommandListAppendLaunchKernelIndirect; + this->coreCommandList.pfnAppendLaunchMultipleKernelsIndirect = L0::zeCommandListAppendLaunchMultipleKernelsIndirect; + this->coreCommandList.pfnAppendImageCopyToMemoryExt = L0::zeCommandListAppendImageCopyToMemoryExt; + this->coreCommandList.pfnAppendImageCopyFromMemoryExt = L0::zeCommandListAppendImageCopyFromMemoryExt; + this->coreCommandList.pfnHostSynchronize = L0::zeCommandListHostSynchronize; + this->coreCommandList.pfnGetDeviceHandle = L0::zeCommandListGetDeviceHandle; + this->coreCommandList.pfnGetContextHandle = L0::zeCommandListGetContextHandle; + this->coreCommandList.pfnGetOrdinal = L0::zeCommandListGetOrdinal; + this->coreCommandList.pfnImmediateGetIndex = L0::zeCommandListImmediateGetIndex; + this->coreCommandList.pfnIsImmediate = L0::zeCommandListIsImmediate; + this->coreCommandList.pfnAppendSignalExternalSemaphoreExt = nullptr; + this->coreCommandList.pfnAppendWaitExternalSemaphoreExt = nullptr; + this->coreCommandListExp.pfnCreateCloneExp = nullptr; + this->coreCommandListExp.pfnImmediateAppendCommandListsExp = L0::zeCommandListImmediateAppendCommandListsExp; + this->coreCommandListExp.pfnGetNextCommandIdExp = L0::zeCommandListGetNextCommandIdExp; + this->coreCommandListExp.pfnUpdateMutableCommandsExp = L0::zeCommandListUpdateMutableCommandsExp; + this->coreCommandListExp.pfnUpdateMutableCommandSignalEventExp = L0::zeCommandListUpdateMutableCommandSignalEventExp; + this->coreCommandListExp.pfnUpdateMutableCommandWaitEventsExp = L0::zeCommandListUpdateMutableCommandWaitEventsExp; + this->coreCommandListExp.pfnGetNextCommandIdWithKernelsExp = L0::zeCommandListGetNextCommandIdWithKernelsExp; + this->coreCommandListExp.pfnUpdateMutableCommandKernelsExp = L0::zeCommandListUpdateMutableCommandKernelsExp; + this->coreImage.pfnGetProperties = L0::zeImageGetProperties; + this->coreImage.pfnCreate = L0::zeImageCreate; + this->coreImage.pfnDestroy = L0::zeImageDestroy; + this->coreImage.pfnGetAllocPropertiesExt = L0::zeImageGetAllocPropertiesExt; + this->coreImage.pfnViewCreateExt = L0::zeImageViewCreateExt; + this->coreImageExp.pfnGetMemoryPropertiesExp = L0::zeImageGetMemoryPropertiesExp; + this->coreImageExp.pfnViewCreateExp = L0::zeImageViewCreateExp; + this->coreImageExp.pfnGetDeviceOffsetExp = L0::zeImageGetDeviceOffsetExp; + this->coreMem.pfnAllocShared = L0::zeMemAllocShared; + this->coreMem.pfnAllocDevice = L0::zeMemAllocDevice; + this->coreMem.pfnAllocHost = L0::zeMemAllocHost; + this->coreMem.pfnFree = L0::zeMemFree; + this->coreMem.pfnGetAllocProperties = L0::zeMemGetAllocProperties; + this->coreMem.pfnGetAddressRange = L0::zeMemGetAddressRange; + this->coreMem.pfnGetIpcHandle = L0::zeMemGetIpcHandle; + this->coreMem.pfnOpenIpcHandle = L0::zeMemOpenIpcHandle; + this->coreMem.pfnCloseIpcHandle = L0::zeMemCloseIpcHandle; + this->coreMem.pfnFreeExt = L0::zeMemFreeExt; + this->coreMem.pfnPutIpcHandle = L0::zeMemPutIpcHandle; + this->coreMem.pfnGetPitchFor2dImage = L0::zeMemGetPitchFor2dImage; + this->coreMemExp.pfnGetIpcHandleFromFileDescriptorExp = L0::zeMemGetIpcHandleFromFileDescriptorExp; + this->coreMemExp.pfnGetFileDescriptorFromIpcHandleExp = L0::zeMemGetFileDescriptorFromIpcHandleExp; + this->coreMemExp.pfnSetAtomicAccessAttributeExp = L0::zeMemSetAtomicAccessAttributeExp; + this->coreMemExp.pfnGetAtomicAccessAttributeExp = L0::zeMemGetAtomicAccessAttributeExp; + this->coreFence.pfnCreate = L0::zeFenceCreate; + this->coreFence.pfnDestroy = L0::zeFenceDestroy; + this->coreFence.pfnHostSynchronize = L0::zeFenceHostSynchronize; + this->coreFence.pfnQueryStatus = L0::zeFenceQueryStatus; + this->coreFence.pfnReset = L0::zeFenceReset; + this->coreEventPool.pfnCreate = L0::zeEventPoolCreate; + this->coreEventPool.pfnDestroy = L0::zeEventPoolDestroy; + this->coreEventPool.pfnGetIpcHandle = L0::zeEventPoolGetIpcHandle; + this->coreEventPool.pfnOpenIpcHandle = L0::zeEventPoolOpenIpcHandle; + this->coreEventPool.pfnCloseIpcHandle = L0::zeEventPoolCloseIpcHandle; + this->coreEventPool.pfnPutIpcHandle = nullptr; + this->coreEventPool.pfnGetContextHandle = L0::zeEventPoolGetContextHandle; + this->coreEventPool.pfnGetFlags = L0::zeEventPoolGetFlags; + this->coreEvent.pfnCreate = L0::zeEventCreate; + this->coreEvent.pfnDestroy = L0::zeEventDestroy; + this->coreEvent.pfnHostSignal = L0::zeEventHostSignal; + this->coreEvent.pfnHostSynchronize = L0::zeEventHostSynchronize; + this->coreEvent.pfnQueryStatus = L0::zeEventQueryStatus; + this->coreEvent.pfnHostReset = L0::zeEventHostReset; + this->coreEvent.pfnQueryKernelTimestamp = L0::zeEventQueryKernelTimestamp; + this->coreEvent.pfnQueryKernelTimestampsExt = L0::zeEventQueryKernelTimestampsExt; + this->coreEvent.pfnGetEventPool = L0::zeEventGetEventPool; + this->coreEvent.pfnGetSignalScope = L0::zeEventGetSignalScope; + this->coreEvent.pfnGetWaitScope = L0::zeEventGetWaitScope; + this->coreEventExp.pfnQueryTimestampsExp = L0::zeEventQueryTimestampsExp; + this->coreModule.pfnCreate = L0::zeModuleCreate; + this->coreModule.pfnDestroy = L0::zeModuleDestroy; + this->coreModule.pfnDynamicLink = L0::zeModuleDynamicLink; + this->coreModule.pfnGetNativeBinary = L0::zeModuleGetNativeBinary; + this->coreModule.pfnGetGlobalPointer = L0::zeModuleGetGlobalPointer; + this->coreModule.pfnGetKernelNames = L0::zeModuleGetKernelNames; + this->coreModule.pfnGetProperties = L0::zeModuleGetProperties; + this->coreModule.pfnGetFunctionPointer = L0::zeModuleGetFunctionPointer; + this->coreModule.pfnInspectLinkageExt = L0::zeModuleInspectLinkageExt; + this->coreModuleBuildLog.pfnDestroy = L0::zeModuleBuildLogDestroy; + this->coreModuleBuildLog.pfnGetString = L0::zeModuleBuildLogGetString; + this->coreKernel.pfnCreate = L0::zeKernelCreate; + this->coreKernel.pfnDestroy = L0::zeKernelDestroy; + this->coreKernel.pfnSetCacheConfig = L0::zeKernelSetCacheConfig; + this->coreKernel.pfnSetGroupSize = L0::zeKernelSetGroupSize; + this->coreKernel.pfnSuggestGroupSize = L0::zeKernelSuggestGroupSize; + this->coreKernel.pfnSuggestMaxCooperativeGroupCount = L0::zeKernelSuggestMaxCooperativeGroupCount; + this->coreKernel.pfnSetArgumentValue = L0::zeKernelSetArgumentValue; + this->coreKernel.pfnSetIndirectAccess = L0::zeKernelSetIndirectAccess; + this->coreKernel.pfnGetIndirectAccess = L0::zeKernelGetIndirectAccess; + this->coreKernel.pfnGetSourceAttributes = L0::zeKernelGetSourceAttributes; + this->coreKernel.pfnGetProperties = L0::zeKernelGetProperties; + this->coreKernel.pfnGetName = L0::zeKernelGetName; + this->coreKernelExp.pfnSetGlobalOffsetExp = L0::zeKernelSetGlobalOffsetExp; + this->coreKernelExp.pfnSchedulingHintExp = L0::zeKernelSchedulingHintExp; + this->coreKernelExp.pfnGetBinaryExp = L0::zeKernelGetBinaryExp; + this->coreSampler.pfnCreate = L0::zeSamplerCreate; + this->coreSampler.pfnDestroy = L0::zeSamplerDestroy; + this->corePhysicalMem.pfnCreate = L0::zePhysicalMemCreate; + this->corePhysicalMem.pfnDestroy = L0::zePhysicalMemDestroy; + this->coreVirtualMem.pfnReserve = L0::zeVirtualMemReserve; + this->coreVirtualMem.pfnFree = L0::zeVirtualMemFree; + this->coreVirtualMem.pfnQueryPageSize = L0::zeVirtualMemQueryPageSize; + this->coreVirtualMem.pfnMap = L0::zeVirtualMemMap; + this->coreVirtualMem.pfnUnmap = L0::zeVirtualMemUnmap; + this->coreVirtualMem.pfnSetAccessAttribute = L0::zeVirtualMemSetAccessAttribute; + this->coreVirtualMem.pfnGetAccessAttribute = L0::zeVirtualMemGetAccessAttribute; + this->coreFabricVertexExp.pfnGetExp = L0::zeFabricVertexGetExp; + this->coreFabricVertexExp.pfnGetSubVerticesExp = L0::zeFabricVertexGetSubVerticesExp; + this->coreFabricVertexExp.pfnGetPropertiesExp = L0::zeFabricVertexGetPropertiesExp; + this->coreFabricVertexExp.pfnGetDeviceExp = L0::zeFabricVertexGetDeviceExp; + this->coreFabricEdgeExp.pfnGetExp = L0::zeFabricEdgeGetExp; + this->coreFabricEdgeExp.pfnGetVerticesExp = L0::zeFabricEdgeGetVerticesExp; + this->coreFabricEdgeExp.pfnGetPropertiesExp = L0::zeFabricEdgeGetPropertiesExp; + + this->toolsMetricProgrammableExp.pfnGetExp = L0::zetMetricProgrammableGetExp; + this->toolsMetricProgrammableExp.pfnGetPropertiesExp = L0::zetMetricProgrammableGetPropertiesExp; + this->toolsMetricProgrammableExp.pfnGetParamInfoExp = L0::zetMetricProgrammableGetParamInfoExp; + this->toolsMetricProgrammableExp.pfnGetParamValueInfoExp = L0::zetMetricProgrammableGetParamValueInfoExp; + this->toolsMetricTracerExp.pfnCreateExp = L0::zetMetricTracerCreateExp; + this->toolsMetricTracerExp.pfnDestroyExp = L0::zetMetricTracerDestroyExp; + this->toolsMetricTracerExp.pfnEnableExp = L0::zetMetricTracerEnableExp; + this->toolsMetricTracerExp.pfnDisableExp = L0::zetMetricTracerDisableExp; + this->toolsMetricTracerExp.pfnReadDataExp = L0::zetMetricTracerReadDataExp; + this->toolsMetricTracerExp.pfnDecodeExp = L0::zetMetricTracerDecodeExp; + this->toolsMetricDecoderExp.pfnCreateExp = L0::zetMetricDecoderCreateExp; + this->toolsMetricDecoderExp.pfnDestroyExp = L0::zetMetricDecoderDestroyExp; + this->toolsMetricDecoderExp.pfnGetDecodableMetricsExp = L0::zetMetricDecoderGetDecodableMetricsExp; + this->toolsDevice.pfnGetDebugProperties = L0::zetDeviceGetDebugProperties; + this->toolsDeviceExp.pfnGetConcurrentMetricGroupsExp = L0::zetDeviceGetConcurrentMetricGroupsExp; + this->toolsDeviceExp.pfnCreateMetricGroupsFromMetricsExp = L0::zetDeviceCreateMetricGroupsFromMetricsExp; + this->toolsContext.pfnActivateMetricGroups = L0::zetContextActivateMetricGroups; + this->toolsCommandList.pfnAppendMetricStreamerMarker = L0::zetCommandListAppendMetricStreamerMarker; + this->toolsCommandList.pfnAppendMetricQueryBegin = L0::zetCommandListAppendMetricQueryBegin; + this->toolsCommandList.pfnAppendMetricQueryEnd = L0::zetCommandListAppendMetricQueryEnd; + this->toolsCommandList.pfnAppendMetricMemoryBarrier = L0::zetCommandListAppendMetricMemoryBarrier; + this->toolsModule.pfnGetDebugInfo = L0::zetModuleGetDebugInfo; + this->toolsKernel.pfnGetProfileInfo = L0::zetKernelGetProfileInfo; + this->toolsMetric.pfnGet = L0::zetMetricGet; + this->toolsMetric.pfnGetProperties = L0::zetMetricGetProperties; + this->toolsMetricExp.pfnCreateFromProgrammableExp = L0::zetMetricCreateFromProgrammableExp; + this->toolsMetricExp.pfnDestroyExp = L0::zetMetricDestroyExp; + this->toolsMetricExp.pfnCreateFromProgrammableExp2 = nullptr; + this->toolsMetricGroup.pfnGet = L0::zetMetricGroupGet; + this->toolsMetricGroup.pfnGetProperties = L0::zetMetricGroupGetProperties; + this->toolsMetricGroup.pfnCalculateMetricValues = L0::zetMetricGroupCalculateMetricValues; + this->toolsMetricGroupExp.pfnCalculateMultipleMetricValuesExp = L0::zetMetricGroupCalculateMultipleMetricValuesExp; + this->toolsMetricGroupExp.pfnGetGlobalTimestampsExp = L0::zetMetricGroupGetGlobalTimestampsExp; + this->toolsMetricGroupExp.pfnGetExportDataExp = L0::zetMetricGroupGetExportDataExp; + this->toolsMetricGroupExp.pfnCalculateMetricExportDataExp = L0::zetDriverCalculateMetricExportDataExp; + this->toolsMetricGroupExp.pfnCreateExp = L0::zetMetricGroupCreateExp; + this->toolsMetricGroupExp.pfnAddMetricExp = L0::zetMetricGroupAddMetricExp; + this->toolsMetricGroupExp.pfnRemoveMetricExp = L0::zetMetricGroupRemoveMetricExp; + this->toolsMetricGroupExp.pfnCloseExp = L0::zetMetricGroupCloseExp; + this->toolsMetricGroupExp.pfnDestroyExp = L0::zetMetricGroupDestroyExp; + this->toolsMetricStreamer.pfnOpen = L0::zetMetricStreamerOpen; + this->toolsMetricStreamer.pfnClose = L0::zetMetricStreamerClose; + this->toolsMetricStreamer.pfnReadData = L0::zetMetricStreamerReadData; + this->toolsMetricQueryPool.pfnCreate = L0::zetMetricQueryPoolCreate; + this->toolsMetricQueryPool.pfnDestroy = L0::zetMetricQueryPoolDestroy; + this->toolsMetricQuery.pfnCreate = L0::zetMetricQueryCreate; + this->toolsMetricQuery.pfnDestroy = L0::zetMetricQueryDestroy; + this->toolsMetricQuery.pfnReset = L0::zetMetricQueryReset; + this->toolsMetricQuery.pfnGetData = L0::zetMetricQueryGetData; + this->toolsTracerExp.pfnCreate = L0::zetTracerExpCreate; + this->toolsTracerExp.pfnDestroy = L0::zetTracerExpDestroy; + this->toolsTracerExp.pfnSetPrologues = L0::zetTracerExpSetPrologues; + this->toolsTracerExp.pfnSetEpilogues = L0::zetTracerExpSetEpilogues; + this->toolsTracerExp.pfnSetEnabled = L0::zetTracerExpSetEnabled; + this->toolsDebug.pfnAttach = L0::zetDebugAttach; + this->toolsDebug.pfnDetach = L0::zetDebugDetach; + this->toolsDebug.pfnReadEvent = L0::zetDebugReadEvent; + this->toolsDebug.pfnAcknowledgeEvent = L0::zetDebugAcknowledgeEvent; + this->toolsDebug.pfnInterrupt = L0::zetDebugInterrupt; + this->toolsDebug.pfnResume = L0::zetDebugResume; + this->toolsDebug.pfnReadMemory = L0::zetDebugReadMemory; + this->toolsDebug.pfnWriteMemory = L0::zetDebugWriteMemory; + this->toolsDebug.pfnGetRegisterSetProperties = L0::zetDebugGetRegisterSetProperties; + this->toolsDebug.pfnReadRegisters = L0::zetDebugReadRegisters; + this->toolsDebug.pfnWriteRegisters = L0::zetDebugWriteRegisters; + this->toolsDebug.pfnGetThreadRegisterSetProperties = L0::zetDebugGetThreadRegisterSetProperties; + + this->sysmanGlobal.pfnInit = L0::zesInit; + this->sysmanDevice.pfnGetProperties = L0::zesDeviceGetProperties; + this->sysmanDevice.pfnGetState = L0::zesDeviceGetState; + this->sysmanDevice.pfnReset = L0::zesDeviceReset; + this->sysmanDevice.pfnProcessesGetState = L0::zesDeviceProcessesGetState; + this->sysmanDevice.pfnPciGetProperties = L0::zesDevicePciGetProperties; + this->sysmanDevice.pfnPciGetState = L0::zesDevicePciGetState; + this->sysmanDevice.pfnPciGetBars = L0::zesDevicePciGetBars; + this->sysmanDevice.pfnPciGetStats = L0::zesDevicePciGetStats; + this->sysmanDevice.pfnEnumDiagnosticTestSuites = L0::zesDeviceEnumDiagnosticTestSuites; + this->sysmanDevice.pfnEnumEngineGroups = L0::zesDeviceEnumEngineGroups; + this->sysmanDevice.pfnEventRegister = L0::zesDeviceEventRegister; + this->sysmanDevice.pfnEnumFabricPorts = L0::zesDeviceEnumFabricPorts; + this->sysmanDevice.pfnEnumFans = L0::zesDeviceEnumFans; + this->sysmanDevice.pfnEnumFirmwares = L0::zesDeviceEnumFirmwares; + this->sysmanDevice.pfnEnumFrequencyDomains = L0::zesDeviceEnumFrequencyDomains; + this->sysmanDevice.pfnEnumLeds = L0::zesDeviceEnumLeds; + this->sysmanDevice.pfnEnumMemoryModules = L0::zesDeviceEnumMemoryModules; + this->sysmanDevice.pfnEnumPerformanceFactorDomains = L0::zesDeviceEnumPerformanceFactorDomains; + this->sysmanDevice.pfnEnumPowerDomains = L0::zesDeviceEnumPowerDomains; + this->sysmanDevice.pfnGetCardPowerDomain = L0::zesDeviceGetCardPowerDomain; + this->sysmanDevice.pfnEnumPsus = L0::zesDeviceEnumPsus; + this->sysmanDevice.pfnEnumRasErrorSets = L0::zesDeviceEnumRasErrorSets; + this->sysmanDevice.pfnEnumSchedulers = L0::zesDeviceEnumSchedulers; + this->sysmanDevice.pfnEnumStandbyDomains = L0::zesDeviceEnumStandbyDomains; + this->sysmanDevice.pfnEnumTemperatureSensors = L0::zesDeviceEnumTemperatureSensors; + this->sysmanDevice.pfnEccAvailable = L0::zesDeviceEccAvailable; + this->sysmanDevice.pfnEccConfigurable = L0::zesDeviceEccConfigurable; + this->sysmanDevice.pfnGetEccState = L0::zesDeviceGetEccState; + this->sysmanDevice.pfnSetEccState = L0::zesDeviceSetEccState; + this->sysmanDevice.pfnGet = L0::zesDeviceGet; + this->sysmanDevice.pfnSetOverclockWaiver = L0::zesDeviceSetOverclockWaiver; + this->sysmanDevice.pfnGetOverclockDomains = L0::zesDeviceGetOverclockDomains; + this->sysmanDevice.pfnGetOverclockControls = L0::zesDeviceGetOverclockControls; + this->sysmanDevice.pfnResetOverclockSettings = L0::zesDeviceResetOverclockSettings; + this->sysmanDevice.pfnReadOverclockState = L0::zesDeviceReadOverclockState; + this->sysmanDevice.pfnEnumOverclockDomains = L0::zesDeviceEnumOverclockDomains; + this->sysmanDevice.pfnResetExt = L0::zesDeviceResetExt; + this->sysmanDeviceExp.pfnGetSubDevicePropertiesExp = L0::zesDeviceGetSubDevicePropertiesExp; + this->sysmanDeviceExp.pfnEnumActiveVFExp = L0::zesDeviceEnumActiveVFExp; + this->sysmanDeviceExp.pfnEnumEnabledVFExp = L0::zesDeviceEnumEnabledVFExp; + this->sysmanDriver.pfnEventListen = L0::zesDriverEventListen; + this->sysmanDriver.pfnEventListenEx = L0::zesDriverEventListenEx; + this->sysmanDriver.pfnGet = L0::zesDriverGet; + this->sysmanDriver.pfnGetExtensionProperties = L0::zesDriverGetExtensionProperties; + this->sysmanDriver.pfnGetExtensionFunctionAddress = L0::zesDriverGetExtensionFunctionAddress; + this->sysmanDriverExp.pfnGetDeviceByUuidExp = L0::zesDriverGetDeviceByUuidExp; + this->sysmanOverclock.pfnGetDomainProperties = L0::zesOverclockGetDomainProperties; + this->sysmanOverclock.pfnGetDomainVFProperties = L0::zesOverclockGetDomainVFProperties; + this->sysmanOverclock.pfnGetDomainControlProperties = L0::zesOverclockGetDomainControlProperties; + this->sysmanOverclock.pfnGetControlCurrentValue = L0::zesOverclockGetControlCurrentValue; + this->sysmanOverclock.pfnGetControlPendingValue = L0::zesOverclockGetControlPendingValue; + this->sysmanOverclock.pfnSetControlUserValue = L0::zesOverclockSetControlUserValue; + this->sysmanOverclock.pfnGetControlState = L0::zesOverclockGetControlState; + this->sysmanOverclock.pfnGetVFPointValues = L0::zesOverclockGetVFPointValues; + this->sysmanOverclock.pfnSetVFPointValues = L0::zesOverclockSetVFPointValues; + this->sysmanScheduler.pfnGetProperties = L0::zesSchedulerGetProperties; + this->sysmanScheduler.pfnGetCurrentMode = L0::zesSchedulerGetCurrentMode; + this->sysmanScheduler.pfnGetTimeoutModeProperties = L0::zesSchedulerGetTimeoutModeProperties; + this->sysmanScheduler.pfnGetTimesliceModeProperties = L0::zesSchedulerGetTimesliceModeProperties; + this->sysmanScheduler.pfnSetTimeoutMode = L0::zesSchedulerSetTimeoutMode; + this->sysmanScheduler.pfnSetTimesliceMode = L0::zesSchedulerSetTimesliceMode; + this->sysmanScheduler.pfnSetExclusiveMode = L0::zesSchedulerSetExclusiveMode; + this->sysmanScheduler.pfnSetComputeUnitDebugMode = L0::zesSchedulerSetComputeUnitDebugMode; + this->sysmanScheduler.pfnGetProperties = L0::zesSchedulerGetProperties; + this->sysmanScheduler.pfnGetCurrentMode = L0::zesSchedulerGetCurrentMode; + this->sysmanScheduler.pfnGetTimeoutModeProperties = L0::zesSchedulerGetTimeoutModeProperties; + this->sysmanScheduler.pfnGetTimesliceModeProperties = L0::zesSchedulerGetTimesliceModeProperties; + this->sysmanScheduler.pfnSetTimeoutMode = L0::zesSchedulerSetTimeoutMode; + this->sysmanScheduler.pfnSetTimesliceMode = L0::zesSchedulerSetTimesliceMode; + this->sysmanScheduler.pfnSetExclusiveMode = L0::zesSchedulerSetExclusiveMode; + this->sysmanScheduler.pfnSetComputeUnitDebugMode = L0::zesSchedulerSetComputeUnitDebugMode; + this->sysmanPerformanceFactor.pfnGetProperties = L0::zesPerformanceFactorGetProperties; + this->sysmanPerformanceFactor.pfnGetConfig = L0::zesPerformanceFactorGetConfig; + this->sysmanPerformanceFactor.pfnSetConfig = L0::zesPerformanceFactorSetConfig; + this->sysmanPower.pfnGetProperties = L0::zesPowerGetProperties; + this->sysmanPower.pfnGetEnergyCounter = L0::zesPowerGetEnergyCounter; + this->sysmanPower.pfnGetLimits = L0::zesPowerGetLimits; + this->sysmanPower.pfnSetLimits = L0::zesPowerSetLimits; + this->sysmanPower.pfnGetEnergyThreshold = L0::zesPowerGetEnergyThreshold; + this->sysmanPower.pfnSetEnergyThreshold = L0::zesPowerSetEnergyThreshold; + this->sysmanPower.pfnGetLimitsExt = L0::zesPowerGetLimitsExt; + this->sysmanPower.pfnSetLimitsExt = L0::zesPowerSetLimitsExt; + this->sysmanPower.pfnGetEnergyCounter = L0::zesPowerGetEnergyCounter; + this->sysmanPower.pfnGetLimits = L0::zesPowerGetLimits; + this->sysmanPower.pfnSetLimits = L0::zesPowerSetLimits; + this->sysmanPower.pfnGetEnergyThreshold = L0::zesPowerGetEnergyThreshold; + this->sysmanPower.pfnSetEnergyThreshold = L0::zesPowerSetEnergyThreshold; + this->sysmanPower.pfnGetLimitsExt = L0::zesPowerGetLimitsExt; + this->sysmanPower.pfnSetLimitsExt = L0::zesPowerSetLimitsExt; + this->sysmanPower.pfnGetEnergyCounter = L0::zesPowerGetEnergyCounter; + this->sysmanPower.pfnGetLimits = L0::zesPowerGetLimits; + this->sysmanPower.pfnSetLimits = L0::zesPowerSetLimits; + this->sysmanPower.pfnGetEnergyThreshold = L0::zesPowerGetEnergyThreshold; + this->sysmanPower.pfnSetEnergyThreshold = L0::zesPowerSetEnergyThreshold; + this->sysmanPower.pfnGetLimitsExt = L0::zesPowerGetLimitsExt; + this->sysmanPower.pfnSetLimitsExt = L0::zesPowerSetLimitsExt; + this->sysmanFrequency.pfnGetProperties = L0::zesFrequencyGetProperties; + this->sysmanFrequency.pfnGetAvailableClocks = L0::zesFrequencyGetAvailableClocks; + this->sysmanFrequency.pfnGetRange = L0::zesFrequencyGetRange; + this->sysmanFrequency.pfnSetRange = L0::zesFrequencySetRange; + this->sysmanFrequency.pfnGetState = L0::zesFrequencyGetState; + this->sysmanFrequency.pfnGetThrottleTime = L0::zesFrequencyGetThrottleTime; + this->sysmanFrequency.pfnOcGetCapabilities = L0::zesFrequencyOcGetCapabilities; + this->sysmanFrequency.pfnOcGetFrequencyTarget = L0::zesFrequencyOcGetFrequencyTarget; + this->sysmanFrequency.pfnOcSetFrequencyTarget = L0::zesFrequencyOcSetFrequencyTarget; + this->sysmanFrequency.pfnOcGetVoltageTarget = L0::zesFrequencyOcGetVoltageTarget; + this->sysmanFrequency.pfnOcSetVoltageTarget = L0::zesFrequencyOcSetVoltageTarget; + this->sysmanFrequency.pfnOcSetMode = L0::zesFrequencyOcSetMode; + this->sysmanFrequency.pfnOcGetMode = L0::zesFrequencyOcGetMode; + this->sysmanFrequency.pfnOcGetIccMax = L0::zesFrequencyOcGetIccMax; + this->sysmanFrequency.pfnOcSetIccMax = L0::zesFrequencyOcSetIccMax; + this->sysmanFrequency.pfnOcGetTjMax = L0::zesFrequencyOcGetTjMax; + this->sysmanFrequency.pfnOcSetTjMax = L0::zesFrequencyOcSetTjMax; + this->sysmanEngine.pfnGetProperties = L0::zesEngineGetProperties; + this->sysmanEngine.pfnGetActivity = L0::zesEngineGetActivity; + this->sysmanEngine.pfnGetActivityExt = L0::zesEngineGetActivityExt; + this->sysmanStandby.pfnGetProperties = L0::zesStandbyGetProperties; + this->sysmanStandby.pfnGetMode = L0::zesStandbyGetMode; + this->sysmanStandby.pfnSetMode = L0::zesStandbySetMode; + this->sysmanFirmware.pfnGetProperties = L0::zesFirmwareGetProperties; + this->sysmanFirmware.pfnFlash = L0::zesFirmwareFlash; + this->sysmanFirmware.pfnGetFlashProgress = L0::zesFirmwareGetFlashProgress; + this->sysmanFirmware.pfnGetConsoleLogs = L0::zesFirmwareGetConsoleLogs; + this->sysmanFirmwareExp.pfnGetSecurityVersionExp = L0::zesFirmwareGetSecurityVersionExp; + this->sysmanFirmwareExp.pfnSetSecurityVersionExp = L0::zesFirmwareSetSecurityVersionExp; + this->sysmanMemory.pfnGetProperties = L0::zesMemoryGetProperties; + this->sysmanMemory.pfnGetState = L0::zesMemoryGetState; + this->sysmanMemory.pfnGetBandwidth = L0::zesMemoryGetBandwidth; + this->sysmanFabricPort.pfnGetProperties = L0::zesFabricPortGetProperties; + this->sysmanFabricPort.pfnGetLinkType = L0::zesFabricPortGetLinkType; + this->sysmanFabricPort.pfnGetConfig = L0::zesFabricPortGetConfig; + this->sysmanFabricPort.pfnSetConfig = L0::zesFabricPortSetConfig; + this->sysmanFabricPort.pfnGetState = L0::zesFabricPortGetState; + this->sysmanFabricPort.pfnGetThroughput = L0::zesFabricPortGetThroughput; + this->sysmanFabricPort.pfnGetFabricErrorCounters = L0::zesFabricPortGetFabricErrorCounters; + this->sysmanFabricPort.pfnGetMultiPortThroughput = L0::zesFabricPortGetMultiPortThroughput; + this->sysmanTemperature.pfnGetProperties = L0::zesTemperatureGetProperties; + this->sysmanTemperature.pfnGetConfig = L0::zesTemperatureGetConfig; + this->sysmanTemperature.pfnSetConfig = L0::zesTemperatureSetConfig; + this->sysmanTemperature.pfnGetState = L0::zesTemperatureGetState; + this->sysmanPsu.pfnGetProperties = L0::zesPsuGetProperties; + this->sysmanPsu.pfnGetState = L0::zesPsuGetState; + this->sysmanFan.pfnGetProperties = L0::zesFanGetProperties; + this->sysmanFan.pfnGetConfig = L0::zesFanGetConfig; + this->sysmanFan.pfnSetDefaultMode = L0::zesFanSetDefaultMode; + this->sysmanFan.pfnSetFixedSpeedMode = L0::zesFanSetFixedSpeedMode; + this->sysmanFan.pfnSetSpeedTableMode = L0::zesFanSetSpeedTableMode; + this->sysmanFan.pfnGetState = L0::zesFanGetState; + this->sysmanLed.pfnGetProperties = L0::zesLedGetProperties; + this->sysmanLed.pfnGetState = L0::zesLedGetState; + this->sysmanLed.pfnSetState = L0::zesLedSetState; + this->sysmanLed.pfnSetColor = L0::zesLedSetColor; + this->sysmanRas.pfnGetProperties = L0::zesRasGetProperties; + this->sysmanRas.pfnGetConfig = L0::zesRasGetConfig; + this->sysmanRas.pfnSetConfig = L0::zesRasSetConfig; + this->sysmanRas.pfnGetState = L0::zesRasGetState; + this->sysmanRasExp.pfnGetStateExp = L0::zesRasGetStateExp; + this->sysmanRasExp.pfnClearStateExp = L0::zesRasClearStateExp; + this->sysmanDiagnostics.pfnGetProperties = L0::zesDiagnosticsGetProperties; + this->sysmanDiagnostics.pfnGetTests = L0::zesDiagnosticsGetTests; + this->sysmanDiagnostics.pfnRunTests = L0::zesDiagnosticsRunTests; + this->sysmanVFManagementExp.pfnGetVFPropertiesExp = L0::zesVFManagementGetVFPropertiesExp; + this->sysmanVFManagementExp.pfnGetVFMemoryUtilizationExp = L0::zesVFManagementGetVFMemoryUtilizationExp; + this->sysmanVFManagementExp.pfnGetVFEngineUtilizationExp = L0::zesVFManagementGetVFEngineUtilizationExp; + this->sysmanVFManagementExp.pfnSetVFTelemetryModeExp = L0::zesVFManagementSetVFTelemetryModeExp; + this->sysmanVFManagementExp.pfnSetVFTelemetrySamplingIntervalExp = L0::zesVFManagementSetVFTelemetrySamplingIntervalExp; + this->sysmanVFManagementExp.pfnGetVFCapabilitiesExp = L0::zesVFManagementGetVFCapabilitiesExp; + this->sysmanVFManagementExp.pfnGetVFMemoryUtilizationExp2 = L0::zesVFManagementGetVFMemoryUtilizationExp2; + this->sysmanVFManagementExp.pfnGetVFEngineUtilizationExp2 = L0::zesVFManagementGetVFEngineUtilizationExp2; + this->sysmanVFManagementExp.pfnGetVFCapabilitiesExp2 = L0::zesVFManagementGetVFCapabilitiesExp2; +} +} // namespace L0 diff --git a/level_zero/ddi/ze_ddi_tables.h b/level_zero/ddi/ze_ddi_tables.h index f7a6ca83a5..922b0b75de 100644 --- a/level_zero/ddi/ze_ddi_tables.h +++ b/level_zero/ddi/ze_ddi_tables.h @@ -16,15 +16,7 @@ extern "C" { typedef struct _ze_gpu_driver_dditable_t { - ze_dditable_t ddiTable; - ze_dditable_t coreDdiTable; - ze_dditable_t tracingDdiTable; - zet_dditable_t toolsDdiTable; - zes_dditable_t sysmanDdiTable; - - ze_api_version_t version = ZE_API_VERSION_1_0; - bool enableTracing; } ze_gpu_driver_dditable_t; @@ -38,3 +30,89 @@ inline void fillDdiEntry(FuncType &entry, FuncType function, ze_api_version_t lo entry = function; } } + +namespace L0 { + +struct DriverDispatch { + DriverDispatch(); + ze_dditable_driver_t core{}; + zet_dditable_driver_t tools{}; + zes_dditable_driver_t sysman{}; + + ze_rtas_builder_exp_dditable_t coreRTASBuilderExp{}; + ze_rtas_parallel_operation_exp_dditable_t coreRTASParallelOperationExp{}; + ze_global_dditable_t coreGlobal{}; + ze_driver_dditable_t coreDriver{}; + ze_driver_exp_dditable_t coreDriverExp{}; + ze_device_dditable_t coreDevice{}; + ze_device_exp_dditable_t coreDeviceExp{}; + ze_context_dditable_t coreContext{}; + ze_command_queue_dditable_t coreCommandQueue{}; + ze_command_list_dditable_t coreCommandList{}; + ze_command_list_exp_dditable_t coreCommandListExp{}; + ze_image_dditable_t coreImage{}; + ze_image_exp_dditable_t coreImageExp{}; + ze_mem_dditable_t coreMem{}; + ze_mem_exp_dditable_t coreMemExp{}; + ze_fence_dditable_t coreFence{}; + ze_event_pool_dditable_t coreEventPool{}; + ze_event_dditable_t coreEvent{}; + ze_event_exp_dditable_t coreEventExp{}; + ze_module_dditable_t coreModule{}; + ze_module_build_log_dditable_t coreModuleBuildLog{}; + ze_kernel_dditable_t coreKernel{}; + ze_kernel_exp_dditable_t coreKernelExp{}; + ze_sampler_dditable_t coreSampler{}; + ze_physical_mem_dditable_t corePhysicalMem{}; + ze_virtual_mem_dditable_t coreVirtualMem{}; + ze_fabric_vertex_exp_dditable_t coreFabricVertexExp{}; + ze_fabric_edge_exp_dditable_t coreFabricEdgeExp{}; + + zet_metric_programmable_exp_dditable_t toolsMetricProgrammableExp{}; + zet_metric_tracer_exp_dditable_t toolsMetricTracerExp{}; + zet_metric_decoder_exp_dditable_t toolsMetricDecoderExp{}; + zet_device_dditable_t toolsDevice{}; + zet_device_exp_dditable_t toolsDeviceExp{}; + zet_context_dditable_t toolsContext{}; + zet_command_list_dditable_t toolsCommandList{}; + zet_module_dditable_t toolsModule{}; + zet_kernel_dditable_t toolsKernel{}; + zet_metric_dditable_t toolsMetric{}; + zet_metric_exp_dditable_t toolsMetricExp{}; + zet_metric_group_dditable_t toolsMetricGroup{}; + zet_metric_group_exp_dditable_t toolsMetricGroupExp{}; + zet_metric_streamer_dditable_t toolsMetricStreamer{}; + zet_metric_query_pool_dditable_t toolsMetricQueryPool{}; + zet_metric_query_dditable_t toolsMetricQuery{}; + zet_tracer_exp_dditable_t toolsTracerExp{}; + zet_debug_dditable_t toolsDebug{}; + + zes_global_dditable_t sysmanGlobal{}; + zes_device_dditable_t sysmanDevice{}; + zes_device_exp_dditable_t sysmanDeviceExp{}; + zes_driver_dditable_t sysmanDriver{}; + zes_driver_exp_dditable_t sysmanDriverExp{}; + zes_overclock_dditable_t sysmanOverclock{}; + zes_scheduler_dditable_t sysmanScheduler{}; + zes_performance_factor_dditable_t sysmanPerformanceFactor{}; + zes_power_dditable_t sysmanPower{}; + zes_frequency_dditable_t sysmanFrequency{}; + zes_engine_dditable_t sysmanEngine{}; + zes_standby_dditable_t sysmanStandby{}; + zes_firmware_dditable_t sysmanFirmware{}; + zes_firmware_exp_dditable_t sysmanFirmwareExp{}; + zes_memory_dditable_t sysmanMemory{}; + zes_fabric_port_dditable_t sysmanFabricPort{}; + zes_temperature_dditable_t sysmanTemperature{}; + zes_psu_dditable_t sysmanPsu{}; + zes_fan_dditable_t sysmanFan{}; + zes_led_dditable_t sysmanLed{}; + zes_ras_dditable_t sysmanRas{}; + zes_ras_exp_dditable_t sysmanRasExp{}; + zes_diagnostics_dditable_t sysmanDiagnostics{}; + zes_vf_management_exp_dditable_t sysmanVFManagementExp{}; +}; + +extern DriverDispatch globalDriverDispatch; + +}; // namespace L0 diff --git a/level_zero/experimental/source/tracing/tracing_imp.h b/level_zero/experimental/source/tracing/tracing_imp.h index 04b961733a..6a9fb391ce 100644 --- a/level_zero/experimental/source/tracing/tracing_imp.h +++ b/level_zero/experimental/source/tracing/tracing_imp.h @@ -7,6 +7,7 @@ #pragma once +#include "level_zero/ddi/ze_ddi_tables.h" #include "level_zero/experimental/source/tracing/tracing.h" #include "level_zero/experimental/source/tracing/tracing_barrier_imp.h" #include "level_zero/experimental/source/tracing/tracing_cmdlist_imp.h" @@ -24,8 +25,6 @@ #include "level_zero/experimental/source/tracing/tracing_sampler_imp.h" #include -#include "ze_ddi_tables.h" - #include #include #include diff --git a/level_zero/tools/test/unit_tests/sources/loader/test_loader.cpp b/level_zero/tools/test/unit_tests/sources/loader/test_loader.cpp index 146e8c7ee6..8d74b0dedb 100644 --- a/level_zero/tools/test/unit_tests/sources/loader/test_loader.cpp +++ b/level_zero/tools/test/unit_tests/sources/loader/test_loader.cpp @@ -7,11 +7,10 @@ #include "shared/test/common/test_macros/test.h" +#include "level_zero/ddi/ze_ddi_tables.h" #include #include -#include "ze_ddi_tables.h" - namespace L0 { namespace ult {