Performance Factor#
oneAPI Level Zero Specification - Version 1.18.31
Performance Factor Functions#
zesPerformanceFactorGetProperties#
Added in version 1.0
-
ZE_APIEXPORT ze_result_t ZE_APICALL zesPerformanceFactorGetProperties(zes_perf_handle_t hPerf, zes_perf_properties_t *pProperties)#
Get properties about a Performance Factor domain.
The application may call this function from simultaneous threads.
The implementation of this function should be lock-free.
- Parameters:
hPerf – [in] Handle for the Performance Factor domain.
pProperties – [in,out] Will contain information about the specified Performance Factor domain.
- Returns:
ZE_RESULT_ERROR_INVALID_NULL_HANDLE
nullptr == hPerf
ZE_RESULT_ERROR_INVALID_NULL_POINTER
nullptr == pProperties
zesPerformanceFactorGetConfig#
Added in version 1.0
-
ZE_APIEXPORT ze_result_t ZE_APICALL zesPerformanceFactorGetConfig(zes_perf_handle_t hPerf, double *pFactor)#
Get current Performance Factor for a given domain.
The application may call this function from simultaneous threads.
The implementation of this function should be lock-free.
- Parameters:
hPerf – [in] Handle for the Performance Factor domain.
pFactor – [in,out] Will contain the actual Performance Factor being used by the hardware (may not be the same as the requested Performance Factor).
- Returns:
ZE_RESULT_ERROR_INVALID_NULL_HANDLE
nullptr == hPerf
ZE_RESULT_ERROR_INVALID_NULL_POINTER
nullptr == pFactor
zesPerformanceFactorSetConfig#
Added in version 1.0
-
ZE_APIEXPORT ze_result_t ZE_APICALL zesPerformanceFactorSetConfig(zes_perf_handle_t hPerf, double factor)#
Change the performance factor for a domain.
The Performance Factor is a number between 0 and 100.
A Performance Factor is a hint to the hardware. Depending on the hardware, the request may not be granted. Follow up this function with a call to zesPerformanceFactorGetConfig() to determine the actual factor being used by the hardware.
The application may call this function from simultaneous threads.
The implementation of this function should be lock-free.
- Parameters:
hPerf – [in] Handle for the Performance Factor domain.
factor – [in] The new Performance Factor.
- Returns:
ZE_RESULT_ERROR_INVALID_NULL_HANDLE
nullptr == hPerf
Performance Factor Structures#
zes_perf_properties_t#
Added in version 1.0
-
struct zes_perf_properties_t#
Static information about a Performance Factor domain.
Public Members
-
zes_structure_type_t stype#
[in] type of this structure
-
void *pNext#
[in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
-
ze_bool_t onSubdevice#
[out] True if this Performance Factor affects accelerators located on a sub-device
-
uint32_t subdeviceId#
[out] If onSubdevice is true, this gives the ID of the sub-device
-
zes_engine_type_flags_t engines#
[out] Bitfield of accelerator engine types that are affected by this Performance Factor.
-
zes_structure_type_t stype#