Sysman API

Contents

Sysman API#

oneAPI Level Zero Specification - Version 1.9.3

Common#

Common Enums#

zes_structure_type_t#

enum zes_structure_type_t#

Defines structure types.

Values:

enumerator ZES_STRUCTURE_TYPE_DEVICE_PROPERTIES#

zes_device_properties_t

enumerator ZES_STRUCTURE_TYPE_PCI_PROPERTIES#

zes_pci_properties_t

enumerator ZES_STRUCTURE_TYPE_PCI_BAR_PROPERTIES#

zes_pci_bar_properties_t

enumerator ZES_STRUCTURE_TYPE_DIAG_PROPERTIES#

zes_diag_properties_t

enumerator ZES_STRUCTURE_TYPE_ENGINE_PROPERTIES#

zes_engine_properties_t

enumerator ZES_STRUCTURE_TYPE_FABRIC_PORT_PROPERTIES#

zes_fabric_port_properties_t

enumerator ZES_STRUCTURE_TYPE_FAN_PROPERTIES#

zes_fan_properties_t

enumerator ZES_STRUCTURE_TYPE_FIRMWARE_PROPERTIES#

zes_firmware_properties_t

enumerator ZES_STRUCTURE_TYPE_FREQ_PROPERTIES#

zes_freq_properties_t

enumerator ZES_STRUCTURE_TYPE_LED_PROPERTIES#

zes_led_properties_t

enumerator ZES_STRUCTURE_TYPE_MEM_PROPERTIES#

zes_mem_properties_t

enumerator ZES_STRUCTURE_TYPE_PERF_PROPERTIES#

zes_perf_properties_t

enumerator ZES_STRUCTURE_TYPE_POWER_PROPERTIES#

zes_power_properties_t

enumerator ZES_STRUCTURE_TYPE_PSU_PROPERTIES#

zes_psu_properties_t

enumerator ZES_STRUCTURE_TYPE_RAS_PROPERTIES#

zes_ras_properties_t

enumerator ZES_STRUCTURE_TYPE_SCHED_PROPERTIES#

zes_sched_properties_t

enumerator ZES_STRUCTURE_TYPE_SCHED_TIMEOUT_PROPERTIES#

zes_sched_timeout_properties_t

enumerator ZES_STRUCTURE_TYPE_SCHED_TIMESLICE_PROPERTIES#

zes_sched_timeslice_properties_t

enumerator ZES_STRUCTURE_TYPE_STANDBY_PROPERTIES#

zes_standby_properties_t

enumerator ZES_STRUCTURE_TYPE_TEMP_PROPERTIES#

zes_temp_properties_t

enumerator ZES_STRUCTURE_TYPE_DEVICE_STATE#

zes_device_state_t

enumerator ZES_STRUCTURE_TYPE_PROCESS_STATE#

zes_process_state_t

enumerator ZES_STRUCTURE_TYPE_PCI_STATE#

zes_pci_state_t

enumerator ZES_STRUCTURE_TYPE_FABRIC_PORT_CONFIG#

zes_fabric_port_config_t

enumerator ZES_STRUCTURE_TYPE_FABRIC_PORT_STATE#

zes_fabric_port_state_t

enumerator ZES_STRUCTURE_TYPE_FAN_CONFIG#

zes_fan_config_t

enumerator ZES_STRUCTURE_TYPE_FREQ_STATE#

zes_freq_state_t

enumerator ZES_STRUCTURE_TYPE_OC_CAPABILITIES#

zes_oc_capabilities_t

enumerator ZES_STRUCTURE_TYPE_LED_STATE#

zes_led_state_t

enumerator ZES_STRUCTURE_TYPE_MEM_STATE#

zes_mem_state_t

enumerator ZES_STRUCTURE_TYPE_PSU_STATE#

zes_psu_state_t

enumerator ZES_STRUCTURE_TYPE_BASE_STATE#

zes_base_state_t

enumerator ZES_STRUCTURE_TYPE_RAS_CONFIG#

zes_ras_config_t

enumerator ZES_STRUCTURE_TYPE_RAS_STATE#

zes_ras_state_t

enumerator ZES_STRUCTURE_TYPE_TEMP_CONFIG#

zes_temp_config_t

enumerator ZES_STRUCTURE_TYPE_PCI_BAR_PROPERTIES_1_2#

zes_pci_bar_properties_1_2_t

enumerator ZES_STRUCTURE_TYPE_DEVICE_ECC_DESC#

zes_device_ecc_desc_t

enumerator ZES_STRUCTURE_TYPE_DEVICE_ECC_PROPERTIES#

zes_device_ecc_properties_t

enumerator ZES_STRUCTURE_TYPE_POWER_LIMIT_EXT_DESC#

zes_power_limit_ext_desc_t

enumerator ZES_STRUCTURE_TYPE_POWER_EXT_PROPERTIES#

zes_power_ext_properties_t

enumerator ZES_STRUCTURE_TYPE_OVERCLOCK_PROPERTIES#

zes_overclock_properties_t

enumerator ZES_STRUCTURE_TYPE_FABRIC_PORT_ERROR_COUNTERS#

zes_fabric_port_error_counters_t

enumerator ZES_STRUCTURE_TYPE_ENGINE_EXT_PROPERTIES#

zes_engine_ext_properties_t

enumerator ZES_STRUCTURE_TYPE_RESET_PROPERTIES#

zes_reset_properties_t

enumerator ZES_STRUCTURE_TYPE_DEVICE_EXT_PROPERTIES#

zes_device_ext_properties_t

enumerator ZES_STRUCTURE_TYPE_DEVICE_UUID#

zes_uuid_t

enumerator ZES_STRUCTURE_TYPE_POWER_DOMAIN_EXP_PROPERTIES#

zes_power_domain_exp_properties_t

enumerator ZES_STRUCTURE_TYPE_MEM_BANDWIDTH_COUNTER_BITS_EXP_PROPERTIES#

zes_mem_bandwidth_counter_bits_exp_properties_t

enumerator ZES_STRUCTURE_TYPE_MEMORY_PAGE_OFFLINE_STATE_EXP#

zes_mem_page_offline_state_exp_t

enumerator ZES_STRUCTURE_TYPE_SUBDEVICE_EXP_PROPERTIES#

zes_subdevice_exp_properties_t

enumerator ZES_STRUCTURE_TYPE_VF_EXP_PROPERTIES#

zes_vf_exp_properties_t

enumerator ZES_STRUCTURE_TYPE_VF_UTIL_MEM_EXP#

zes_vf_util_mem_exp_t

enumerator ZES_STRUCTURE_TYPE_VF_UTIL_ENGINE_EXP#

zes_vf_util_engine_exp_t

enumerator ZES_STRUCTURE_TYPE_FORCE_UINT32#

Common Structures#

zes_base_properties_t#

struct zes_base_properties_t#

Base for all properties types.

Public Members

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

zes_base_desc_t#

struct zes_base_desc_t#

Base for all descriptor types.

Public Members

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

zes_base_state_t#

struct zes_base_state_t#

Base for all state types.

Public Members

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

zes_base_config_t#

struct zes_base_config_t#

Base for all config types.

Public Members

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

zes_base_capability_t#

struct zes_base_capability_t#

Base for all capability types.

Public Members

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

zesInit#

ZE_APIEXPORT ze_result_t ZE_APICALL zesInit(zes_init_flags_t flags)#

Initialize ‘oneAPI’ System Resource Management (sysman)

  • The application must call this function or zeInit with the ::ZES_ENABLE_SYSMAN environment variable set before calling any other sysman function.

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

  • This function will only initialize sysman. To initialize other functions, call zeInit.

  • There is no requirement to call this function before or after zeInit.

  • Only one instance of sysman will be initialized per process.

  • 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 sysman simultaneously.

Parameters:

flags – [in] initialization flags. currently unused, must be 0 (default).

Returns:

zesDriverGet#

ZE_APIEXPORT ze_result_t ZE_APICALL zesDriverGet(uint32_t *pCount, zes_driver_handle_t *phDrivers)#

Retrieves sysman driver instances.

  • A sysman driver represents a collection of physical devices.

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

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

  • The application may call this function from simultaneous threads.

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

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

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

Returns:

zesDriverGetExtensionProperties#

