mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
Improve logic in addInternalAllocationsToResidencyContainer
Change-Id: I0be0082d2d70623867b691629cac09f5d653fc0d Signed-off: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
4b6f8b415e
commit
74ac02e1f3
@@ -75,12 +75,8 @@ void SVMAllocsManager::addInternalAllocationsToResidencyContainer(uint32_t rootD
|
||||
uint32_t requestedTypesMask) {
|
||||
std::unique_lock<SpinLock> lock(mtx);
|
||||
for (auto &allocation : this->SVMAllocs.allocations) {
|
||||
if (!(allocation.second.memoryType & requestedTypesMask)) {
|
||||
continue;
|
||||
}
|
||||
if ((allocation.second.memoryType & InternalMemoryType::DEVICE_UNIFIED_MEMORY ||
|
||||
allocation.second.memoryType & InternalMemoryType::SHARED_UNIFIED_MEMORY) &&
|
||||
(static_cast<Device *>(allocation.second.device)->getRootDeviceIndex() != rootDeviceIndex)) {
|
||||
if (!(allocation.second.memoryType & requestedTypesMask) ||
|
||||
(nullptr == allocation.second.gpuAllocations.getGraphicsAllocation(rootDeviceIndex))) {
|
||||
continue;
|
||||
}
|
||||
residencyContainer.push_back(allocation.second.gpuAllocations.getGraphicsAllocation(rootDeviceIndex));
|
||||
|
||||
Reference in New Issue
Block a user