Device - Experimental#
oneAPI Level Zero Specification - Version 1.18.31
Device - Experimental Functions#
zetDeviceGetConcurrentMetricGroupsExp#
Added in version 1.10
-
ZE_APIEXPORT ze_result_t ZE_APICALL zetDeviceGetConcurrentMetricGroupsExp(zet_device_handle_t hDevice, uint32_t metricGroupCount, zet_metric_group_handle_t *phMetricGroups, uint32_t *pMetricGroupsCountPerConcurrentGroup, uint32_t *pConcurrentGroupCount)#
Get sets of metric groups which could be collected concurrently.
Re-arrange the input metric groups to provide sets of concurrent metric groups.
- Parameters:
hDevice – [in] handle of the device
metricGroupCount – [in] metric group count
phMetricGroups – [in,out] metrics groups to be re-arranged to be sets of concurrent groups
pMetricGroupsCountPerConcurrentGroup – [in,out][optional][*pConcurrentGroupCount] count of metric groups per concurrent group.
pConcurrentGroupCount – [out] number of concurrent groups. The value of this parameter could be used to determine the number of replays necessary.
- Returns:
ZE_RESULT_ERROR_INVALID_NULL_HANDLE
nullptr == hDevice
zetDeviceCreateMetricGroupsFromMetricsExp#
Added in version 1.10
-
ZE_APIEXPORT ze_result_t ZE_APICALL zetDeviceCreateMetricGroupsFromMetricsExp(zet_device_handle_t hDevice, uint32_t metricCount, zet_metric_handle_t *phMetrics, const char *pMetricGroupNamePrefix, const char *pDescription, uint32_t *pMetricGroupCount, zet_metric_group_handle_t *phMetricGroup)#
Create multiple metric group handles from metric handles.
Creates multiple metric groups from metrics which were created using zetMetricCreateFromProgrammableExp2().
Metrics whose Hardware resources do not overlap are added to same metric group.
The metric groups created using this API are managed by the application and cannot be retrieved using zetMetricGroupGet().
The created metric groups are ready for activation and collection.
- Parameters:
hDevice – [in] handle of the device.
metricCount – [in] number of metric handles.
phMetrics – [in] metric handles to be added to the metric groups.
pMetricGroupNamePrefix – [in] prefix to the name created for the metric groups. Must point to a null-terminated character array no longer than ZET_MAX_METRIC_GROUP_NAME_PREFIX_EXP.
pDescription – [in] pointer to description of the metric groups. Must point to a null-terminated character array no longer than ZET_MAX_METRIC_GROUP_DESCRIPTION.
pMetricGroupCount – [in,out] pointer to the number of metric group handles to be created. if pMetricGroupCount is zero, then the driver shall update the value with the maximum possible number of metric group handles that could be created. if pMetricGroupCount is greater than the number of metric group handles that could be created, then the driver shall update the value with the correct number of metric group handles generated. if pMetricGroupCount is lesser than the number of metric group handles that could be created, then ZE_RESULT_ERROR_INVALID_ARGUMENT is returned.
phMetricGroup – [in,out][optional][range(0, *pMetricGroupCount)] array of handle of metric group handles. Created Metric group handles.
- Returns:
ZE_RESULT_ERROR_INVALID_NULL_HANDLE
nullptr == hDevice
ZE_RESULT_ERROR_INVALID_ARGUMENT
metricGroupCount is lesser than the number of metric group handles that could be created.
zetDeviceEnableMetricsExp#
Added in version 1.13
-
ZE_APIEXPORT ze_result_t ZE_APICALL zetDeviceEnableMetricsExp(zet_device_handle_t hDevice)#
Enable Metrics collection during runtime.
This API enables metric collection for a device/sub-device if not already enabled.
if ZET_ENABLE_METRICS=1 was already set, then calling this api would be a NOP.
This api should be called after calling zeInit().
If device is a root-device handle, then its sub-devices are also enabled.
zetDeviceDisableMetricsExp need not be called if if this api returns error.
This API can be used as runtime alternative to setting ZET_ENABLE_METRICS=1.
- Parameters:
hDevice – [in] handle of the device where metrics collection has to be enabled.
- Returns:
ZE_RESULT_ERROR_INVALID_NULL_HANDLE
nullptr == hDevice
zetDeviceDisableMetricsExp#
Added in version 1.13
-
ZE_APIEXPORT ze_result_t ZE_APICALL zetDeviceDisableMetricsExp(zet_device_handle_t hDevice)#
Disable Metrics collection during runtime, if it was already enabled.
This API disables metrics collection for a device/sub-device, if it was previously enabled.
If device is a root-device handle, then its sub-devices are also disabled.
The application has to ensure that all metric operations are complete and all metric resources are released before this API is called.
If there are metric operations in progress or metric resources are not released, then ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE is returned.
- Parameters:
hDevice – [in] handle of the device where metrics collection has to be disabled
- Returns:
ZE_RESULT_ERROR_INVALID_NULL_HANDLE
nullptr == hDevice