ZE_APIEXPORT ze_result_t ZE_APICALL zesDriverGetExtensionProperties(zes_driver_handle_t hDriver, uint32_t *pCount, zes_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.

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:

zesDriverGetExtensionFunctionAddress#

ZE_APIEXPORT ze_result_t ZE_APICALL zesDriverGetExtensionFunctionAddress(zes_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:

Driver Enums#

zes_init_flags_t#

enum zes_init_flag_t#

Values:

enumerator ZES_INIT_FLAG_PLACEHOLDER#

placeholder for future use

enumerator ZES_INIT_FLAG_FORCE_UINT32#

Driver Structures#

zes_driver_extension_properties_t#

struct zes_driver_extension_properties_t#

Extension properties queried using zesDriverGetExtensionProperties.

Public Members

char name[ZES_MAX_EXTENSION_NAME]#

[out] extension name

uint32_t version#

[out] extension version using ZE_MAKE_VERSION

Device#

Device Functions#

zesDeviceGet#

ZE_APIEXPORT ze_result_t ZE_APICALL zesDeviceGet(zes_driver_handle_t hDriver, uint32_t *pCount, zes_device_handle_t *phDevices)#

Retrieves sysman devices within a sysman driver.

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

  • The number and order of handles returned from this function is NOT affected by the ::ZE_AFFINITY_MASK, ::ZE_ENABLE_PCI_ID_DEVICE_ORDER, or ::ZE_FLAT_DEVICE_HIERARCHY 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 sysman driver instance

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

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

Returns:

zesDeviceGetProperties#

ZE_APIEXPORT ze_result_t ZE_APICALL zesDeviceGetProperties(zes_device_handle_t hDevice, zes_device_properties_t *pProperties)#

Get properties about the device.

  • The application may call this function from simultaneous threads.

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

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

  • pProperties – [in,out] Structure that will contain information about the device.

Returns:

zesDeviceGetState#

ZE_APIEXPORT ze_result_t ZE_APICALL zesDeviceGetState(zes_device_handle_t hDevice, zes_device_state_t *pState)#

Get information about the state of the device - if a reset is required, reasons for the reset and if the device has been repaired.

  • The application may call this function from simultaneous threads.

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

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

  • pState – [in,out] Structure that will contain information about the device.

Returns:

zesDeviceReset#

ZE_APIEXPORT ze_result_t ZE_APICALL zesDeviceReset(zes_device_handle_t hDevice, ze_bool_t force)#

Reset device.

  • Performs a PCI bus reset of the device. This will result in all current device state being lost.

  • All applications using the device should be stopped before calling this function.

  • If the force argument is specified, all applications using the device will be forcibly killed.

  • The function will block until the device has restarted or an implementation defined timeout occurred waiting for the reset to complete.

Parameters:
  • hDevice – [in] Sysman handle for the device

  • force – [in] If set to true, all applications that are currently using the device will be forcibly killed.

Returns:

zesDeviceResetExt#

ZE_APIEXPORT ze_result_t ZE_APICALL zesDeviceResetExt(zes_device_handle_t hDevice, zes_reset_properties_t *pProperties)#

Reset device extension.

  • Performs a PCI bus reset of the device. This will result in all current device state being lost.

  • Prior to calling this function, user is responsible for closing applications using the device unless force argument is specified.

  • If the force argument is specified, all applications using the device will be forcibly killed.

  • The function will block until the device has restarted or a implementation specific timeout occurred waiting for the reset to complete.

Parameters:
  • hDevice – [in] Sysman handle for the device

  • pProperties – [in] Device reset properties to apply

Returns:

zesDeviceProcessesGetState#

ZE_APIEXPORT ze_result_t ZE_APICALL zesDeviceProcessesGetState(zes_device_handle_t hDevice, uint32_t *pCount, zes_process_state_t *pProcesses)#

Get information about host processes using the device.

  • The number of processes connected to the device is dynamic. This means that between a call to determine the value of pCount and the subsequent call, the number of processes may have increased or decreased. It is recommended that a large array be passed in so as to avoid receiving the error ZE_RESULT_ERROR_INVALID_SIZE. Also, always check the returned value in pCount since it may be less than the earlier call to get the required array size.

  • The application may call this function from simultaneous threads.

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

Parameters:
  • hDevice – [in] Sysman handle for the device

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

  • pProcesses – [in,out][optional][range(0, *pCount)] array of process information. if count is less than the number of processes currently attached to the device, then the driver shall only retrieve information about that number of processes. In this case, the return code will ZE_RESULT_ERROR_INVALID_SIZE.

Returns:

zesDevicePciGetProperties#

ZE_APIEXPORT ze_result_t ZE_APICALL zesDevicePciGetProperties(zes_device_handle_t hDevice, zes_pci_properties_t *pProperties)#

Get PCI properties - address, max speed.

  • The application may call this function from simultaneous threads.

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

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

  • pProperties – [in,out] Will contain the PCI properties.

Returns:

zesDevicePciGetState#

ZE_APIEXPORT ze_result_t ZE_APICALL zesDevicePciGetState(zes_device_handle_t hDevice, zes_pci_state_t *pState)#

Get current PCI state - current speed.

  • The application may call this function from simultaneous threads.

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

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

  • pState – [in,out] Will contain the PCI properties.

Returns:

zesDevicePciGetBars#

ZE_APIEXPORT ze_result_t ZE_APICALL zesDevicePciGetBars(zes_device_handle_t hDevice, uint32_t *pCount, zes_pci_bar_properties_t *pProperties)#

Get information about each configured bar.

  • The application may call this function from simultaneous threads.

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

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

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

  • pProperties – [in,out][optional][range(0, *pCount)] array of information about setup PCI bars. if count is less than the number of PCI bars that are setup, then the driver shall only retrieve information about that number of PCI bars.

Returns:

zesDevicePciGetStats#

ZE_APIEXPORT ze_result_t ZE_APICALL zesDevicePciGetStats(zes_device_handle_t hDevice, zes_pci_stats_t *pStats)#

Get PCI stats - bandwidth, number of packets, number of replays.

  • The application may call this function from simultaneous threads.

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

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

  • pStats – [in,out] Will contain a snapshot of the latest stats.

Returns:

Device Enums#

zes_engine_type_flags_t#

enum zes_engine_type_flag_t#

Values:

enumerator ZES_ENGINE_TYPE_FLAG_OTHER#

Undefined types of accelerators.

enumerator ZES_ENGINE_TYPE_FLAG_COMPUTE#

Engines that process compute kernels only (no 3D content).

enumerator ZES_ENGINE_TYPE_FLAG_3D#

Engines that process 3D content only (no compute kernels).

enumerator ZES_ENGINE_TYPE_FLAG_MEDIA#

Engines that process media workloads.

enumerator ZES_ENGINE_TYPE_FLAG_DMA#

Engines that copy blocks of data.

enumerator ZES_ENGINE_TYPE_FLAG_RENDER#

Engines that can process both 3D content and compute kernels.

enumerator ZES_ENGINE_TYPE_FLAG_FORCE_UINT32#

zes_repair_status_t#

enum zes_repair_status_t#

Device repair status.

Values:

enumerator ZES_REPAIR_STATUS_UNSUPPORTED#

The device does not support in-field repairs.

enumerator ZES_REPAIR_STATUS_NOT_PERFORMED#

The device has never been repaired.

enumerator ZES_REPAIR_STATUS_PERFORMED#

The device has been repaired.

enumerator ZES_REPAIR_STATUS_FORCE_UINT32#

zes_reset_reason_flags_t#

enum zes_reset_reason_flag_t#

Values:

enumerator ZES_RESET_REASON_FLAG_WEDGED#

The device needs to be reset because one or more parts of the hardware is wedged

enumerator ZES_RESET_REASON_FLAG_REPAIR#

The device needs to be reset in order to complete in-field repairs.

enumerator ZES_RESET_REASON_FLAG_FORCE_UINT32#

zes_reset_type_t#

enum zes_reset_type_t#

Device reset type.

Values:

enumerator ZES_RESET_TYPE_WARM#

Apply warm reset.

enumerator ZES_RESET_TYPE_COLD#

Apply cold reset.

enumerator ZES_RESET_TYPE_FLR#

Apply FLR reset.

enumerator ZES_RESET_TYPE_FORCE_UINT32#

zes_device_type_t#

enum zes_device_type_t#

Supported device types.

Values:

enumerator ZES_DEVICE_TYPE_GPU#

Graphics Processing Unit.

enumerator ZES_DEVICE_TYPE_CPU#

Central Processing Unit.

enumerator ZES_DEVICE_TYPE_FPGA#

Field Programmable Gate Array.

enumerator ZES_DEVICE_TYPE_MCA#

Memory Copy Accelerator.

enumerator ZES_DEVICE_TYPE_VPU#

Vision Processing Unit.

enumerator ZES_DEVICE_TYPE_FORCE_UINT32#

zes_device_property_flags_t#

enum zes_device_property_flag_t#

Values:

enumerator ZES_DEVICE_PROPERTY_FLAG_INTEGRATED#

Device is integrated with the Host.

enumerator ZES_DEVICE_PROPERTY_FLAG_SUBDEVICE#

Device handle used for query represents a sub-device.

enumerator ZES_DEVICE_PROPERTY_FLAG_ECC#

Device supports error correction memory access.

enumerator ZES_DEVICE_PROPERTY_FLAG_ONDEMANDPAGING#

Device supports on-demand page-faulting.

enumerator ZES_DEVICE_PROPERTY_FLAG_FORCE_UINT32#

zes_pci_bar_type_t#

enum zes_pci_bar_type_t#

PCI bar types.

Values:

enumerator ZES_PCI_BAR_TYPE_MMIO#

MMIO registers.

enumerator ZES_PCI_BAR_TYPE_ROM#

ROM aperture.

enumerator ZES_PCI_BAR_TYPE_MEM#

Device memory.

enumerator ZES_PCI_BAR_TYPE_FORCE_UINT32#

Device Structures#

zes_device_state_t#

struct zes_device_state_t#

Device state.

Public Members

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

zes_reset_reason_flags_t reset#

[out] Indicates if the device needs to be reset and for what reasons. returns 0 (none) or combination of zes_reset_reason_flag_t

zes_repair_status_t repaired#

[out] Indicates if the device has been repaired

zes_reset_properties_t#

struct zes_reset_properties_t#

Device reset properties.

Public Members

zes_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_bool_t force#

[in] If set to true, all applications that are currently using the device will be forcibly killed.

zes_reset_type_t resetType#

[in] Type of reset needs to be performed

zes_uuid_t#

struct zes_uuid_t#

Device universal unique id (UUID)

Public Members

uint8_t id[ZES_MAX_UUID_SIZE]#

[out] opaque data representing a device UUID

zes_device_properties_t#

struct zes_device_properties_t#

Device properties.

Public Members

zes_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_properties_t core#

[out] (Deprecated, use zes_uuid_t in the extended structure) Core device properties

uint32_t numSubdevices#

[out] Number of sub-devices. A value of 0 indicates that this device doesn’t have sub-devices.

char serialNumber[ZES_STRING_PROPERTY_SIZE]#

[out] Manufacturing serial number (NULL terminated string value). This value is intended to reflect the Part ID/SoC ID assigned by manufacturer that is unique for a SoC. Will be set to the string “unknown” if this cannot be determined for the device.

char boardNumber[ZES_STRING_PROPERTY_SIZE]#

[out] Manufacturing board number (NULL terminated string value). Alternatively “boardSerialNumber”, this value is intended to reflect the string printed on board label by manufacturer. Will be set to the string “unknown” if this cannot be determined for the device.

char brandName[ZES_STRING_PROPERTY_SIZE]#

[out] Brand name of the device (NULL terminated string value). Will be set to the string “unknown” if this cannot be determined for the device.

char modelName[ZES_STRING_PROPERTY_SIZE]#

[out] Model name of the device (NULL terminated string value). Will be set to the string “unknown” if this cannot be determined for the device.

char vendorName[ZES_STRING_PROPERTY_SIZE]#

[out] Vendor name of the device (NULL terminated string value). Will be set to the string “unknown” if this cannot be determined for the device.

char driverVersion[ZES_STRING_PROPERTY_SIZE]#

[out] Installed driver version (NULL terminated string value). Will be set to the string “unknown” if this cannot be determined for the device.

zes_device_ext_properties_t#

struct zes_device_ext_properties_t#

Device properties.

Public Members

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

zes_uuid_t uuid#

[out] universal unique identifier. Note: uuid obtained from Sysman API is the same as from core API. Subdevices will have their own uuid.

zes_device_type_t type#

[out] generic device type

zes_device_property_flags_t flags#

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

zes_process_state_t#

struct zes_process_state_t#

Contains information about a process that has an open connection with this device.

  • The application can use the process ID to query the OS for the owner and the path to the executable.

Public Members

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

uint32_t processId#

[out] Host OS process ID.

uint64_t memSize#

[out] Device memory size in bytes allocated by this process (may not necessarily be resident on the device at the time of reading).

uint64_t sharedSize#

[out] The size of shared device memory mapped into this process (may not necessarily be resident on the device at the time of reading).

zes_engine_type_flags_t engines#

[out] Bitfield of accelerator engine types being used by this process.

zes_pci_address_t#

struct zes_pci_address_t#

PCI address.

Public Members

uint32_t domain#

[out] BDF domain

uint32_t bus#

[out] BDF bus

uint32_t device#

[out] BDF device

uint32_t function#

[out] BDF function

zes_pci_speed_t#

struct zes_pci_speed_t#

PCI speed.

Public Members

int32_t gen#

[out] The link generation. A value of -1 means that this property is unknown.

int32_t width#

[out] The number of lanes. A value of -1 means that this property is unknown.

int64_t maxBandwidth#

[out] The maximum bandwidth in bytes/sec (sum of all lanes). A value of -1 means that this property is unknown.

zes_pci_properties_t#

struct zes_pci_properties_t#

Static PCI properties.

Public Members

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

zes_pci_address_t address#

[out] The BDF address

zes_pci_speed_t maxSpeed#

[out] Fastest port configuration supported by the device (sum of all lanes)

ze_bool_t haveBandwidthCounters#

[out] Indicates whether the rxCounter and txCounter members of zes_pci_stats_t will have valid values

ze_bool_t havePacketCounters#

[out] Indicates whether the packetCounter member of zes_pci_stats_t will have a valid value

ze_bool_t haveReplayCounters#

[out] Indicates whether the replayCounter member of zes_pci_stats_t will have a valid value

zes_pci_state_t#

struct zes_pci_state_t#

Dynamic PCI state.

Public Members

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

zes_pci_link_status_t status#

[out] The current status of the port

zes_pci_link_qual_issue_flags_t qualityIssues#

[out] If status is ZES_PCI_LINK_STATUS_QUALITY_ISSUES, then this gives a combination of zes_pci_link_qual_issue_flag_t for quality issues that have been detected; otherwise, 0 indicates there are no quality issues with the link at this time.”

zes_pci_link_stab_issue_flags_t stabilityIssues#

[out] If status is ZES_PCI_LINK_STATUS_STABILITY_ISSUES, then this gives a combination of zes_pci_link_stab_issue_flag_t for reasons for the connection instability; otherwise, 0 indicates there are no connection stability issues at this time.”

zes_pci_speed_t speed#

[out] The current port configure speed

zes_pci_bar_properties_t#

struct zes_pci_bar_properties_t#

Properties of a pci bar.

Public Members

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

zes_pci_bar_type_t type#

[out] The type of bar

uint32_t index#

[out] The index of the bar

uint64_t base#

[out] Base address of the bar.

uint64_t size#

[out] Size of the bar.

zes_pci_bar_properties_1_2_t#

struct zes_pci_bar_properties_1_2_t#

Properties of a pci bar, including the resizable bar.

Public Members

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

zes_pci_bar_type_t type#

[out] The type of bar

uint32_t index#

[out] The index of the bar

uint64_t base#

[out] Base address of the bar.

uint64_t size#

[out] Size of the bar.

ze_bool_t resizableBarSupported#

[out] Support for Resizable Bar on this device.

ze_bool_t resizableBarEnabled#

[out] Resizable Bar enabled on this device

zes_pci_stats_t#

struct zes_pci_stats_t#

PCI stats counters.

  • Percent replays is calculated by taking two snapshots (s1, s2) and using the equation: replay = 10^6 * (s2.replayCounter - s1.replayCounter) / (s2.maxBandwidth * (s2.timestamp - s1.timestamp))

  • Percent throughput is calculated by taking two snapshots (s1, s2) and using the equation: bw = 10^6 * ((s2.rxCounter - s1.rxCounter) + (s2.txCounter - s1.txCounter)) / (s2.maxBandwidth * (s2.timestamp - s1.timestamp))

Public Members

uint64_t timestamp#

[out] Monotonic timestamp counter in microseconds when the measurement was made. This timestamp should only be used to calculate delta time between snapshots of this structure. Never take the delta of this timestamp with the timestamp from a different structure since they are not guaranteed to have the same base. The absolute value of the timestamp is only valid during within the application and may be different on the next execution.

uint64_t replayCounter#

[out] Monotonic counter for the number of replay packets (sum of all lanes). Will always be 0 when the haveReplayCounters member of zes_pci_properties_t is FALSE.

uint64_t packetCounter#

[out] Monotonic counter for the number of packets (sum of all lanes). Will always be 0 when the havePacketCounters member of zes_pci_properties_t is FALSE.

uint64_t rxCounter#

[out] Monotonic counter for the number of bytes received (sum of all lanes). Will always be 0 when the haveBandwidthCounters member of zes_pci_properties_t is FALSE.

uint64_t txCounter#

[out] Monotonic counter for the number of bytes transmitted (including replays) (sum of all lanes). Will always be 0 when the haveBandwidthCounters member of zes_pci_properties_t is FALSE.

zes_pci_speed_t speed#

[out] The current speed of the link (sum of all lanes)

Overclock#

Overclock Functions#

zesDeviceSetOverclockWaiver#

ZE_APIEXPORT ze_result_t ZE_APICALL zesDeviceSetOverclockWaiver(zes_device_handle_t hDevice)#

Set the overclock waiver.The overclock waiver setting is persistent until the next pcode boot.

  • The application may call this function from simultaneous threads.

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

Parameters:

hDevice – [in] Sysman handle of the device.

Returns:

zesDeviceGetOverclockDomains#

ZE_APIEXPORT ze_result_t ZE_APICALL zesDeviceGetOverclockDomains(zes_device_handle_t hDevice, uint32_t *pOverclockDomains)#

Get the list of supported overclock domains for this device.

  • The application may call this function from simultaneous threads.

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

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

  • pOverclockDomains – [in,out] Returns the overclock domains that are supported (a bit for each of enum zes_overclock_domain_t). If no bits are set, the device doesn’t support overclocking.

Returns:

zesDeviceGetOverclockControls#

ZE_APIEXPORT ze_result_t ZE_APICALL zesDeviceGetOverclockControls(zes_device_handle_t hDevice, zes_overclock_domain_t domainType, uint32_t *pAvailableControls)#

Get the list of supported overclock controls available for one of the supported overclock domains on the device.

  • The application may call this function from simultaneous threads.

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

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

  • domainType – [in] Domain type.

  • pAvailableControls – [in,out] Returns the overclock controls that are supported for the specified overclock domain (a bit for each of enum zes_overclock_control_t).

Returns:

zesDeviceResetOverclockSettings#

ZE_APIEXPORT ze_result_t ZE_APICALL zesDeviceResetOverclockSettings(zes_device_handle_t hDevice, ze_bool_t onShippedState)#

Reset all overclock settings to default values (shipped = 1 or manufacturing =0)

  • The application may call this function from simultaneous threads.

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

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

  • onShippedState – [in] True will reset to shipped state; false will reset to manufacturing state

Returns:

zesDeviceReadOverclockState#

ZE_APIEXPORT ze_result_t ZE_APICALL zesDeviceReadOverclockState(zes_device_handle_t hDevice, zes_overclock_mode_t *pOverclockMode, ze_bool_t *pWaiverSetting, ze_bool_t *pOverclockState, zes_pending_action_t *pPendingAction, ze_bool_t *pPendingReset)#

Determine the state of overclocking.

  • The application may call this function from simultaneous threads.

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

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

  • pOverclockMode – [out] One of overclock mode.

  • pWaiverSetting – [out] Waiver setting: 0 = Waiver not set, 1 = waiver has been set.

  • pOverclockState – [out] Current settings 0 =manufacturing state, 1= shipped state)..

  • pPendingAction – [out] This enum is returned when the driver attempts to set an overclock control or reset overclock settings.

  • pPendingReset – [out] Pending reset 0 =manufacturing state, 1= shipped state)..

