Core API

Contents

Core API#

oneAPI Level Zero Specification - Version 1.9.3

Common#

Common Enums#

ze_result_t#

enum ze_result_t#

Defines Return/Error codes.

Values:

enumerator ZE_RESULT_SUCCESS#

[Core] success

enumerator ZE_RESULT_NOT_READY#

[Core] synchronization primitive not signaled

enumerator ZE_RESULT_ERROR_DEVICE_LOST#

[Core] device hung, reset, was removed, or driver update occurred

enumerator ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY#

[Core] insufficient host memory to satisfy call

enumerator ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY#

[Core] insufficient device memory to satisfy call

enumerator ZE_RESULT_ERROR_MODULE_BUILD_FAILURE#

[Core] error occurred when building module, see build log for details

[Core] error occurred when linking modules, see build log for details

enumerator ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET#

[Core] device requires a reset

enumerator ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE#

[Core] device currently in low power state

enumerator ZE_RESULT_EXP_ERROR_DEVICE_IS_NOT_VERTEX#

[Core, Experimental] device is not represented by a fabric vertex

enumerator ZE_RESULT_EXP_ERROR_VERTEX_IS_NOT_DEVICE#

[Core, Experimental] fabric vertex does not represent a device

enumerator ZE_RESULT_EXP_ERROR_REMOTE_DEVICE#

[Core, Experimental] fabric vertex represents a remote device or subdevice

enumerator ZE_RESULT_EXP_ERROR_OPERANDS_INCOMPATIBLE#

[Core, Experimental] operands of comparison are not compatible

enumerator ZE_RESULT_EXP_RTAS_BUILD_RETRY#

[Core, Experimental] ray tracing acceleration structure build operation failed due to insufficient resources, retry with a larger acceleration structure buffer allocation

enumerator ZE_RESULT_EXP_RTAS_BUILD_DEFERRED#

[Core, Experimental] ray tracing acceleration structure build operation deferred to parallel operation join

enumerator ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS#

[Sysman] access denied due to permission level

enumerator ZE_RESULT_ERROR_NOT_AVAILABLE#

[Sysman] resource already in use and simultaneous access not allowed or resource was removed

enumerator ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE#

[Common] external required dependency is unavailable or missing

enumerator ZE_RESULT_WARNING_DROPPED_DATA#

[Tools] data may have been dropped

enumerator ZE_RESULT_ERROR_UNINITIALIZED#

[Validation] driver is not initialized

enumerator ZE_RESULT_ERROR_UNSUPPORTED_VERSION#

[Validation] generic error code for unsupported versions

enumerator ZE_RESULT_ERROR_UNSUPPORTED_FEATURE#

[Validation] generic error code for unsupported features

enumerator ZE_RESULT_ERROR_INVALID_ARGUMENT#

[Validation] generic error code for invalid arguments

enumerator ZE_RESULT_ERROR_INVALID_NULL_HANDLE#

[Validation] handle argument is not valid

enumerator ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE#

[Validation] object pointed to by handle still in-use by device

enumerator ZE_RESULT_ERROR_INVALID_NULL_POINTER#

[Validation] pointer argument may not be nullptr

enumerator ZE_RESULT_ERROR_INVALID_SIZE#

[Validation] size argument is invalid (e.g., must not be zero)

enumerator ZE_RESULT_ERROR_UNSUPPORTED_SIZE#

[Validation] size argument is not supported by the device (e.g., too large)

enumerator ZE_RESULT_ERROR_UNSUPPORTED_ALIGNMENT#

[Validation] alignment argument is not supported by the device (e.g., too small)

enumerator ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT#

[Validation] synchronization object in invalid state

enumerator ZE_RESULT_ERROR_INVALID_ENUMERATION#

[Validation] enumerator argument is not valid

enumerator ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION#

[Validation] enumerator argument is not supported by the device

enumerator ZE_RESULT_ERROR_UNSUPPORTED_IMAGE_FORMAT#

[Validation] image format is not supported by the device

enumerator ZE_RESULT_ERROR_INVALID_NATIVE_BINARY#

[Validation] native binary is not supported by the device

enumerator ZE_RESULT_ERROR_INVALID_GLOBAL_NAME#

[Validation] global variable is not found in the module

enumerator ZE_RESULT_ERROR_INVALID_KERNEL_NAME#

[Validation] kernel name is not found in the module

enumerator ZE_RESULT_ERROR_INVALID_FUNCTION_NAME#

[Validation] function name is not found in the module

enumerator ZE_RESULT_ERROR_INVALID_GROUP_SIZE_DIMENSION#

[Validation] group size dimension is not valid for the kernel or device

enumerator ZE_RESULT_ERROR_INVALID_GLOBAL_WIDTH_DIMENSION#

[Validation] global width dimension is not valid for the kernel or device

enumerator ZE_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_INDEX#

[Validation] kernel argument index is not valid for kernel

enumerator ZE_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_SIZE#

[Validation] kernel argument size does not match kernel

enumerator ZE_RESULT_ERROR_INVALID_KERNEL_ATTRIBUTE_VALUE#

[Validation] value of kernel attribute is not valid for the kernel or device

enumerator ZE_RESULT_ERROR_INVALID_MODULE_UNLINKED#

[Validation] module with imports needs to be linked before kernels can be created from it.

enumerator ZE_RESULT_ERROR_INVALID_COMMAND_LIST_TYPE#

[Validation] command list type does not match command queue type

enumerator ZE_RESULT_ERROR_OVERLAPPING_REGIONS#

[Validation] copy operations do not support overlapping regions of memory

enumerator ZE_RESULT_WARNING_ACTION_REQUIRED#

[Sysman] an action is required to complete the desired operation

enumerator ZE_RESULT_ERROR_UNKNOWN#

[Core] unknown or internal error

enumerator ZE_RESULT_FORCE_UINT32#

ze_structure_type_t#

enum ze_structure_type_t#

Defines structure types.

Values:

enumerator ZE_STRUCTURE_TYPE_DRIVER_PROPERTIES#

ze_driver_properties_t

enumerator ZE_STRUCTURE_TYPE_DRIVER_IPC_PROPERTIES#

ze_driver_ipc_properties_t

enumerator ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES#

ze_device_properties_t

enumerator ZE_STRUCTURE_TYPE_DEVICE_COMPUTE_PROPERTIES#

ze_device_compute_properties_t

enumerator ZE_STRUCTURE_TYPE_DEVICE_MODULE_PROPERTIES#

ze_device_module_properties_t

enumerator ZE_STRUCTURE_TYPE_COMMAND_QUEUE_GROUP_PROPERTIES#

ze_command_queue_group_properties_t

enumerator ZE_STRUCTURE_TYPE_DEVICE_MEMORY_PROPERTIES#

ze_device_memory_properties_t

enumerator ZE_STRUCTURE_TYPE_DEVICE_MEMORY_ACCESS_PROPERTIES#

ze_device_memory_access_properties_t

enumerator ZE_STRUCTURE_TYPE_DEVICE_CACHE_PROPERTIES#

ze_device_cache_properties_t

enumerator ZE_STRUCTURE_TYPE_DEVICE_IMAGE_PROPERTIES#

ze_device_image_properties_t

enumerator ZE_STRUCTURE_TYPE_DEVICE_P2P_PROPERTIES#

ze_device_p2p_properties_t

enumerator ZE_STRUCTURE_TYPE_DEVICE_EXTERNAL_MEMORY_PROPERTIES#

ze_device_external_memory_properties_t

enumerator ZE_STRUCTURE_TYPE_CONTEXT_DESC#

