fix: Disable async release of buffers with external host ptr

Related-To: NEO-10036

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2024-03-22 11:47:32 +00:00
committed by Compute-Runtime-Automation
parent d94be09020
commit 70a62d89e3
2 changed files with 50 additions and 4 deletions

View File

@@ -82,7 +82,8 @@ MemObj::~MemObj() {
needWait |= multiGraphicsAllocation.getGraphicsAllocations().size() > 1u;
for (auto graphicsAllocation : multiGraphicsAllocation.getGraphicsAllocations()) {
auto rootDeviceIndex = graphicsAllocation ? graphicsAllocation->getRootDeviceIndex() : 0;
bool doAsyncDestructions = debugManager.flags.EnableAsyncDestroyAllocations.get();
bool doAsyncDestructions = debugManager.flags.EnableAsyncDestroyAllocations.get() && !this->memoryProperties.flags.useHostPtr;
if (graphicsAllocation && !associatedMemObject && !isHostPtrSVM && graphicsAllocation->peekReuseCount() == 0) {
memoryManager->removeAllocationFromHostPtrManager(graphicsAllocation);
if (!doAsyncDestructions) {