mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-11 08:07:19 +08:00
Disable cross-device indirect access
Change-Id: I57655abfc02785dfd68384a1546ee4cfdbea938a Signed-off: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
351af1d3de
commit
8113fafe53
@@ -70,12 +70,20 @@ SvmMapOperation *SVMAllocsManager::MapOperationsTracker::get(const void *regionP
|
||||
return &iter->second;
|
||||
}
|
||||
|
||||
void SVMAllocsManager::addInternalAllocationsToResidencyContainer(ResidencyContainer &residencyContainer, uint32_t requestedTypesMask) {
|
||||
void SVMAllocsManager::addInternalAllocationsToResidencyContainer(uint32_t rootDeviceIndex,
|
||||
ResidencyContainer &residencyContainer,
|
||||
uint32_t requestedTypesMask) {
|
||||
std::unique_lock<SpinLock> lock(mtx);
|
||||
for (auto &allocation : this->SVMAllocs.allocations) {
|
||||
if (allocation.second.memoryType & requestedTypesMask) {
|
||||
residencyContainer.push_back(allocation.second.gpuAllocation);
|
||||
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)) {
|
||||
continue;
|
||||
}
|
||||
residencyContainer.push_back(allocation.second.gpuAllocation);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -96,7 +96,9 @@ class SVMAllocsManager {
|
||||
void insertSvmMapOperation(void *regionSvmPtr, size_t regionSize, void *baseSvmPtr, size_t offset, bool readOnlyMap);
|
||||
void removeSvmMapOperation(const void *regionSvmPtr);
|
||||
SvmMapOperation *getSvmMapOperation(const void *regionPtr);
|
||||
void addInternalAllocationsToResidencyContainer(ResidencyContainer &residencyContainer, uint32_t requestedTypesMask);
|
||||
void addInternalAllocationsToResidencyContainer(uint32_t rootDeviceIndex,
|
||||
ResidencyContainer &residencyContainer,
|
||||
uint32_t requestedTypesMask);
|
||||
void makeInternalAllocationsResident(CommandStreamReceiver &commandStreamReceiver, uint32_t requestedTypesMask);
|
||||
void *createUnifiedAllocationWithDeviceStorage(uint32_t rootDeviceIndex, size_t size, const SvmAllocationProperties &svmProperties, const UnifiedMemoryProperties &unifiedMemoryProperties);
|
||||
void freeSvmAllocationWithDeviceStorage(SvmAllocationData *svmData);
|
||||
|
||||
Reference in New Issue
Block a user