Returns:

zesDeviceEnumOverclockDomains#

ZE_APIEXPORT ze_result_t ZE_APICALL zesDeviceEnumOverclockDomains(zes_device_handle_t hDevice, uint32_t *pCount, zes_overclock_handle_t *phDomainHandle)#

Get handle of overclock domains.

  • The application may call this function from simultaneous threads.

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

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

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

  • phDomainHandle – [in,out][optional][range(0, *pCount)] array of handle of components of this type. if count is less than the number of components of this type that are available, then the driver shall only retrieve that number of component handles.

Returns:

zesOverclockGetDomainProperties#

ZE_APIEXPORT ze_result_t ZE_APICALL zesOverclockGetDomainProperties(zes_overclock_handle_t hDomainHandle, zes_overclock_properties_t *pDomainProperties)#

Get overclock domain control properties.

  • The application may call this function from simultaneous threads.

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

Parameters:
  • hDomainHandle – [in] Handle for the component domain.

  • pDomainProperties – [in,out] The overclock properties for the specified domain.

Returns:

zesOverclockGetDomainVFProperties#

ZE_APIEXPORT ze_result_t ZE_APICALL zesOverclockGetDomainVFProperties(zes_overclock_handle_t hDomainHandle, zes_vf_property_t *pVFProperties)#

