mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 21:42:53 +08:00
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:
committed by
Compute-Runtime-Automation
parent
4fc37f9afd
commit
b6299b8a21
@@ -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]) {
|
||||
|
||||
Reference in New Issue
Block a user