Tools API

oneAPI Level Zero Specification - Version 0.91

Driver

Driver Functions

zetInit

__ze_api_export ze_result_t __zecall zetInit(ze_init_flag_t flags)

Initialize the ‘One API’ driver and must be called before any other API function.

Parameters
  • flags: initialization flags

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

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

  • This function is thread-safe for scenarios where multiple libraries may initialize the driver simultaneously.

Return

Debug

Debug Functions

zetDebugAttach

__ze_api_export ze_result_t __zecall zetDebugAttach(zet_device_handle_t hDevice, const zet_debug_config_t *config, zet_debug_session_handle_t *hDebug)

Attach to a device.

Parameters
  • hDevice: device handle

  • config: the debug configuration

  • hDebug: debug session handle

Return

zetDebugDetach

__ze_api_export ze_result_t __zecall zetDebugDetach(zet_debug_session_handle_t hDebug)

Close a debug session.

Parameters
  • hDebug: [release] debug session handle

Return

zetDebugGetNumThreads

__ze_api_export ze_result_t __zecall zetDebugGetNumThreads(zet_debug_session_handle_t hDebug, uint64_t *pNumThreads)

Query the number of device threads for a debug session.

Parameters
  • hDebug: debug session handle

  • pNumThreads: the maximal number of threads

Return

zetDebugReadEvent

__ze_api_export ze_result_t __zecall zetDebugReadEvent(zet_debug_session_handle_t hDebug, uint64_t timeout, size_t size, void *buffer)

Read the topmost debug event.

Parameters
  • hDebug: debug session handle

  • timeout: timeout in milliseconds (or ZET_DEBUG_TIMEOUT_INFINITE)

  • size: the size of the buffer in bytes

  • buffer: a buffer to hold the event data

Return

zetDebugInterrupt

__ze_api_export ze_result_t __zecall zetDebugInterrupt(zet_debug_session_handle_t hDebug, uint64_t threadid)

Interrupt device threads.

Parameters
  • hDebug: debug session handle

  • threadid: the thread to inerrupt or ZET_DEBUG_THREAD_ALL

Return

zetDebugResume

__ze_api_export ze_result_t __zecall zetDebugResume(zet_debug_session_handle_t hDebug, uint64_t threadid)

Resume device threads.

Parameters
  • hDebug: debug session handle

  • threadid: the thread to resume or ZET_DEBUG_THREAD_ALL

Return

zetDebugReadMemory

__ze_api_export ze_result_t __zecall zetDebugReadMemory(zet_debug_session_handle_t hDebug, uint64_t threadid, int memSpace, uint64_t address, size_t size, void *buffer)

Read memory.

Parameters
  • hDebug: debug session handle

  • threadid: the thread context or ZET_DEBUG_THREAD_NONE

  • memSpace: the (device-specific) memory space

  • address: the virtual address of the memory to read from

  • size: the number of bytes to read

  • buffer: a buffer to hold a copy of the memory

Return

zetDebugWriteMemory

__ze_api_export ze_result_t __zecall zetDebugWriteMemory(zet_debug_session_handle_t hDebug, uint64_t threadid, int memSpace, uint64_t address, size_t size, const void *buffer)

Write memory.

Parameters
  • hDebug: debug session handle

  • threadid: the thread context or ZET_DEBUG_THREAD_NONE

  • memSpace: the (device-specific) memory space

  • address: the virtual address of the memory to write to

  • size: the number of bytes to write

  • buffer: a buffer holding the pattern to write

Return

zetDebugReadState

__ze_api_export ze_result_t __zecall zetDebugReadState(zet_debug_session_handle_t hDebug, uint64_t threadid, uint64_t offset, size_t size, void *buffer)

Read register state.

Parameters
  • hDebug: debug session handle

  • threadid: the thread context

  • offset: the offset into the register state area

  • size: the number of bytes to read

  • buffer: a buffer to hold a copy of the register state

Return

zetDebugWriteState

__ze_api_export ze_result_t __zecall zetDebugWriteState(zet_debug_session_handle_t hDebug, uint64_t threadid, uint64_t offset, size_t size, const void *buffer)

Write register state.

Parameters
  • hDebug: debug session handle

  • threadid: the thread context

  • offset: the offset into the register state area

  • size: the number of bytes to write

  • buffer: a buffer holding the pattern to write

Return

Debug Enums

zet_debug_event_flags_t

enum zet_debug_event_flags_t

Debug event flags.

Values:

ZET_DEBUG_EVENT_FLAG_NONE = 0

No event flags.

ZET_DEBUG_EVENT_FLAG_STOPPED = ZE_BIT(0)

The reporting thread stopped.

zet_debug_event_type_t

enum zet_debug_event_type_t

Debug event types.

Values:

ZET_DEBUG_EVENT_INVALID = 0

The event is invalid.

ZET_DEBUG_EVENT_DETACHED

The tool was detached.

ZET_DEBUG_EVENT_PROCESS_ENTRY

The debuggee process created command queues on the device.

ZET_DEBUG_EVENT_PROCESS_EXIT

The debuggee process destroyed all command queues on the device.

ZET_DEBUG_EVENT_MODULE_LOAD

An in-memory module was loaded onto the device.

ZET_DEBUG_EVENT_MODULE_UNLOAD

An in-memory module is about to get unloaded from the device.

ZET_DEBUG_EVENT_EXCEPTION

The thread stopped due to a device exception.

zet_debug_detach_reason_t

enum zet_debug_detach_reason_t

Debug detach reason.

Values:

ZET_DEBUG_DETACH_INVALID = 0

The detach reason is not valid.

ZET_DEBUG_DETACH_HOST_EXIT

The host process exited.

zet_debug_memory_space_intel_graphics_t

enum zet_debug_memory_space_intel_graphics_t

Memory spaces for Intel Graphics devices.

Values:

ZET_DEBUG_MEMORY_SPACE_GEN_DEFAULT = 0

default memory space (attribute may be omitted)

ZET_DEBUG_MEMORY_SPACE_GEN_SLM

shared local memory space

zet_debug_state_intel_graphics_t

enum zet_debug_state_intel_graphics_t

Register file types for Intel Graphics devices.

Values:

ZET_DEBUG_STATE_GEN_INVALID = 0

An invalid register file.

ZET_DEBUG_STATE_GEN_GRF

The general register file.

ZET_DEBUG_STATE_GEN_ACC

The accumulator register file.

ZET_DEBUG_STATE_GEN_ADDR

The address register file.

ZET_DEBUG_STATE_GEN_FLAG

The flags register file.

Debug Structures

zet_debug_config_v1_t

struct zet_debug_config_v1_t

Debug configuration: version 1.

Public Members

int pid

The host process identifier.

zet_debug_config_variants_t

union zet_debug_config_variants_t
#include <zet_debug.h>

Debug configuration: version-dependent fields.

Public Members

zet_debug_config_v1_t v1

Version 1.

zet_debug_config_t

struct zet_debug_config_t

Debug configuration.

Public Members

uint16_t version

The requested program debug API version.

zet_debug_config_variants_t variant

Version-specific fields.

zet_debug_event_info_detached_t

struct zet_debug_event_info_detached_t

Event information for ZET_DEBUG_EVENT_DETACHED.

Public Members

uint8_t reason

The detach reason.

zet_debug_event_info_module_t

struct zet_debug_event_info_module_t

Event information for ZET_DEBUG_EVENT_MODULE_LOAD/UNLOAD.

Public Members

uint64_t moduleBegin

The begin address of the in-memory module.

uint64_t moduleEnd

The end address of the in-memory module.

uint64_t load

The load address of the module on the device.

zet_debug_event_info_t

union zet_debug_event_info_t
#include <zet_debug.h>

Event type specific information.

zet_debug_event_t

struct zet_debug_event_t

A debug event on the device.

Public Members

uint8_t type

The event type.

uint64_t thread

The thread reporting the event.

uint64_t flags

A bit-vector of zet_debug_event_flags_t.

zet_debug_event_info_t info

Event type specific information.

zet_debug_state_section_t

struct zet_debug_state_section_t

A register file descriptor.

Public Members

uint16_t type

The register file type type.

uint16_t version

The register file version.

uint32_t size

The size of the register file in bytes.

uint64_t offset

The offset into the register state area.

zet_debug_state_t

struct zet_debug_state_t

A register state descriptor.

Public Members

uint32_t size

The size of the register state object in bytes.

uint8_t headerSize

The size of the register state descriptor in bytes.

uint8_t secSize

The size of the register file descriptors in bytes.

uint16_t numSec

The number of register file descriptors.

Metric

Metric Functions

zetMetricGroupGet

__ze_api_export ze_result_t __zecall zetMetricGroupGet(zet_device_handle_t hDevice, uint32_t *pCount, zet_metric_group_handle_t *phMetricGroups)

Retrieves metric group for a device.

Parameters
  • hDevice: handle of the device

  • pCount: pointer to the number of metric groups. if count is zero, then the driver will update the value with the total number of metric groups available. if count is non-zero, then driver will only retrieve that number of metric groups. if count is larger than the number of metric groups available, then the driver will update the value with the correct number of metric groups available.

  • phMetricGroups: [optional][range(0, *pCount)] array of handle of metric groups

  • The application may call this function from simultaneous threads.

Return

zetMetricGroupGetProperties

__ze_api_export ze_result_t __zecall zetMetricGroupGetProperties(zet_metric_group_handle_t hMetricGroup, zet_metric_group_properties_t *pProperties)

Retrieves attributes of a metric group.

Parameters
  • hMetricGroup: handle of the metric group

  • pProperties: metric group properties

  • The application may call this function from simultaneous threads.

Return

zetMetricGroupCalculateMetricValues

__ze_api_export ze_result_t __zecall zetMetricGroupCalculateMetricValues(zet_metric_group_handle_t hMetricGroup, size_t rawDataSize, const uint8_t *pRawData, uint32_t *pMetricValueCount, zet_typed_value_t *pMetricValues)

Calculates metric values from raw data.

Parameters
  • hMetricGroup: handle of the metric group

  • rawDataSize: size in bytes of raw data buffer

  • pRawData: [range(0, rawDataSize)] buffer of raw data to calculate

  • pMetricValueCount: pointer to number of metric values calculated. if count is zero, then the driver will update the value with the total number of metric values to be calculated. if count is non-zero, then driver will only calculate that number of metric values. if count is larger than the number available in the raw data buffer, then the driver will update the value with the actual number of metric values to be calculated.

  • pMetricValues: [optional][range(0, *pMetricValueCount)] buffer of calculated metrics

  • The application may call this function from simultaneous threads.

Return

zetMetricGet

__ze_api_export ze_result_t __zecall zetMetricGet(zet_metric_group_handle_t hMetricGroup, uint32_t *pCount, zet_metric_handle_t *phMetrics)

Retrieves metric from a metric group.

Parameters
  • hMetricGroup: handle of the metric group

  • pCount: pointer to the number of metrics. if count is zero, then the driver will update the value with the total number of metrics available. if count is non-zero, then driver will only retrieve that number of metrics. if count is larger than the number of metrics available, then the driver will update the value with the correct number of metrics available.

  • phMetrics: [optional][range(0, *pCount)] array of handle of metrics

  • The application may call this function from simultaneous threads.

Return

zetMetricGetProperties

__ze_api_export ze_result_t __zecall zetMetricGetProperties(zet_metric_handle_t hMetric, zet_metric_properties_t *pProperties)

Retrieves attributes of a metric.

Parameters
  • hMetric: handle of the metric

  • pProperties: metric properties

  • The application may call this function from simultaneous threads.

Return

zetDeviceActivateMetricGroups

__ze_api_export ze_result_t __zecall zetDeviceActivateMetricGroups(zet_device_handle_t hDevice, uint32_t count, zet_metric_group_handle_t *phMetricGroups)

Activates metric groups.

Parameters
  • hDevice: handle of the device

  • count: metric group count to activate. 0 to deactivate.

  • phMetricGroups: [optional][range(0, count)] handles of the metric groups to activate. NULL to deactivate.

  • MetricGroup must be active until MetricQueryGetDeta and zetMetricTracerClose.

  • Conflicting metric groups cannot be activated, in such case tha call would fail.

Return

zetMetricTracerOpen

__ze_api_export ze_result_t __zecall zetMetricTracerOpen(zet_device_handle_t hDevice, zet_metric_group_handle_t hMetricGroup, zet_metric_tracer_desc_t *desc, ze_event_handle_t hNotificationEvent, zet_metric_tracer_handle_t *phMetricTracer)

Opens metric tracer for a device.

Parameters
  • hDevice: handle of the device

  • hMetricGroup: handle of the metric group

  • desc: metric tracer descriptor

  • hNotificationEvent: [optional] event used for report availability notification. Must be device to host type.

  • phMetricTracer: handle of metric tracer

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

Return

zetCommandListAppendMetricTracerMarker

__ze_api_export ze_result_t __zecall zetCommandListAppendMetricTracerMarker(zet_command_list_handle_t hCommandList, zet_metric_tracer_handle_t hMetricTracer, uint32_t value)

Append metric tracer marker into a command list.

Parameters
  • hCommandList: handle of the command list

  • hMetricTracer: handle of the metric tracer

  • value: tracer marker value

  • The application may not call this function from simultaneous threads with the same command list handle.

Return

zetMetricTracerClose

__ze_api_export ze_result_t __zecall zetMetricTracerClose(zet_metric_tracer_handle_t hMetricTracer)

Closes metric tracer.

Parameters
  • hMetricTracer: [release] handle of the metric tracer

  • The application may not call this function from simultaneous threads with the same metric tracer handle.

Return

zetMetricTracerReadData

__ze_api_export ze_result_t __zecall zetMetricTracerReadData(zet_metric_tracer_handle_t hMetricTracer, uint32_t maxReportCount, size_t *pRawDataSize, uint8_t *pRawData)

Reads data from metric tracer.

Parameters
  • hMetricTracer: handle of the metric tracer

  • maxReportCount: the maximum number of reports the application wants to receive. if UINT32_MAX, then function will retrieve all reports available

  • pRawDataSize: pointer to size in bytes of raw data requested to read. if size is zero, then the driver will update the value with the total size in bytes needed for all reports available. if size is non-zero, then driver will only retrieve the number of reports that fit into the buffer. if size is larger than size needed for all reports, then driver will update the value with the actual size needed.

  • pRawData: [optional][range(0, *pRawDataSize)] buffer containing tracer reports in raw format

  • The application may call this function from simultaneous threads.