Read overclock VF min,max and step values.

  • The application may call this function from simultaneous threads.

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

Parameters:
  • hDomainHandle – [in] Handle for the component domain.

  • pVFProperties – [in,out] The VF min,max,step for a specified domain.

Returns:

zesOverclockGetDomainControlProperties#

ZE_APIEXPORT ze_result_t ZE_APICALL zesOverclockGetDomainControlProperties(zes_overclock_handle_t hDomainHandle, zes_overclock_control_t DomainControl, zes_control_property_t *pControlProperties)#

Read overclock control values - min/max/step/default/ref.

  • The application may call this function from simultaneous threads.

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

Parameters:
  • hDomainHandle – [in] Handle for the component domain.

  • DomainControl – [in] Handle for the component.

  • pControlProperties – [in,out] overclock control values.

Returns:

zesOverclockGetControlCurrentValue#

ZE_APIEXPORT ze_result_t ZE_APICALL zesOverclockGetControlCurrentValue(zes_overclock_handle_t hDomainHandle, zes_overclock_control_t DomainControl, double *pValue)#

Read the current value for a given overclock control.

  • The application may call this function from simultaneous threads.

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

Parameters:
  • hDomainHandle – [in] Handle for the component.

  • DomainControl – [in] Overclock Control.

  • pValue – [in,out] Getting overclock control value for the specified control.

Returns:

zesOverclockGetControlPendingValue#

ZE_APIEXPORT ze_result_t ZE_APICALL zesOverclockGetControlPendingValue(zes_overclock_handle_t hDomainHandle, zes_overclock_control_t DomainControl, double *pValue)#

Read the the reset pending value for a given overclock control.

  • The application may call this function from simultaneous threads.

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

Parameters:
  • hDomainHandle – [in] Handle for the component domain.

  • DomainControl – [in] Overclock Control.

  • pValue – [out] Returns the pending value for a given control. The units and format of the value depend on the control type.

Returns:

zesOverclockSetControlUserValue#

ZE_APIEXPORT ze_result_t ZE_APICALL zesOverclockSetControlUserValue(zes_overclock_handle_t hDomainHandle, zes_overclock_control_t DomainControl, double pValue, zes_pending_action_t *pPendingAction)#

Set the value for a given overclock control.

  • The application may call this function from simultaneous threads.

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

Parameters:
  • hDomainHandle – [in] Handle for the component domain.

  • DomainControl – [in] Domain Control.

  • pValue – [in] The new value of the control. The units and format of the value depend on the control type.

  • pPendingAction – [out] Pending overclock setting.

Returns:

zesOverclockGetControlState#

ZE_APIEXPORT ze_result_t ZE_APICALL zesOverclockGetControlState(zes_overclock_handle_t hDomainHandle, zes_overclock_control_t DomainControl, zes_control_state_t *pControlState, zes_pending_action_t *pPendingAction)#

Determine the state of an overclock control.

  • The application may call this function from simultaneous threads.

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

Parameters:
  • hDomainHandle – [in] Handle for the component domain.

  • DomainControl – [in] Domain Control.

  • pControlState – [out] Current overclock control state.

  • pPendingAction – [out] Pending overclock setting.

Returns:

zesOverclockGetVFPointValues#

ZE_APIEXPORT ze_result_t ZE_APICALL zesOverclockGetVFPointValues(zes_overclock_handle_t hDomainHandle, zes_vf_type_t VFType, zes_vf_array_type_t VFArrayType, uint32_t PointIndex, uint32_t *PointValue)#

Read the frequency or voltage of a V-F point from the default or custom V-F curve.

  • The application may call this function from simultaneous threads.

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

Parameters:
  • hDomainHandle – [in] Handle for the component domain.

  • VFType – [in] Voltage or Freqency point to read.

  • VFArrayType – [in] User,Default or Live VF array to read from

  • PointIndex – [in] Point index - number between (0, max_num_points - 1).

  • PointValue – [out] Returns the frequency in 1kHz units or voltage in millivolt units from the custom V-F curve at the specified zero-based index

Returns:

zesOverclockSetVFPointValues#

ZE_APIEXPORT ze_result_t ZE_APICALL zesOverclockSetVFPointValues(zes_overclock_handle_t hDomainHandle, zes_vf_type_t VFType, uint32_t PointIndex, uint32_t PointValue)#

Write the frequency or voltage of a V-F point to custom V-F curve.

  • The application may call this function from simultaneous threads.

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

Parameters:
  • hDomainHandle – [in] Handle for the component domain.

  • VFType – [in] Voltage or Freqency point to read.

  • PointIndex – [in] Point index - number between (0, max_num_points - 1).

  • PointValue – [in] Writes frequency in 1kHz units or voltage in millivolt units to custom V-F curve at the specified zero-based index

Returns:

Overclock Enums#

zes_overclock_domain_t#

enum zes_overclock_domain_t#

Overclock domains.

Values:

enumerator ZES_OVERCLOCK_DOMAIN_CARD#

Overclocking card level properties such as temperature limits.

enumerator ZES_OVERCLOCK_DOMAIN_PACKAGE#

Overclocking package level properties such as power limits.

enumerator ZES_OVERCLOCK_DOMAIN_GPU_ALL#

Overclocking a GPU that has all accelerator assets on the same PLL/VR.

enumerator ZES_OVERCLOCK_DOMAIN_GPU_RENDER_COMPUTE#

Overclocking a GPU with render and compute assets on the same PLL/VR.

enumerator ZES_OVERCLOCK_DOMAIN_GPU_RENDER#

Overclocking a GPU with render assets on its own PLL/VR.

enumerator ZES_OVERCLOCK_DOMAIN_GPU_COMPUTE#

Overclocking a GPU with compute assets on its own PLL/VR.

enumerator ZES_OVERCLOCK_DOMAIN_GPU_MEDIA#

Overclocking a GPU with media assets on its own PLL/VR.

enumerator ZES_OVERCLOCK_DOMAIN_VRAM#

Overclocking device local memory.

enumerator ZES_OVERCLOCK_DOMAIN_ADM#

Overclocking LLC/L4 cache.

enumerator ZES_OVERCLOCK_DOMAIN_FORCE_UINT32#

zes_overclock_control_t#

enum zes_overclock_control_t#

Overclock controls.

Values:

enumerator ZES_OVERCLOCK_CONTROL_VF#

This control permits setting a custom V-F curve.

enumerator ZES_OVERCLOCK_CONTROL_FREQ_OFFSET#

The V-F curve of the overclock domain can be shifted up or down using this control.

enumerator ZES_OVERCLOCK_CONTROL_VMAX_OFFSET#

This control is used to increase the permitted voltage above the shipped voltage maximum.

enumerator ZES_OVERCLOCK_CONTROL_FREQ#

This control permits direct changes to the operating frequency.

enumerator ZES_OVERCLOCK_CONTROL_VOLT_LIMIT#

This control prevents frequencies that would push the voltage above this value, typically used by V-F scanners.

enumerator ZES_OVERCLOCK_CONTROL_POWER_SUSTAINED_LIMIT#

This control changes the sustained power limit (PL1).

enumerator ZES_OVERCLOCK_CONTROL_POWER_BURST_LIMIT#

This control changes the burst power limit (PL2).

enumerator ZES_OVERCLOCK_CONTROL_POWER_PEAK_LIMIT#

his control changes the peak power limit (PL4).

enumerator ZES_OVERCLOCK_CONTROL_ICCMAX_LIMIT#

This control changes the value of IccMax..

enumerator ZES_OVERCLOCK_CONTROL_TEMP_LIMIT#