ze_context_desc_t

enumerator ZE_STRUCTURE_TYPE_COMMAND_QUEUE_DESC#

ze_command_queue_desc_t

enumerator ZE_STRUCTURE_TYPE_COMMAND_LIST_DESC#

ze_command_list_desc_t

enumerator ZE_STRUCTURE_TYPE_EVENT_POOL_DESC#

ze_event_pool_desc_t

enumerator ZE_STRUCTURE_TYPE_EVENT_DESC#

ze_event_desc_t

enumerator ZE_STRUCTURE_TYPE_FENCE_DESC#

ze_fence_desc_t

enumerator ZE_STRUCTURE_TYPE_IMAGE_DESC#

ze_image_desc_t

enumerator ZE_STRUCTURE_TYPE_IMAGE_PROPERTIES#

ze_image_properties_t

enumerator ZE_STRUCTURE_TYPE_DEVICE_MEM_ALLOC_DESC#

ze_device_mem_alloc_desc_t

enumerator ZE_STRUCTURE_TYPE_HOST_MEM_ALLOC_DESC#

ze_host_mem_alloc_desc_t

enumerator ZE_STRUCTURE_TYPE_MEMORY_ALLOCATION_PROPERTIES#

ze_memory_allocation_properties_t

enumerator ZE_STRUCTURE_TYPE_EXTERNAL_MEMORY_EXPORT_DESC#

ze_external_memory_export_desc_t

enumerator ZE_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMPORT_FD#

ze_external_memory_import_fd_t

enumerator ZE_STRUCTURE_TYPE_EXTERNAL_MEMORY_EXPORT_FD#

ze_external_memory_export_fd_t

enumerator ZE_STRUCTURE_TYPE_MODULE_DESC#

ze_module_desc_t

enumerator ZE_STRUCTURE_TYPE_MODULE_PROPERTIES#

ze_module_properties_t

enumerator ZE_STRUCTURE_TYPE_KERNEL_DESC#

ze_kernel_desc_t

enumerator ZE_STRUCTURE_TYPE_KERNEL_PROPERTIES#

ze_kernel_properties_t

enumerator ZE_STRUCTURE_TYPE_SAMPLER_DESC#

ze_sampler_desc_t

enumerator ZE_STRUCTURE_TYPE_PHYSICAL_MEM_DESC#

ze_physical_mem_desc_t

enumerator ZE_STRUCTURE_TYPE_KERNEL_PREFERRED_GROUP_SIZE_PROPERTIES#

ze_kernel_preferred_group_size_properties_t

enumerator ZE_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMPORT_WIN32#

ze_external_memory_import_win32_handle_t

enumerator ZE_STRUCTURE_TYPE_EXTERNAL_MEMORY_EXPORT_WIN32#

ze_external_memory_export_win32_handle_t

enumerator ZE_STRUCTURE_TYPE_DEVICE_RAYTRACING_EXT_PROPERTIES#

ze_device_raytracing_ext_properties_t

enumerator ZE_STRUCTURE_TYPE_RAYTRACING_MEM_ALLOC_EXT_DESC#

ze_raytracing_mem_alloc_ext_desc_t

enumerator ZE_STRUCTURE_TYPE_FLOAT_ATOMIC_EXT_PROPERTIES#

ze_float_atomic_ext_properties_t

enumerator ZE_STRUCTURE_TYPE_CACHE_RESERVATION_EXT_DESC#

ze_cache_reservation_ext_desc_t

enumerator ZE_STRUCTURE_TYPE_EU_COUNT_EXT#

ze_eu_count_ext_t

enumerator ZE_STRUCTURE_TYPE_SRGB_EXT_DESC#

ze_srgb_ext_desc_t

enumerator ZE_STRUCTURE_TYPE_LINKAGE_INSPECTION_EXT_DESC#

ze_linkage_inspection_ext_desc_t

enumerator ZE_STRUCTURE_TYPE_PCI_EXT_PROPERTIES#

ze_pci_ext_properties_t

enumerator ZE_STRUCTURE_TYPE_DRIVER_MEMORY_FREE_EXT_PROPERTIES#

ze_driver_memory_free_ext_properties_t

enumerator ZE_STRUCTURE_TYPE_MEMORY_FREE_EXT_DESC#

ze_memory_free_ext_desc_t

enumerator ZE_STRUCTURE_TYPE_MEMORY_COMPRESSION_HINTS_EXT_DESC#

ze_memory_compression_hints_ext_desc_t

enumerator ZE_STRUCTURE_TYPE_IMAGE_ALLOCATION_EXT_PROPERTIES#

ze_image_allocation_ext_properties_t

enumerator ZE_STRUCTURE_TYPE_DEVICE_LUID_EXT_PROPERTIES#

ze_device_luid_ext_properties_t

enumerator ZE_STRUCTURE_TYPE_DEVICE_MEMORY_EXT_PROPERTIES#

ze_device_memory_ext_properties_t

enumerator ZE_STRUCTURE_TYPE_DEVICE_IP_VERSION_EXT#

ze_device_ip_version_ext_t

enumerator ZE_STRUCTURE_TYPE_IMAGE_VIEW_PLANAR_EXT_DESC#

ze_image_view_planar_ext_desc_t

enumerator ZE_STRUCTURE_TYPE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_PROPERTIES#

ze_event_query_kernel_timestamps_ext_properties_t

enumerator ZE_STRUCTURE_TYPE_EVENT_QUERY_KERNEL_TIMESTAMPS_RESULTS_EXT_PROPERTIES#

ze_event_query_kernel_timestamps_results_ext_properties_t

enumerator ZE_STRUCTURE_TYPE_KERNEL_MAX_GROUP_SIZE_EXT_PROPERTIES#

ze_kernel_max_group_size_ext_properties_t

enumerator ZE_STRUCTURE_TYPE_RELAXED_ALLOCATION_LIMITS_EXP_DESC#

ze_relaxed_allocation_limits_exp_desc_t

enumerator ZE_STRUCTURE_TYPE_MODULE_PROGRAM_EXP_DESC#

ze_module_program_exp_desc_t

enumerator ZE_STRUCTURE_TYPE_SCHEDULING_HINT_EXP_PROPERTIES#

ze_scheduling_hint_exp_properties_t

enumerator ZE_STRUCTURE_TYPE_SCHEDULING_HINT_EXP_DESC#

ze_scheduling_hint_exp_desc_t

enumerator ZE_STRUCTURE_TYPE_IMAGE_VIEW_PLANAR_EXP_DESC#

ze_image_view_planar_exp_desc_t

enumerator ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES_1_2#

ze_device_properties_t

enumerator ZE_STRUCTURE_TYPE_IMAGE_MEMORY_EXP_PROPERTIES#

ze_image_memory_properties_exp_t

enumerator ZE_STRUCTURE_TYPE_POWER_SAVING_HINT_EXP_DESC#

ze_context_power_saving_hint_exp_desc_t

enumerator ZE_STRUCTURE_TYPE_COPY_BANDWIDTH_EXP_PROPERTIES#

ze_copy_bandwidth_exp_properties_t

enumerator ZE_STRUCTURE_TYPE_DEVICE_P2P_BANDWIDTH_EXP_PROPERTIES#

ze_device_p2p_bandwidth_exp_properties_t

enumerator ZE_STRUCTURE_TYPE_FABRIC_VERTEX_EXP_PROPERTIES#

ze_fabric_vertex_exp_properties_t

enumerator ZE_STRUCTURE_TYPE_FABRIC_EDGE_EXP_PROPERTIES#

