feature(sysman): Add support for the Diagnostics APIs

Added support for the Diagnostics APIs in the new sysman design
Added ULTs for the Diagnostics APIs in the new sysman design

Related-To: LOCI-4247

Signed-off-by: Bari, Pratik <pratik.bari@intel.com>
This commit is contained in:
Bari, Pratik
2023-04-11 15:33:13 +00:00
committed by Compute-Runtime-Automation
parent 64bd9e58a8
commit 112bbec6e9
19 changed files with 1550 additions and 15 deletions

View File

@@ -942,20 +942,32 @@ ze_result_t zesDeviceEnumDiagnosticTestSuites(
zes_device_handle_t hDevice,
uint32_t *pCount,
zes_diag_handle_t *phDiagnostics) {
return L0::SysmanDevice::diagnosticsGet(hDevice, pCount, phDiagnostics);
if (L0::sysmanInitFromCore) {
return L0::SysmanDevice::diagnosticsGet(hDevice, pCount, phDiagnostics);
} else {
return L0::Sysman::SysmanDevice::diagnosticsGet(hDevice, pCount, phDiagnostics);
}
}
ze_result_t zesDiagnosticsGetProperties(
zes_diag_handle_t hDiagnostics,
zes_diag_properties_t *pProperties) {
return L0::Diagnostics::fromHandle(hDiagnostics)->diagnosticsGetProperties(pProperties);
if (L0::sysmanInitFromCore) {
return L0::Diagnostics::fromHandle(hDiagnostics)->diagnosticsGetProperties(pProperties);
} else {
return L0::Sysman::Diagnostics::fromHandle(hDiagnostics)->diagnosticsGetProperties(pProperties);
}
}
ze_result_t zesDiagnosticsGetTests(
zes_diag_handle_t hDiagnostics,
uint32_t *pCount,
zes_diag_test_t *pTests) {
return L0::Diagnostics::fromHandle(hDiagnostics)->diagnosticsGetTests(pCount, pTests);
if (L0::sysmanInitFromCore) {
return L0::Diagnostics::fromHandle(hDiagnostics)->diagnosticsGetTests(pCount, pTests);
} else {
return L0::Sysman::Diagnostics::fromHandle(hDiagnostics)->diagnosticsGetTests(pCount, pTests);
}
}
ze_result_t zesDiagnosticsRunTests(
@@ -963,7 +975,11 @@ ze_result_t zesDiagnosticsRunTests(
uint32_t startIndex,
uint32_t endIndex,
zes_diag_result_t *pResult) {
return L0::Diagnostics::fromHandle(hDiagnostics)->diagnosticsRunTests(startIndex, endIndex, pResult);
if (L0::sysmanInitFromCore) {
return L0::Diagnostics::fromHandle(hDiagnostics)->diagnosticsRunTests(startIndex, endIndex, pResult);
} else {
return L0::Sysman::Diagnostics::fromHandle(hDiagnostics)->diagnosticsRunTests(startIndex, endIndex, pResult);
}
}
ze_result_t zesDeviceEnumPerformanceFactorDomains(