Return

zetMetricQueryPoolCreate

__ze_api_export ze_result_t __zecall zetMetricQueryPoolCreate(zet_device_handle_t hDevice, zet_metric_group_handle_t hMetricGroup, const zet_metric_query_pool_desc_t *desc, zet_metric_query_pool_handle_t *phMetricQueryPool)

Creates a pool of metric queries.

Parameters
  • hDevice: handle of the device

  • hMetricGroup: metric group associated with the query object.

  • desc: metric query pool descriptor

  • phMetricQueryPool: handle of metric query pool

  • The application may call this function from simultaneous threads.

Return

zetMetricQueryPoolDestroy

__ze_api_export ze_result_t __zecall zetMetricQueryPoolDestroy(zet_metric_query_pool_handle_t hMetricQueryPool)

Deletes a query pool object.

Parameters
  • hMetricQueryPool: [release] handle of the metric query pool

  • The application is responsible for destroying all query handles created from the pool before destroying the pool itself

  • The application is responsible for making sure the device is not currently referencing the any query within the pool before it is deleted

  • The application may not call this function from simultaneous threads with the same query pool handle.

Return

zetMetricQueryCreate

__ze_api_export ze_result_t __zecall zetMetricQueryCreate(zet_metric_query_pool_handle_t hMetricQueryPool, uint32_t index, zet_metric_query_handle_t *phMetricQuery)

Creates metric query object.

Parameters
  • hMetricQueryPool: handle of the metric query pool

  • index: index of the query within the pool

  • phMetricQuery: handle of metric query

  • The application may call this function from simultaneous threads.

Return

zetMetricQueryDestroy

__ze_api_export ze_result_t __zecall zetMetricQueryDestroy(zet_metric_query_handle_t hMetricQuery)

Deletes a metric query object.

Parameters
  • hMetricQuery: [release] handle of metric query

  • The application is responsible for making sure the device is not currently referencing the query before it is deleted

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

Return

zetMetricQueryReset

__ze_api_export ze_result_t __zecall zetMetricQueryReset(zet_metric_query_handle_t hMetricQuery)

Resets a metric query object back to inital state.

Parameters
  • hMetricQuery: handle of metric query

  • The application is responsible for making sure the device is not currently referencing the query before it is reset

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

Return

zetCommandListAppendMetricQueryBegin

__ze_api_export ze_result_t __zecall zetCommandListAppendMetricQueryBegin(zet_command_list_handle_t hCommandList, zet_metric_query_handle_t hMetricQuery)

Appends metric query begin into a command list.

Parameters
  • hCommandList: handle of the command list

  • hMetricQuery: handle of the metric query

  • The application may not call this function from simultaneous threads with the same command list handle.

Return

zetCommandListAppendMetricQueryEnd

__ze_api_export ze_result_t __zecall zetCommandListAppendMetricQueryEnd(zet_command_list_handle_t hCommandList, zet_metric_query_handle_t hMetricQuery, ze_event_handle_t hCompletionEvent)

Appends metric query end into a command list.

Parameters
  • hCommandList: handle of the command list

  • hMetricQuery: handle of the metric query

  • hCompletionEvent: [optional] handle of the completion event to signal

  • The application may not call this function from simultaneous threads with the same command list handle.

Return

zetCommandListAppendMetricMemoryBarrier

__ze_api_export ze_result_t __zecall zetCommandListAppendMetricMemoryBarrier(zet_command_list_handle_t hCommandList)

Appends metric query commands to flush all caches.

Parameters
  • hCommandList: handle of the command list

  • The application may not call this function from simultaneous threads with the same command list handle.

Return

zetMetricQueryGetData

__ze_api_export ze_result_t __zecall zetMetricQueryGetData(zet_metric_query_handle_t hMetricQuery, size_t *pRawDataSize, uint8_t *pRawData)

Retrieves raw data for a given metric query.

Parameters
  • hMetricQuery: handle of the metric query

  • pRawDataSize: pointer to size in bytes of raw data requested to read. if size is zero, then the driver will update the value with the total size in bytes needed for all reports available. if size is non-zero, then driver will only retrieve the number of reports that fit into the buffer. if size is larger than size needed for all reports, then driver will update the value with the actual size needed.

  • pRawData: [optional][range(0, *pRawDataSize)] buffer containing query reports in raw format

  • The application may call this function from simultaneous threads.

Return

Metric Enums

zet_metric_group_sampling_type_t

enum zet_metric_group_sampling_type_t

Metric group sampling type.

Values:

ZET_METRIC_GROUP_SAMPLING_TYPE_EVENT_BASED = ZE_BIT(0)

Event based sampling.

ZET_METRIC_GROUP_SAMPLING_TYPE_TIME_BASED = ZE_BIT(1)

Time based sampling.

zet_metric_group_properties_version_t

enum zet_metric_group_properties_version_t

API version of zet_metric_group_properties_t.

Values:

ZET_METRIC_GROUP_PROPERTIES_VERSION_CURRENT = ZE_MAKE_VERSION(0, )

version 0.91

zet_metric_type_t

enum zet_metric_type_t

Metric types.

Values:

ZET_METRIC_TYPE_DURATION

Metric type: duration.

ZET_METRIC_TYPE_EVENT

Metric type: event.

ZET_METRIC_TYPE_EVENT_WITH_RANGE

Metric type: event with range.

ZET_METRIC_TYPE_THROUGHPUT

Metric type: throughput.

ZET_METRIC_TYPE_TIMESTAMP

Metric type: timestamp.

ZET_METRIC_TYPE_FLAG

Metric type: flag.

ZET_METRIC_TYPE_RATIO

Metric type: ratio.

ZET_METRIC_TYPE_RAW

Metric type: raw.

zet_value_type_t

enum zet_value_type_t

Supported value types.

Values:

ZET_VALUE_TYPE_UINT32

32-bit unsigned-integer

ZET_VALUE_TYPE_UINT64

64-bit unsigned-integer

ZET_VALUE_TYPE_FLOAT32

32-bit floating-point

ZET_VALUE_TYPE_FLOAT64

64-bit floating-point

ZET_VALUE_TYPE_BOOL8

8-bit boolean

zet_metric_properties_version_t

enum zet_metric_properties_version_t

API version of zet_metric_properties_t.

Values:

ZET_METRIC_PROPERTIES_VERSION_CURRENT = ZE_MAKE_VERSION(0, )

version 0.91

zet_metric_tracer_desc_version_t

enum zet_metric_tracer_desc_version_t

API version of zet_metric_tracer_desc_t.

Values:

ZET_METRIC_TRACER_DESC_VERSION_CURRENT = ZE_MAKE_VERSION(0, )

version 0.91

zet_metric_query_pool_desc_version_t

enum zet_metric_query_pool_desc_version_t

API version of zet_metric_query_pool_desc_t.

Values:

ZET_METRIC_QUERY_POOL_DESC_VERSION_CURRENT = ZE_MAKE_VERSION(0, )

version 0.91

zet_metric_query_pool_flag_t

enum zet_metric_query_pool_flag_t

Metric query pool types.

Values:

ZET_METRIC_QUERY_POOL_FLAG_PERFORMANCE

Performance metric query pool.

ZET_METRIC_QUERY_POOL_FLAG_SKIP_EXECUTION

Skips workload execution between begin/end calls.

Metric Structures

zet_metric_group_properties_t

struct zet_metric_group_properties_t

Metric group properties queried using zetMetricGroupGetProperties.

Public Members

zet_metric_group_properties_version_t version

[in] ZET_METRIC_GROUP_PROPERTIES_VERSION_CURRENT

char name[ZET_MAX_METRIC_GROUP_NAME]

[out] metric group name

char description[ZET_MAX_METRIC_GROUP_DESCRIPTION]

[out] metric group description

zet_metric_group_sampling_type_t samplingType

[out] metric group sampling type

uint32_t domain

[out] metric group domain number. Cannot use simultaneous metric groups from different domains.

uint32_t maxCommandQueueOrdinal

[out] tracers and queries of this metric group cannot be submitted to a command queue with a larger ordinal value. See ze_command_queue_desc_t for more information on how to specify the command queue’s ordinal.

uint32_t metricCount

[out] metric count belonging to this group

zet_value_t

union zet_value_t
#include <zet_metric.h>

Union of values.

Public Members

uint32_t ui32

[out] 32-bit unsigned-integer

uint64_t ui64

[out] 32-bit unsigned-integer

float fp32

[out] 32-bit floating-point

double fp64

[out] 64-bit floating-point

ze_bool_t b8

[out] 8-bit boolean

zet_typed_value_t

struct zet_typed_value_t

Typed value.

Public Members

zet_value_type_t type

[out] type of value

zet_value_t value

[out] value

zet_metric_properties_t

struct zet_metric_properties_t

Metric properties queried using zetMetricGetProperties.

Public Members

zet_metric_properties_version_t version

[in] ZET_METRIC_PROPERTIES_VERSION_CURRENT

char name[ZET_MAX_METRIC_NAME]

[out] metric name

char description[ZET_MAX_METRIC_DESCRIPTION]

[out] metric description

char component[ZET_MAX_METRIC_COMPONENT]

[out] metric component

uint32_t tierNumber

[out] number of tier

zet_metric_type_t metricType

[out] metric type

zet_value_type_t resultType

[out] metric result type

char resultUnits[ZET_MAX_METRIC_RESULT_UNITS]

[out] metric result units

zet_metric_tracer_desc_t

struct zet_metric_tracer_desc_t

Metric tracer descriptor.

Public Members

zet_metric_tracer_desc_version_t version

[in] ZET_METRIC_TRACER_DESC_VERSION_CURRENT

uint32_t notifyEveryNReports

[in,out] number of collected reports after which notification event will be signalled

uint32_t samplingPeriod

[in,out] tracer sampling period in nanoseconds

zet_metric_query_pool_desc_t

struct zet_metric_query_pool_desc_t

Metric query pool description.

Public Members

zet_metric_query_pool_desc_version_t version

[in] ZET_METRIC_QUERY_POOL_DESC_VERSION_CURRENT

zet_metric_query_pool_flag_t flags

[in] Query pool type.

uint32_t count

[in] Internal slots count within query pool object.

Module

Module Functions

zetModuleGetDebugInfo

__ze_api_export ze_result_t __zecall zetModuleGetDebugInfo(zet_module_handle_t hModule, zet_module_debug_info_format_t format, size_t *pSize, uint8_t *pDebugInfo)

Retrieve debug info from module.

Parameters
  • hModule: handle of the module

  • format: debug info format requested

  • pSize: size of debug info in bytes

  • pDebugInfo: [optional] byte pointer to debug info

  • The caller can pass nullptr for pDebugInfo when querying only for size.

  • The implementation will copy the native binary into a buffer supplied by the caller.

  • The application may call this function from simultaneous threads.

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

Return

Module Enums

zet_module_debug_info_format_t

enum zet_module_debug_info_format_t

Supported module debug info formats.

Values:

ZET_MODULE_DEBUG_INFO_FORMAT_ELF_DWARF

Format is ELF/DWARF.

Pin

Pin Functions

zetKernelGetProfileInfo

__ze_api_export ze_result_t __zecall zetKernelGetProfileInfo(zet_kernel_handle_t hKernel, zet_profile_info_t *pInfo)

Retrieve profiling information generated for the kernel.

Parameters
  • hKernel: handle to kernel

  • pInfo: pointer to profile info

  • Module must be created using the following build option:

    • ”-zet-profile-flags <n>” - enable generation of profile information

    • ”<n>” must be a combination of zet_profile_flag_t, in hex

  • The application may call this function from simultaneous threads.

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

Return

Pin Enums

zet_profile_info_version_t

enum zet_profile_info_version_t

API version of zet_profile_info_t.

Values:

ZET_PROFILE_INFO_VERSION_CURRENT = ZE_MAKE_VERSION(0, )

version 0.91

zet_profile_flag_t

enum zet_profile_flag_t

Supportted profile features.

Values:

ZET_PROFILE_FLAG_REGISTER_REALLOCATION = ZE_BIT(0)

possible to allow for instrumentation

request the compiler attempt to minimize register usage as much as

ZET_PROFILE_FLAG_FREE_REGISTER_INFO = ZE_BIT(1)

request the compiler generate free register info

zet_profile_token_type_t

enum zet_profile_token_type_t

Supported profile token types.

Values:

ZET_PROFILE_TOKEN_TYPE_FREE_REGISTER

GRF info.

Pin Structures

zet_profile_info_t

struct zet_profile_info_t

Profiling meta-data for instrumentation.

Public Members

zet_profile_info_version_t version

[in] ZET_PROFILE_INFO_VERSION_CURRENT

zet_profile_flag_t flags

[out] indicates which flags were enabled during compilation

uint32_t numTokens

[out] number of tokens immediately following this structure

zet_profile_free_register_token_t

struct zet_profile_free_register_token_t

Profile free register token detailing unused registers in the current function.

Public Members

zet_profile_token_type_t type

[out] type of token

uint32_t size

[out] total size of the token, in bytes

uint32_t count

[out] number of register sequences immediately following this structure

zet_profile_register_sequence_t

struct zet_profile_register_sequence_t

Profile register sequence detailing consecutive bytes, all of which are unused.

Public Members

uint32_t start

[out] starting byte in the register table, representing the start of unused bytes in the current function

uint32_t count

[out] number of consecutive bytes in the sequence, starting from start

Sysman

Sysman Functions

zetSysmanGet

__ze_api_export ze_result_t __zecall zetSysmanGet(zet_device_handle_t hDevice, zet_sysman_version_t version, zet_sysman_handle_t *phSysman)

Get the handle to access Sysman features for a device.

Parameters
  • hDevice: Handle of the device

  • version: Sysman version that application was built with

  • phSysman: Handle for accessing Sysman features

  • The returned handle is unique.

  • zet_device_handle_t returned by zeDeviceGetSubDevices() are not support. Only use handles returned by zeDeviceGet(). All resources on sub-devices can be enumerated through the primary device.

Return

zetSysmanDeviceGetProperties

__ze_api_export ze_result_t __zecall zetSysmanDeviceGetProperties(zet_sysman_handle_t hSysman, zet_sysman_properties_t *pProperties)