ze_fabric_edge_exp_properties_t

enumerator ZE_STRUCTURE_TYPE_MEMORY_SUB_ALLOCATIONS_EXP_PROPERTIES#

ze_memory_sub_allocations_exp_properties_t

enumerator ZE_STRUCTURE_TYPE_RTAS_BUILDER_EXP_DESC#

ze_rtas_builder_exp_desc_t

enumerator ZE_STRUCTURE_TYPE_RTAS_BUILDER_BUILD_OP_EXP_DESC#

ze_rtas_builder_build_op_exp_desc_t

enumerator ZE_STRUCTURE_TYPE_RTAS_BUILDER_EXP_PROPERTIES#

ze_rtas_builder_exp_properties_t

enumerator ZE_STRUCTURE_TYPE_RTAS_PARALLEL_OPERATION_EXP_PROPERTIES#

ze_rtas_parallel_operation_exp_properties_t

enumerator ZE_STRUCTURE_TYPE_RTAS_DEVICE_EXP_PROPERTIES#

ze_rtas_device_exp_properties_t

enumerator ZE_STRUCTURE_TYPE_RTAS_GEOMETRY_AABBS_EXP_CB_PARAMS#

ze_rtas_geometry_aabbs_exp_cb_params_t

enumerator ZE_STRUCTURE_TYPE_COUNTER_BASED_EVENT_POOL_EXP_DESC#

ze_event_pool_counter_based_exp_desc_t

enumerator ZE_STRUCTURE_TYPE_MUTABLE_COMMAND_LIST_EXP_PROPERTIES#

ze_mutable_command_list_exp_properties_t

enumerator ZE_STRUCTURE_TYPE_MUTABLE_COMMAND_LIST_EXP_DESC#

ze_mutable_command_list_exp_desc_t

enumerator ZE_STRUCTURE_TYPE_MUTABLE_COMMAND_ID_EXP_DESC#

ze_mutable_command_id_exp_desc_t

enumerator ZE_STRUCTURE_TYPE_MUTABLE_COMMANDS_EXP_DESC#

ze_mutable_commands_exp_desc_t

enumerator ZE_STRUCTURE_TYPE_MUTABLE_KERNEL_ARGUMENT_EXP_DESC#

ze_mutable_kernel_argument_exp_desc_t

enumerator ZE_STRUCTURE_TYPE_MUTABLE_GROUP_COUNT_EXP_DESC#

ze_mutable_group_count_exp_desc_t

enumerator ZE_STRUCTURE_TYPE_MUTABLE_GROUP_SIZE_EXP_DESC#

ze_mutable_group_size_exp_desc_t

enumerator ZE_STRUCTURE_TYPE_MUTABLE_GLOBAL_OFFSET_EXP_DESC#

ze_mutable_global_offset_exp_desc_t

enumerator ZE_STRUCTURE_TYPE_PITCHED_ALLOC_DEVICE_EXP_PROPERTIES#

ze_device_pitched_alloc_exp_properties_t

enumerator ZE_STRUCTURE_TYPE_BINDLESS_IMAGE_EXP_DESC#

ze_image_bindless_exp_desc_t

enumerator ZE_STRUCTURE_TYPE_PITCHED_IMAGE_EXP_DESC#

ze_image_pitched_exp_desc_t

enumerator ZE_STRUCTURE_TYPE_FORCE_UINT32#

ze_external_memory_type_flags_t#

enum ze_external_memory_type_flag_t#

Values:

enumerator ZE_EXTERNAL_MEMORY_TYPE_FLAG_OPAQUE_FD#

an opaque POSIX file descriptor handle

enumerator ZE_EXTERNAL_MEMORY_TYPE_FLAG_DMA_BUF#

a file descriptor handle for a Linux dma_buf

enumerator ZE_EXTERNAL_MEMORY_TYPE_FLAG_OPAQUE_WIN32#

an NT handle

enumerator ZE_EXTERNAL_MEMORY_TYPE_FLAG_OPAQUE_WIN32_KMT#

a global share (KMT) handle

enumerator ZE_EXTERNAL_MEMORY_TYPE_FLAG_D3D11_TEXTURE#

an NT handle referring to a Direct3D 10 or 11 texture resource

enumerator ZE_EXTERNAL_MEMORY_TYPE_FLAG_D3D11_TEXTURE_KMT#

a global share (KMT) handle referring to a Direct3D 10 or 11 texture resource

enumerator ZE_EXTERNAL_MEMORY_TYPE_FLAG_D3D12_HEAP#

an NT handle referring to a Direct3D 12 heap resource

enumerator ZE_EXTERNAL_MEMORY_TYPE_FLAG_D3D12_RESOURCE#

an NT handle referring to a Direct3D 12 committed resource

enumerator ZE_EXTERNAL_MEMORY_TYPE_FLAG_FORCE_UINT32#

ze_bandwidth_unit_t#

enum ze_bandwidth_unit_t#

Bandwidth unit.

Values:

enumerator ZE_BANDWIDTH_UNIT_UNKNOWN#

The unit used for bandwidth is unknown.

enumerator ZE_BANDWIDTH_UNIT_BYTES_PER_NANOSEC#

Bandwidth is provided in bytes/nanosec.

enumerator ZE_BANDWIDTH_UNIT_BYTES_PER_CLOCK#

Bandwidth is provided in bytes/clock.

enumerator ZE_BANDWIDTH_UNIT_FORCE_UINT32#

ze_latency_unit_t#

enum ze_latency_unit_t#

Latency unit.

Values:

enumerator ZE_LATENCY_UNIT_UNKNOWN#

The unit used for latency is unknown.

enumerator ZE_LATENCY_UNIT_NANOSEC#

Latency is provided in nanosecs.

enumerator ZE_LATENCY_UNIT_CLOCK#

Latency is provided in clocks.

enumerator ZE_LATENCY_UNIT_HOP#

Latency is provided in hops (normalized so that the lowest latency link has a latency of 1 hop)

enumerator ZE_LATENCY_UNIT_FORCE_UINT32#

Common Structures#

ze_ipc_mem_handle_t#

struct ze_ipc_mem_handle_t#

IPC handle to a memory allocation.

Public Members

char data[ZE_MAX_IPC_HANDLE_SIZE]#

[out] Opaque data representing an IPC handle

ze_ipc_event_pool_handle_t#

struct ze_ipc_event_pool_handle_t#

IPC handle to a event pool allocation.

Public Members

char data[ZE_MAX_IPC_HANDLE_SIZE]#

[out] Opaque data representing an IPC handle

ze_uuid_t#

struct ze_uuid_t#

Universal unique id (UUID)

Public Members

uint8_t id[ZE_MAX_UUID_SIZE]#

[out] opaque data representing a UUID

ze_base_cb_params_t#

struct ze_base_cb_params_t#

Base for all callback function parameter types.

Public Members

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_base_properties_t#

struct ze_base_properties_t#

Base for all properties types.

Public Members

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_base_desc_t#

struct ze_base_desc_t#

Base for all descriptor types.

Public Members

ze_structure_type_t stype#

[in] type of this structure

const void *pNext#

[in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).

Driver#

Driver Functions#

zeInit#

ZE_APIEXPORT ze_result_t ZE_APICALL zeInit(ze_init_flags_t flags)#

Initialize the ‘oneAPI’ driver(s)

  • The application must call this function before calling any other function.

  • If this function is not called then all other functions will return ZE_RESULT_ERROR_UNINITIALIZED.

  • Only one instance of each driver will be initialized per process.

  • The application may call this function multiple times with different flags or environment variables enabled.

  • The application must call this function after forking new processes. Each forked process must call this function.

  • The application may call this function from simultaneous threads.

  • The implementation of this function must be thread-safe for scenarios where multiple libraries may initialize the driver(s) simultaneously.

