mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-30 18:29:21 +08:00
fix: expose single device mode
- return internal engine as default engine when defaultEngineIndex is not yet set - return correct internal engine from Device::getInternalEngine() Resolves: HSD-18043691881 Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
c5384f7c01
commit
08fc0c1e1f
@@ -1291,6 +1291,15 @@ OsContext *MemoryManager::getDefaultEngineContext(uint32_t rootDeviceIndex, Devi
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!defaultContext && peekExecutionEnvironment().rootDeviceEnvironments[rootDeviceIndex]->isExposeSingleDeviceMode()) {
|
||||
for (auto &engine : getRegisteredEngines(rootDeviceIndex)) {
|
||||
auto osContext = engine.osContext;
|
||||
if (osContext->isInternalEngine() && osContext->getDeviceBitfield() == subdevicesBitfield) {
|
||||
defaultContext = osContext;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!defaultContext) {
|
||||
defaultContext = getRegisteredEngines(rootDeviceIndex)[defaultEngineIndex[rootDeviceIndex]].osContext;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user