Create only available engines

Change-Id: If7880db0dd7aa76b578d0e4e300f510ca686b825
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
Dunajski, Bartosz
2020-02-21 15:25:04 +01:00
committed by sys_ocldev
parent c345939dd6
commit 750036742d
39 changed files with 242 additions and 171 deletions

View File

@ -231,9 +231,10 @@ TEST(ExecutionEnvironment, whenCalculateMaxOsContexCountThenGlobalVariableHasPro
auto expectedOsContextCount = 0u;
for (const auto &rootDeviceEnvironment : executionEnvironment.rootDeviceEnvironments) {
auto &hwHelper = HwHelper::get(rootDeviceEnvironment->getHardwareInfo()->platform.eRenderCoreFamily);
auto osContextCount = hwHelper.getGpgpuEngineInstances().size();
auto subDevicesCount = HwHelper::getSubDevicesCount(rootDeviceEnvironment->getHardwareInfo());
auto hwInfo = rootDeviceEnvironment->getHardwareInfo();
auto &hwHelper = HwHelper::get(hwInfo->platform.eRenderCoreFamily);
auto osContextCount = hwHelper.getGpgpuEngineInstances(*hwInfo).size();
auto subDevicesCount = HwHelper::getSubDevicesCount(hwInfo);
bool hasRootCsr = subDevicesCount > 1;
expectedOsContextCount += static_cast<uint32_t>(osContextCount * subDevicesCount + hasRootCsr);
}