Parameters:

flags – [in] initialization flags. must be 0 (default) or a combination of ze_init_flag_t.

Returns:

zeDriverGet#

ZE_APIEXPORT ze_result_t ZE_APICALL zeDriverGet(uint32_t *pCount, ze_driver_handle_t *phDrivers)#

Retrieves driver instances.

  • A driver represents a collection of physical devices.

  • Multiple calls to this function will return identical driver handles, in the same order.

  • The application may pass nullptr for pDrivers when only querying the number of drivers.

  • The application may call this function from simultaneous threads.

  • The implementation of this function should be lock-free.

Remark

Analogues

  • clGetPlatformIDs

Parameters:
  • pCount – [in,out] pointer to the number of driver instances. if count is zero, then the loader shall update the value with the total number of drivers available. if count is greater than the number of drivers available, then the loader shall update the value with the correct number of drivers available.

  • phDrivers – [in,out][optional][range(0, *pCount)] array of driver instance handles. if count is less than the number of drivers available, then the loader shall only retrieve that number of drivers.

Returns:

zeDriverGetApiVersion#

ZE_APIEXPORT ze_result_t ZE_APICALL zeDriverGetApiVersion(ze_driver_handle_t hDriver, ze_api_version_t *version)#

Returns the API version supported by the specified driver.

  • The application may call this function from simultaneous threads.

  • The implementation of this function should be lock-free.

Parameters:
  • hDriver – [in] handle of the driver instance

  • version – [out] api version

Returns:

zeDriverGetProperties#

ZE_APIEXPORT ze_result_t ZE_APICALL zeDriverGetProperties(ze_driver_handle_t hDriver, ze_driver_properties_t *pDriverProperties)#

Retrieves properties of the driver.

  • The application may call this function from simultaneous threads.

  • The implementation of this function should be lock-free.

Remark

Analogues

  • clGetPlatformInfo

Parameters:
  • hDriver – [in] handle of the driver instance

  • pDriverProperties – [in,out] query result for driver properties

Returns:

zeDriverGetIpcProperties#

ZE_APIEXPORT ze_result_t ZE_APICALL zeDriverGetIpcProperties(ze_driver_handle_t hDriver, ze_driver_ipc_properties_t *pIpcProperties)#

Retrieves IPC attributes of the driver.

  • The application may call this function from simultaneous threads.

  • The implementation of this function should be lock-free.

Parameters:
  • hDriver – [in] handle of the driver instance

  • pIpcProperties – [in,out] query result for IPC properties

Returns:

zeDriverGetExtensionProperties#

ZE_APIEXPORT ze_result_t ZE_APICALL zeDriverGetExtensionProperties(ze_driver_handle_t hDriver, uint32_t *pCount, ze_driver_extension_properties_t *pExtensionProperties)#

Retrieves extension properties.

  • The application may call this function from simultaneous threads.

  • The implementation of this function should be lock-free.

Remark

Analogues

  • vkEnumerateInstanceExtensionProperties

Parameters:
  • hDriver – [in] handle of the driver instance

  • pCount – [in,out] pointer to the number of extension properties. if count is zero, then the driver shall update the value with the total number of extension properties available. if count is greater than the number of extension properties available, then the driver shall update the value with the correct number of extension properties available.

  • pExtensionProperties – [in,out][optional][range(0, *pCount)] array of query results for extension properties. if count is less than the number of extension properties available, then driver shall only retrieve that number of extension properties.

Returns:

zeDriverGetExtensionFunctionAddress#

ZE_APIEXPORT ze_result_t ZE_APICALL zeDriverGetExtensionFunctionAddress(ze_driver_handle_t hDriver, const char *name, void **ppFunctionAddress)#

Retrieves function pointer for vendor-specific or experimental extensions.

  • The application may call this function from simultaneous threads.

  • The implementation of this function should be lock-free.

Parameters:
  • hDriver – [in] handle of the driver instance

  • name – [in] extension function name

  • ppFunctionAddress – [out] pointer to function pointer

Returns:

zeDriverGetLastErrorDescription#

ZE_APIEXPORT ze_result_t ZE_APICALL zeDriverGetLastErrorDescription(ze_driver_handle_t hDriver, const char **ppString)#

Retrieves a string describing the last error code returned by the driver in the current thread.

  • String returned is thread local.

  • String is only updated on calls returning an error, i.e., not on calls returning ZE_RESULT_SUCCESS.

  • String may be empty if driver considers error code is already explicit enough to describe cause.

  • Memory pointed to by ppString is owned by the driver.

  • String returned is null-terminated.

Parameters:
  • hDriver – [in] handle of the driver instance

  • ppString – [in,out] pointer to a null-terminated array of characters describing cause of error.

Returns:

Driver Enums#

ze_init_flags_t#

enum ze_init_flag_t#

Values:

enumerator ZE_INIT_FLAG_GPU_ONLY#

only initialize GPU drivers

enumerator ZE_INIT_FLAG_VPU_ONLY#

only initialize VPU drivers

enumerator ZE_INIT_FLAG_FORCE_UINT32#

ze_api_version_t#

enum ze_api_version_t#

Supported API versions.

  • API versions contain major and minor attributes, use ZE_MAJOR_VERSION and ZE_MINOR_VERSION

Values:

enumerator ZE_API_VERSION_1_0#

version 1.0

enumerator ZE_API_VERSION_1_1#

version 1.1

enumerator ZE_API_VERSION_1_2#

version 1.2

enumerator ZE_API_VERSION_1_3#

version 1.3

enumerator ZE_API_VERSION_1_4#

version 1.4

enumerator ZE_API_VERSION_1_5#

version 1.5

enumerator ZE_API_VERSION_1_6#

version 1.6

enumerator ZE_API_VERSION_1_7#

version 1.7

enumerator ZE_API_VERSION_1_8#

version 1.8

enumerator ZE_API_VERSION_1_9#

version 1.9

enumerator ZE_API_VERSION_CURRENT#

latest known version

enumerator ZE_API_VERSION_FORCE_UINT32#

ze_ipc_property_flags_t#

enum ze_ipc_property_flag_t#

Values:

enumerator ZE_IPC_PROPERTY_FLAG_MEMORY#

Supports passing memory allocations between processes. See zeMemGetIpcHandle.

enumerator ZE_IPC_PROPERTY_FLAG_EVENT_POOL#

Supports passing event pools between processes. See zeEventPoolGetIpcHandle.

enumerator ZE_IPC_PROPERTY_FLAG_FORCE_UINT32#

Driver Structures#

ze_driver_uuid_t#

struct ze_driver_uuid_t#

Driver universal unique id (UUID)

Public Members

uint8_t id[ZE_MAX_DRIVER_UUID_SIZE]#

[out] opaque data representing a driver UUID

ze_driver_properties_t#

struct ze_driver_properties_t#

Driver properties queried using zeDriverGetProperties.

Public Members

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_uuid_t uuid#

[out] universal unique identifier.

uint32_t driverVersion#

[out] driver version The driver version is a non-zero, monotonically increasing value where higher values always indicate a more recent version.

ze_driver_ipc_properties_t#

struct ze_driver_ipc_properties_t#

IPC properties queried using zeDriverGetIpcProperties.

Public Members

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_ipc_property_flags_t flags#

