Adjust ccs on reinit

Parse and adjust ccs count on reset so that initial
environment is restored.

Related-To: LOCI-3435

Signed-off-by: Bellekallu Rajkiran <bellekallu.rajkiran@intel.com>
This commit is contained in:
Bellekallu Rajkiran
2022-09-22 08:48:55 +00:00
committed by Compute-Runtime-Automation
parent a95ab1d16b
commit 7f8e9378b6
5 changed files with 96 additions and 10 deletions

View File

@@ -176,7 +176,12 @@ bool DeviceFactory::prepareDeviceEnvironment(ExecutionEnvironment &executionEnvi
// HwDeviceIds should contain only one entry corresponding to osPciPath
UNRECOVERABLE_IF(hwDeviceIds.size() > 1);
return initHwDeviceIdResources(executionEnvironment, std::move(hwDeviceIds[0]), rootDeviceIndex);
if (!initHwDeviceIdResources(executionEnvironment, std::move(hwDeviceIds[0]), rootDeviceIndex)) {
return false;
}
executionEnvironment.adjustCcsCount(rootDeviceIndex);
return true;
}
std::unique_ptr<Device> DeviceFactory::createDevice(ExecutionEnvironment &executionEnvironment, std::string &osPciPath, const uint32_t rootDeviceIndex) {