fix: use primaryCsr allocations when csr has primaryCsr set

- global fence allocation
- global stateless heap allocation
- preemption allocation
- debug surface allocation

all above are shared from primary csr

Related-To: NEO-7824


Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe
2024-05-06 19:17:52 +00:00
committed by Compute-Runtime-Automation
parent ce36812f8d
commit d35d8727e5
7 changed files with 158 additions and 15 deletions

View File

@@ -501,6 +501,7 @@ bool Device::createSecondaryEngine(CommandStreamReceiver *primaryCsr, uint32_t i
auto osContext = executionEnvironment->memoryManager->createAndRegisterSecondaryOsContext(&primaryCsr->getOsContext(), commandStreamReceiver.get(), engineDescriptor);
commandStreamReceiver->setupContext(*osContext);
commandStreamReceiver->setPrimaryCsr(primaryCsr);
EngineControl engine{commandStreamReceiver.get(), osContext};
secondaryEngines[index].engines.push_back(engine);
@@ -547,10 +548,6 @@ EngineControl *Device::getSecondaryEngineCsr(uint32_t engineIndex, EngineTypeUsa
return nullptr;
}
if (!commandStreamReceiver->createGlobalFenceAllocation()) {
return nullptr;
}
if (preemptionMode == PreemptionMode::MidThread && !commandStreamReceiver->createPreemptionAllocation()) {
return nullptr;
}