[out] 0 (none) or a valid combination of ze_ipc_property_flag_t

ze_driver_extension_properties_t#

struct ze_driver_extension_properties_t#

Extension properties queried using zeDriverGetExtensionProperties.

Public Members

char name[ZE_MAX_EXTENSION_NAME]#

[out] extension name

uint32_t version#

[out] extension version using ZE_MAKE_VERSION

Device#

Device Functions#

zeDeviceGet#

ZE_APIEXPORT ze_result_t ZE_APICALL zeDeviceGet(ze_driver_handle_t hDriver, uint32_t *pCount, ze_device_handle_t *phDevices)#

Retrieves devices within a driver.

  • Multiple calls to this function will return identical device handles, in the same order.

  • The number and order of handles returned from this function is affected by the ::ZE_AFFINITY_MASK and ::ZE_ENABLE_PCI_ID_DEVICE_ORDER environment variables.

  • The application may call this function from simultaneous threads.

  • The implementation of this function should be lock-free.

Parameters:
  • hDriver – [in] handle of the driver instance

  • pCount – [in,out] pointer to the number of devices. if count is zero, then the driver shall update the value with the total number of devices available. if count is greater than the number of devices available, then the driver shall update the value with the correct number of devices available.

  • phDevices – [in,out][optional][range(0, *pCount)] array of handle of devices. if count is less than the number of devices available, then driver shall only retrieve that number of devices.

Returns:

zeDeviceGetRootDevice#

ZE_APIEXPORT ze_result_t ZE_APICALL zeDeviceGetRootDevice(ze_device_handle_t hDevice, ze_device_handle_t *phRootDevice)#

Retrieves the root-device of a device handle.

  • When the device handle passed does not belong to any root-device, nullptr is returned.

  • Multiple calls to this function will return the same device handle.

  • The root-device handle returned by this function does not have access automatically to the resources created with the associated sub-device, unless those resources have been created with a context explicitly containing both handles.

  • The application may call this function from simultaneous threads.

  • The implementation of this function should be lock-free.

Parameters:
  • hDevice – [in] handle of the device object

  • phRootDevice – [in,out] parent root device.

Returns:

zeDeviceGetSubDevices#

ZE_APIEXPORT ze_result_t ZE_APICALL zeDeviceGetSubDevices(ze_device_handle_t hDevice, uint32_t *pCount, ze_device_handle_t *phSubdevices)#

Retrieves a sub-device from a device.

  • When the device handle passed does not contain any sub-device, a pCount of 0 is returned.

  • Multiple calls to this function will return identical device handles, in the same order.

  • The number of handles returned from this function is affected by the ::ZE_AFFINITY_MASK environment variable.

  • The application may call this function from simultaneous threads.

  • The implementation of this function should be lock-free.

Remark

Analogues

  • clCreateSubDevices

Parameters:
  • hDevice – [in] handle of the device object

  • pCount – [in,out] pointer to the number of sub-devices. if count is zero, then the driver shall update the value with the total number of sub-devices available. if count is greater than the number of sub-devices available, then the driver shall update the value with the correct number of sub-devices available.

  • phSubdevices – [in,out][optional][range(0, *pCount)] array of handle of sub-devices. if count is less than the number of sub-devices available, then driver shall only retrieve that number of sub-devices.

Returns:

zeDeviceGetProperties#

ZE_APIEXPORT ze_result_t ZE_APICALL zeDeviceGetProperties(ze_device_handle_t hDevice, ze_device_properties_t *pDeviceProperties)#

Retrieves properties of the device.

  • The application may call this function from simultaneous threads.

  • The implementation of this function should be lock-free.

Remark

Analogues

  • clGetDeviceInfo

Parameters:
  • hDevice – [in] handle of the device

  • pDeviceProperties – [in,out] query result for device properties

Returns:

zeDeviceGetComputeProperties#

ZE_APIEXPORT ze_result_t ZE_APICALL zeDeviceGetComputeProperties(ze_device_handle_t hDevice, ze_device_compute_properties_t *pComputeProperties)#

Retrieves compute properties of the device.

  • The application may call this function from simultaneous threads.

  • The implementation of this function should be lock-free.

Remark

Analogues

  • clGetDeviceInfo

Parameters:
  • hDevice – [in] handle of the device

  • pComputeProperties – [in,out] query result for compute properties

Returns:

zeDeviceGetModuleProperties#

ZE_APIEXPORT ze_result_t ZE_APICALL zeDeviceGetModuleProperties(ze_device_handle_t hDevice, ze_device_module_properties_t *pModuleProperties)#

Retrieves module properties of the device.

  • The application may call this function from simultaneous threads.

  • The implementation of this function should be lock-free.

Parameters:
  • hDevice – [in] handle of the device

  • pModuleProperties – [in,out] query result for module properties

Returns:

zeDeviceGetCommandQueueGroupProperties#

ZE_APIEXPORT ze_result_t ZE_APICALL zeDeviceGetCommandQueueGroupProperties(ze_device_handle_t hDevice, uint32_t *pCount, ze_command_queue_group_properties_t *pCommandQueueGroupProperties)#

Retrieves command queue group properties of the device.

  • Properties are reported for each physical command queue type supported by the device.

  • Multiple calls to this function will return properties in the same order.

  • The order in which the properties are returned defines the command queue group’s ordinal.

  • The application may call this function from simultaneous threads.

  • The implementation of this function should be lock-free.

Remark

Analogues

  • vkGetPhysicalDeviceQueueFamilyProperties

Parameters:
  • hDevice – [in] handle of the device

  • pCount – [in,out] pointer to the number of command queue group properties. if count is zero, then the driver shall update the value with the total number of command queue group properties available. if count is greater than the number of command queue group properties available, then the driver shall update the value with the correct number of command queue group properties available.

  • pCommandQueueGroupProperties – [in,out][optional][range(0, *pCount)] array of query results for command queue group properties. if count is less than the number of command queue group properties available, then driver shall only retrieve that number of command queue group properties.

Returns:

zeDeviceGetMemoryProperties#

ZE_APIEXPORT ze_result_t ZE_APICALL zeDeviceGetMemoryProperties(ze_device_handle_t hDevice, uint32_t *pCount, ze_device_memory_properties_t *pMemProperties)#

Retrieves local memory properties of the device.

  • Properties are reported for each physical memory type supported by the device.

  • Multiple calls to this function will return properties in the same order.

  • The order in which the properties are returned defines the device’s local memory ordinal.

  • The application may call this function from simultaneous threads.

  • The implementation of this function should be lock-free.

Remark

Analogues

  • clGetDeviceInfo

Parameters:
  • hDevice – [in] handle of the device

  • pCount – [in,out] pointer to the number of memory properties. if count is zero, then the driver shall update the value with the total number of memory properties available. if count is greater than the number of memory properties available, then the driver shall update the value with the correct number of memory properties available.

  • pMemProperties – [in,out][optional][range(0, *pCount)] array of query results for memory properties. if count is less than the number of memory properties available, then driver shall only retrieve that number of memory properties.

Returns:

zeDeviceGetMemoryAccessProperties#

ZE_APIEXPORT ze_result_t ZE_APICALL zeDeviceGetMemoryAccessProperties(ze_device_handle_t hDevice, ze_device_memory_access_properties_t *pMemAccessProperties)#

Retrieves memory access properties of the device.

  • The application may call this function from simultaneous threads.

  • The implementation of this function should be lock-free.

Remark

Analogues

  • clGetDeviceInfo

Parameters:
  • hDevice – [in] handle of the device

  • pMemAccessProperties – [in,out] query result for memory access properties