This control changes the value of TjMax.

enumerator ZES_OVERCLOCK_CONTROL_ITD_DISABLE#

This control permits disabling the adaptive voltage feature ITD.

enumerator ZES_OVERCLOCK_CONTROL_ACM_DISABLE#

This control permits disabling the adaptive voltage feature ACM.

enumerator ZES_OVERCLOCK_CONTROL_FORCE_UINT32#

zes_overclock_mode_t#

enum zes_overclock_mode_t#

Overclock modes.

Values:

enumerator ZES_OVERCLOCK_MODE_MODE_OFF#

Overclock mode is off.

enumerator ZES_OVERCLOCK_MODE_MODE_STOCK#

Stock (manufacturing settings) are being used.

enumerator ZES_OVERCLOCK_MODE_MODE_ON#

Overclock mode is on.

enumerator ZES_OVERCLOCK_MODE_MODE_UNAVAILABLE#

Overclocking is unavailable at this time since the system is running on battery.

enumerator ZES_OVERCLOCK_MODE_MODE_DISABLED#

Overclock mode is disabled.

enumerator ZES_OVERCLOCK_MODE_FORCE_UINT32#

zes_control_state_t#

enum zes_control_state_t#

Overclock control states.

Values:

enumerator ZES_CONTROL_STATE_STATE_UNSET#

No overclock control has not been changed by the driver since the last boot/reset.

enumerator ZES_CONTROL_STATE_STATE_ACTIVE#

The overclock control has been set and it is active.

enumerator ZES_CONTROL_STATE_STATE_DISABLED#

The overclock control value has been disabled due to the current power configuration (typically when running on DC).

enumerator ZES_CONTROL_STATE_FORCE_UINT32#

zes_pending_action_t#

enum zes_pending_action_t#

Overclock pending actions.

Values:

enumerator ZES_PENDING_ACTION_PENDING_NONE#

There no pending actions. .

enumerator ZES_PENDING_ACTION_PENDING_IMMINENT#

The requested change is in progress and should complete soon.

enumerator ZES_PENDING_ACTION_PENDING_COLD_RESET#

The requested change requires a device cold reset (hotplug, system boot).

enumerator ZES_PENDING_ACTION_PENDING_WARM_RESET#

The requested change requires a device warm reset (PCIe FLR).

enumerator ZES_PENDING_ACTION_FORCE_UINT32#

zes_vf_program_type_t#

enum zes_vf_program_type_t#

Overclock V-F curve programing.

Values:

enumerator ZES_VF_PROGRAM_TYPE_VF_ARBITRARY#

Can program an arbitrary number of V-F points up to the maximum number and each point can have arbitrary voltage and frequency values within the min/max/step limits

enumerator ZES_VF_PROGRAM_TYPE_VF_FREQ_FIXED#

Can only program the voltage for the V-F points that it reads back - the frequency of those points cannot be changed

enumerator ZES_VF_PROGRAM_TYPE_VF_VOLT_FIXED#

Can only program the frequency for the V-F points that is reads back - the voltage of each point cannot be changed.

enumerator ZES_VF_PROGRAM_TYPE_FORCE_UINT32#

zes_vf_type_t#

enum zes_vf_type_t#

VF type.

Values:

enumerator ZES_VF_TYPE_VOLT#

VF Voltage point.

enumerator ZES_VF_TYPE_FREQ#

VF Frequency point.

enumerator ZES_VF_TYPE_FORCE_UINT32#

zes_vf_array_type_t#

enum zes_vf_array_type_t#

VF type.

Values:

enumerator ZES_VF_ARRAY_TYPE_USER_VF_ARRAY#

User V-F array.

enumerator ZES_VF_ARRAY_TYPE_DEFAULT_VF_ARRAY#

Default V-F array.

enumerator ZES_VF_ARRAY_TYPE_LIVE_VF_ARRAY#

Live V-F array.

enumerator ZES_VF_ARRAY_TYPE_FORCE_UINT32#

Overclock Structures#

zes_overclock_properties_t#

struct zes_overclock_properties_t#

Overclock properties.

  • Information on the overclock domain type and all the contols that are part of the domain.

Public Members

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

zes_overclock_domain_t domainType#

[out] The hardware block that this overclock domain controls (GPU, VRAM, …)

uint32_t AvailableControls#

[out] Returns the overclock controls that are supported (a bit for each of enum zes_overclock_control_t). If no bits are set, the domain doesn’t support overclocking.

zes_vf_program_type_t VFProgramType#

[out] Type of V-F curve programming that is permitted:.

uint32_t NumberOfVFPoints#

[out] Number of VF points that can be programmed - max_num_points

zes_control_property_t#

struct zes_control_property_t#

Overclock Control properties.

  • Provides all the control capabilities supported by the device for the overclock domain.

Public Members

double MinValue#

[out] This provides information about the limits of the control value so that the driver can calculate the set of valid values.

double MaxValue#

[out] This provides information about the limits of the control value so that the driver can calculate the set of valid values.

double StepValue#

[out] This provides information about the limits of the control value so that the driver can calculate the set of valid values.

double RefValue#

[out] The reference value provides the anchor point, UIs can combine this with the user offset request to show the anticipated improvement.

double DefaultValue#

[out] The shipped out-of-box position of this control. Driver can request this value at any time to return to the out-of-box behavior.

zes_vf_property_t#

struct zes_vf_property_t#

Overclock VF properties.

  • Provides all the VF capabilities supported by the device for the overclock domain.

Public Members

double MinFreq#

[out] Read the minimum frequency that can be be programmed in the custom V-F point..

double MaxFreq#

[out] Read the maximum frequency that can be be programmed in the custom V-F point..

double StepFreq#

[out] Read the frequency step that can be be programmed in the custom V-F point..

double MinVolt#

[out] Read the minimum voltage that can be be programmed in the custom V-F point..

double MaxVolt#

[out] Read the maximum voltage that can be be programmed in the custom V-F point..

double StepVolt#

[out] Read the voltage step that can be be programmed in the custom V-F point.

Diagnostics#

Diagnostics Functions#

zesDeviceEnumDiagnosticTestSuites#

ZE_APIEXPORT ze_result_t ZE_APICALL zesDeviceEnumDiagnosticTestSuites(zes_device_handle_t hDevice, uint32_t *pCount, zes_diag_handle_t *phDiagnostics)#

Get handle of diagnostics test suites.

  • The application may call this function from simultaneous threads.

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

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

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

  • phDiagnostics – [in,out][optional][range(0, *pCount)] array of handle of components of this type. if count is less than the number of components of this type that are available, then the driver shall only retrieve that number of component handles.

Returns:

zesDiagnosticsGetProperties#

ZE_APIEXPORT ze_result_t ZE_APICALL zesDiagnosticsGetProperties(zes_diag_handle_t hDiagnostics, zes_diag_properties_t *pProperties)#

Get properties of a diagnostics test suite.

  • The application may call this function from simultaneous threads.

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

Parameters:
  • hDiagnostics – [in] Handle for the component.

  • pProperties – [in,out] Structure describing the properties of a diagnostics test suite

Returns:

zesDiagnosticsGetTests#

ZE_APIEXPORT ze_result_t ZE_APICALL zesDiagnosticsGetTests(zes_diag_handle_t hDiagnostics, uint32_t *pCount, zes_diag_test_t *pTests)#

Get individual tests that can be run separately. Not all test suites permit running individual tests, check the haveTests member of zes_diag_properties_t.

  • The list of available tests is returned in order of increasing test index (see the index member of zes_diag_test_t).

  • The application may call this function from simultaneous threads.

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

Parameters:
  • hDiagnostics – [in] Handle for the component.

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

  • pTests – [in,out][optional][range(0, *pCount)] array of information about individual tests sorted by increasing value of the index member of zes_diag_test_t. if count is less than the number of tests that are available, then the driver shall only retrieve that number of tests.

Returns:

zesDiagnosticsRunTests#

ZE_APIEXPORT ze_result_t ZE_APICALL zesDiagnosticsRunTests(zes_diag_handle_t hDiagnostics, uint32_t startIndex, uint32_t endIndex, zes_diag_result_t *pResult)#

Run a diagnostics test suite, either all tests or a subset of tests.

  • WARNING: Running diagnostics may destroy current device state information. Gracefully close any running workloads before initiating.

  • To run all tests in a test suite, set start = ZES_DIAG_FIRST_TEST_INDEX and end = ZES_DIAG_LAST_TEST_INDEX.

  • If the test suite permits running individual tests, the haveTests member of zes_diag_properties_t will be true. In this case, the function zesDiagnosticsGetTests() can be called to get the list of tests and corresponding indices that can be supplied to the arguments start and end in this function.

  • This function will block until the diagnostics have completed and force reset based on result

Parameters:
  • hDiagnostics – [in] Handle for the component.

  • startIndex – [in] The index of the first test to run. Set to ZES_DIAG_FIRST_TEST_INDEX to start from the beginning.

  • endIndex – [in] The index of the last test to run. Set to ZES_DIAG_LAST_TEST_INDEX to complete all tests after the start test.

  • pResult – [in,out] The result of the diagnostics

Returns:

Diagnostics Enums#

zes_diag_result_t#

enum zes_diag_result_t#

Diagnostic results.

Values:

enumerator ZES_DIAG_RESULT_NO_ERRORS#

Diagnostic completed without finding errors to repair.

enumerator ZES_DIAG_RESULT_ABORT#

Diagnostic had problems running tests.