Get properties about the device.

Parameters
  • hSysman: Sysman handle of the device.

  • pProperties: Structure that will contain information about the device.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanSchedulerGetSupportedModes

__ze_api_export ze_result_t __zecall zetSysmanSchedulerGetSupportedModes(zet_sysman_handle_t hSysman, uint32_t *pCount, zet_sched_mode_t *pModes)

Get a list of supported scheduler modes.

Parameters
  • hSysman: Sysman handle of the device.

  • pCount: pointer to the number of scheduler modes. if count is zero, then the driver will update the value with the total number of supported modes. if count is non-zero, then driver will only retrieve that number of supported scheduler modes. if count is larger than the number of supported scheduler modes, then the driver will update the value with the correct number of supported scheduler modes that are returned.

  • pModes: [optional][range(0, *pCount)] Array of supported scheduler modes

  • If zero modes are returned, control of scheduler modes are not supported.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanSchedulerGetCurrentMode

__ze_api_export ze_result_t __zecall zetSysmanSchedulerGetCurrentMode(zet_sysman_handle_t hSysman, zet_sched_mode_t *pMode)

Get current scheduler mode.

Parameters
  • hSysman: Sysman handle of the device.

  • pMode: Will contain the current scheduler mode.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanSchedulerGetTimeoutModeProperties

__ze_api_export ze_result_t __zecall zetSysmanSchedulerGetTimeoutModeProperties(zet_sysman_handle_t hSysman, ze_bool_t getDefaults, zet_sched_timeout_properties_t *pConfig)

Get scheduler config for mode ZET_SCHED_MODE_TIMEOUT.

Parameters
  • hSysman: Sysman handle of the device.

  • getDefaults: If TRUE, the driver will return the system default properties for this mode, otherwise it will return the current properties.

  • pConfig: Will contain the current parameters for this mode.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanSchedulerGetTimesliceModeProperties

__ze_api_export ze_result_t __zecall zetSysmanSchedulerGetTimesliceModeProperties(zet_sysman_handle_t hSysman, ze_bool_t getDefaults, zet_sched_timeslice_properties_t *pConfig)

Get scheduler config for mode ZET_SCHED_MODE_TIMESLICE.

Parameters
  • hSysman: Sysman handle of the device.

  • getDefaults: If TRUE, the driver will return the system default properties for this mode, otherwise it will return the current properties.

  • pConfig: Will contain the current parameters for this mode.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanSchedulerSetTimeoutMode

__ze_api_export ze_result_t __zecall zetSysmanSchedulerSetTimeoutMode(zet_sysman_handle_t hSysman, zet_sched_timeout_properties_t *pProperties, ze_bool_t *pNeedReboot)

Change scheduler mode to ZET_SCHED_MODE_TIMEOUT or update scheduler mode parameters if already running in this mode.

Parameters
  • hSysman: Sysman handle of the device.

  • pProperties: The properties to use when configurating this mode.

  • pNeedReboot: Will be set to TRUE if a system reboot is needed to apply the new scheduler mode.

  • This mode is optimized for multiple applications or contexts submitting work to the hardware. When higher priority work arrives, the scheduler attempts to pause the current executing work within some timeout interval, then submits the other work.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanSchedulerSetTimesliceMode

__ze_api_export ze_result_t __zecall zetSysmanSchedulerSetTimesliceMode(zet_sysman_handle_t hSysman, zet_sched_timeslice_properties_t *pProperties, ze_bool_t *pNeedReboot)

Change scheduler mode to ZET_SCHED_MODE_TIMESLICE or update scheduler mode parameters if already running in this mode.

Parameters
  • hSysman: Sysman handle of the device.

  • pProperties: The properties to use when configurating this mode.

  • pNeedReboot: Will be set to TRUE if a system reboot is needed to apply the new scheduler mode.

  • This mode is optimized to provide fair sharing of hardware execution time between multiple contexts submitting work to the hardware concurrently.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanSchedulerSetExclusiveMode

__ze_api_export ze_result_t __zecall zetSysmanSchedulerSetExclusiveMode(zet_sysman_handle_t hSysman, ze_bool_t *pNeedReboot)

Change scheduler mode to ZET_SCHED_MODE_EXCLUSIVE.

Parameters
  • hSysman: Sysman handle of the device.

  • pNeedReboot: Will be set to TRUE if a system reboot is needed to apply the new scheduler mode.

  • This mode is optimized for single application/context use-cases. It permits a context to run indefinitely on the hardware without being preempted or terminated. All pending work for other contexts must wait until the running context completes with no further submitted work.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanSchedulerSetComputeUnitDebugMode

__ze_api_export ze_result_t __zecall zetSysmanSchedulerSetComputeUnitDebugMode(zet_sysman_handle_t hSysman, ze_bool_t *pNeedReboot)

Change scheduler mode to ZET_SCHED_MODE_COMPUTE_UNIT_DEBUG.

Parameters
  • hSysman: Sysman handle of the device.

  • pNeedReboot: Will be set to TRUE if a system reboot is needed to apply the new scheduler mode.

  • This mode is optimized for application debug. It ensures that only one command queue can execute work on the hardware at a given time. Work is permitted to run as long as needed without enforcing any scheduler fairness policies.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanPerformanceProfileGetSupported

__ze_api_export ze_result_t __zecall zetSysmanPerformanceProfileGetSupported(zet_sysman_handle_t hSysman, uint32_t *pCount, zet_perf_profile_t *pProfiles)

Get a list of supported performance profiles that can be loaded for this device.

Parameters
  • hSysman: Sysman handle of the device.

  • pCount: pointer to the number of performance profiles. if count is zero, then the driver will update the value with the total number of supported performance profiles. if count is non-zero, then driver will only retrieve that number of supported performance profiles. if count is larger than the number of supported performance profiles, then the driver will update the value with the correct number of supported performance profiles that are returned.

  • pProfiles: [optional][range(0, *pCount)] Array of supported performance profiles

  • The balanced profile ZET_PERF_PROFILE_BALANCED is always returned in the array.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanPerformanceProfileGet

__ze_api_export ze_result_t __zecall zetSysmanPerformanceProfileGet(zet_sysman_handle_t hSysman, zet_perf_profile_t *pProfile)

Get current pre-configured performance profile being used by the hardware.

Parameters
  • hSysman: Sysman handle of the device.

  • pProfile: The performance profile currently loaded.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanPerformanceProfileSet

__ze_api_export ze_result_t __zecall zetSysmanPerformanceProfileSet(zet_sysman_handle_t hSysman, zet_perf_profile_t profile)

Load a pre-configured performance profile.

Parameters
  • hSysman: Sysman handle of the device.

  • profile: The performance profile to load.

  • Performance profiles are not persistent settings. If the device is reset, the device will default back to the balanced profile ZET_PERF_PROFILE_BALANCED.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanProcessesGetState

__ze_api_export ze_result_t __zecall zetSysmanProcessesGetState(zet_sysman_handle_t hSysman, uint32_t *pCount, zet_process_state_t *pProcesses)

Get information about host processes using the device.

Parameters
  • hSysman: Sysman handle for the device

  • pCount: pointer to the number of processes. if count is zero, then the driver will update the value with the total number of processes currently using the device. if count is non-zero but less than the number of processes, the driver will set to the number of processes currently using the device and return the error ZE_RESULT_ERROR_INVALID_SIZE. if count is larger than the number of processes, then the driver will update the value with the correct number of processes that are returned.

  • pProcesses: [optional][range(0, *pCount)] array of process information, one for each process currently using the device

  • The number of processes connected to the device is dynamic. This means that between a call to determine the correct value of pCount and the subsequent call, the number of processes may have increased. It is recommended that a large array be passed in so as to avoid receiving the error ZE_RESULT_ERROR_INVALID_SIZE.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanDeviceReset

__ze_api_export ze_result_t __zecall zetSysmanDeviceReset(zet_sysman_handle_t hSysman)

Reset device.

Parameters
  • hSysman: Sysman handle for the device

Return

zetSysmanDeviceGetRepairStatus

__ze_api_export ze_result_t __zecall zetSysmanDeviceGetRepairStatus(zet_sysman_handle_t hSysman, zet_repair_status_t *pRepairStatus)

Find out if the device has been repaired (either by the manufacturer or by running diagnostics)

Parameters
  • hSysman: Sysman handle for the device

  • pRepairStatus: Will indicate if the device was repaired

Return

zetSysmanPciGetProperties

__ze_api_export ze_result_t __zecall zetSysmanPciGetProperties(zet_sysman_handle_t hSysman, zet_pci_properties_t *pProperties)

Get PCI properties - address, max speed.

Parameters
  • hSysman: Sysman handle of the device.

  • pProperties: Will contain the PCI properties.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanPciGetState

__ze_api_export ze_result_t __zecall zetSysmanPciGetState(zet_sysman_handle_t hSysman, zet_pci_state_t *pState)

Get current PCI state - current speed.

Parameters
  • hSysman: Sysman handle of the device.

  • pState: Will contain the PCI properties.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanPciGetBars

__ze_api_export ze_result_t __zecall zetSysmanPciGetBars(zet_sysman_handle_t hSysman, uint32_t *pCount, zet_pci_bar_properties_t *pProperties)

Get information about each configured bar.

Parameters
  • hSysman: Sysman handle of the device.

  • pCount: pointer to the number of PCI bars. if count is zero, then the driver will update the value with the total number of bars. if count is non-zero, then driver will only retrieve that number of bars. if count is larger than the number of bar, then the driver will update the value with the correct number of bars that are returned.

  • pProperties: [optional][range(0, *pCount)] array of bar properties

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanPciGetStats

__ze_api_export ze_result_t __zecall zetSysmanPciGetStats(zet_sysman_handle_t hSysman, zet_pci_stats_t *pStats)

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

Parameters
  • hSysman: Sysman handle of the device.

  • pStats: Will contain a snapshot of the latest stats.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanPowerGet

__ze_api_export ze_result_t __zecall zetSysmanPowerGet(zet_sysman_handle_t hSysman, uint32_t *pCount, zet_sysman_pwr_handle_t *phPower)

Get handle of power domains.

Parameters
  • hSysman: Sysman handle of the device.

  • pCount: pointer to the number of components of this type. if count is zero, then the driver will update the value with the total number of components of this type. if count is non-zero, then driver will only retrieve that number of components. if count is larger than the number of components available, then the driver will update the value with the correct number of components that are returned.

  • phPower: [optional][range(0, *pCount)] array of handle of components of this type

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanPowerGetProperties

__ze_api_export ze_result_t __zecall zetSysmanPowerGetProperties(zet_sysman_pwr_handle_t hPower, zet_power_properties_t *pProperties)

Get properties related to a power domain.

Parameters
  • hPower: Handle for the component.

  • pProperties: Structure that will contain property data.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanPowerGetEnergyCounter

__ze_api_export ze_result_t __zecall zetSysmanPowerGetEnergyCounter(zet_sysman_pwr_handle_t hPower, zet_power_energy_counter_t *pEnergy)

Get energy counter.

Parameters
  • hPower: Handle for the component.

  • pEnergy: Will contain the latest snapshot of the energy counter and timestamp when the last counter value was measured.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanPowerGetLimits

__ze_api_export ze_result_t __zecall zetSysmanPowerGetLimits(zet_sysman_pwr_handle_t hPower, zet_power_sustained_limit_t *pSustained, zet_power_burst_limit_t *pBurst, zet_power_peak_limit_t *pPeak)

Get power limits.

Parameters
  • hPower: Handle for the component.

  • pSustained: [optional] The sustained power limit.

  • pBurst: [optional] The burst power limit.

  • pPeak: [optional] The peak power limit.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanPowerSetLimits

__ze_api_export ze_result_t __zecall zetSysmanPowerSetLimits(zet_sysman_pwr_handle_t hPower, const zet_power_sustained_limit_t *pSustained, const zet_power_burst_limit_t *pBurst, const zet_power_peak_limit_t *pPeak)

Set power limits.

Parameters
  • hPower: Handle for the component.

  • pSustained: [optional] The sustained power limit.

  • pBurst: [optional] The burst power limit.

  • pPeak: [optional] The peak power limit.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanPowerGetEnergyThreshold

__ze_api_export ze_result_t __zecall zetSysmanPowerGetEnergyThreshold(zet_sysman_pwr_handle_t hPower, zet_energy_threshold_t *pThreshold)

Get energy threshold.

Parameters
  • hPower: Handle for the component.

  • pThreshold: Returns information about the energy threshold setting - enabled/energy threshold/process ID.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanPowerSetEnergyThreshold

__ze_api_export ze_result_t __zecall zetSysmanPowerSetEnergyThreshold(zet_sysman_pwr_handle_t hPower, double threshold)

Set energy threshold.

Parameters
  • hPower: Handle for the component.

  • threshold: The energy threshold to be set in joules.

  • An event ZET_SYSMAN_EVENT_TYPE_ENERGY_THRESHOLD_CROSSED will be generated when the delta energy consumed starting from this call exceeds the specified threshold. Use the function zetSysmanEventSetConfig() to start receiving the event.

  • Only one running process can control the energy threshold at a given time. If another process attempts to change the energy threshold, the error ZE_RESULT_ERROR_NOT_AVAILABLE will be returned. The function zetSysmanPowerGetEnergyThreshold() to determine the process ID currently controlling this setting.

  • Calling this function will remove any pending energy thresholds and start counting from the time of this call.

  • Once the energy threshold has been reached and the event generated, the threshold is automatically removed. It is up to the application to request a new threshold.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanFrequencyGet

__ze_api_export ze_result_t __zecall zetSysmanFrequencyGet(zet_sysman_handle_t hSysman, uint32_t *pCount, zet_sysman_freq_handle_t *phFrequency)

Get handle of frequency domains.

Parameters
  • hSysman: Sysman handle of the device.

  • pCount: pointer to the number of components of this type. if count is zero, then the driver will update the value with the total number of components of this type. if count is non-zero, then driver will only retrieve that number of components. if count is larger than the number of components available, then the driver will update the value with the correct number of components that are returned.

  • phFrequency: [optional][range(0, *pCount)] array of handle of components of this type

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanFrequencyGetProperties

__ze_api_export ze_result_t __zecall zetSysmanFrequencyGetProperties(zet_sysman_freq_handle_t hFrequency, zet_freq_properties_t *pProperties)

