mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 14:02:58 +08:00
Remove duplicate check in residency container
Remove find in SVMAllocsManager addInternalAllocationsToResidencyContainer, not needed, CSR resolves duplicates at makeResident calls Co-authored-by: Michal Mrozek <michal.mrozek@intel.com> Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
3a030d9b8b
commit
a5067d6b0b
@@ -1404,7 +1404,7 @@ HWTEST_F(EnqueueSvmTest, whenInternalAllocationsAreAddedToResidencyContainerThen
|
||||
svmManager->freeSVMAlloc(unifiedMemoryPtr);
|
||||
}
|
||||
|
||||
HWTEST_F(EnqueueSvmTest, whenInternalAllocationIsTriedToBeAddedTwiceToResidencyContainerThenOnlyOnceIsAdded) {
|
||||
HWTEST_F(EnqueueSvmTest, whenInternalAllocationIsTriedToBeAddedTwiceToResidencyContainerThenItIsAdded) {
|
||||
SVMAllocsManager::UnifiedMemoryProperties unifiedMemoryProperties(InternalMemoryType::DEVICE_UNIFIED_MEMORY, context->getRootDeviceIndices(), context->getDeviceBitfields());
|
||||
unifiedMemoryProperties.device = pDevice;
|
||||
auto allocationSize = 4096u;
|
||||
@@ -1428,7 +1428,7 @@ HWTEST_F(EnqueueSvmTest, whenInternalAllocationIsTriedToBeAddedTwiceToResidencyC
|
||||
svmManager->addInternalAllocationsToResidencyContainer(pDevice->getRootDeviceIndex(),
|
||||
residencyContainer,
|
||||
InternalMemoryType::DEVICE_UNIFIED_MEMORY);
|
||||
EXPECT_EQ(1u, residencyContainer.size());
|
||||
EXPECT_EQ(2u, residencyContainer.size());
|
||||
|
||||
svmManager->freeSVMAlloc(unifiedMemoryPtr);
|
||||
}
|
||||
|
||||
@@ -85,10 +85,8 @@ void SVMAllocsManager::addInternalAllocationsToResidencyContainer(uint32_t rootD
|
||||
}
|
||||
|
||||
auto alloc = allocation.second.gpuAllocations.getGraphicsAllocation(rootDeviceIndex);
|
||||
if (residencyContainer.end() == std::find(residencyContainer.begin(), residencyContainer.end(), alloc)) {
|
||||
residencyContainer.push_back(alloc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SVMAllocsManager::makeInternalAllocationsResident(CommandStreamReceiver &commandStreamReceiver, uint32_t requestedTypesMask) {
|
||||
|
||||
Reference in New Issue
Block a user