enumerator ZES_DIAG_RESULT_FAIL_CANT_REPAIR#

Diagnostic had problems setting up repairs.

enumerator ZES_DIAG_RESULT_REBOOT_FOR_REPAIR#

Diagnostics found errors, setup for repair and reboot is required to complete the process

enumerator ZES_DIAG_RESULT_FORCE_UINT32#

Diagnostics Structures#

zes_diag_test_t#

struct zes_diag_test_t#

Diagnostic test.

Public Members

uint32_t index#

[out] Index of the test

char name[ZES_STRING_PROPERTY_SIZE]#

[out] Name of the test

zes_diag_properties_t#

struct zes_diag_properties_t#

Diagnostics test suite properties.

Public Members

zes_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_bool_t onSubdevice#

[out] True if the resource is located on a sub-device; false means that the resource is on the device of the calling Sysman handle

uint32_t subdeviceId#

[out] If onSubdevice is true, this gives the ID of the sub-device

char name[ZES_STRING_PROPERTY_SIZE]#

[out] Name of the diagnostics test suite

ze_bool_t haveTests#

[out] Indicates if this test suite has individual tests which can be run separately (use the function zesDiagnosticsGetTests() to get the list of these tests)

Ecc#

Ecc Functions#

zesDeviceEccAvailable#

ZE_APIEXPORT ze_result_t ZE_APICALL zesDeviceEccAvailable(zes_device_handle_t hDevice, ze_bool_t *pAvailable)#

Is ECC functionality available - true or false?

  • The application may call this function from simultaneous threads.

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

Parameters:
  • hDevice – [in] Handle for the component.

  • pAvailable – [out] ECC functionality is available (true)/unavailable (false).

Returns:

zesDeviceEccConfigurable#

ZE_APIEXPORT ze_result_t ZE_APICALL zesDeviceEccConfigurable(zes_device_handle_t hDevice, ze_bool_t *pConfigurable)#

Is ECC support configurable - true or false?

  • The application may call this function from simultaneous threads.

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

Parameters:
  • hDevice – [in] Handle for the component.

  • pConfigurable – [out] ECC can be enabled/disabled (true)/enabled/disabled (false).

Returns:

zesDeviceGetEccState#

ZE_APIEXPORT ze_result_t ZE_APICALL zesDeviceGetEccState(zes_device_handle_t hDevice, zes_device_ecc_properties_t *pState)#

Get current ECC state, pending state, and pending action.

  • The application may call this function from simultaneous threads.

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

Parameters:
  • hDevice – [in] Handle for the component.

  • pState – [out] ECC state, pending state, and pending action for state change.

Returns:

zesDeviceSetEccState#

ZE_APIEXPORT ze_result_t ZE_APICALL zesDeviceSetEccState(zes_device_handle_t hDevice, const zes_device_ecc_desc_t *newState, zes_device_ecc_properties_t *pState)#

Set new ECC state.

  • The application may call this function from simultaneous threads.

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

  • zesDeviceGetState should be called to determine pending action required to implement state change.

Parameters:
  • hDevice – [in] Handle for the component.

  • newState – [in] Pointer to desired ECC state.

  • pState – [out] ECC state, pending state, and pending action for state change.

Returns:

Ecc Enums#

zes_device_ecc_state_t#

enum zes_device_ecc_state_t#

ECC State.

Values:

enumerator ZES_DEVICE_ECC_STATE_UNAVAILABLE#

None.

enumerator ZES_DEVICE_ECC_STATE_ENABLED#

ECC enabled.

enumerator ZES_DEVICE_ECC_STATE_DISABLED#

ECC disabled.

enumerator ZES_DEVICE_ECC_STATE_FORCE_UINT32#

zes_device_action_t#

enum zes_device_action_t#

State Change Requirements.

Values:

enumerator ZES_DEVICE_ACTION_NONE#

No action.

enumerator ZES_DEVICE_ACTION_WARM_CARD_RESET#

Warm reset of the card.

enumerator ZES_DEVICE_ACTION_COLD_CARD_RESET#

Cold reset of the card.

enumerator ZES_DEVICE_ACTION_COLD_SYSTEM_REBOOT#

Cold reboot of the system.

enumerator ZES_DEVICE_ACTION_FORCE_UINT32#

Ecc Structures#

zes_device_ecc_desc_t#

struct zes_device_ecc_desc_t#

ECC State Descriptor.

Public Members

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

zes_device_ecc_state_t state#

[out] ECC state

zes_device_ecc_properties_t#

struct zes_device_ecc_properties_t#

ECC State.

Public Members

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

zes_device_ecc_state_t currentState#

[out] Current ECC state

zes_device_ecc_state_t pendingState#

[out] Pending ECC state

zes_device_action_t pendingAction#

[out] Pending action

Engine#

Engine Functions#

zesDeviceEnumEngineGroups#

ZE_APIEXPORT ze_result_t ZE_APICALL zesDeviceEnumEngineGroups(zes_device_handle_t hDevice, uint32_t *pCount, zes_engine_handle_t *phEngine)#

Get handle of engine groups.

  • The application may call this function from simultaneous threads.

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

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

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

  • phEngine – [in,out][optional][range(0, *pCount)] array of handle of components of this type. if count is less than the number of components of this type that are available, then the driver shall only retrieve that number of component handles.

Returns:

zesEngineGetProperties#

ZE_APIEXPORT ze_result_t ZE_APICALL zesEngineGetProperties(zes_engine_handle_t hEngine, zes_engine_properties_t *pProperties)#

Get engine group properties.

  • The application may call this function from simultaneous threads.

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

Parameters:
  • hEngine – [in] Handle for the component.

  • pProperties – [in,out] The properties for the specified engine group.

Returns:

zesEngineGetActivity#

ZE_APIEXPORT ze_result_t ZE_APICALL zesEngineGetActivity(zes_engine_handle_t hEngine, zes_engine_stats_t *pStats)#

Get the activity stats for an engine group.

  • This function also returns the engine activity inside a Virtual Machine (VM), in the presence of hardware virtualization (SRIOV)

  • The application may call this function from simultaneous threads.

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

Parameters:
  • hEngine – [in] Handle for the component.

  • pStats – [in,out] Will contain a snapshot of the engine group activity counters.

Returns:

Engine Enums#

zes_engine_group_t#

enum zes_engine_group_t#

Accelerator engine groups.

Values:

enumerator ZES_ENGINE_GROUP_ALL#

Access information about all engines combined.

enumerator ZES_ENGINE_GROUP_COMPUTE_ALL#

Access information about all compute engines combined. Compute engines can only process compute kernels (no 3D content).

enumerator ZES_ENGINE_GROUP_MEDIA_ALL#

Access information about all media engines combined.

enumerator ZES_ENGINE_GROUP_COPY_ALL#

Access information about all copy (blitter) engines combined.

enumerator ZES_ENGINE_GROUP_COMPUTE_SINGLE#

Access information about a single compute engine - this is an engine that can process compute kernels. Note that single engines may share the same underlying accelerator resources as other engines so activity of such an engine may not be indicative of the underlying resource utilization - use ZES_ENGINE_GROUP_3D_RENDER_COMPUTE_ALL for that.

enumerator ZES_ENGINE_GROUP_RENDER_SINGLE#

Access information about a single render engine - this is an engine that can process both 3D content and compute kernels. Note that single engines may share the same underlying accelerator resources as other engines so activity of such an engine may not be indicative of the underlying resource utilization - use ZES_ENGINE_GROUP_3D_RENDER_COMPUTE_ALL for that.

enumerator ZES_ENGINE_GROUP_MEDIA_DECODE_SINGLE#

[DEPRECATED] No longer supported.

enumerator ZES_ENGINE_GROUP_MEDIA_ENCODE_SINGLE#

[DEPRECATED] No longer supported.

enumerator ZES_ENGINE_GROUP_COPY_SINGLE#

Access information about a single media encode engine. Note that single engines may share the same underlying accelerator resources as other engines so activity of such an engine may not be indicative of the underlying resource utilization - use ZES_ENGINE_GROUP_COPY_ALL for that.

enumerator ZES_ENGINE_GROUP_MEDIA_ENHANCEMENT_SINGLE#

Access information about a single media enhancement engine. Note that single engines may share the same underlying accelerator resources as other engines so activity of such an engine may not be indicative of the underlying resource utilization - use ZES_ENGINE_GROUP_MEDIA_ALL for that.

enumerator ZES_ENGINE_GROUP_3D_SINGLE#

[DEPRECATED] No longer supported.

enumerator ZES_ENGINE_GROUP_3D_RENDER_COMPUTE_ALL#

[DEPRECATED] No longer supported.

enumerator ZES_ENGINE_GROUP_RENDER_ALL#

Access information about all render engines combined. Render engines are those than process both 3D content and compute kernels.

enumerator ZES_ENGINE_GROUP_3D_ALL#

[DEPRECATED] No longer supported.

enumerator ZES_ENGINE_GROUP_MEDIA_CODEC_SINGLE#

Access information about a single media engine. Note that single engines may share the same underlying accelerator resources as other engines so activity of such an engine may not be indicative of the underlying resource utilization - use ZES_ENGINE_GROUP_MEDIA_ALL for that.

enumerator ZES_ENGINE_GROUP_FORCE_UINT32#

Engine Structures#

zes_engine_properties_t#

struct zes_engine_properties_t#

Engine group properties.

Public Members

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

zes_engine_group_t type#

[out] The engine group

ze_bool_t onSubdevice#

[out] True if this resource is located on a sub-device; false means that the resource is on the device of the calling Sysman handle