Get frequency properties - available frequencies.

Parameters
  • hFrequency: Handle for the component.

  • pProperties: The frequency properties for the specified domain.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanFrequencyGetAvailableClocks

__ze_api_export ze_result_t __zecall zetSysmanFrequencyGetAvailableClocks(zet_sysman_freq_handle_t hFrequency, uint32_t *pCount, double *phFrequency)

Get available non-overclocked hardware clock frequencies for the frequency domain.

Parameters
  • hFrequency: Sysman handle of the device.

  • pCount: pointer to the number of frequencies. If count is zero, then the driver will update the value with the total number of frequencies available. If count is non-zero, then driver will only retrieve that number of frequencies. If count is larger than the number of frequencies available, then the driver will update the value with the correct number of frequencies available.

  • phFrequency: [optional][range(0, *pCount)] array of frequencies in units of MHz and sorted from slowest to fastest

  • The list of available frequencies is returned in order of slowest to fastest.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanFrequencyGetRange

__ze_api_export ze_result_t __zecall zetSysmanFrequencyGetRange(zet_sysman_freq_handle_t hFrequency, zet_freq_range_t *pLimits)

Get current frequency limits.

Parameters
  • hFrequency: Handle for the component.

  • pLimits: The range between which the hardware can operate for the specified domain.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanFrequencySetRange

__ze_api_export ze_result_t __zecall zetSysmanFrequencySetRange(zet_sysman_freq_handle_t hFrequency, const zet_freq_range_t *pLimits)

Set frequency range between which the hardware can operate.

Parameters
  • hFrequency: Handle for the component.

  • pLimits: The limits between which the hardware can operate for the specified domain.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanFrequencyGetState

__ze_api_export ze_result_t __zecall zetSysmanFrequencyGetState(zet_sysman_freq_handle_t hFrequency, zet_freq_state_t *pState)

Get current frequency state - frequency request, actual frequency, TDP limits.

Parameters
  • hFrequency: Handle for the component.

  • pState: Frequency state for the specified domain.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanFrequencyGetThrottleTime

__ze_api_export ze_result_t __zecall zetSysmanFrequencyGetThrottleTime(zet_sysman_freq_handle_t hFrequency, zet_freq_throttle_time_t *pThrottleTime)

Get frequency throttle time.

Parameters
  • hFrequency: Handle for the component.

  • pThrottleTime: Will contain a snapshot of the throttle time counters for the specified domain.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanFrequencyOcGetCapabilities

__ze_api_export ze_result_t __zecall zetSysmanFrequencyOcGetCapabilities(zet_sysman_freq_handle_t hFrequency, zet_oc_capabilities_t *pOcCapabilities)

Get the overclocking capabilities.

Parameters
  • hFrequency: Handle for the component.

  • pOcCapabilities: Pointer to the capabilities structure zet_oc_capabilities_t.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanFrequencyOcGetConfig

__ze_api_export ze_result_t __zecall zetSysmanFrequencyOcGetConfig(zet_sysman_freq_handle_t hFrequency, zet_oc_config_t *pOcConfiguration)

Get the current overclocking configuration.

Parameters
  • hFrequency: Handle for the component.

  • pOcConfiguration: Pointer to the configuration structure zet_oc_config_t.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanFrequencyOcSetConfig

__ze_api_export ze_result_t __zecall zetSysmanFrequencyOcSetConfig(zet_sysman_freq_handle_t hFrequency, zet_oc_config_t *pOcConfiguration, ze_bool_t *pDeviceRestart)

Change the overclocking configuration.

Parameters
  • hFrequency: Handle for the component.

  • pOcConfiguration: Pointer to the configuration structure zet_oc_config_t.

  • pDeviceRestart: This will be set to true if the device needs to be restarted in order to enable the new overclock settings.

Return

zetSysmanFrequencyOcGetIccMax

__ze_api_export ze_result_t __zecall zetSysmanFrequencyOcGetIccMax(zet_sysman_freq_handle_t hFrequency, double *pOcIccMax)

Get the maximum current limit setting.

Parameters
  • hFrequency: Handle for the component.

  • pOcIccMax: Will contain the maximum current limit in Amperes on successful return.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanFrequencyOcSetIccMax

__ze_api_export ze_result_t __zecall zetSysmanFrequencyOcSetIccMax(zet_sysman_freq_handle_t hFrequency, double ocIccMax)

Change the maximum current limit setting.

Parameters
  • hFrequency: Handle for the component.

  • ocIccMax: The new maximum current limit in Amperes.

  • Setting ocIccMax to 0.0 will return the value to the factory default.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanFrequencyOcGetTjMax

__ze_api_export ze_result_t __zecall zetSysmanFrequencyOcGetTjMax(zet_sysman_freq_handle_t hFrequency, double *pOcTjMax)

Get the maximum temperature limit setting.

Parameters
  • hFrequency: Handle for the component.

  • pOcTjMax: Will contain the maximum temperature limit in degrees Celsius on successful return.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanFrequencyOcSetTjMax

__ze_api_export ze_result_t __zecall zetSysmanFrequencyOcSetTjMax(zet_sysman_freq_handle_t hFrequency, double ocTjMax)

Change the maximum temperature limit setting.

Parameters
  • hFrequency: Handle for the component.

  • ocTjMax: The new maximum temperature limit in degrees Celsius.

  • Setting ocTjMax to 0.0 will return the value to the factory default.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanEngineGet

__ze_api_export ze_result_t __zecall zetSysmanEngineGet(zet_sysman_handle_t hSysman, uint32_t *pCount, zet_sysman_engine_handle_t *phEngine)

Get handle of engine groups.

Parameters
  • hSysman: Sysman handle of the device.

  • pCount: pointer to the number of components of this type. if count is zero, then the driver will update the value with the total number of components of this type. if count is non-zero, then driver will only retrieve that number of components. if count is larger than the number of components available, then the driver will update the value with the correct number of components that are returned.

  • phEngine: [optional][range(0, *pCount)] array of handle of components of this type

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanEngineGetProperties

__ze_api_export ze_result_t __zecall zetSysmanEngineGetProperties(zet_sysman_engine_handle_t hEngine, zet_engine_properties_t *pProperties)

Get engine group properties.

Parameters
  • hEngine: Handle for the component.

  • pProperties: The properties for the specified engine group.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanEngineGetActivity

__ze_api_export ze_result_t __zecall zetSysmanEngineGetActivity(zet_sysman_engine_handle_t hEngine, zet_engine_stats_t *pStats)

Get the activity stats for an engine group.

Parameters
  • hEngine: Handle for the component.

  • pStats: Will contain a snapshot of the engine group activity counters.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanStandbyGet

__ze_api_export ze_result_t __zecall zetSysmanStandbyGet(zet_sysman_handle_t hSysman, uint32_t *pCount, zet_sysman_standby_handle_t *phStandby)

Get handle of standby controls.

Parameters
  • hSysman: Sysman handle of the device.

  • pCount: pointer to the number of components of this type. if count is zero, then the driver will update the value with the total number of components of this type. if count is non-zero, then driver will only retrieve that number of components. if count is larger than the number of components available, then the driver will update the value with the correct number of components that are returned.

  • phStandby: [optional][range(0, *pCount)] array of handle of components of this type

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanStandbyGetProperties

__ze_api_export ze_result_t __zecall zetSysmanStandbyGetProperties(zet_sysman_standby_handle_t hStandby, zet_standby_properties_t *pProperties)

Get standby hardware component properties.

Parameters
  • hStandby: Handle for the component.

  • pProperties: Will contain the standby hardware properties.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanStandbyGetMode

__ze_api_export ze_result_t __zecall zetSysmanStandbyGetMode(zet_sysman_standby_handle_t hStandby, zet_standby_promo_mode_t *pMode)

Get the current standby promotion mode.

Parameters
  • hStandby: Handle for the component.

  • pMode: Will contain the current standby mode.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanStandbySetMode

__ze_api_export ze_result_t __zecall zetSysmanStandbySetMode(zet_sysman_standby_handle_t hStandby, zet_standby_promo_mode_t mode)

Set standby promotion mode.

Parameters
  • hStandby: Handle for the component.

  • mode: New standby mode.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanFirmwareGet

__ze_api_export ze_result_t __zecall zetSysmanFirmwareGet(zet_sysman_handle_t hSysman, uint32_t *pCount, zet_sysman_firmware_handle_t *phFirmware)

Get handle of firmwares.

Parameters
  • hSysman: Sysman handle of the device.

  • pCount: pointer to the number of components of this type. if count is zero, then the driver will update the value with the total number of components of this type. if count is non-zero, then driver will only retrieve that number of components. if count is larger than the number of components available, then the driver will update the value with the correct number of components that are returned.

  • phFirmware: [optional][range(0, *pCount)] array of handle of components of this type

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanFirmwareGetProperties

__ze_api_export ze_result_t __zecall zetSysmanFirmwareGetProperties(zet_sysman_firmware_handle_t hFirmware, zet_firmware_properties_t *pProperties)

Get firmware properties.

Parameters
  • hFirmware: Handle for the component.

  • pProperties: Pointer to an array that will hold the properties of the firmware

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanFirmwareGetChecksum

__ze_api_export ze_result_t __zecall zetSysmanFirmwareGetChecksum(zet_sysman_firmware_handle_t hFirmware, uint32_t *pChecksum)

Get firmware checksum.

Parameters
  • hFirmware: Handle for the component.

  • pChecksum: Calculated checksum of the installed firmware.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanFirmwareFlash

__ze_api_export ze_result_t __zecall zetSysmanFirmwareFlash(zet_sysman_firmware_handle_t hFirmware, void *pImage, uint32_t size)

Flash a new firmware image.

Parameters
  • hFirmware: Handle for the component.

  • pImage: Image of the new firmware to flash.

  • size: Size of the flash image.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanMemoryGet

__ze_api_export ze_result_t __zecall zetSysmanMemoryGet(zet_sysman_handle_t hSysman, uint32_t *pCount, zet_sysman_mem_handle_t *phMemory)

Get handle of memory modules.

Parameters
  • hSysman: Sysman handle of the device.

  • pCount: pointer to the number of components of this type. if count is zero, then the driver will update the value with the total number of components of this type. if count is non-zero, then driver will only retrieve that number of components. if count is larger than the number of components available, then the driver will update the value with the correct number of components that are returned.

  • phMemory: [optional][range(0, *pCount)] array of handle of components of this type

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanMemoryGetProperties

__ze_api_export ze_result_t __zecall zetSysmanMemoryGetProperties(zet_sysman_mem_handle_t hMemory, zet_mem_properties_t *pProperties)

Get memory properties.

Parameters
  • hMemory: Handle for the component.

  • pProperties: Will contain memory properties.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanMemoryGetState

__ze_api_export ze_result_t __zecall zetSysmanMemoryGetState(zet_sysman_mem_handle_t hMemory, zet_mem_state_t *pState)

Get memory state - health, allocated.

Parameters
  • hMemory: Handle for the component.

  • pState: Will contain the current health and allocated memory.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanMemoryGetBandwidth

__ze_api_export ze_result_t __zecall zetSysmanMemoryGetBandwidth(zet_sysman_mem_handle_t hMemory, zet_mem_bandwidth_t *pBandwidth)

Get memory bandwidth.

Parameters
  • hMemory: Handle for the component.

  • pBandwidth: Will contain a snapshot of the bandwidth counters.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanFabricPortGet

__ze_api_export ze_result_t __zecall zetSysmanFabricPortGet(zet_sysman_handle_t hSysman, uint32_t *pCount, zet_sysman_fabric_port_handle_t *phPort)

Get handle of Fabric ports in a device.

Parameters
  • hSysman: Sysman handle of the device.

  • pCount: pointer to the number of components of this type. if count is zero, then the driver will update the value with the total number of components of this type. if count is non-zero, then driver will only retrieve that number of components. if count is larger than the number of components available, then the driver will update the value with the correct number of components that are returned.

  • phPort: [optional][range(0, *pCount)] array of handle of components of this type

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanFabricPortGetProperties

__ze_api_export ze_result_t __zecall zetSysmanFabricPortGetProperties(zet_sysman_fabric_port_handle_t hPort, zet_fabric_port_properties_t *pProperties)

Get Fabric port properties.

Parameters
  • hPort: Handle for the component.

  • pProperties: Will contain properties of the Fabric Port.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanFabricPortGetLinkType

Get Fabric port link type.

Parameters
  • hPort: Handle for the component.

  • verbose: Set to true to get a more detailed report.

  • pLinkType: Will contain details about the link attached to the Fabric port.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanFabricPortGetConfig

__ze_api_export ze_result_t __zecall zetSysmanFabricPortGetConfig(zet_sysman_fabric_port_handle_t hPort, zet_fabric_port_config_t *pConfig)

Get Fabric port configuration.

Parameters
  • hPort: Handle for the component.

  • pConfig: Will contain configuration of the Fabric Port.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanFabricPortSetConfig

__ze_api_export ze_result_t __zecall zetSysmanFabricPortSetConfig(zet_sysman_fabric_port_handle_t hPort, const zet_fabric_port_config_t *pConfig)

Set Fabric port configuration.

Parameters
  • hPort: Handle for the component.

  • pConfig: Contains new configuration of the Fabric Port.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanFabricPortGetState

__ze_api_export ze_result_t __zecall zetSysmanFabricPortGetState(zet_sysman_fabric_port_handle_t hPort, zet_fabric_port_state_t *pState)

Get Fabric port state - status (green/yellow/red/black), reasons for link degradation or instability, current rx/tx speed.

Parameters
  • hPort: Handle for the component.

  • pState: Will contain the current state of the Fabric Port

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanFabricPortGetThroughput

__ze_api_export ze_result_t __zecall zetSysmanFabricPortGetThroughput(zet_sysman_fabric_port_handle_t hPort, zet_fabric_port_throughput_t *pThroughput)

Get Fabric port throughput.

Parameters
  • hPort: Handle for the component.

  • pThroughput: Will contain the Fabric port throughput counters and maximum bandwidth.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanTemperatureGet

__ze_api_export ze_result_t __zecall zetSysmanTemperatureGet(zet_sysman_handle_t hSysman, uint32_t *pCount, zet_sysman_temp_handle_t *phTemperature)

Get handle of temperature sensors.

