Create Root CSR only for Devices with Generic SubDevices

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2021-04-27 09:51:03 +00:00
committed by Compute-Runtime-Automation
parent bb9d902899
commit 0c9050c26c
5 changed files with 21 additions and 4 deletions

View File

@@ -118,6 +118,7 @@ bool Device::createGenericSubDevices() {
subdevices[i] = subDevice;
}
hasGenericSubDevices = true;
return true;
}

View File

@@ -155,6 +155,7 @@ class Device : public ReferenceTrackedObject<Device> {
ExecutionEnvironment *executionEnvironment = nullptr;
uint32_t defaultEngineIndex = 0;
uint32_t numSubDevices = 0;
bool hasGenericSubDevices = false;
std::atomic<uint32_t> selectorCopyEngine{0};

View File

@@ -44,12 +44,13 @@ void RootDevice::createBindlessHeapsHelper() {
}
bool RootDevice::createEngines() {
if (getNumSubDevices() < 2) {
return Device::createEngines();
} else {
if (hasGenericSubDevices) {
this->engineGroups.resize(static_cast<uint32_t>(EngineGroupType::MaxEngineGroups));
initializeRootCommandStreamReceiver();
} else {
return Device::createEngines();
}
return true;
}