Returns:

zeDeviceGetCacheProperties#

ZE_APIEXPORT ze_result_t ZE_APICALL zeDeviceGetCacheProperties(ze_device_handle_t hDevice, uint32_t *pCount, ze_device_cache_properties_t *pCacheProperties)#

Retrieves cache properties of the device.

  • The application may call this function from simultaneous threads.

  • The implementation of this function should be lock-free.

Remark

Analogues

  • clGetDeviceInfo

Parameters:
  • hDevice – [in] handle of the device

  • pCount – [in,out] pointer to the number of cache properties. if count is zero, then the driver shall update the value with the total number of cache properties available. if count is greater than the number of cache properties available, then the driver shall update the value with the correct number of cache properties available.

  • pCacheProperties – [in,out][optional][range(0, *pCount)] array of query results for cache properties. if count is less than the number of cache properties available, then driver shall only retrieve that number of cache properties.

Returns:

zeDeviceGetImageProperties#

ZE_APIEXPORT ze_result_t ZE_APICALL zeDeviceGetImageProperties(ze_device_handle_t hDevice, ze_device_image_properties_t *pImageProperties)#

Retrieves image properties of the device.

  • See zeImageGetProperties for format-specific capabilities.

  • The application may call this function from simultaneous threads.

  • The implementation of this function should be lock-free.

Parameters:
  • hDevice – [in] handle of the device

  • pImageProperties – [in,out] query result for image properties

Returns:

zeDeviceGetExternalMemoryProperties#

ZE_APIEXPORT ze_result_t ZE_APICALL zeDeviceGetExternalMemoryProperties(ze_device_handle_t hDevice, ze_device_external_memory_properties_t *pExternalMemoryProperties)#

Retrieves external memory import and export of the device.

  • The application may call this function from simultaneous threads.

  • The implementation of this function should be lock-free.

Parameters:
  • hDevice – [in] handle of the device

  • pExternalMemoryProperties – [in,out] query result for external memory properties

Returns:

zeDeviceGetP2PProperties#

ZE_APIEXPORT ze_result_t ZE_APICALL zeDeviceGetP2PProperties(ze_device_handle_t hDevice, ze_device_handle_t hPeerDevice, ze_device_p2p_properties_t *pP2PProperties)#

Retrieves peer-to-peer properties between one device and a peer devices.

  • The application may call this function from simultaneous threads.

  • The implementation of this function should be lock-free.

Parameters:
  • hDevice – [in] handle of the device performing the access

  • hPeerDevice – [in] handle of the peer device with the allocation

  • pP2PProperties – [in,out] Peer-to-Peer properties between source and peer device

Returns:

zeDeviceCanAccessPeer#

ZE_APIEXPORT ze_result_t ZE_APICALL zeDeviceCanAccessPeer(ze_device_handle_t hDevice, ze_device_handle_t hPeerDevice, ze_bool_t *value)#

Queries if one device can directly access peer device allocations.

  • Any device can access any other device within a node through a scale-up fabric.

  • The following are conditions for CanAccessPeer query.

    • If both device and peer device are the same then return true.

    • If both sub-device and peer sub-device are the same then return true.

    • If both are sub-devices and share the same parent device then return true.

    • If both device and remote device are connected by a direct or indirect scale-up fabric or over PCIe (same root complex or shared PCIe switch) then true.

    • If both sub-device and remote parent device (and vice-versa) are connected by a direct or indirect scale-up fabric or over PCIe (same root complex or shared PCIe switch) then true.

  • The application may call this function from simultaneous threads.

  • The implementation of this function should be lock-free.

Parameters:
  • hDevice – [in] handle of the device performing the access

  • hPeerDevice – [in] handle of the peer device with the allocation

  • value – [out] returned access capability

Returns:

zeDeviceGetStatus#

ZE_APIEXPORT ze_result_t ZE_APICALL zeDeviceGetStatus(ze_device_handle_t hDevice)#

Returns current status of the device.

  • Once a device is reset, this call will update the OS handle attached to the device handle.

  • The application may call this function from simultaneous threads with the same device handle.

  • The implementation of this function must be thread-safe.

Parameters:

hDevice – [in] handle of the device

Returns:

zeDeviceGetGlobalTimestamps#

ZE_APIEXPORT ze_result_t ZE_APICALL zeDeviceGetGlobalTimestamps(ze_device_handle_t hDevice, uint64_t *hostTimestamp, uint64_t *deviceTimestamp)#

Returns synchronized Host and device global timestamps.

  • The application may call this function from simultaneous threads with the same device handle.

  • The implementation of this function must be thread-safe.

Parameters:
  • hDevice – [in] handle of the device

  • hostTimestamp – [out] value of the Host’s global timestamp that correlates with the Device’s global timestamp value

  • deviceTimestamp – [out] value of the Device’s global timestamp that correlates with the Host’s global timestamp value

Returns:

Device Enums#

ze_device_type_t#

enum ze_device_type_t#

Supported device types.

Values:

enumerator ZE_DEVICE_TYPE_GPU#

Graphics Processing Unit.

enumerator ZE_DEVICE_TYPE_CPU#

Central Processing Unit.

enumerator ZE_DEVICE_TYPE_FPGA#

Field Programmable Gate Array.

enumerator ZE_DEVICE_TYPE_MCA#

Memory Copy Accelerator.

enumerator ZE_DEVICE_TYPE_VPU#

Vision Processing Unit.

enumerator ZE_DEVICE_TYPE_FORCE_UINT32#

ze_device_property_flags_t#

enum ze_device_property_flag_t#

Values:

enumerator ZE_DEVICE_PROPERTY_FLAG_INTEGRATED#

Device is integrated with the Host.

enumerator ZE_DEVICE_PROPERTY_FLAG_SUBDEVICE#

Device handle used for query represents a sub-device.

enumerator ZE_DEVICE_PROPERTY_FLAG_ECC#

Device supports error correction memory access.

enumerator ZE_DEVICE_PROPERTY_FLAG_ONDEMANDPAGING#

Device supports on-demand page-faulting.

enumerator ZE_DEVICE_PROPERTY_FLAG_FORCE_UINT32#

ze_device_module_flags_t#

enum ze_device_module_flag_t#

Values:

enumerator ZE_DEVICE_MODULE_FLAG_FP16#

Device supports 16-bit floating-point operations.

enumerator ZE_DEVICE_MODULE_FLAG_FP64#

Device supports 64-bit floating-point operations.

enumerator ZE_DEVICE_MODULE_FLAG_INT64_ATOMICS#

Device supports 64-bit atomic operations.

enumerator ZE_DEVICE_MODULE_FLAG_DP4A#

Device supports four component dot product and accumulate operations.

enumerator ZE_DEVICE_MODULE_FLAG_FORCE_UINT32#

ze_device_fp_flags_t#

enum ze_device_fp_flag_t#

Values:

enumerator ZE_DEVICE_FP_FLAG_DENORM#

Supports denorms.

enumerator ZE_DEVICE_FP_FLAG_INF_NAN#

Supports INF and quiet NaNs.

enumerator ZE_DEVICE_FP_FLAG_ROUND_TO_NEAREST#

Supports rounding to nearest even rounding mode.

enumerator ZE_DEVICE_FP_FLAG_ROUND_TO_ZERO#

Supports rounding to zero.

enumerator ZE_DEVICE_FP_FLAG_ROUND_TO_INF#

Supports rounding to both positive and negative INF.

enumerator ZE_DEVICE_FP_FLAG_FMA#

Supports IEEE754-2008 fused multiply-add.