Parameters
  • hSysman: Sysman handle of the device.

  • pCount: pointer to the number of components of this type. if count is zero, then the driver will update the value with the total number of components of this type. if count is non-zero, then driver will only retrieve that number of components. if count is larger than the number of components available, then the driver will update the value with the correct number of components that are returned.

  • phTemperature: [optional][range(0, *pCount)] array of handle of components of this type

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanTemperatureGetProperties

__ze_api_export ze_result_t __zecall zetSysmanTemperatureGetProperties(zet_sysman_temp_handle_t hTemperature, zet_temp_properties_t *pProperties)

Get temperature sensor properties.

Parameters
  • hTemperature: Handle for the component.

  • pProperties: Will contain the temperature sensor properties.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanTemperatureGetConfig

__ze_api_export ze_result_t __zecall zetSysmanTemperatureGetConfig(zet_sysman_temp_handle_t hTemperature, zet_temp_config_t *pConfig)

Get temperature configuration for this sensor - which events are triggered and the trigger conditions.

Parameters
  • hTemperature: Handle for the component.

  • pConfig: Returns current configuration.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanTemperatureSetConfig

__ze_api_export ze_result_t __zecall zetSysmanTemperatureSetConfig(zet_sysman_temp_handle_t hTemperature, const zet_temp_config_t *pConfig)

Set temperature configuration for this sensor - indicates which events are triggered and the trigger conditions.

Parameters
  • hTemperature: Handle for the component.

  • pConfig: New configuration.

Return

zetSysmanTemperatureGetState

__ze_api_export ze_result_t __zecall zetSysmanTemperatureGetState(zet_sysman_temp_handle_t hTemperature, double *pTemperature)

Get the temperature from a specified sensor.

Parameters
  • hTemperature: Handle for the component.

  • pTemperature: Will contain the temperature read from the specified sensor in degrees Celcius.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanPsuGet

__ze_api_export ze_result_t __zecall zetSysmanPsuGet(zet_sysman_handle_t hSysman, uint32_t *pCount, zet_sysman_psu_handle_t *phPsu)

Get handle of power supplies.

Parameters
  • hSysman: Sysman handle of the device.

  • pCount: pointer to the number of components of this type. if count is zero, then the driver will update the value with the total number of components of this type. if count is non-zero, then driver will only retrieve that number of components. if count is larger than the number of components available, then the driver will update the value with the correct number of components that are returned.

  • phPsu: [optional][range(0, *pCount)] array of handle of components of this type

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanPsuGetProperties

__ze_api_export ze_result_t __zecall zetSysmanPsuGetProperties(zet_sysman_psu_handle_t hPsu, zet_psu_properties_t *pProperties)

Get power supply properties.

Parameters
  • hPsu: Handle for the component.

  • pProperties: Will contain the properties of the power supply.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanPsuGetState

__ze_api_export ze_result_t __zecall zetSysmanPsuGetState(zet_sysman_psu_handle_t hPsu, zet_psu_state_t *pState)

Get current power supply state.

Parameters
  • hPsu: Handle for the component.

  • pState: Will contain the current state of the power supply.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanFanGet

__ze_api_export ze_result_t __zecall zetSysmanFanGet(zet_sysman_handle_t hSysman, uint32_t *pCount, zet_sysman_fan_handle_t *phFan)

Get handle of fans.

Parameters
  • hSysman: Sysman handle of the device.

  • pCount: pointer to the number of components of this type. if count is zero, then the driver will update the value with the total number of components of this type. if count is non-zero, then driver will only retrieve that number of components. if count is larger than the number of components available, then the driver will update the value with the correct number of components that are returned.

  • phFan: [optional][range(0, *pCount)] array of handle of components of this type

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanFanGetProperties

__ze_api_export ze_result_t __zecall zetSysmanFanGetProperties(zet_sysman_fan_handle_t hFan, zet_fan_properties_t *pProperties)

Get fan properties.

Parameters
  • hFan: Handle for the component.

  • pProperties: Will contain the properties of the fan.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanFanGetConfig

__ze_api_export ze_result_t __zecall zetSysmanFanGetConfig(zet_sysman_fan_handle_t hFan, zet_fan_config_t *pConfig)

Get current fan configuration.

Parameters
  • hFan: Handle for the component.

  • pConfig: Will contain the current configuration of the fan.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanFanSetConfig

__ze_api_export ze_result_t __zecall zetSysmanFanSetConfig(zet_sysman_fan_handle_t hFan, const zet_fan_config_t *pConfig)

Set fan configuration.

Parameters
  • hFan: Handle for the component.

  • pConfig: New fan configuration.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanFanGetState

__ze_api_export ze_result_t __zecall zetSysmanFanGetState(zet_sysman_fan_handle_t hFan, zet_fan_speed_units_t units, uint32_t *pSpeed)

Get current state of a fan - current mode and speed.

Parameters
  • hFan: Handle for the component.

  • units: The units in which the fan speed should be returned.

  • pSpeed: Will contain the current speed of the fan in the units requested.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanLedGet

__ze_api_export ze_result_t __zecall zetSysmanLedGet(zet_sysman_handle_t hSysman, uint32_t *pCount, zet_sysman_led_handle_t *phLed)

Get handle of LEDs.

Parameters
  • hSysman: Sysman handle of the device.

  • pCount: pointer to the number of components of this type. if count is zero, then the driver will update the value with the total number of components of this type. if count is non-zero, then driver will only retrieve that number of components. if count is larger than the number of components available, then the driver will update the value with the correct number of components that are returned.

  • phLed: [optional][range(0, *pCount)] array of handle of components of this type

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanLedGetProperties

__ze_api_export ze_result_t __zecall zetSysmanLedGetProperties(zet_sysman_led_handle_t hLed, zet_led_properties_t *pProperties)

Get LED properties.

Parameters
  • hLed: Handle for the component.

  • pProperties: Will contain the properties of the LED.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanLedGetState

__ze_api_export ze_result_t __zecall zetSysmanLedGetState(zet_sysman_led_handle_t hLed, zet_led_state_t *pState)

Get current state of a LED - on/off, color.

Parameters
  • hLed: Handle for the component.

  • pState: Will contain the current state of the LED.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanLedSetState

__ze_api_export ze_result_t __zecall zetSysmanLedSetState(zet_sysman_led_handle_t hLed, const zet_led_state_t *pState)

Set state of a LED - on/off, color.

Parameters
  • hLed: Handle for the component.

  • pState: New state of the LED.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanRasGet

__ze_api_export ze_result_t __zecall zetSysmanRasGet(zet_sysman_handle_t hSysman, uint32_t *pCount, zet_sysman_ras_handle_t *phRas)

Get handle of all RAS error sets on a device.

Parameters
  • hSysman: Sysman handle of the device.

  • pCount: pointer to the number of components of this type. if count is zero, then the driver will update the value with the total number of components of this type. if count is non-zero, then driver will only retrieve that number of components. if count is larger than the number of components available, then the driver will update the value with the correct number of components that are returned.

  • phRas: [optional][range(0, *pCount)] array of handle of components of this type

  • A RAS error set is a collection of RAS error counters of a given type (correctable/uncorrectable) from hardware blocks contained within a sub-device or within the device.

  • A device without sub-devices will typically return two handles, one for correctable errors sets and one for uncorrectable error sets.

  • A device with sub-devices will return RAS error sets for each sub-device and possibly RAS error sets for hardware blocks outside the sub-devices.

  • If the function completes successfully but pCount is set to 0, RAS features are not available/enabled on this device.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanRasGetProperties

__ze_api_export ze_result_t __zecall zetSysmanRasGetProperties(zet_sysman_ras_handle_t hRas, zet_ras_properties_t *pProperties)

Get RAS properties of a given RAS error set - this enables discovery of the type of RAS error set (correctable/uncorrectable) and if located on a sub-device.

Parameters
  • hRas: Handle for the component.

  • pProperties: Structure describing RAS properties

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanRasGetConfig

__ze_api_export ze_result_t __zecall zetSysmanRasGetConfig(zet_sysman_ras_handle_t hRas, zet_ras_config_t *pConfig)

Get RAS error thresholds that control when RAS events are generated.

Parameters
  • hRas: Handle for the component.

  • pConfig: Will be populed with the current RAS configuration - thresholds used to trigger events

  • The driver maintains counters for all RAS error sets and error categories. Events are generated when errors occur. The configuration enables setting thresholds to limit when events are sent.

  • When a particular RAS correctable error counter exceeds the configured threshold, the event ZET_SYSMAN_EVENT_TYPE_RAS_CORRECTABLE_ERRORS will be triggered.

  • When a particular RAS uncorrectable error counter exceeds the configured threshold, the event ZET_SYSMAN_EVENT_TYPE_RAS_UNCORRECTABLE_ERRORS will be triggered.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanRasSetConfig

__ze_api_export ze_result_t __zecall zetSysmanRasSetConfig(zet_sysman_ras_handle_t hRas, const zet_ras_config_t *pConfig)

Set RAS error thresholds that control when RAS events are generated.

Parameters
  • hRas: Handle for the component.

  • pConfig: Change the RAS configuration - thresholds used to trigger events

  • The driver maintains counters for all RAS error sets and error categories. Events are generated when errors occur. The configuration enables setting thresholds to limit when events are sent.

  • When a particular RAS correctable error counter exceeds the specified threshold, the event ZET_SYSMAN_EVENT_TYPE_RAS_CORRECTABLE_ERRORS will be generated.

  • When a particular RAS uncorrectable error counter exceeds the specified threshold, the event ZET_SYSMAN_EVENT_TYPE_RAS_UNCORRECTABLE_ERRORS will be generated.

  • Call zetSysmanRasGetState() and set the clear flag to true to restart event generation once counters have exceeded thresholds.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanRasGetState

__ze_api_export ze_result_t __zecall zetSysmanRasGetState(zet_sysman_ras_handle_t hRas, ze_bool_t clear, uint64_t *pTotalErrors, zet_ras_details_t *pDetails)

Get the current value of RAS error counters for a particular error set.

Parameters
  • hRas: Handle for the component.

  • clear: Set to 1 to clear the counters of this type

  • pTotalErrors: The number total number of errors that have occurred

  • pDetails: [optional] Breakdown of where errors have occurred

  • Clearing errors will affect other threads/applications - the counter values will start from zero.

  • Clearing errors requires write permissions.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanEventGet

__ze_api_export ze_result_t __zecall zetSysmanEventGet(zet_sysman_handle_t hSysman, zet_sysman_event_handle_t *phEvent)

Get the event handle for the specified device.

Parameters
  • hSysman: Sysman handle for the device

  • phEvent: The event handle for the specified device.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanEventGetConfig

__ze_api_export ze_result_t __zecall zetSysmanEventGetConfig(zet_sysman_event_handle_t hEvent, zet_event_config_t *pConfig)

Find out which events are currently registered on the specified device event handler.

Parameters
  • hEvent: The event handle for the device

  • pConfig: Will contain the current event configuration (list of registered events).

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanEventSetConfig

__ze_api_export ze_result_t __zecall zetSysmanEventSetConfig(zet_sysman_event_handle_t hEvent, const zet_event_config_t *pConfig)

Set a new event configuration (list of registered events) on the specified device event handler.

Parameters
  • hEvent: The event handle for the device

  • pConfig: New event configuration (list of registered events).

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanEventGetState

__ze_api_export ze_result_t __zecall zetSysmanEventGetState(zet_sysman_event_handle_t hEvent, ze_bool_t clear, uint32_t *pEvents)

Get events that have been triggered for a specific device.

Parameters
  • hEvent: The event handle for the device.

  • clear: Indicates if the event list for this device should be cleared.

  • pEvents: Bitfield of events zet_sysman_event_type_t that have been triggered by this device.

  • If events have occurred on the specified device event handle, they are returned and the corresponding event status is cleared if the argument clear = true.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanEventListen

__ze_api_export ze_result_t __zecall zetSysmanEventListen(ze_driver_handle_t hDriver, uint32_t timeout, uint32_t count, zet_sysman_event_handle_t *phEvents, uint32_t *pEvents)

Wait for the specified list of event handles to receive any registered events.

Parameters
  • hDriver: handle of the driver instance

  • timeout: How long to wait in milliseconds for events to arrive. Set to ZET_EVENT_WAIT_NONE will check status and return immediately. Set to ZET_EVENT_WAIT_INFINITE to block until events arrive.

  • count: Number of handles in phEvents

  • phEvents: [range(0, count)] Handle of events that should be listened to

  • pEvents: Bitfield of events zet_sysman_event_type_t that have been triggered by any of the supplied event handles. If timeout is not ZET_EVENT_WAIT_INFINITE and this value is ZET_SYSMAN_EVENT_TYPE_NONE, then a timeout has occurred.

  • If previous events arrived and were not cleared using zetSysmanEventGetState(), this call will return immediately.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanDiagnosticsGet

__ze_api_export ze_result_t __zecall zetSysmanDiagnosticsGet(zet_sysman_handle_t hSysman, uint32_t *pCount, zet_sysman_diag_handle_t *phDiagnostics)

Get handle of diagnostics test suites.

Parameters
  • hSysman: Sysman handle of the device.

  • pCount: pointer to the number of components of this type. if count is zero, then the driver will update the value with the total number of components of this type. if count is non-zero, then driver will only retrieve that number of components. if count is larger than the number of components available, then the driver will update the value with the correct number of components that are returned.

  • phDiagnostics: [optional][range(0, *pCount)] array of handle of components of this type

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanDiagnosticsGetProperties

__ze_api_export ze_result_t __zecall zetSysmanDiagnosticsGetProperties(zet_sysman_diag_handle_t hDiagnostics, zet_diag_properties_t *pProperties)

Get properties of a diagnostics test suite.

Parameters
  • hDiagnostics: Handle for the component.

  • pProperties: Structure describing the properties of a diagnostics test suite

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanDiagnosticsGetTests

__ze_api_export ze_result_t __zecall zetSysmanDiagnosticsGetTests(zet_sysman_diag_handle_t hDiagnostics, uint32_t *pCount, zet_diag_test_t *pTests)

Get individual tests that can be run separately. Not all test suites permit running individual tests - check zet_diag_properties_t.haveTests.

