mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-30 01:35:20 +08:00
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:
committed by
Compute-Runtime-Automation
parent
53e02bc615
commit
9d5f8eb587
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user