enumerator ZE_DEVICE_FP_FLAG_ROUNDED_DIVIDE_SQRT#

Supports rounding as defined by IEEE754 for divide and sqrt operations.

enumerator ZE_DEVICE_FP_FLAG_SOFT_FLOAT#

Uses software implementation for basic floating-point operations.

enumerator ZE_DEVICE_FP_FLAG_FORCE_UINT32#

ze_command_queue_group_property_flags_t#

enum ze_command_queue_group_property_flag_t#

Values:

enumerator ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COMPUTE#

Command queue group supports enqueing compute commands.

enumerator ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COPY#

Command queue group supports enqueing copy commands.

enumerator ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COOPERATIVE_KERNELS#

Command queue group supports cooperative kernels. See zeCommandListAppendLaunchCooperativeKernel for more details.

enumerator ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_METRICS#

Command queue groups supports metric queries.

enumerator ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_FORCE_UINT32#

ze_device_memory_property_flags_t#

enum ze_device_memory_property_flag_t#

Values:

enumerator ZE_DEVICE_MEMORY_PROPERTY_FLAG_TBD#

reserved for future use

enumerator ZE_DEVICE_MEMORY_PROPERTY_FLAG_FORCE_UINT32#

ze_memory_access_cap_flags_t#

enum ze_memory_access_cap_flag_t#

Values:

enumerator ZE_MEMORY_ACCESS_CAP_FLAG_RW#

Supports load/store access.

enumerator ZE_MEMORY_ACCESS_CAP_FLAG_ATOMIC#

Supports atomic access.

enumerator ZE_MEMORY_ACCESS_CAP_FLAG_CONCURRENT#

Supports concurrent access.

enumerator ZE_MEMORY_ACCESS_CAP_FLAG_CONCURRENT_ATOMIC#

Supports concurrent atomic access.

enumerator ZE_MEMORY_ACCESS_CAP_FLAG_FORCE_UINT32#

ze_device_cache_property_flags_t#

enum ze_device_cache_property_flag_t#

Values:

enumerator ZE_DEVICE_CACHE_PROPERTY_FLAG_USER_CONTROL#

Device support User Cache Control (i.e. SLM section vs Generic Cache)

enumerator ZE_DEVICE_CACHE_PROPERTY_FLAG_FORCE_UINT32#

ze_device_p2p_property_flags_t#

enum ze_device_p2p_property_flag_t#

Values:

enumerator ZE_DEVICE_P2P_PROPERTY_FLAG_ACCESS#

Device supports access between peer devices.

enumerator ZE_DEVICE_P2P_PROPERTY_FLAG_ATOMICS#

Device supports atomics between peer devices.

enumerator ZE_DEVICE_P2P_PROPERTY_FLAG_FORCE_UINT32#

Device Structures#

ze_device_uuid_t#

struct ze_device_uuid_t#

Device universal unique id (UUID)

Public Members

uint8_t id[ZE_MAX_DEVICE_UUID_SIZE]#

[out] opaque data representing a device UUID

ze_device_properties_t#

struct ze_device_properties_t#

Device properties queried using zeDeviceGetProperties.

Public Members

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_device_type_t type#

[out] generic device type

uint32_t vendorId#

[out] vendor id from PCI configuration

uint32_t deviceId#

[out] device id from PCI configuration. Note, the device id uses little-endian format.

ze_device_property_flags_t flags#

[out] 0 (none) or a valid combination of ze_device_property_flag_t

uint32_t subdeviceId#

[out] sub-device id. Only valid if ZE_DEVICE_PROPERTY_FLAG_SUBDEVICE is set.

uint32_t coreClockRate#

[out] Clock rate for device core.

uint64_t maxMemAllocSize#

[out] Maximum memory allocation size.

uint32_t maxHardwareContexts#

[out] Maximum number of logical hardware contexts.

uint32_t maxCommandQueuePriority#

[out] Maximum priority for command queues. Higher value is higher priority.

uint32_t numThreadsPerEU#

[out] Maximum number of threads per EU.

uint32_t physicalEUSimdWidth#

[out] The physical EU simd width.

uint32_t numEUsPerSubslice#

[out] Maximum number of EUs per sub-slice.

uint32_t numSubslicesPerSlice#

[out] Maximum number of sub-slices per slice.

uint32_t numSlices#

[out] Maximum number of slices.

uint64_t timerResolution#

[out] Returns the resolution of device timer used for profiling, timestamps, etc. When stype==ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES the units are in nanoseconds. When stype==ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES_1_2 units are in cycles/sec

uint32_t timestampValidBits#

[out] Returns the number of valid bits in the timestamp value.

uint32_t kernelTimestampValidBits#

[out] Returns the number of valid bits in the kernel timestamp values

ze_device_uuid_t uuid#

[out] universal unique identifier. Note: Subdevices will have their own uuid.

char name[ZE_MAX_DEVICE_NAME]#

[out] Device name

ze_device_thread_t#

struct ze_device_thread_t#

Device thread identifier.

Public Members

uint32_t slice#

[in,out] the slice number. Must be UINT32_MAX (all) or less than the numSlices member of ze_device_properties_t.

uint32_t subslice#

[in,out] the sub-slice number within its slice. Must be UINT32_MAX (all) or less than the numSubslicesPerSlice member of ze_device_properties_t.

uint32_t eu#

[in,out] the EU number within its sub-slice. Must be UINT32_MAX (all) or less than the numEUsPerSubslice member of ze_device_properties_t.

uint32_t thread#

[in,out] the thread number within its EU. Must be UINT32_MAX (all) or less than the numThreadsPerEU member of ze_device_properties_t.

ze_device_compute_properties_t#

struct ze_device_compute_properties_t#

Device compute properties queried using zeDeviceGetComputeProperties.

Public Members

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).

uint32_t maxTotalGroupSize#

[out] Maximum items per compute group. (groupSizeX * groupSizeY * groupSizeZ) <= maxTotalGroupSize

uint32_t maxGroupSizeX#

[out] Maximum items for X dimension in group

uint32_t maxGroupSizeY#

[out] Maximum items for Y dimension in group

uint32_t maxGroupSizeZ#

[out] Maximum items for Z dimension in group

uint32_t maxGroupCountX#

[out] Maximum groups that can be launched for x dimension

uint32_t maxGroupCountY#

[out] Maximum groups that can be launched for y dimension

uint32_t maxGroupCountZ#

[out] Maximum groups that can be launched for z dimension

uint32_t maxSharedLocalMemory#

[out] Maximum shared local memory per group.

uint32_t numSubGroupSizes#

[out] Number of subgroup sizes supported. This indicates number of entries in subGroupSizes.

uint32_t subGroupSizes[ZE_SUBGROUPSIZE_COUNT]#

[out] Size group sizes supported.

ze_native_kernel_uuid_t#

struct ze_native_kernel_uuid_t#

Native kernel universal unique id (UUID)

Public Members

uint8_t id[ZE_MAX_NATIVE_KERNEL_UUID_SIZE]#

[out] opaque data representing a native kernel UUID

ze_device_module_properties_t#

struct ze_device_module_properties_t#

Device module properties queried using zeDeviceGetModuleProperties.

Public Members

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).

uint32_t spirvVersionSupported#

[out] Maximum supported SPIR-V version. Returns zero if SPIR-V is not supported. Contains major and minor attributes, use ZE_MAJOR_VERSION and ZE_MINOR_VERSION.

ze_device_module_flags_t flags#

[out] 0 or a valid combination of ze_device_module_flag_t

ze_device_fp_flags_t fp16flags#