Parameters
  • hDiagnostics: Handle for the component.

  • pCount: pointer to the number of tests. If count is zero, then the driver will update the value with the total number of tests available. If count is non-zero, then driver will only retrieve that number of tests. If count is larger than the number of tests available, then the driver will update the value with the correct number of tests available.

  • pTests: [optional][range(0, *pCount)] Array of tests sorted by increasing value of zet_diag_test_t.index

  • The list of available tests is returned in order of increasing test index zet_diag_test_t.index.

  • The application may call this function from simultaneous threads.

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

Return

zetSysmanDiagnosticsRunTests

__ze_api_export ze_result_t __zecall zetSysmanDiagnosticsRunTests(zet_sysman_diag_handle_t hDiagnostics, uint32_t start, uint32_t end, zet_diag_result_t *pResult)

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

Parameters
  • hDiagnostics: Handle for the component.

  • start: The index of the first test to run. Set to ZET_DIAG_FIRST_TEST_INDEX to start from the beginning.

  • end: The index of the last test to run. Set to ZET_DIAG_LAST_TEST_INDEX to complete all tests after the start test.

  • pResult: The result of the diagnostics

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

  • If the test suite permits running individual tests, zet_diag_properties_t.haveTests will be true. In this case, the function zetSysmanDiagnosticsGetTests() 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.

Return

Sysman Enums

zet_sysman_version_t

enum zet_sysman_version_t

API version of Sysman.

Values:

ZET_SYSMAN_VERSION_CURRENT = ZE_MAKE_VERSION(0, )

version 0.91

zet_engine_type_t

enum zet_engine_type_t

Types of accelerator engines.

Values:

ZET_ENGINE_TYPE_OTHER = 0

Undefined types of accelerators.

ZET_ENGINE_TYPE_COMPUTE

Engines that process compute kernels.

ZET_ENGINE_TYPE_3D

Engines that process 3D content.

ZET_ENGINE_TYPE_MEDIA

Engines that process media workloads.

ZET_ENGINE_TYPE_DMA

Engines that copy blocks of data.

zet_sched_mode_t

enum zet_sched_mode_t

Scheduler mode.

Values:

ZET_SCHED_MODE_TIMEOUT = 0

Multiple applications or contexts are submitting work to the hardware. When higher priority work arrives, the scheduler attempts to pause the current executing work within some timeout interval, then submits the other work.

ZET_SCHED_MODE_TIMESLICE

The scheduler attempts to fairly timeslice hardware execution time between multiple contexts submitting work to the hardware concurrently.

ZET_SCHED_MODE_EXCLUSIVE

Any application or context can run indefinitely on the hardware without being preempted or terminated. All pending work for other contexts must wait until the running context completes with no further submitted work.

ZET_SCHED_MODE_COMPUTE_UNIT_DEBUG

Scheduler ensures that submission of workloads to the hardware is optimized for compute unit debugging.

zet_perf_profile_t

enum zet_perf_profile_t

Workload performance profiles.

Values:

ZET_PERF_PROFILE_BALANCED = 0

The hardware is configured to strike a balance between compute and memory resources. This is the default profile when the device boots/resets.

ZET_PERF_PROFILE_COMPUTE_BOUNDED

The hardware is configured to prioritize performance of the compute units.

ZET_PERF_PROFILE_MEMORY_BOUNDED

The hardware is configured to prioritize memory throughput.

zet_repair_status_t

enum zet_repair_status_t

Device repair status.

Values:

ZET_REPAIR_STATUS_UNSUPPORTED = 0

The device does not support in-field repairs.

ZET_REPAIR_STATUS_NOT_PERFORMED

The device has never been repaired.

ZET_REPAIR_STATUS_PERFORMED

The device has been repaired.

zet_pci_bar_type_t

enum zet_pci_bar_type_t

PCI bar types.

Values:

ZET_PCI_BAR_TYPE_CONFIG = 0

PCI configuration space.

ZET_PCI_BAR_TYPE_MMIO

MMIO registers.

ZET_PCI_BAR_TYPE_VRAM

VRAM aperture.

ZET_PCI_BAR_TYPE_ROM

ROM aperture.

ZET_PCI_BAR_TYPE_VGA_IO

Legacy VGA IO ports.

ZET_PCI_BAR_TYPE_VGA_MEM

Legacy VGA memory.

ZET_PCI_BAR_TYPE_INDIRECT_IO

Indirect IO port access.

ZET_PCI_BAR_TYPE_INDIRECT_MEM

Indirect memory access.

ZET_PCI_BAR_TYPE_OTHER

Other type of PCI bar.

zet_freq_domain_t

enum zet_freq_domain_t

Frequency domains.

Values:

ZET_FREQ_DOMAIN_GPU = 0

GPU Core Domain.

ZET_FREQ_DOMAIN_MEMORY

Local Memory Domain.

zet_freq_throttle_reasons_t

enum zet_freq_throttle_reasons_t

Frequency throttle reasons.

Values:

ZET_FREQ_THROTTLE_REASONS_NONE = 0

frequency not throttled

ZET_FREQ_THROTTLE_REASONS_AVE_PWR_CAP = ZE_BIT(0)

frequency throttled due to average power excursion (PL1)

ZET_FREQ_THROTTLE_REASONS_BURST_PWR_CAP = ZE_BIT(1)

frequency throttled due to burst power excursion (PL2)

ZET_FREQ_THROTTLE_REASONS_CURRENT_LIMIT = ZE_BIT(2)

frequency throttled due to current excursion (PL4)

ZET_FREQ_THROTTLE_REASONS_THERMAL_LIMIT = ZE_BIT(3)

frequency throttled due to thermal excursion (T > TjMax)

ZET_FREQ_THROTTLE_REASONS_PSU_ALERT = ZE_BIT(4)

frequency throttled due to power supply assertion

ZET_FREQ_THROTTLE_REASONS_SW_RANGE = ZE_BIT(5)

frequency throttled due to software supplied frequency range

ZET_FREQ_THROTTLE_REASONS_HW_RANGE = ZE_BIT(6)

range when it receives clocks

frequency throttled due to a sub block that has a lower frequency

zet_oc_mode_t

enum zet_oc_mode_t

Overclocking modes.

Values:

ZET_OC_MODE_OFF = 0

Overclocking if off - hardware is running using factory default voltages/frequencies.

ZET_OC_MODE_OVERRIDE

Overclock override mode - In this mode, a fixed user-supplied voltage is applied independent of the frequency request. The maximum permitted frequency can also be increased.

ZET_OC_MODE_INTERPOLATIVE

Overclock interpolative mode - In this mode, the voltage/frequency curve can be extended with a new voltage/frequency point that will be interpolated. The existing voltage/frequency points can also be offset (up or down) by a fixed voltage.

zet_engine_group_t

enum zet_engine_group_t

Accelerator engine groups.

Values:

ZET_ENGINE_GROUP_ALL = 0

Access information about all engines combined.

ZET_ENGINE_GROUP_COMPUTE_ALL

Access information about all compute engines combined.

ZET_ENGINE_GROUP_MEDIA_ALL

Access information about all media engines combined.

ZET_ENGINE_GROUP_COPY_ALL

Access information about all copy (blitter) engines combined.

zet_standby_type_t

enum zet_standby_type_t

Standby hardware components.

Values:

ZET_STANDBY_TYPE_GLOBAL = 0

Control the overall standby policy of the device/sub-device.

zet_standby_promo_mode_t

enum zet_standby_promo_mode_t

Standby promotion modes.

Values:

ZET_STANDBY_PROMO_MODE_DEFAULT = 0

Best compromise between performance and energy savings.

ZET_STANDBY_PROMO_MODE_NEVER

The device/component will never shutdown. This can improve performance but uses more energy.

zet_mem_type_t

enum zet_mem_type_t

Memory module types.

Values:

ZET_MEM_TYPE_HBM = 0

HBM memory.

ZET_MEM_TYPE_DDR

DDR memory.

ZET_MEM_TYPE_SRAM

SRAM memory.

ZET_MEM_TYPE_L1

L1 cache.

ZET_MEM_TYPE_L3

L3 cache.

ZET_MEM_TYPE_GRF

Execution unit register file.

ZET_MEM_TYPE_SLM

Execution unit shared local memory.

zet_mem_health_t

enum zet_mem_health_t

Memory health.

Values:

ZET_MEM_HEALTH_OK = 0

All memory channels are healthy.

ZET_MEM_HEALTH_DEGRADED

Excessive correctable errors have been detected on one or more channels. Device should be reset.

ZET_MEM_HEALTH_CRITICAL

Operating with reduced memory to cover banks with too many uncorrectable errors.

ZET_MEM_HEALTH_REPLACE

Device should be replaced due to excessive uncorrectable errors.

zet_fabric_port_status_t

enum zet_fabric_port_status_t

Fabric port status.

Values:

ZET_FABRIC_PORT_STATUS_GREEN = 0

The port is up and operating as expected.

ZET_FABRIC_PORT_STATUS_YELLOW

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

ZET_FABRIC_PORT_STATUS_RED

Port connection instabilities are preventing workloads making forward progress

ZET_FABRIC_PORT_STATUS_BLACK

The port is configured down.

zet_fabric_port_qual_issues_t

enum zet_fabric_port_qual_issues_t

Fabric port quality degradation reasons.

Values:

ZET_FABRIC_PORT_QUAL_ISSUES_NONE = 0

There are no quality issues with the link at this time.

ZET_FABRIC_PORT_QUAL_ISSUES_FEC = ZE_BIT(0)

Excessive FEC (forward error correction) are occurring.

ZET_FABRIC_PORT_QUAL_ISSUES_LTP_CRC = ZE_BIT(1)

Excessive LTP CRC failure induced replays are occurring.

ZET_FABRIC_PORT_QUAL_ISSUES_SPEED = ZE_BIT(2)

There is a degradation in the maximum bandwidth of the port.

zet_fabric_port_stab_issues_t

enum zet_fabric_port_stab_issues_t

Fabric port stability issues.

Values:

ZET_FABRIC_PORT_STAB_ISSUES_NONE = 0

There are no connection stability issues at this time.

ZET_FABRIC_PORT_STAB_ISSUES_TOO_MANY_REPLAYS = ZE_BIT(0)

Sequential replay failure is inducing link retraining.

ZET_FABRIC_PORT_STAB_ISSUES_NO_CONNECT = ZE_BIT(1)

A connection was never able to be established through the link.

ZET_FABRIC_PORT_STAB_ISSUES_FLAPPING = ZE_BIT(2)

The port is flapping.

zet_temp_sensors_t

enum zet_temp_sensors_t

Temperature sensors.

Values:

ZET_TEMP_SENSORS_GLOBAL = 0

The maximum temperature across all device sensors.

ZET_TEMP_SENSORS_GPU

The maximum temperature across all sensors in the GPU.

ZET_TEMP_SENSORS_MEMORY

The maximum temperature across all sensors in the local memory.

zet_psu_voltage_status_t

enum zet_psu_voltage_status_t

PSU voltage status.

Values:

ZET_PSU_VOLTAGE_STATUS_NORMAL = 0

No unusual voltages have been detected.

ZET_PSU_VOLTAGE_STATUS_OVER

Over-voltage has occurred.

ZET_PSU_VOLTAGE_STATUS_UNDER

Under-voltage has occurred.

zet_fan_speed_mode_t

enum zet_fan_speed_mode_t

Fan resource speed mode.

Values:

ZET_FAN_SPEED_MODE_DEFAULT = 0

The fan speed is operating using the hardware default settings.

ZET_FAN_SPEED_MODE_FIXED

The fan speed is currently set to a fixed value.

ZET_FAN_SPEED_MODE_TABLE

The fan speed is currently controlled dynamically by hardware based on a temp/speed table

zet_fan_speed_units_t

enum zet_fan_speed_units_t

Fan speed units.

Values:

ZET_FAN_SPEED_UNITS_RPM = 0

The fan speed is in units of revolutions per minute (rpm)

ZET_FAN_SPEED_UNITS_PERCENT

The fan speed is a percentage of the maximum speed of the fan.

zet_ras_error_type_t

enum zet_ras_error_type_t

RAS error type.

Values:

ZET_RAS_ERROR_TYPE_CORRECTABLE = 0

Errors were corrected by hardware.

ZET_RAS_ERROR_TYPE_UNCORRECTABLE

Error were not corrected.

zet_sysman_event_type_t

enum zet_sysman_event_type_t

Event types.

Values:

ZET_SYSMAN_EVENT_TYPE_NONE = 0

Specifies no events.

ZET_SYSMAN_EVENT_TYPE_DEVICE_RESET = ZE_BIT(0)

Event is triggered when the driver is going to reset the device.

ZET_SYSMAN_EVENT_TYPE_DEVICE_SLEEP_STATE_ENTER = ZE_BIT(1)

deep sleep state

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

ZET_SYSMAN_EVENT_TYPE_DEVICE_SLEEP_STATE_EXIT = ZE_BIT(2)

sleep state

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

ZET_SYSMAN_EVENT_TYPE_FREQ_THROTTLED = ZE_BIT(3)

Event is triggered when the frequency starts being throttled.

ZET_SYSMAN_EVENT_TYPE_ENERGY_THRESHOLD_CROSSED = ZE_BIT(4)

(use zetSysmanPowerSetEnergyThreshold() to configure).

Event is triggered when the energy consumption threshold is reached

ZET_SYSMAN_EVENT_TYPE_TEMP_CRITICAL = ZE_BIT(5)

zetSysmanTemperatureSetConfig() to configure - disabled by default).

Event is triggered when the critical temperature is reached (use

ZET_SYSMAN_EVENT_TYPE_TEMP_THRESHOLD1 = ZE_BIT(6)

zetSysmanTemperatureSetConfig() to configure - disabled by default).

Event is triggered when the temperature crosses threshold 1 (use

ZET_SYSMAN_EVENT_TYPE_TEMP_THRESHOLD2 = ZE_BIT(7)

zetSysmanTemperatureSetConfig() to configure - disabled by default).

