feature: add support for HP copy engine context

- add support for contect group with HP copy engine
- choose HP copy engine when available

Related-To: NEO-11983

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe
2024-07-19 10:20:37 +00:00
committed by Compute-Runtime-Automation
parent 4fc37f9afd
commit b6299b8a21
13 changed files with 510 additions and 46 deletions

View File

@@ -311,8 +311,16 @@ CommandStreamReceiver &CommandQueue::selectCsrForBuiltinOperation(const CsrSelec
}
if (preferredBCSType) {
preferredBcsEngineType = EngineHelpers::getBcsEngineType(device->getRootDeviceEnvironment(), device->getDeviceBitfield(),
device->getSelectorCopyEngine(), false);
if (this->priority == QueuePriority::high) {
const auto &gfxCoreHelper = device->getRootDeviceEnvironment().getHelper<GfxCoreHelper>();
const auto &hwInfo = device->getHardwareInfo();
preferredBcsEngineType = gfxCoreHelper.getDefaultHpCopyEngine(hwInfo);
}
if (preferredBcsEngineType == aub_stream::EngineType::NUM_ENGINES) {
preferredBcsEngineType = EngineHelpers::getBcsEngineType(device->getRootDeviceEnvironment(), device->getDeviceBitfield(),
device->getSelectorCopyEngine(), false);
}
}
break;
}
@@ -353,6 +361,16 @@ void CommandQueue::constructBcsEngine(bool internalUsage) {
auto bcsIndex = EngineHelpers::getBcsIndex(bcsEngineType);
auto engineUsage = (internalUsage && gfxCoreHelper.preferInternalBcsEngine()) ? EngineUsage::internal : EngineUsage::regular;
if (priority == QueuePriority::high) {
const auto &hwInfo = device->getHardwareInfo();
auto hpEngine = gfxCoreHelper.getDefaultHpCopyEngine(hwInfo);
if (hpEngine != aub_stream::EngineType::NUM_ENGINES) {
bcsEngineType = hpEngine;
bcsIndex = EngineHelpers::getBcsIndex(bcsEngineType);
engineUsage = EngineUsage::highPriority;
}
}
bcsEngines[bcsIndex] = neoDevice.tryGetEngine(bcsEngineType, engineUsage);
if (bcsEngines[bcsIndex]) {