mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 05:35:19 +08:00
fix: add cpu alloc to eviction list only once
Related-To: NEO-12572 Also, before migration to GPU domain, remove it from this list Signed-off-by: Szymon Morek <szymon.morek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
9db83b8231
commit
b2fd1972a4
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2023 Intel Corporation
|
||||
* Copyright (C) 2019-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -33,7 +33,7 @@ void PageFaultManager::transferToGpu(void *ptr, void *cmdQ) {
|
||||
UNRECOVERABLE_IF(allocData == nullptr);
|
||||
this->evictMemoryAfterImplCopy(allocData->cpuAllocation, &commandQueue->getDevice());
|
||||
}
|
||||
void PageFaultManager::allowCPUMemoryEviction(void *ptr, PageFaultData &pageFaultData) {
|
||||
void PageFaultManager::allowCPUMemoryEviction(bool evict, void *ptr, PageFaultData &pageFaultData) {
|
||||
auto commandQueue = static_cast<CommandQueue *>(pageFaultData.cmdQ);
|
||||
|
||||
auto allocData = memoryData[ptr].unifiedMemoryManager->getSVMAlloc(ptr);
|
||||
@@ -42,7 +42,7 @@ void PageFaultManager::allowCPUMemoryEviction(void *ptr, PageFaultData &pageFaul
|
||||
auto &csr = commandQueue->selectCsrForBuiltinOperation(csrSelectionArgs);
|
||||
auto osInterface = commandQueue->getDevice().getRootDeviceEnvironment().osInterface.get();
|
||||
|
||||
allowCPUMemoryEvictionImpl(ptr, csr, osInterface);
|
||||
allowCPUMemoryEvictionImpl(evict, ptr, csr, osInterface);
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2023 Intel Corporation
|
||||
* Copyright (C) 2019-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -124,7 +124,7 @@ TEST_F(PageFaultManagerTest, givenUnifiedMemoryAllocWhenAllowCPUMemoryEvictionIs
|
||||
NEO::PageFaultManager::PageFaultData pageData;
|
||||
pageData.cmdQ = cmdQ.get();
|
||||
|
||||
pageFaultManager->baseAllowCPUMemoryEviction(alloc, pageData);
|
||||
pageFaultManager->baseAllowCPUMemoryEviction(true, alloc, pageData);
|
||||
EXPECT_EQ(pageFaultManager->allowCPUMemoryEvictionImplCalled, 1);
|
||||
|
||||
auto allocData = svmAllocsManager->getSVMAlloc(alloc);
|
||||
|
||||
Reference in New Issue
Block a user