uint32_t subdeviceId#

[out] If onSubdevice is true, this gives the ID of the sub-device

zes_engine_stats_t#

struct zes_engine_stats_t#

Engine activity counters.

  • Percent utilization is calculated by taking two snapshots (s1, s2) and using the equation: util = (s2.activeTime - s1.activeTime) / (s2.timestamp - s1.timestamp)

  • The activeTime time units are implementation-specific since the value is only intended to be used for calculating utilization percentage.

  • The timestamp should only be used to calculate delta between snapshots of this structure.

  • The application should never take the delta of timestamp with the timestamp from a different structure since they are not guaranteed to have the same base.

  • When taking the delta, the difference between timestamp samples could be 0, if the frequency of sampling the snapshots is higher than the frequency of the timestamp update.

  • The absolute value of timestamp is only valid during within the application and may be different on the next execution.

Public Members

uint64_t activeTime#

[out] Monotonic counter where the resource is actively running workloads.

uint64_t timestamp#

[out] Monotonic counter when activeTime counter was sampled.

Events#

Events Functions#

zesDeviceEventRegister#

ZE_APIEXPORT ze_result_t ZE_APICALL zesDeviceEventRegister(zes_device_handle_t hDevice, zes_event_type_flags_t events)#

Specify the list of events to listen to for a given device.

  • The application may call this function from simultaneous threads.

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

Parameters:
  • hDevice – [in] The device handle.

  • events – [in] List of events to listen to.

Returns:

zesDriverEventListen#

ZE_APIEXPORT ze_result_t ZE_APICALL zesDriverEventListen(ze_driver_handle_t hDriver, uint32_t timeout, uint32_t count, zes_device_handle_t *phDevices, uint32_t *pNumDeviceEvents, zes_event_type_flags_t *pEvents)#

Wait for events to be received from a one or more devices.

  • 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

  • timeout – [in] if non-zero, then indicates the maximum time (in milliseconds) to yield before returning ZE_RESULT_SUCCESS or ZE_RESULT_NOT_READY; if zero, then will check status and return immediately; if UINT32_MAX, then function will not return until events arrive.

  • count – [in] Number of device handles in phDevices.

  • phDevices – [in][range(0, count)] Device handles to listen to for events. Only devices from the provided driver handle can be specified in this list.

  • pNumDeviceEvents – [in,out] Will contain the actual number of devices in phDevices that generated events. If non-zero, check pEvents to determine the devices and events that were received.

  • pEvents – [in,out] An array that will continue the list of events for each device listened in phDevices. This array must be at least as big as count. For every device handle in phDevices, this will provide the events that occurred for that device at the same position in this array. If no event was received for a given device, the corresponding array entry will be zero.

Returns:

zesDriverEventListenEx#

ZE_APIEXPORT ze_result_t ZE_APICALL zesDriverEventListenEx(ze_driver_handle_t hDriver, uint64_t timeout, uint32_t count, zes_device_handle_t *phDevices, uint32_t *pNumDeviceEvents, zes_event_type_flags_t *pEvents)#

Wait for events to be received from a one or more devices.

  • 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

  • timeout – [in] if non-zero, then indicates the maximum time (in milliseconds) to yield before returning ZE_RESULT_SUCCESS or ZE_RESULT_NOT_READY; if zero, then will check status and return immediately; if UINT64_MAX, then function will not return until events arrive.

  • count – [in] Number of device handles in phDevices.

  • phDevices – [in][range(0, count)] Device handles to listen to for events. Only devices from the provided driver handle can be specified in this list.

  • pNumDeviceEvents – [in,out] Will contain the actual number of devices in phDevices that generated events. If non-zero, check pEvents to determine the devices and events that were received.

  • pEvents – [in,out] An array that will continue the list of events for each device listened in phDevices. This array must be at least as big as count. For every device handle in phDevices, this will provide the events that occurred for that device at the same position in this array. If no event was received for a given device, the corresponding array entry will be zero.

Returns:

Events Enums#

zes_event_type_flags_t#

enum zes_event_type_flag_t#

Values:

enumerator ZES_EVENT_TYPE_FLAG_DEVICE_DETACH#

Event is triggered when the device is no longer available (due to a reset or being disabled).

enumerator ZES_EVENT_TYPE_FLAG_DEVICE_ATTACH#

Event is triggered after the device is available again.

enumerator ZES_EVENT_TYPE_FLAG_DEVICE_SLEEP_STATE_ENTER#

Event is triggered when the driver is about to put the device into a deep sleep state

enumerator ZES_EVENT_TYPE_FLAG_DEVICE_SLEEP_STATE_EXIT#

Event is triggered when the driver is waking the device up from a deep sleep state

enumerator ZES_EVENT_TYPE_FLAG_FREQ_THROTTLED#

Event is triggered when the frequency starts being throttled.

enumerator ZES_EVENT_TYPE_FLAG_ENERGY_THRESHOLD_CROSSED#

Event is triggered when the energy consumption threshold is reached (use zesPowerSetEnergyThreshold() to configure).

enumerator ZES_EVENT_TYPE_FLAG_TEMP_CRITICAL#

Event is triggered when the critical temperature is reached (use zesTemperatureSetConfig() to configure - disabled by default).

enumerator ZES_EVENT_TYPE_FLAG_TEMP_THRESHOLD1#

Event is triggered when the temperature crosses threshold 1 (use zesTemperatureSetConfig() to configure - disabled by default).

enumerator ZES_EVENT_TYPE_FLAG_TEMP_THRESHOLD2#

Event is triggered when the temperature crosses threshold 2 (use zesTemperatureSetConfig() to configure - disabled by default).

enumerator ZES_EVENT_TYPE_FLAG_MEM_HEALTH#

Event is triggered when the health of device memory changes.

enumerator ZES_EVENT_TYPE_FLAG_FABRIC_PORT_HEALTH#

Event is triggered when the health of fabric ports change.

Event is triggered when the health of the PCI link changes.

enumerator ZES_EVENT_TYPE_FLAG_RAS_CORRECTABLE_ERRORS#

Event is triggered when accelerator RAS correctable errors cross thresholds (use zesRasSetConfig() to configure - disabled by default).

enumerator ZES_EVENT_TYPE_FLAG_RAS_UNCORRECTABLE_ERRORS#

Event is triggered when accelerator RAS uncorrectable errors cross thresholds (use zesRasSetConfig() to configure - disabled by default).

enumerator ZES_EVENT_TYPE_FLAG_DEVICE_RESET_REQUIRED#

Event is triggered when the device needs to be reset (use zesDeviceGetState() to determine the reasons for the reset).

enumerator ZES_EVENT_TYPE_FLAG_SURVIVABILITY_MODE_DETECTED#

Event is triggered when graphics driver encounter an error condition.

enumerator ZES_EVENT_TYPE_FLAG_FORCE_UINT32#

Fabric#

Fabric Functions#

zesDeviceEnumFabricPorts#

ZE_APIEXPORT ze_result_t ZE_APICALL zesDeviceEnumFabricPorts(zes_device_handle_t hDevice, uint32_t *pCount, zes_fabric_port_handle_t *phPort)#

Get handle of Fabric ports in a device.

  • The application may call this function from simultaneous threads.

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

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

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

  • phPort – [in,out][optional][range(0, *pCount)] array of handle of components of this type. if count is less than the number of components of this type that are available, then the driver shall only retrieve that number of component handles.

Returns:

zesFabricPortGetProperties#

ZE_APIEXPORT ze_result_t ZE_APICALL zesFabricPortGetProperties(zes_fabric_port_handle_t hPort, zes_fabric_port_properties_t *pProperties)#

Get Fabric port properties.

  • The application may call this function from simultaneous threads.

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

Parameters:
  • hPort – [in] Handle for the component.

  • pProperties – [in,out] Will contain properties of the Fabric Port.

Returns:

zesFabricPortGetLinkType#

Get Fabric port link type.

  • The application may call this function from simultaneous threads.

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

Parameters:
  • hPort – [in] Handle for the component.

  • pLinkType – [in,out] Will contain details about the link attached to the Fabric port.

Returns:

zesFabricPortGetConfig#

ZE_APIEXPORT ze_result_t ZE_APICALL zesFabricPortGetConfig(zes_fabric_port_handle_t hPort, zes_fabric_port_config_t *pConfig)#

Get Fabric port configuration.

  • The application may call this function from simultaneous threads.

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

Parameters:
  • hPort – [in] Handle for the component.

  • pConfig – [in,out] Will contain configuration of the Fabric Port.

Returns:

zesFabricPortSetConfig#

ZE_APIEXPORT ze_result_t ZE_APICALL zesFabricPortSetConfig(zes_fabric_port_handle_t hPort, const zes_fabric_port_config_t *pConfig)#

Set Fabric port configuration.

  • The application may call this function from simultaneous threads.

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

Parameters:
  • hPort – [in] Handle for the component.

  • pConfig – [in] Contains new configuration of the Fabric Port.

Returns:

zesFabricPortGetState#

ZE_APIEXPORT ze_result_t ZE_APICALL zesFabricPortGetState(zes_fabric_port_handle_t hPort, zes_fabric_port_state_t *pState)#

Get Fabric port state - status (health/degraded/failed/disabled), reasons for link degradation or instability, current rx/tx speed.

  • The application may call this function from simultaneous threads.

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

Parameters:
  • hPort – [in] Handle for the component.

  • pState – [in,out] Will contain the current state of the Fabric Port

Returns:

zesFabricPortGetThroughput#

ZE_APIEXPORT ze_result_t ZE_APICALL zesFabricPortGetThroughput(zes_fabric_port_handle_t hPort, zes_fabric_port_throughput_t *pThroughput)#

Get Fabric port throughput.

  • The application may call this function from simultaneous threads.

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

Parameters:
  • hPort – [in] Handle for the component.

  • pThroughput – [in,out] Will contain the Fabric port throughput counters.

Returns:

zesFabricPortGetFabricErrorCounters#

ZE_APIEXPORT ze_result_t ZE_APICALL zesFabricPortGetFabricErrorCounters(zes_fabric_port_handle_t hPort, zes_fabric_port_error_counters_t *pErrors)#

Get Fabric Port Error Counters.

  • The application may call this function from simultaneous threads.

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

  • The memory backing the arrays for phPorts and ppThroughputs must be allocated in system memory by the user who is also responsible for releasing them when they are no longer needed.

Parameters:
  • hPort – [in] Handle for the component.

  • pErrors – [in,out] Will contain the Fabric port Error counters.

Returns:

zesFabricPortGetMultiPortThroughput#

ZE_APIEXPORT ze_result_t ZE_APICALL zesFabricPortGetMultiPortThroughput(zes_device_handle_t hDevice, uint32_t numPorts, zes_fabric_port_handle_t *phPort, zes_fabric_port_throughput_t **pThroughput)#

Get Fabric port throughput from multiple ports in a single call.

  • The application may call this function from simultaneous threads.

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

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

  • numPorts – [in] Number of ports enumerated in function zesDeviceEnumFabricPorts

  • phPort – [in][range(0, numPorts)] array of fabric port handles provided by user to gather throughput values.

  • pThroughput – [out][range(0, numPorts)] array of fabric port throughput counters from multiple ports of type zes_fabric_port_throughput_t.

Returns:

Fabric Enums#

zes_fabric_port_status_t#

enum zes_fabric_port_status_t#

Fabric port status.

Values:

enumerator ZES_FABRIC_PORT_STATUS_UNKNOWN#

The port status cannot be determined.

enumerator ZES_FABRIC_PORT_STATUS_HEALTHY#

The port is up and operating as expected.

enumerator ZES_FABRIC_PORT_STATUS_DEGRADED#

The port is up but has quality and/or speed degradation.

enumerator ZES_FABRIC_PORT_STATUS_FAILED#

Port connection instabilities are preventing workloads making forward progress

enumerator ZES_FABRIC_PORT_STATUS_DISABLED#

The port is configured down.

enumerator ZES_FABRIC_PORT_STATUS_FORCE_UINT32#

zes_fabric_port_qual_issue_flags_t#

enum zes_fabric_port_qual_issue_flag_t#

Values:

Excessive link errors are occurring.

enumerator ZES_FABRIC_PORT_QUAL_ISSUE_FLAG_SPEED#

There is a degradation in the bitrate and/or width of the link.

enumerator ZES_FABRIC_PORT_QUAL_ISSUE_FLAG_FORCE_UINT32#

zes_fabric_port_failure_flags_t#

enum zes_fabric_port_failure_flag_t#

Values:

enumerator ZES_FABRIC_PORT_FAILURE_FLAG_FAILED#

A previously operating link has failed. Hardware will automatically retrain this port. This state will persist until either the physical connection is removed or the link trains successfully.

enumerator ZES_FABRIC_PORT_FAILURE_FLAG_TRAINING_TIMEOUT#

A connection has not been established within an expected time. Hardware will continue to attempt port training. This status will persist until either the physical connection is removed or the link successfully trains.

enumerator ZES_FABRIC_PORT_FAILURE_FLAG_FLAPPING#

Port has excessively trained and then transitioned down for some period of time. Driver will allow port to continue to train, but will not enable the port for use until the port has been disabled and subsequently re-enabled using zesFabricPortSetConfig().

enumerator ZES_FABRIC_PORT_FAILURE_FLAG_FORCE_UINT32#

Fabric Structures#

zes_fabric_port_id_t#

struct zes_fabric_port_id_t#

Unique identifier for a fabric port.

  • This not a universal identifier. The identified is garanteed to be unique for the current hardware configuration of the system. Changes in the hardware may result in a different identifier for a given port.

  • The main purpose of this identifier to build up an instantaneous topology map of system connectivity. An application should enumerate all fabric ports and match the remotePortId member of zes_fabric_port_state_t to the portId member of zes_fabric_port_properties_t.

Public Members

uint32_t fabricId#

[out] Unique identifier for the fabric end-point

uint32_t attachId#

[out] Unique identifier for the device attachment point

uint8_t portNumber#

[out] The logical port number (this is typically marked somewhere on the physical device)

zes_fabric_port_speed_t#

struct zes_fabric_port_speed_t#

Fabric port speed in one direction.

Public Members

int64_t bitRate#

[out] Bits/sec that the link is operating at. A value of -1 means that this property is unknown.

int32_t width#

[out] The number of lanes. A value of -1 means that this property is unknown.

zes_fabric_port_properties_t#

struct zes_fabric_port_properties_t#

Fabric port properties.

Public Members

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

char model[ZES_MAX_FABRIC_PORT_MODEL_SIZE]#

[out] Description of port technology. Will be set to the string “unkown” if this cannot be determined for this port.

ze_bool_t onSubdevice#

[out] True if the port is located on a sub-device; false means that the port is on the device of the calling Sysman handle

uint32_t subdeviceId#

[out] If onSubdevice is true, this gives the ID of the sub-device

zes_fabric_port_id_t portId#

[out] The unique port identifier

zes_fabric_port_speed_t maxRxSpeed#

[out] Maximum speed supported by the receive side of the port (sum of all lanes)

zes_fabric_port_speed_t maxTxSpeed#

[out] Maximum speed supported by the transmit side of the port (sum of all lanes)

zes_fabric_port_config_t#

struct zes_fabric_port_config_t#

Fabric port configuration.

Public Members

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

ze_bool_t enabled#

[in,out] Port is configured up/down

ze_bool_t beaconing#

[in,out] Beaconing is configured on/off

zes_fabric_port_state_t#

struct zes_fabric_port_state_t#

Fabric port state.

Public Members

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

zes_fabric_port_status_t status#

[out] The current status of the port

zes_fabric_port_qual_issue_flags_t qualityIssues#

[out] If status is ZES_FABRIC_PORT_STATUS_DEGRADED, then this gives a combination of zes_fabric_port_qual_issue_flag_t for quality issues that have been detected; otherwise, 0 indicates there are no quality issues with the link at this time.

zes_fabric_port_failure_flags_t failureReasons#

[out] If status is ZES_FABRIC_PORT_STATUS_FAILED, then this gives a combination of zes_fabric_port_failure_flag_t for reasons for the connection instability; otherwise, 0 indicates there are no connection stability issues at this time.

zes_fabric_port_id_t remotePortId#

[out] The unique port identifier for the remote connection point if status is ZES_FABRIC_PORT_STATUS_HEALTHY, ZES_FABRIC_PORT_STATUS_DEGRADED or ZES_FABRIC_PORT_STATUS_FAILED

zes_fabric_port_speed_t rxSpeed#

[out] Current maximum receive speed (sum of all lanes)

zes_fabric_port_speed_t txSpeed#

[out] Current maximum transmit speed (sum of all lanes)

zes_fabric_port_throughput_t#

struct zes_fabric_port_throughput_t#

Fabric port throughput.

Public Members

uint64_t timestamp#

[out] Monotonic timestamp counter in microseconds when the measurement was made. This timestamp should only be used to calculate delta time between snapshots of this structure. Never take the delta of this timestamp with the timestamp from a different structure since they are not guaranteed to have the same base. The absolute value of the timestamp is only valid during within the application and may be different on the next execution.

uint64_t rxCounter#

[out] Monotonic counter for the number of bytes received (sum of all lanes). This includes all protocol overhead, not only the GPU traffic.

uint64_t txCounter#

[out] Monotonic counter for the number of bytes transmitted (sum of all lanes). This includes all protocol overhead, not only the GPU traffic.

zes_fabric_port_error_counters_t#

struct zes_fabric_port_error_counters_t#

Fabric Port Error Counters.

Public Members

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

uint64_t linkFailureCount#

[out] Link Failure Error Count reported per port

uint64_t fwCommErrorCount#

[out] Firmware Communication Error Count reported per device

uint64_t fwErrorCount#

[out] Firmware reported Error Count reported per device

uint64_t linkDegradeCount#

[out] Link Degrade Error Count reported per port

Fan#

Fan Functions#

zesDeviceEnumFans#

ZE_APIEXPORT ze_result_t ZE_APICALL zesDeviceEnumFans(zes_device_handle_t hDevice, uint32_t *pCount, zes_fan_handle_t *phFan)#

Get handle of fans.

  • The application may call this function from simultaneous threads.

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

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

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

  • phFan – [in,out][optional][range(0, *pCount)] array of handle of components of this type. if count is less than the number of components of this type that are available, then the driver shall only retrieve that number of component handles.

Returns:

zesFanGetProperties#

ZE_APIEXPORT ze_result_t ZE_APICALL zesFanGetProperties(zes_fan_handle_t hFan, zes_fan_properties_t *pProperties)#

Get fan properties.

  • The application may call this function from simultaneous threads.

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

Parameters:
  • hFan – [in] Handle for the component.

  • pProperties – [in,out] Will contain the properties of the fan.

Returns:

zesFanGetConfig#