feature: pass external device allocation to CB event

Related-To: NEO-11925

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2024-10-14 16:37:26 +00:00
committed by Compute-Runtime-Automation
parent 7172d373ea
commit acef3a1e71
6 changed files with 14 additions and 7 deletions

View File

@@ -27,11 +27,12 @@ std::shared_ptr<InOrderExecInfo> InOrderExecInfo::create(TagNodeBase *deviceCoun
return std::make_shared<NEO::InOrderExecInfo>(deviceCounterNode, hostCounterNode, device, partitionCount, regularCmdList, atomicDeviceSignalling);
}
std::shared_ptr<InOrderExecInfo> InOrderExecInfo::createFromExternalAllocation(NEO::Device &device, uint64_t deviceAddress, NEO::GraphicsAllocation *hostAllocation, uint64_t *hostAddress, uint64_t counterValue) {
std::shared_ptr<InOrderExecInfo> InOrderExecInfo::createFromExternalAllocation(NEO::Device &device, NEO::GraphicsAllocation *deviceAllocation, uint64_t deviceAddress, NEO::GraphicsAllocation *hostAllocation, uint64_t *hostAddress, uint64_t counterValue) {
auto inOrderExecInfo = std::make_shared<NEO::InOrderExecInfo>(nullptr, nullptr, device, 1, false, true);
inOrderExecInfo->counterValue = counterValue;
inOrderExecInfo->externalHostAllocation = hostAllocation;
inOrderExecInfo->externalDeviceAllocation = deviceAllocation;
inOrderExecInfo->hostAddress = hostAddress;
inOrderExecInfo->deviceAddress = deviceAddress;
inOrderExecInfo->duplicatedHostStorage = true;
@@ -122,6 +123,9 @@ void InOrderExecInfo::reset() {
}
NEO::GraphicsAllocation *InOrderExecInfo::getDeviceCounterAllocation() const {
if (externalDeviceAllocation) {
return externalDeviceAllocation;
}
return deviceCounterNode ? deviceCounterNode->getBaseGraphicsAllocation()->getGraphicsAllocation(rootDeviceIndex) : nullptr;
}