Fix gap for forcing engine by debug flag NodeOrdinal

add scenario when command queue created with properties
and there is also applied NodeOrdinal flag
then value from flag will use to force engine

Signed-off-by: Katarzyna Cencelewska <katarzyna.cencelewska@intel.com>
This commit is contained in:
Katarzyna Cencelewska
2022-04-20 16:52:30 +00:00
committed by Compute-Runtime-Automation
parent b91e630bb5
commit 91840e6e07
2 changed files with 91 additions and 4 deletions

View File

@ -926,6 +926,23 @@ void CommandQueue::processProperties(const cl_queue_properties *properties) {
break;
case CL_QUEUE_INDEX_INTEL:
selectedQueueIndex = static_cast<cl_uint>(*(currentProperties + 1));
auto nodeOrdinal = DebugManager.flags.NodeOrdinal.get();
if (nodeOrdinal != -1) {
int currentEngineIndex = 0;
const HardwareInfo &hwInfo = getDevice().getHardwareInfo();
const HwHelper &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily);
auto engineGroupTyp = hwHelper.getEngineGroupType(static_cast<aub_stream::EngineType>(nodeOrdinal), EngineUsage::Regular, hwInfo);
selectedQueueFamilyIndex = static_cast<cl_uint>(getDevice().getEngineGroupIndexFromEngineGroupType(engineGroupTyp));
const auto &engines = getDevice().getRegularEngineGroups()[selectedQueueFamilyIndex].engines;
for (const auto &engine : engines) {
if (engine.getEngineType() == static_cast<aub_stream::EngineType>(nodeOrdinal)) {
selectedQueueIndex = currentEngineIndex;
break;
}
currentEngineIndex++;
}
}
specificEngineSelected = true;
break;
}