SysMan: fix issues in execution environment restoration.

the scpoe of the restorer is till the LinuxSysmanImp is deleted.
Ideally the scope of restorer needs to be function level.

Signed-off-by: Vilvaraj, T J Vivek <t.j.vivek.vilvaraj@intel.com>
This commit is contained in:
Vilvaraj, T J Vivek
2022-06-10 10:52:34 +00:00
committed by Compute-Runtime-Automation
parent 3dd6e3f125
commit c0121eb824
6 changed files with 35 additions and 3 deletions

View File

@@ -105,6 +105,10 @@ ze_result_t LinuxDiagnosticsImp::waitForQuiescentCompletion() {
ze_result_t LinuxDiagnosticsImp::osRunDiagTestsinFW(zes_diag_result_t *pResult) {
pLinuxSysmanImp->diagnosticsReset = true;
auto pDevice = pLinuxSysmanImp->getDeviceHandle();
auto devicePtr = static_cast<DeviceImp *>(pDevice);
NEO::ExecutionEnvironment *executionEnvironment = devicePtr->getNEODevice()->getExecutionEnvironment();
auto restorer = std::make_unique<L0::ExecutionEnvironmentRefCountRestore>(executionEnvironment);
pLinuxSysmanImp->releaseDeviceResources();
ze_result_t result = gpuProcessCleanup();
if (ZE_RESULT_SUCCESS != result) {