diff --git a/include/ze.py b/include/ze.py index d17cf647..6b94de46 100644 --- a/include/ze.py +++ b/include/ze.py @@ -4,7 +4,7 @@ SPDX-License-Identifier: MIT @file ze.py - @version v1.11-r1.11.8 + @version v1.12-r1.11.9 """ import platform @@ -316,6 +316,7 @@ class ze_structure_type_v(IntEnum): PITCHED_IMAGE_EXP_DESC = 0x0002001F ## ::ze_image_pitched_exp_desc_t MUTABLE_GRAPH_ARGUMENT_EXP_DESC = 0x00020020 ## ::ze_mutable_graph_argument_exp_desc_t INIT_DRIVER_TYPE_DESC = 0x00020021 ## ::ze_init_driver_type_desc_t + DRIVER_DDI_HANDLES_EXT_PROPERTIES = 0x00020022 ## ::ze_driver_ddi_handles_ext_properties_t class ze_structure_type_t(c_int): def __str__(self): @@ -2114,6 +2115,45 @@ class ze_relaxed_allocation_limits_exp_desc_t(Structure): ## @brief Get Kernel Binary Extension Name ZE_GET_KERNEL_BINARY_EXP_NAME = "ZE_extension_kernel_binary_exp" +############################################################################### +## @brief Driver Direct Device Interface (DDI) Handles Extension Name +ZE_DRIVER_DDI_HANDLES_EXT_NAME = "ZE_extension_driver_ddi_handles" + +############################################################################### +## @brief Driver Direct Device Interface (DDI) Handles Extension Version(s) +class ze_driver_ddi_handles_ext_version_v(IntEnum): + _1_0 = ZE_MAKE_VERSION( 1, 0 ) ## version 1.0 + CURRENT = ZE_MAKE_VERSION( 1, 0 ) ## latest known version + +class ze_driver_ddi_handles_ext_version_t(c_int): + def __str__(self): + return str(ze_driver_ddi_handles_ext_version_v(self.value)) + + +############################################################################### +## @brief Driver Direct Device Interface (DDI) Handle Extension Flags +class ze_driver_ddi_handle_ext_flags_v(IntEnum): + DDI_HANDLE_EXT_SUPPORTED = ZE_BIT(0) ## Driver Supports DDI Handles Extension + +class ze_driver_ddi_handle_ext_flags_t(c_int): + def __str__(self): + return hex(self.value) + + +############################################################################### +## @brief Driver DDI Handles properties queried using ::zeDriverGetProperties +## +## @details +## - This structure may be returned from ::zeDriverGetProperties, via the +## `pNext` member of ::ze_driver_properties_t. +class ze_driver_ddi_handles_ext_properties_t(Structure): + _fields_ = [ + ("stype", ze_structure_type_t), ## [in] type of this structure + ("pNext", c_void_p), ## [in,out][optional] must be null or a pointer to an extension-specific + ## structure (i.e. contains stype and pNext). + ("flags", ze_driver_ddi_handle_ext_flags_t) ## [out] 0 (none) or a valid combination of ::ze_driver_ddi_handle_ext_flags_t + ] + ############################################################################### ## @brief Cache_Reservation Extension Name ZE_CACHE_RESERVATION_EXT_NAME = "ZE_extension_cache_reservation" diff --git a/include/ze_api.h b/include/ze_api.h index dc57f4d4..827a008d 100644 --- a/include/ze_api.h +++ b/include/ze_api.h @@ -5,7 +5,7 @@ * SPDX-License-Identifier: MIT * * @file ze_api.h - * @version v1.11-r1.11.8 + * @version v1.12-r1.11.9 * */ #ifndef _ZE_API_H @@ -345,6 +345,7 @@ typedef enum _ze_structure_type_t ZE_STRUCTURE_TYPE_PITCHED_IMAGE_EXP_DESC = 0x0002001F, ///< ::ze_image_pitched_exp_desc_t ZE_STRUCTURE_TYPE_MUTABLE_GRAPH_ARGUMENT_EXP_DESC = 0x00020020, ///< ::ze_mutable_graph_argument_exp_desc_t ZE_STRUCTURE_TYPE_INIT_DRIVER_TYPE_DESC = 0x00020021, ///< ::ze_init_driver_type_desc_t + ZE_STRUCTURE_TYPE_DRIVER_DDI_HANDLES_EXT_PROPERTIES = 0x00020022, ///< ::ze_driver_ddi_handles_ext_properties_t ZE_STRUCTURE_TYPE_FORCE_UINT32 = 0x7fffffff } ze_structure_type_t; @@ -689,6 +690,10 @@ typedef struct _ze_float_atomic_ext_properties_t ze_float_atomic_ext_properties_ /// @brief Forward-declare ze_relaxed_allocation_limits_exp_desc_t typedef struct _ze_relaxed_allocation_limits_exp_desc_t ze_relaxed_allocation_limits_exp_desc_t; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Forward-declare ze_driver_ddi_handles_ext_properties_t +typedef struct _ze_driver_ddi_handles_ext_properties_t ze_driver_ddi_handles_ext_properties_t; + /////////////////////////////////////////////////////////////////////////////// /// @brief Forward-declare ze_cache_reservation_ext_desc_t typedef struct _ze_cache_reservation_ext_desc_t ze_cache_reservation_ext_desc_t; @@ -7692,6 +7697,54 @@ zeKernelGetBinaryExp( uint8_t* pKernelBinary ///< [in,out] pointer to storage area for GEN ISA binary function. ); +#if !defined(__GNUC__) +#pragma endregion +#endif +// Intel 'oneAPI' Level-Zero Extension for Driver Direct Device Interface (DDI) Handles +#if !defined(__GNUC__) +#pragma region driverDDIHandles +#endif +/////////////////////////////////////////////////////////////////////////////// +#ifndef ZE_DRIVER_DDI_HANDLES_EXT_NAME +/// @brief Driver Direct Device Interface (DDI) Handles Extension Name +#define ZE_DRIVER_DDI_HANDLES_EXT_NAME "ZE_extension_driver_ddi_handles" +#endif // ZE_DRIVER_DDI_HANDLES_EXT_NAME + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Driver Direct Device Interface (DDI) Handles Extension Version(s) +typedef enum _ze_driver_ddi_handles_ext_version_t +{ + ZE_DRIVER_DDI_HANDLES_EXT_VERSION_1_0 = ZE_MAKE_VERSION( 1, 0 ), ///< version 1.0 + ZE_DRIVER_DDI_HANDLES_EXT_VERSION_CURRENT = ZE_MAKE_VERSION( 1, 0 ), ///< latest known version + ZE_DRIVER_DDI_HANDLES_EXT_VERSION_FORCE_UINT32 = 0x7fffffff + +} ze_driver_ddi_handles_ext_version_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Driver Direct Device Interface (DDI) Handle Extension Flags +typedef uint32_t ze_driver_ddi_handle_ext_flags_t; +typedef enum _ze_driver_ddi_handle_ext_flag_t +{ + ZE_DRIVER_DDI_HANDLE_EXT_FLAG_DDI_HANDLE_EXT_SUPPORTED = ZE_BIT(0), ///< Driver Supports DDI Handles Extension + ZE_DRIVER_DDI_HANDLE_EXT_FLAG_FORCE_UINT32 = 0x7fffffff + +} ze_driver_ddi_handle_ext_flag_t; + +/////////////////////////////////////////////////////////////////////////////// +/// @brief Driver DDI Handles properties queried using ::zeDriverGetProperties +/// +/// @details +/// - This structure may be returned from ::zeDriverGetProperties, via the +/// `pNext` member of ::ze_driver_properties_t. +typedef struct _ze_driver_ddi_handles_ext_properties_t +{ + ze_structure_type_t stype; ///< [in] type of this structure + void* pNext; ///< [in,out][optional] must be null or a pointer to an extension-specific + ///< structure (i.e. contains stype and pNext). + ze_driver_ddi_handle_ext_flags_t flags; ///< [out] 0 (none) or a valid combination of ::ze_driver_ddi_handle_ext_flags_t + +} ze_driver_ddi_handles_ext_properties_t; + #if !defined(__GNUC__) #pragma endregion #endif diff --git a/include/ze_ddi.h b/include/ze_ddi.h index e06ef343..00b4c5c2 100644 --- a/include/ze_ddi.h +++ b/include/ze_ddi.h @@ -5,7 +5,7 @@ * SPDX-License-Identifier: MIT * * @file ze_ddi.h - * @version v1.11-r1.11.8 + * @version v1.12-r1.11.9 * */ #ifndef _ZE_DDI_H @@ -2575,6 +2575,39 @@ typedef struct _ze_dditable_t ze_fabric_vertex_exp_dditable_t FabricVertexExp; ze_fabric_edge_exp_dditable_t FabricEdgeExp; } ze_dditable_t; +/// @brief Container for all DDI tables with version and tables set by the Driver +typedef struct _ze_dditable_driver_t +{ + ze_api_version_t version; + ze_rtas_builder_exp_dditable_t * RTASBuilderExp; + ze_rtas_parallel_operation_exp_dditable_t * RTASParallelOperationExp; + ze_global_dditable_t * Global; + ze_driver_dditable_t * Driver; + ze_driver_exp_dditable_t * DriverExp; + ze_device_dditable_t * Device; + ze_device_exp_dditable_t * DeviceExp; + ze_context_dditable_t * Context; + ze_command_queue_dditable_t * CommandQueue; + ze_command_list_dditable_t * CommandList; + ze_command_list_exp_dditable_t * CommandListExp; + ze_image_dditable_t * Image; + ze_image_exp_dditable_t * ImageExp; + ze_mem_dditable_t * Mem; + ze_mem_exp_dditable_t * MemExp; + ze_fence_dditable_t * Fence; + ze_event_pool_dditable_t * EventPool; + ze_event_dditable_t * Event; + ze_event_exp_dditable_t * EventExp; + ze_module_dditable_t * Module; + ze_module_build_log_dditable_t * ModuleBuildLog; + ze_kernel_dditable_t * Kernel; + ze_kernel_exp_dditable_t * KernelExp; + ze_sampler_dditable_t * Sampler; + ze_physical_mem_dditable_t * PhysicalMem; + ze_virtual_mem_dditable_t * VirtualMem; + ze_fabric_vertex_exp_dditable_t * FabricVertexExp; + ze_fabric_edge_exp_dditable_t * FabricEdgeExp; +} ze_dditable_driver_t; #if defined(__cplusplus) } // extern "C" diff --git a/include/ze_ddi_common.h b/include/ze_ddi_common.h new file mode 100644 index 00000000..d80c7015 --- /dev/null +++ b/include/ze_ddi_common.h @@ -0,0 +1,41 @@ +/* + * + * Copyright (C) 2024 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + * @file ze_ddi_common.h + * @version v1.12-r1.11.9 + * + */ +#ifndef _ZE_DDI_H +#define _ZE_DDI_H +#if defined(__cplusplus) +#pragma once +#endif +#include "ze_ddi.h" +#include "zet_ddi.h" +#include "zes_ddi.h" + +#if defined(__cplusplus) +extern "C" { +#endif + +/// @brief Container of all dditables for dispatchable functions +typedef struct _ze_dispatch_t +{ + ze_dditable_driver_t *pCore; // [in] pointer to _ze_dditable_t_ object related to this handle + zet_dditable_driver_t *pTools; // [in] pointer to _zet_dditable_t_ object related to this handle + zes_dditable_driver_t *pSysman; // [in] pointer to _zes_dditable_t_ object related to this handle +} ze_dispatch_t; +/// @brief Handle with pointer to Dispatch Container allocated by the driver at the beginning of every L0 object handle +typedef struct _ze_handle_t +{ + ze_dispatch_t *pDispatch; // [in] pointer to _ze_dispatch_t_ object related to this handle +} ze_handle_t; + +#if defined(__cplusplus) +} // extern "C" +#endif + +#endif // _ZE_DDI_H \ No newline at end of file diff --git a/include/zes.py b/include/zes.py index dc4af648..2071719f 100644 --- a/include/zes.py +++ b/include/zes.py @@ -4,7 +4,7 @@ SPDX-License-Identifier: MIT @file zes.py - @version v1.11-r1.11.8 + @version v1.12-r1.11.9 """ import platform diff --git a/include/zes_api.h b/include/zes_api.h index 874643ce..678aeefb 100644 --- a/include/zes_api.h +++ b/include/zes_api.h @@ -5,7 +5,7 @@ * SPDX-License-Identifier: MIT * * @file zes_api.h - * @version v1.11-r1.11.8 + * @version v1.12-r1.11.9 * */ #ifndef _ZES_API_H diff --git a/include/zes_ddi.h b/include/zes_ddi.h index 27ef4403..3ee99596 100644 --- a/include/zes_ddi.h +++ b/include/zes_ddi.h @@ -5,7 +5,7 @@ * SPDX-License-Identifier: MIT * * @file zes_ddi.h - * @version v1.11-r1.11.8 + * @version v1.12-r1.11.9 * */ #ifndef _ZES_DDI_H @@ -1983,6 +1983,35 @@ typedef struct _zes_dditable_t zes_diagnostics_dditable_t Diagnostics; zes_vf_management_exp_dditable_t VFManagementExp; } zes_dditable_t; +/// @brief Container for all DDI tables with version and tables set by the Driver +typedef struct _zes_dditable_driver_t +{ + ze_api_version_t version; + zes_global_dditable_t * Global; + zes_device_dditable_t * Device; + zes_device_exp_dditable_t * DeviceExp; + zes_driver_dditable_t * Driver; + zes_driver_exp_dditable_t * DriverExp; + zes_overclock_dditable_t * Overclock; + zes_scheduler_dditable_t * Scheduler; + zes_performance_factor_dditable_t * PerformanceFactor; + zes_power_dditable_t * Power; + zes_frequency_dditable_t * Frequency; + zes_engine_dditable_t * Engine; + zes_standby_dditable_t * Standby; + zes_firmware_dditable_t * Firmware; + zes_firmware_exp_dditable_t * FirmwareExp; + zes_memory_dditable_t * Memory; + zes_fabric_port_dditable_t * FabricPort; + zes_temperature_dditable_t * Temperature; + zes_psu_dditable_t * Psu; + zes_fan_dditable_t * Fan; + zes_led_dditable_t * Led; + zes_ras_dditable_t * Ras; + zes_ras_exp_dditable_t * RasExp; + zes_diagnostics_dditable_t * Diagnostics; + zes_vf_management_exp_dditable_t * VFManagementExp; +} zes_dditable_driver_t; #if defined(__cplusplus) } // extern "C" diff --git a/include/zet.py b/include/zet.py index 993e7383..861e858f 100644 --- a/include/zet.py +++ b/include/zet.py @@ -4,7 +4,7 @@ SPDX-License-Identifier: MIT @file zet.py - @version v1.11-r1.11.8 + @version v1.12-r1.11.9 """ import platform diff --git a/include/zet_api.h b/include/zet_api.h index 15c74eb5..3d397c79 100644 --- a/include/zet_api.h +++ b/include/zet_api.h @@ -5,7 +5,7 @@ * SPDX-License-Identifier: MIT * * @file zet_api.h - * @version v1.11-r1.11.8 + * @version v1.12-r1.11.9 * */ #ifndef _ZET_API_H diff --git a/include/zet_ddi.h b/include/zet_ddi.h index 8d6d7c0d..beefa357 100644 --- a/include/zet_ddi.h +++ b/include/zet_ddi.h @@ -5,7 +5,7 @@ * SPDX-License-Identifier: MIT * * @file zet_ddi.h - * @version v1.11-r1.11.8 + * @version v1.12-r1.11.9 * */ #ifndef _ZET_DDI_H @@ -1166,6 +1166,29 @@ typedef struct _zet_dditable_t zet_tracer_exp_dditable_t TracerExp; zet_debug_dditable_t Debug; } zet_dditable_t; +/// @brief Container for all DDI tables with version and tables set by the Driver +typedef struct _zet_dditable_driver_t +{ + ze_api_version_t version; + zet_metric_programmable_exp_dditable_t * MetricProgrammableExp; + zet_metric_tracer_exp_dditable_t * MetricTracerExp; + zet_metric_decoder_exp_dditable_t * MetricDecoderExp; + zet_device_dditable_t * Device; + zet_device_exp_dditable_t * DeviceExp; + zet_context_dditable_t * Context; + zet_command_list_dditable_t * CommandList; + zet_module_dditable_t * Module; + zet_kernel_dditable_t * Kernel; + zet_metric_dditable_t * Metric; + zet_metric_exp_dditable_t * MetricExp; + zet_metric_group_dditable_t * MetricGroup; + zet_metric_group_exp_dditable_t * MetricGroupExp; + zet_metric_streamer_dditable_t * MetricStreamer; + zet_metric_query_pool_dditable_t * MetricQueryPool; + zet_metric_query_dditable_t * MetricQuery; + zet_tracer_exp_dditable_t * TracerExp; + zet_debug_dditable_t * Debug; +} zet_dditable_driver_t; #if defined(__cplusplus) } // extern "C"