feature: assign secondary BCS engines at queue creation

Related-To: NEO-7824

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2024-05-31 14:39:53 +00:00
committed by Compute-Runtime-Automation
parent 78eda1e952
commit 88ed909e57
8 changed files with 145 additions and 29 deletions

View File

@@ -356,6 +356,11 @@ void CommandQueue::constructBcsEngine(bool internalUsage) {
if (bcsEngines[bcsIndex]) {
bcsQueueEngineType = bcsEngineType;
if (gfxCoreHelper.areSecondaryContextsSupported() && !internalUsage) {
bcsEngines[bcsIndex] = device->getDevice().getSecondaryEngineCsr({bcsEngineType, engineUsage});
}
bcsEngines[bcsIndex]->osContext->ensureContextInitialized();
bcsEngines[bcsIndex]->commandStreamReceiver->initDirectSubmission();
}
@@ -1218,6 +1223,10 @@ void CommandQueue::overrideEngine(aub_stream::EngineType engineType, EngineUsage
}
if (bcsEngines[engineIndex]) {
bcsQueueEngineType = engineType;
if (secondaryContextsEnabled) {
bcsEngines[engineIndex] = device->getDevice().getSecondaryEngineCsr({engineType, engineUsage});
}
}
timestampPacketContainer = std::make_unique<TimestampPacketContainer>();
deferredTimestampPackets = std::make_unique<TimestampPacketContainer>();