Event is triggered when the temperature crosses threshold 2 (use

ZET_SYSMAN_EVENT_TYPE_MEM_HEALTH = ZE_BIT(8)

Event is triggered when the health of device memory changes.

ZET_SYSMAN_EVENT_TYPE_FABRIC_PORT_HEALTH = ZE_BIT(9)

Event is triggered when the health of fabric ports change.

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

ZET_SYSMAN_EVENT_TYPE_RAS_CORRECTABLE_ERRORS = ZE_BIT(11)

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

ZET_SYSMAN_EVENT_TYPE_RAS_UNCORRECTABLE_ERRORS = ZE_BIT(12)

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

ZET_SYSMAN_EVENT_TYPE_ALL = 0x0FFF

Specifies all events.

zet_diag_type_t

enum zet_diag_type_t

Diagnostic test suite type.

Values:

ZET_DIAG_TYPE_SCAN = 0

Run SCAN diagnostics.

ZET_DIAG_TYPE_ARRAY

Run Array diagnostics.

zet_diag_result_t

enum zet_diag_result_t

Diagnostic results.

Values:

ZET_DIAG_RESULT_NO_ERRORS = 0

Diagnostic completed without finding errors to repair.

ZET_DIAG_RESULT_ABORT

Diagnostic had problems running tests.

ZET_DIAG_RESULT_FAIL_CANT_REPAIR

Diagnostic had problems setting up repairs.

ZET_DIAG_RESULT_REBOOT_FOR_REPAIR

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

Sysman Structures

zet_sysman_properties_t

struct zet_sysman_properties_t

Device properties.

Public Members

ze_device_properties_t core

[out] Core device properties

uint32_t numSubdevices

[out] Number of sub-devices

int8_t serialNumber[ZET_STRING_PROPERTY_SIZE]

[out] Manufacturing serial number (NULL terminated string value)

int8_t boardNumber[ZET_STRING_PROPERTY_SIZE]

[out] Manufacturing board number (NULL terminated string value)

int8_t brandName[ZET_STRING_PROPERTY_SIZE]

[out] Brand name of the device (NULL terminated string value)

int8_t modelName[ZET_STRING_PROPERTY_SIZE]

[out] Model name of the device (NULL terminated string value)

int8_t vendorName[ZET_STRING_PROPERTY_SIZE]

[out] Vendor name of the device (NULL terminated string value)

int8_t driverVersion[ZET_STRING_PROPERTY_SIZE]

[out] Installed driver version (NULL terminated string value)

zet_sched_timeout_properties_t

struct zet_sched_timeout_properties_t

Configuration for timeout scheduler mode (ZET_SCHED_MODE_TIMEOUT)

Public Members

uint64_t watchdogTimeout

[in,out] The maximum time in microseconds that the scheduler will wait for a batch of work submitted to a hardware engine to complete or to be preempted so as to run another context. If this time is exceeded, the hardware engine is reset and the context terminated. If set to ZET_SCHED_WATCHDOG_DISABLE, a running workload can run as long as it wants without being terminated, but preemption attempts to run other contexts are permitted but not enforced.

zet_sched_timeslice_properties_t

struct zet_sched_timeslice_properties_t

Configuration for timeslice scheduler mode (ZET_SCHED_MODE_TIMESLICE)

Public Members

uint64_t interval

[in,out] The average interval in microseconds that a submission for a context will run on a hardware engine before being preempted out to run a pending submission for another context.

uint64_t yieldTimeout

[in,out] The maximum time in microseconds that the scheduler will wait to preempt a workload running on an engine before deciding to reset the hardware engine and terminating the associated context.

zet_process_state_t

struct zet_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

uint32_t processId

[out] Host OS process ID.

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

int64_t engines

[out] Bitfield of accelerator engines being used by this process (or 1<<zet_engine_type_t together).

zet_pci_address_t

struct zet_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

zet_pci_speed_t

struct zet_pci_speed_t

PCI speed.

Public Members

uint32_t gen

[out] The link generation

uint32_t width

[out] The number of lanes

uint64_t maxBandwidth

[out] The maximum bandwidth in bytes/sec

zet_pci_properties_t

struct zet_pci_properties_t

Static PCI properties.

Public Members

zet_pci_address_t address

[out] The BDF address

zet_pci_speed_t maxSpeed

[out] Fastest port configuration supported by the device.

zet_pci_state_t

struct zet_pci_state_t

Dynamic PCI state.

Public Members

zet_pci_link_status_t status

[out] The current status of the port

zet_pci_link_qual_issues_t qualityIssues

[out] If status is ZET_PCI_LINK_STATUS_YELLOW, this gives a bitfield of quality issues that have been detected

zet_pci_link_stab_issues_t stabilityIssues

[out] If status is ZET_PCI_LINK_STATUS_RED, this gives a bitfield of reasons for the connection instability

zet_pci_speed_t speed

[out] The current port configure speed

zet_pci_bar_properties_t

struct zet_pci_bar_properties_t

Properties of a pci bar.

Public Members

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

zet_pci_stats_t

struct zet_pci_stats_t

PCI stats counters.

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

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

Public Members

uint64_t timestamp

[out] Monotonic timestamp counter in microseconds when the measurement was made. No assumption should be made about the absolute value of the timestamp. It should only be used to calculate delta time between two snapshots of the same structure. Never take the delta of this timestamp with the timestamp from a different structure.

uint64_t replayCounter

[out] Monotonic counter for the number of replay packets

uint64_t packetCounter

[out] Monotonic counter for the number of packets

uint64_t rxCounter

[out] Monotonic counter for the number of bytes received

uint64_t txCounter

[out] Monotonic counter for the number of bytes transmitted (including replays)

uint64_t maxBandwidth

[out] The maximum bandwidth in bytes/sec under the current configuration

zet_power_properties_t

struct zet_power_properties_t

Properties related to device power settings.

Public Members

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

ze_bool_t canControl

[out] Software can change the power limits of this domain assuming the user has permissions.

ze_bool_t isEnergyThresholdSupported

[out] Indicates if this power domain supports the energy threshold event (ZET_SYSMAN_EVENT_TYPE_ENERGY_THRESHOLD_CROSSED).

uint32_t maxLimit

[out] The maximum power limit in milliwatts that can be requested.

zet_power_energy_counter_t

struct zet_power_energy_counter_t

Energy counter snapshot.

  • Average power is calculated by taking two snapshots (s1, s2) and using the equation: PowerWatts = (s2.energy - s1.energy) / (s2.timestamp - s1.timestamp)

Public Members

uint64_t energy

[out] The monotonic energy counter in microjoules.

uint64_t timestamp

[out] Microsecond timestamp when energy was captured. No assumption should be made about the absolute value of the timestamp. It should only be used to calculate delta time between two snapshots of the same structure. Never take the delta of this timestamp with the timestamp from a different structure.

zet_power_sustained_limit_t

struct zet_power_sustained_limit_t

Sustained power limits.

  • The power controller (Punit) will throttle the operating frequency if the power averaged over a window (typically seconds) exceeds this limit.

Public Members

ze_bool_t enabled

[in,out] indicates if the limit is enabled (true) or ignored (false)

uint32_t power

[in,out] power limit in milliwatts

uint32_t interval

[in,out] power averaging window (Tau) in milliseconds

zet_power_burst_limit_t

struct zet_power_burst_limit_t

Burst power limit.

  • The power controller (Punit) will throttle the operating frequency of the device if the power averaged over a few milliseconds exceeds a limit known as PL2. Typically PL2 > PL1 so that it permits the frequency to burst higher for short periods than would be otherwise permitted by PL1.

Public Members

ze_bool_t enabled

[in,out] indicates if the limit is enabled (true) or ignored (false)

uint32_t power

[in,out] power limit in milliwatts

zet_power_peak_limit_t

struct zet_power_peak_limit_t

Peak power limit.

  • The power controller (Punit) will preemptively throttle the operating frequency of the device when the instantaneous power exceeds this limit. The limit is known as PL4. It expresses the maximum power that can be drawn from the power supply.

  • If this power limit is removed or set too high, the power supply will generate an interrupt when it detects an overcurrent condition and the power controller will throttle the device frequencies down to min. It is thus better to tune the PL4 value in order to avoid such excursions.

Public Members

uint32_t powerAC

[in,out] power limit in milliwatts for the AC power source.

uint32_t powerDC

[in,out] power limit in milliwatts for the DC power source. This is ignored if the product does not have a battery.

zet_energy_threshold_t

struct zet_energy_threshold_t

Energy threshold.

  • .

Public Members

ze_bool_t enable

[in,out] Indicates if the energy threshold is enabled.

double threshold

[in,out] The energy threshold in Joules. Will be 0.0 if no threshold has been set.

uint32_t processId

[in,out] The host process ID that set the energy threshold. Will be 0xFFFFFFFF if no threshold has been set.

zet_freq_properties_t

struct zet_freq_properties_t

Frequency properties.

  • Indicates if this frequency domain can be overclocked (if true, functions such as zetSysmanFrequencyOcSetConfig() are supported).

  • The min/max hardware frequencies are specified for non-overclock configurations. For overclock configurations, use zetSysmanFrequencyOcGetConfig() to determine the maximum frequency that can be requested.

  • If step is non-zero, the available frequencies are (min, min + step, min + 2xstep, …, max). Otherwise, call zetSysmanFrequencyGetAvailableClocks() to get the list of frequencies that can be requested.

Public Members

zet_freq_domain_t type

[out] The hardware block that this frequency domain controls (GPU, memory, …)

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

ze_bool_t canControl

[out] Indicates if software can control the frequency of this domain assuming the user has permissions

ze_bool_t isThrottleEventSupported

[out] Indicates if software can register to receive event ZET_SYSMAN_EVENT_TYPE_FREQ_THROTTLED

double min

[out] The minimum hardware clock frequency in units of MHz

double max

[out] The maximum non-overclock hardware clock frequency in units of MHz.

double step

[out] The minimum step-size for clock frequencies in units of MHz. The hardware will clamp intermediate frequencies to lowest multiplier of this number.

zet_freq_range_t

struct zet_freq_range_t

Frequency range between which the hardware can operate.

Public Members

double min

[in,out] The min frequency in MHz below which hardware frequency management will not request frequencies. Setting to 0 will use the hardware default value.

double max

[in,out] The max frequency in MHz above which hardware frequency management will not request frequencies. Setting to 0 will use the hardware default value.

zet_freq_state_t

struct zet_freq_state_t

Frequency state.

Public Members

double request

[out] The current frequency request in MHz.

double tdp

[out] The maximum frequency in MHz supported under the current TDP conditions

double efficient

[out] The efficient minimum frequency in MHz

double actual

[out] The resolved frequency in MHz

uint32_t throttleReasons

[out] The reasons that the frequency is being limited by the hardware (Bitfield of zet_freq_throttle_reasons_t).

zet_freq_throttle_time_t

struct zet_freq_throttle_time_t

Frequency throttle time snapshot.

  • Percent time throttled is calculated by taking two snapshots (s1, s2) and using the equation: throttled = (s2.throttleTime - s1.throttleTime) / (s2.timestamp - s1.timestamp)

Public Members

uint64_t throttleTime

[out] The monotonic counter of time in microseconds that the frequency has been limited by the hardware.

uint64_t timestamp

[out] Microsecond timestamp when throttleTime was captured. No assumption should be made about the absolute value of the timestamp. It should only be used to calculate delta time between two snapshots of the same structure. Never take the delta of this timestamp with the timestamp from a different structure.

zet_oc_capabilities_t

struct zet_oc_capabilities_t

Overclocking properties.

  • Provides all the overclocking capabilities and properties supported by the device for the frequency domain.

Public Members

ze_bool_t isOcSupported

[out] Indicates if any overclocking features are supported on this frequency domain.

double maxFactoryDefaultFrequency

[out] Factory default non-overclock maximum frequency in Mhz.

double maxFactoryDefaultVoltage

[out] Factory default voltage used for the non-overclock maximum frequency in MHz.

double maxOcFrequency

[out] Maximum hardware overclocking frequency limit in Mhz.

double minOcVoltageOffset

[out] The minimum voltage offset that can be applied to the voltage/frequency curve. Note that this number can be negative.

double maxOcVoltageOffset

[out] The maximum voltage offset that can be applied to the voltage/frequency curve.

double maxOcVoltage

[out] The maximum overclock voltage that hardware supports.

ze_bool_t isTjMaxSupported

[out] Indicates if the maximum temperature limit (TjMax) can be changed for this frequency domain.

ze_bool_t isIccMaxSupported

[out] Indicates if the maximum current (IccMax) can be changed for this frequency domain.

ze_bool_t isHighVoltModeCapable

[out] Indicates if this frequency domains supports a feature to set very high voltages.

ze_bool_t isHighVoltModeEnabled

[out] Indicates if very high voltages are permitted on this frequency domain.

zet_oc_config_t

struct zet_oc_config_t

Overclocking configuration.

  • Overclock settings

Public Members

zet_oc_mode_t mode

[in,out] Overclock Mode zet_oc_mode_t.

double frequency

[in,out] Overclocking Frequency in MHz. This cannot be greater than zet_oc_capabilities_t.maxOcFrequency.

double voltageTarget

[in,out] Overclock voltage in Volts. This cannot be greater than zet_oc_capabilities_t.maxOcVoltage.

double voltageOffset

[in,out] This voltage offset is applied to all points on the voltage/frequency curve, include the new overclock voltageTarget. It can be in the range (zet_oc_capabilities_t.minOcVoltageOffset, zet_oc_capabilities_t.maxOcVoltageOffset).

zet_engine_properties_t

struct zet_engine_properties_t

Engine group properties.

Public Members

zet_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

zet_engine_stats_t

struct zet_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)

Public Members

uint64_t activeTime

[out] Monotonic counter for time in microseconds that this resource is actively running workloads.

uint64_t timestamp

[out] Monotonic timestamp counter in microseconds when activeTime counter was sampled. No assumption should be made about the absolute value of the timestamp. It should only be used to calculate delta time between two snapshots of the same structure. Never take the delta of this timestamp with the timestamp from a different structure.

zet_standby_properties_t

struct zet_standby_properties_t

Standby hardware component properties.

Public Members

zet_standby_type_t type

[out] Which standby hardware component this controls

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

zet_firmware_properties_t

struct zet_firmware_properties_t

Firmware properties.

Public Members

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

ze_bool_t canControl

[out] Indicates if software can flash the firmware assuming the user has permissions

int8_t name[ZET_STRING_PROPERTY_SIZE]

[out] NULL terminated string value

int8_t version[ZET_STRING_PROPERTY_SIZE]

[out] NULL terminated string value

zet_mem_properties_t

struct zet_mem_properties_t

Memory properties.

Public Members

zet_mem_type_t type

