Context#
oneAPI Level Zero Specification - Version 1.18.31
Context Functions#
zetContextActivateMetricGroups#
Added in version 1.0
-
ZE_APIEXPORT ze_result_t ZE_APICALL zetContextActivateMetricGroups(zet_context_handle_t hContext, zet_device_handle_t hDevice, uint32_t count, zet_metric_group_handle_t *phMetricGroups)#
Activates metric groups.
Immediately reconfigures the device to activate only those metric groups provided.
Any metric groups previously activated but not provided will be deactivated.
Deactivating metric groups that are still in-use will result in undefined behavior.
All metric groups must have different domains, see zet_metric_group_properties_t.
The application must not call this function from simultaneous threads with the same device handle.
- Parameters:
hContext – [in] handle of the context object
hDevice – [in] handle of the device
count – [in] metric group count to activate; must be 0 if
nullptr == phMetricGroupsphMetricGroups – [in][optional][range(0, count)] handles of the metric groups to activate. nullptr deactivates all previously used metric groups. all metrics groups must come from a different domains. metric query and metric stream must use activated metric groups.
- Returns:
ZE_RESULT_ERROR_INVALID_NULL_HANDLE
nullptr == hContextnullptr == hDevice
(nullptr == phMetricGroups) && (0 < count)
ZE_RESULT_ERROR_INVALID_ARGUMENT
Multiple metric groups share the same domain