feature(sysman): Added support for Performance APIs

Added support for the Performance APIs in the new sysman design.
Added ULTs for the Performance APIs in the new sysman design.
In the black box test for performance, the API to compute the number
of sub devices has been changed in order to get the sub device count
regardless of the sysman initialization using zeInit or zesInit.

Related-To: LOCI-4294

Signed-off-by: Bari, Pratik <pratik.bari@intel.com>
This commit is contained in:
Bari, Pratik
2023-04-25 14:29:24 +00:00
committed by Compute-Runtime-Automation
parent 2eff2dac0e
commit af2c61c54b
29 changed files with 1383 additions and 12 deletions

View File

@@ -50,4 +50,7 @@ struct _zes_standby_handle_t {
struct _zes_temp_handle_t {
virtual ~_zes_temp_handle_t() = default;
};
};
struct _zes_perf_handle_t {
virtual ~_zes_perf_handle_t() = default;
};

View File

@@ -954,25 +954,41 @@ ze_result_t zesDeviceEnumPerformanceFactorDomains(
zes_device_handle_t hDevice,
uint32_t *pCount,
zes_perf_handle_t *phPerf) {
return L0::SysmanDevice::performanceGet(hDevice, pCount, phPerf);
if (L0::sysmanInitFromCore) {
return L0::SysmanDevice::performanceGet(hDevice, pCount, phPerf);
} else {
return L0::Sysman::SysmanDevice::performanceGet(hDevice, pCount, phPerf);
}
}
ze_result_t zesPerformanceFactorGetProperties(
zes_perf_handle_t hPerf,
zes_perf_properties_t *pProperties) {
return L0::Performance::fromHandle(hPerf)->performanceGetProperties(pProperties);
if (L0::sysmanInitFromCore) {
return L0::Performance::fromHandle(hPerf)->performanceGetProperties(pProperties);
} else {
return L0::Sysman::Performance::fromHandle(hPerf)->performanceGetProperties(pProperties);
}
}
ze_result_t zesPerformanceFactorGetConfig(
zes_perf_handle_t hPerf,
double *pFactor) {
return L0::Performance::fromHandle(hPerf)->performanceGetConfig(pFactor);
if (L0::sysmanInitFromCore) {
return L0::Performance::fromHandle(hPerf)->performanceGetConfig(pFactor);
} else {
return L0::Sysman::Performance::fromHandle(hPerf)->performanceGetConfig(pFactor);
}
}
ze_result_t zesPerformanceFactorSetConfig(
zes_perf_handle_t hPerf,
double factor) {
return L0::Performance::fromHandle(hPerf)->performanceSetConfig(factor);
if (L0::sysmanInitFromCore) {
return L0::Performance::fromHandle(hPerf)->performanceSetConfig(factor);
} else {
return L0::Sysman::Performance::fromHandle(hPerf)->performanceSetConfig(factor);
}
}
ze_result_t zesDeviceEccAvailable(