[out] The memory type

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

uint64_t physicalSize

[out] Physical memory size in bytes

zet_mem_state_t

struct zet_mem_state_t

Memory state - health, allocated.

  • Percent allocation is given by 100 * allocatedSize / maxSize.

  • Percent free is given by 100 * (maxSize - allocatedSize) / maxSize.

Public Members

zet_mem_health_t health

[out] Indicates the health of the memory

uint64_t allocatedSize

[out] The total allocated bytes

uint64_t maxSize

[out] The total allocatable memory in bytes (can be less than zet_mem_properties_t.physicalSize)

zet_mem_bandwidth_t

struct zet_mem_bandwidth_t

Memory bandwidth.

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

Public Members

uint64_t readCounter

[out] Total bytes read from memory

uint64_t writeCounter

[out] Total bytes written to memory

uint64_t maxBandwidth

[out] Current maximum bandwidth in units of bytes/sec

uint64_t timestamp

[out] The timestamp when these measurements were sampled. No assumption should be made about the absolute value of the timestamp. It should only be used to calculate delta time between two snapshots of the same structure. Never take the delta of this timestamp with the timestamp from a different structure.

zet_fabric_port_uuid_t

struct zet_fabric_port_uuid_t

Fabric port universal unique id (UUID)

Public Members

uint8_t id[ZET_MAX_FABRIC_PORT_UUID_SIZE]

[out] Frabric port universal unique id

zet_fabric_port_speed_t

struct zet_fabric_port_speed_t

Fabric port speed in one direction.

Public Members

uint64_t bitRate

[out] Bits/sec that the link is operating at

uint32_t width

[out] The number of lanes

uint64_t maxBandwidth

[out] The maximum bandwidth in bytes/sec

zet_fabric_port_properties_t

struct zet_fabric_port_properties_t

Fabric port properties.

Public Members

int8_t model[ZET_MAX_FABRIC_PORT_MODEL_SIZE]

[out] Description of port technology

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

zet_fabric_port_uuid_t portUuid

[out] The port universal unique id

zet_fabric_port_speed_t maxRxSpeed

[out] Maximum bandwidth supported by the receive side of the port

zet_fabric_port_speed_t maxTxSpeed

[out] Maximum bandwidth supported by the transmit side of the port

zet_fabric_port_config_t

struct zet_fabric_port_config_t

Fabric port configuration.

Public Members

ze_bool_t enabled

[in,out] Port is configured up/down

ze_bool_t beaconing

[in,out] Beaconing is configured on/off

zet_fabric_port_state_t

struct zet_fabric_port_state_t

Fabric port state.

Public Members

zet_fabric_port_status_t status

[out] The current status of the port

zet_fabric_port_qual_issues_t qualityIssues

[out] If status is ZET_FABRIC_PORT_STATUS_YELLOW, this gives a bitfield of quality issues that have been detected

zet_fabric_port_stab_issues_t stabilityIssues

[out] If status is ZET_FABRIC_PORT_STATUS_RED, this gives a bitfield of reasons for the connection instability

zet_fabric_port_speed_t rxSpeed

[out] Current maximum receive speed

zet_fabric_port_speed_t txSpeed

[out] Current maximum transmit speed

zet_fabric_port_throughput_t

struct zet_fabric_port_throughput_t

Fabric port throughput.

  • Percent throughput is calculated by taking two snapshots (s1, s2) and using the equation:

  • rx_bandwidth = 10^6 * (s2.rxCounter - s1.rxCounter) / (s2.rxMaxBandwidth * (s2.timestamp - s1.timestamp))

  • tx_bandwidth = 10^6 * (s2.txCounter - s1.txCounter) / (s2.txMaxBandwidth * (s2.timestamp - s1.timestamp))

Public Members

uint64_t timestamp

[out] Monotonic timestamp counter in microseconds when the measurement was made. No assumption should be made about the absolute value of the timestamp. It should only be used to calculate delta time between two snapshots of the same structure. Never take the delta of this timestamp with the timestamp from a different structure.

uint64_t rxCounter

[out] Monotonic counter for the number of bytes received

uint64_t txCounter

[out] Monotonic counter for the number of bytes transmitted

uint64_t rxMaxBandwidth

[out] The current maximum bandwidth in bytes/sec for receiving packats

uint64_t txMaxBandwidth

[out] The current maximum bandwidth in bytes/sec for transmitting packets

zet_temp_properties_t

struct zet_temp_properties_t

Temperature sensor properties.

Public Members

zet_temp_sensors_t type

[out] Which part of the device the temperature sensor measures

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

ze_bool_t isCriticalTempSupported

[out] Indicates if the critical temperature event ZET_SYSMAN_EVENT_TYPE_TEMP_CRITICAL is supported

ze_bool_t isThreshold1Supported

[out] Indicates if the temperature threshold 1 event ZET_SYSMAN_EVENT_TYPE_TEMP_THRESHOLD1 is supported

ze_bool_t isThreshold2Supported

[out] Indicates if the temperature threshold 2 event ZET_SYSMAN_EVENT_TYPE_TEMP_THRESHOLD2 is supported

zet_temp_threshold_t

struct zet_temp_threshold_t

Temperature sensor threshold.

Public Members

ze_bool_t enableLowToHigh

[in,out] Trigger an event when the temperature crosses from below the threshold to above.

ze_bool_t enableHighToLow

[in,out] Trigger an event when the temperature crosses from above the threshold to below.

double threshold

[in,out] The threshold in degrees Celcius.

zet_temp_config_t

struct zet_temp_config_t

Temperature configuration - which events should be triggered and the trigger conditions.

Public Members

ze_bool_t enableCritical

[in,out] Indicates if event ZET_SYSMAN_EVENT_TYPE_TEMP_CRITICAL should be triggered by the driver.

zet_temp_threshold_t threshold1

[in,out] Configuration controlling if and when event ZET_SYSMAN_EVENT_TYPE_TEMP_THRESHOLD1 should be triggered by the driver.

zet_temp_threshold_t threshold2

[in,out] Configuration controlling if and when event ZET_SYSMAN_EVENT_TYPE_TEMP_THRESHOLD2 should be triggered by the driver.

uint32_t processId

[out] Host processId that set this configuration (ignored when setting the configuration).

zet_psu_properties_t

struct zet_psu_properties_t

Static properties of the power supply.

Public Members

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

ze_bool_t haveFan

[out] True if the power supply has a fan

uint32_t ampLimit

[out] The maximum electrical current in amperes that can be drawn

zet_psu_state_t

struct zet_psu_state_t

Dynamic state of the power supply.

Public Members

zet_psu_voltage_status_t voltStatus

[out] The current PSU voltage status

ze_bool_t fanFailed

[out] Indicates if the fan has failed

uint32_t temperature

[out] Read the current heatsink temperature in degrees Celsius.

uint32_t current

[out] The amps being drawn in amperes

zet_fan_temp_speed_t

struct zet_fan_temp_speed_t

Fan temperature/speed pair.

Public Members

uint32_t temperature

[in,out] Temperature in degrees Celsius.

uint32_t speed

[in,out] The speed of the fan

zet_fan_speed_units_t units

[in,out] The units of the member speed

zet_fan_properties_t

struct zet_fan_properties_t

Fan properties.

Public Members

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

ze_bool_t canControl

[out] Indicates if software can control the fan speed assuming the user has permissions

uint32_t maxSpeed

[out] The maximum RPM of the fan

uint32_t maxPoints

[out] The maximum number of points in the fan temp/speed table

zet_fan_config_t

struct zet_fan_config_t

Fan configuration.

Public Members

zet_fan_speed_mode_t mode

[in,out] The fan speed mode (fixed, temp-speed table)

uint32_t speed

[in,out] The fixed fan speed setting

zet_fan_speed_units_t speedUnits

[in,out] The units of the fixed fan speed setting

uint32_t numPoints

[in,out] The number of valid points in the fan speed table

zet_fan_temp_speed_t table[ZET_FAN_TEMP_SPEED_PAIR_COUNT]

[in,out] Array of temperature/fan speed pairs

zet_led_properties_t

struct zet_led_properties_t

LED properties.

Public Members

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

ze_bool_t canControl

[out] Indicates if software can control the LED assuming the user has permissions

ze_bool_t haveRGB

[out] Indicates if the LED is RGB capable

zet_led_state_t

struct zet_led_state_t

LED state.

Public Members

ze_bool_t isOn

[in,out] Indicates if the LED is on or off

uint8_t red

[in,out][range(0, 255)] The LED red value

uint8_t green

[in,out][range(0, 255)] The LED green value

uint8_t blue

[in,out][range(0, 255)] The LED blue value

zet_ras_properties_t

struct zet_ras_properties_t

RAS properties.

Public Members

zet_ras_error_type_t type

[out] The type of RAS error

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

zet_ras_details_t

struct zet_ras_details_t

RAS error details.

Public Members

uint64_t numResets

[out] The number of device resets that have taken place

uint64_t numProgrammingErrors

[out] The number of hardware exceptions generated by the way workloads have programmed the hardware

uint64_t numDriverErrors

[out] The number of low level driver communication errors have occurred

uint64_t numComputeErrors

[out] The number of errors that have occurred in the compute accelerator hardware

uint64_t numNonComputeErrors

[out] The number of errors that have occurred in the fixed-function accelerator hardware

uint64_t numCacheErrors

[out] The number of errors that have occurred in caches (L1/L3/register file/shared local memory/sampler)

uint64_t numDisplayErrors

[out] The number of errors that have occurred in the display

zet_ras_config_t

struct zet_ras_config_t

RAS error configuration - thresholds used for triggering RAS events (ZET_SYSMAN_EVENT_TYPE_RAS_CORRECTABLE_ERRORS, ZET_SYSMAN_EVENT_TYPE_RAS_UNCORRECTABLE_ERRORS)

  • The driver maintains a total counter which is updated every time a hardware block covered by the corresponding RAS error set notifies that an error has occurred. When this total count goes above the totalThreshold specified below, a RAS event is triggered.

  • The driver also maintains a counter for each category of RAS error (see zet_ras_details_t for a breakdown). Each time a hardware block of that category notifies that an error has occurred, that corresponding category counter is updated. When it goes above the threshold specified in detailedThresholds, a RAS event is triggered.

Public Members

uint64_t totalThreshold

[in,out] If the total RAS errors exceeds this threshold, the event will be triggered. A value of 0ULL disables triggering the event based on the total counter.

zet_ras_details_t detailedThresholds

[in,out] If the RAS errors for each category exceed the threshold for that category, the event will be triggered. A value of 0ULL will disable an event being triggered for that category.

uint32_t processId

[out] Host processId that set this configuration (ignored when setting the configuration).

zet_event_config_t

struct zet_event_config_t

Event configuration for a device.

Public Members

uint32_t registered

[in,out] List of registered events (Bitfield of events zet_sysman_event_type_t). ZET_SYSMAN_EVENT_TYPE_NONE indicates there are no registered events. ZET_SYSMAN_EVENT_TYPE_ALL indicates that all events are registered.

zet_diag_test_t

struct zet_diag_test_t

Diagnostic test.

Public Members

uint32_t index

[out] Index of the test

char name[ZET_STRING_PROPERTY_SIZE]

[out] Name of the test

zet_diag_properties_t

struct zet_diag_properties_t

Diagnostics test suite properties.

Public Members

zet_diag_type_t type

[out] The type of diagnostics test suite

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[ZET_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 $SysmanDiagnosticsGetTests() to get the list of these tests)

Tracing

Tracing Functions

zetTracerCreate

__ze_api_export ze_result_t __zecall zetTracerCreate(zet_driver_handle_t hDriver, const zet_tracer_desc_t *desc, zet_tracer_handle_t *phTracer)

Creates a tracer for the specified driver.

Parameters
  • hDriver: handle of the driver

  • desc: pointer to tracer descriptor

  • phTracer: pointer to handle of tracer object created

  • The tracer can only be used on the driver on which it was created.

  • The tracer is created in the disabled state.

  • The application may call this function from simultaneous threads.

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

Return

zetTracerDestroy

__ze_api_export ze_result_t __zecall zetTracerDestroy(zet_tracer_handle_t hTracer)

Destroys a tracer.

Parameters
  • hTracer: [release] handle of tracer object to destroy

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

  • The implementation of this function will stall and wait on any outstanding threads executing callbacks before freeing any Host allocations associated with this tracer.

Return

zetTracerSetPrologues

__ze_api_export ze_result_t __zecall zetTracerSetPrologues(zet_tracer_handle_t hTracer, zet_core_callbacks_t *pCoreCbs)

Sets the collection of callbacks to be executed before driver execution.

Parameters
  • hTracer: handle of the tracer

  • pCoreCbs: pointer to table of ‘core’ callback function pointers

  • The application only needs to set the function pointers it is interested in receiving; all others should be ‘nullptr’

  • The application must ensure that no other threads are executing functions for which the tracing functions are changing.

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

Return

zetTracerSetEpilogues

__ze_api_export ze_result_t __zecall zetTracerSetEpilogues(zet_tracer_handle_t hTracer, zet_core_callbacks_t *pCoreCbs)

Sets the collection of callbacks to be executed after driver execution.

Parameters
  • hTracer: handle of the tracer

  • pCoreCbs: pointer to table of ‘core’ callback function pointers

  • The application only needs to set the function pointers it is interested in receiving; all others should be ‘nullptr’

  • The application must ensure that no other threads are executing functions for which the tracing functions are changing.

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

Return

zetTracerSetEnabled

__ze_api_export ze_result_t __zecall zetTracerSetEnabled(zet_tracer_handle_t hTracer, ze_bool_t enable)

Enables (or disables) the tracer.

Parameters
  • hTracer: handle of the tracer

  • enable: enable the tracer if true; disable if false

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

Return

Tracing Enums

zet_tracer_desc_version_t

enum zet_tracer_desc_version_t

API version of zet_tracer_desc_t.

Values:

ZET_TRACER_DESC_VERSION_CURRENT = ZE_MAKE_VERSION(0, )

version 0.91

Tracing Structures

zet_tracer_desc_t

struct zet_tracer_desc_t

Tracer descriptor.

Public Members

zet_tracer_desc_version_t version

[in] ZET_TRACER_DESC_VERSION_CURRENT

void *pUserData

[in] pointer passed to every tracer’s callbacks