Remove redundant GmmHelper init in createDeviceImpl

Initialization of GmmHelper is carried out earlier in the
prepareDeviceEnvironments method.

Related-To: NEO-6523
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
This commit is contained in:
Krzysztof Gibala 2022-06-14 10:46:03 +00:00 committed by Compute-Runtime-Automation
parent ce91edcb82
commit 21c2f06d72
2 changed files with 9 additions and 4 deletions

View File

@ -206,8 +206,6 @@ bool Device::createDeviceImpl() {
auto &hwInfo = getHardwareInfo();
preemptionMode = PreemptionHelper::getDefaultPreemptionMode(hwInfo);
executionEnvironment->rootDeviceEnvironments[getRootDeviceIndex()]->initGmm();
if (!getDebugger()) {
this->executionEnvironment->rootDeviceEnvironments[getRootDeviceIndex()]->initDebugger();
}

View File

@ -62,6 +62,7 @@ bool prepareDeviceEnvironments(ExecutionEnvironment &executionEnvironment) {
}
bool prepareDeviceEnvironment(ExecutionEnvironment &executionEnvironment, std::string &osPciPath, const uint32_t rootDeviceIndex) {
auto retVal = true;
executionEnvironment.prepareRootDeviceEnvironment(rootDeviceIndex);
auto currentHwInfo = executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->getHardwareInfo();
if (currentHwInfo->platform.eProductFamily == IGFX_UNKNOWN && currentHwInfo->platform.eRenderCoreFamily == IGFX_UNKNOWN_CORE) {
@ -70,10 +71,16 @@ bool prepareDeviceEnvironment(ExecutionEnvironment &executionEnvironment, std::s
if (ultHwConfig.useMockedPrepareDeviceEnvironmentsFunc) {
uint32_t numRootDevices = DebugManager.flags.CreateMultipleRootDevices.get() != 0 ? DebugManager.flags.CreateMultipleRootDevices.get() : 1u;
UltDeviceFactory::prepareDeviceEnvironments(executionEnvironment, numRootDevices);
return ultHwConfig.mockedPrepareDeviceEnvironmentsFuncResult;
retVal = ultHwConfig.mockedPrepareDeviceEnvironmentsFuncResult;
} else {
retVal = prepareDeviceEnvironmentImpl(executionEnvironment, osPciPath, rootDeviceIndex);
}
return prepareDeviceEnvironmentImpl(executionEnvironment, osPciPath, rootDeviceIndex);
for (uint32_t rootDeviceIndex = 0u; rootDeviceIndex < executionEnvironment.rootDeviceEnvironments.size(); rootDeviceIndex++) {
executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->initGmm();
}
return retVal;
}
const HardwareInfo *getDefaultHwInfo() {
return defaultHwInfo.get();