refactor: save hpCopyEngine in Device

- remove loop iteration to get hpCopyEngine

Related-To: NEO-11983

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe
2024-09-06 12:38:55 +00:00
committed by Compute-Runtime-Automation
parent 53e02bc615
commit 9d5f8eb587
4 changed files with 20 additions and 20 deletions

View File

@@ -371,16 +371,19 @@ void CommandQueue::constructBcsEngine(bool internalUsage) {
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);
auto hpBcs = neoDevice.getHpCopyEngine();
if (hpBcs) {
bcsEngineType = hpBcs->getEngineType();
engineUsage = EngineUsage::highPriority;
bcsIndex = EngineHelpers::getBcsIndex(bcsEngineType);
bcsEngines[bcsIndex] = hpBcs;
}
}
bcsEngines[bcsIndex] = neoDevice.tryGetEngine(bcsEngineType, engineUsage);
if (bcsEngines[bcsIndex] == nullptr) {
bcsEngines[bcsIndex] = neoDevice.tryGetEngine(bcsEngineType, engineUsage);
}
if (bcsEngines[bcsIndex]) {
bcsQueueEngineType = bcsEngineType;