Support for power limit extensions

Boiler plate implementation of power limit
extension functions.

Related-To: LOCI-3125, LOCI-3193

Signed-off-by: Bellekallu Rajkiran <bellekallu.rajkiran@intel.com>
This commit is contained in:
Bellekallu Rajkiran
2022-07-05 09:48:01 +00:00
committed by Compute-Runtime-Automation
parent 97a3368aad
commit e1ba6d825a
14 changed files with 108 additions and 4 deletions

View File

@@ -373,6 +373,8 @@ zesGetPowerProcAddrTable(
pDdiTable->pfnGetEnergyCounter = L0::zesPowerGetEnergyCounter;
pDdiTable->pfnGetLimits = L0::zesPowerGetLimits;
pDdiTable->pfnSetLimits = L0::zesPowerSetLimits;
pDdiTable->pfnGetLimitsExt = L0::zesPowerGetLimitsExt;
pDdiTable->pfnSetLimitsExt = L0::zesPowerSetLimitsExt;
pDdiTable->pfnGetEnergyThreshold = L0::zesPowerGetEnergyThreshold;
pDdiTable->pfnSetEnergyThreshold = L0::zesPowerSetEnergyThreshold;

View File

@@ -161,6 +161,20 @@ ze_result_t zesPowerSetLimits(
return L0::Power::fromHandle(hPower)->powerSetLimits(pSustained, pBurst, pPeak);
}
ze_result_t zesPowerGetLimitsExt(
zes_pwr_handle_t hPower,
uint32_t *pCount,
zes_power_limit_ext_desc_t *pSustained) {
return L0::Power::fromHandle(hPower)->powerGetLimitsExt(pCount, pSustained);
}
ze_result_t zesPowerSetLimitsExt(
zes_pwr_handle_t hPower,
uint32_t *pCount,
zes_power_limit_ext_desc_t *pSustained) {
return L0::Power::fromHandle(hPower)->powerSetLimitsExt(pCount, pSustained);
}
ze_result_t zesPowerGetEnergyThreshold(
zes_pwr_handle_t hPower,
zes_energy_threshold_t *pThreshold) {
@@ -1352,6 +1366,26 @@ ZE_APIEXPORT ze_result_t ZE_APICALL zesPowerSetLimits(
pPeak);
}
ZE_APIEXPORT ze_result_t ZE_APICALL zesPowerGetLimitsExt(
zes_pwr_handle_t hPower,
uint32_t *pCount,
zes_power_limit_ext_desc_t *pSustained) {
return L0::zesPowerGetLimitsExt(
hPower,
pCount,
pSustained);
}
ZE_APIEXPORT ze_result_t ZE_APICALL zesPowerSetLimitsExt(
zes_pwr_handle_t hPower,
uint32_t *pCount,
zes_power_limit_ext_desc_t *pSustained) {
return L0::zesPowerSetLimitsExt(
hPower,
pCount,
pSustained);
}
ZE_APIEXPORT ze_result_t ZE_APICALL zesPowerGetEnergyThreshold(
zes_pwr_handle_t hPower,
zes_energy_threshold_t *pThreshold) {