[out] Capabilities for half-precision floating-point operations. returns 0 (if ZE_DEVICE_MODULE_FLAG_FP16 is not set) or a combination of ze_device_fp_flag_t.

ze_device_fp_flags_t fp32flags#

[out] Capabilities for single-precision floating-point operations. returns a combination of ze_device_fp_flag_t.

ze_device_fp_flags_t fp64flags#

[out] Capabilities for double-precision floating-point operations. returns 0 (if ZE_DEVICE_MODULE_FLAG_FP64 is not set) or a combination of ze_device_fp_flag_t.

uint32_t maxArgumentsSize#

[out] Maximum kernel argument size that is supported.

uint32_t printfBufferSize#

[out] Maximum size of internal buffer that holds output of printf calls from kernel.

ze_native_kernel_uuid_t nativeKernelSupported#

[out] Compatibility UUID of supported native kernel. UUID may or may not be the same across driver release, devices, or operating systems. Application is responsible for ensuring UUID matches before creating module using previously created native kernel.

ze_command_queue_group_properties_t#

struct ze_command_queue_group_properties_t#

Command queue group properties queried using zeDeviceGetCommandQueueGroupProperties.

Public Members

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_command_queue_group_property_flags_t flags#

[out] 0 (none) or a valid combination of ze_command_queue_group_property_flag_t

size_t maxMemoryFillPatternSize#

[out] maximum pattern_size supported by command queue group. See zeCommandListAppendMemoryFill for more details.

uint32_t numQueues#

[out] the number of physical engines within the group.

ze_device_memory_properties_t#

struct ze_device_memory_properties_t#

Device local memory properties queried using zeDeviceGetMemoryProperties.

Public Members

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_device_memory_property_flags_t flags#

[out] 0 (none) or a valid combination of ze_device_memory_property_flag_t

uint32_t maxClockRate#

[out] Maximum clock rate for device memory.

uint32_t maxBusWidth#

[out] Maximum bus width between device and memory.

uint64_t totalSize#

[out] Total memory size in bytes that is available to the device.

char name[ZE_MAX_DEVICE_NAME]#

[out] Memory name

ze_device_memory_access_properties_t#

struct ze_device_memory_access_properties_t#

Device memory access properties queried using zeDeviceGetMemoryAccessProperties.

Public Members

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_memory_access_cap_flags_t hostAllocCapabilities#

[out] host memory capabilities. returns 0 (unsupported) or a combination of ze_memory_access_cap_flag_t.

ze_memory_access_cap_flags_t deviceAllocCapabilities#

[out] device memory capabilities. returns 0 (unsupported) or a combination of ze_memory_access_cap_flag_t.

ze_memory_access_cap_flags_t sharedSingleDeviceAllocCapabilities#

[out] shared, single-device memory capabilities. returns 0 (unsupported) or a combination of ze_memory_access_cap_flag_t.

ze_memory_access_cap_flags_t sharedCrossDeviceAllocCapabilities#

[out] shared, cross-device memory capabilities. returns 0 (unsupported) or a combination of ze_memory_access_cap_flag_t.

ze_memory_access_cap_flags_t sharedSystemAllocCapabilities#

[out] shared, system memory capabilities. returns 0 (unsupported) or a combination of ze_memory_access_cap_flag_t.

ze_device_cache_properties_t#

struct ze_device_cache_properties_t#

Device cache properties queried using zeDeviceGetCacheProperties.

Public Members

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_device_cache_property_flags_t flags#

[out] 0 (none) or a valid combination of ze_device_cache_property_flag_t

size_t cacheSize#

[out] Per-cache size, in bytes

ze_device_image_properties_t#

struct ze_device_image_properties_t#

Device image properties queried using zeDeviceGetImageProperties.

Public Members

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).

uint32_t maxImageDims1D#

[out] Maximum image dimensions for 1D resources. if 0, then 1D images are unsupported.

uint32_t maxImageDims2D#

[out] Maximum image dimensions for 2D resources. if 0, then 2D images are unsupported.

uint32_t maxImageDims3D#

[out] Maximum image dimensions for 3D resources. if 0, then 3D images are unsupported.

uint64_t maxImageBufferSize#

[out] Maximum image buffer size in bytes. if 0, then buffer images are unsupported.

uint32_t maxImageArraySlices#

[out] Maximum image array slices. if 0, then image arrays are unsupported.

uint32_t maxSamplers#

[out] Max samplers that can be used in kernel. if 0, then sampling is unsupported.

uint32_t maxReadImageArgs#

[out] Returns the maximum number of simultaneous image objects that can be read from by a kernel. if 0, then reading images is unsupported.

uint32_t maxWriteImageArgs#

[out] Returns the maximum number of simultaneous image objects that can be written to by a kernel. if 0, then writing images is unsupported.

ze_device_external_memory_properties_t#

struct ze_device_external_memory_properties_t#

Device external memory import and export properties.

Public Members

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_external_memory_type_flags_t memoryAllocationImportTypes#

[out] Supported external memory import types for memory allocations.

ze_external_memory_type_flags_t memoryAllocationExportTypes#

[out] Supported external memory export types for memory allocations.

ze_external_memory_type_flags_t imageImportTypes#

[out] Supported external memory import types for images.

ze_external_memory_type_flags_t imageExportTypes#

[out] Supported external memory export types for images.

ze_device_p2p_properties_t#

struct ze_device_p2p_properties_t#

Device peer-to-peer properties queried using zeDeviceGetP2PProperties.

Public Members

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_device_p2p_property_flags_t flags#

[out] 0 (none) or a valid combination of ze_device_p2p_property_flag_t

Context#

Context Functions#

zeContextCreate#

ZE_APIEXPORT ze_result_t ZE_APICALL zeContextCreate(ze_driver_handle_t hDriver, const ze_context_desc_t *desc, ze_context_handle_t *phContext)#

Creates a context for the driver.

  • The application must only use the context for the driver which was provided during creation.

  • The application may call this function from simultaneous threads.

  • The implementation of this function must be thread-safe.

Parameters:
  • hDriver – [in] handle of the driver object

  • desc – [in] pointer to context descriptor

  • phContext – [out] pointer to handle of context object created

Returns:

zeContextCreateEx#

ZE_APIEXPORT ze_result_t ZE_APICALL zeContextCreateEx(ze_driver_handle_t hDriver, const ze_context_desc_t *desc, uint32_t numDevices, ze_device_handle_t *phDevices, ze_context_handle_t *phContext)#

Creates a context for the driver.

  • The application must only use the context for the driver which was provided during creation.

  • The application may call this function from simultaneous threads.

  • The implementation of this function must be thread-safe.

Parameters:
  • hDriver – [in] handle of the driver object

  • desc – [in] pointer to context descriptor

  • numDevices – [in][optional] number of device handles; must be 0 if nullptr == phDevices

  • phDevices – [in][optional][range(0, numDevices)] array of device handles which context has visibility. if nullptr, then all devices and any sub-devices supported by the driver instance are visible to the context. otherwise, the context only has visibility to the devices and any sub-devices of the devices in this array.

  • phContext – [out] pointer to handle of context object created

Returns:

zeContextDestroy#

ZE_APIEXPORT ze_result_t ZE_APICALL zeContextDestroy(ze_context_handle_t hContext)#

Destroys a context.

  • The application must ensure the device is not currently referencing the context before it is deleted.

  • The implementation of this function may immediately free all Host and Device allocations associated with this context.

  • The application must not call this function from simultaneous threads with the same context handle.

  • The implementation of this function must be thread-safe.