mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 21:18:24 +08:00
feature: atomic attributes for shared system alloc
Related-To: NEO-13715, NEO-14862 Signed-off-by: Chandio, Bibrak Qamar <bibrak.qamar.chandio@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
cb4fa456b7
commit
c1867ed981
@@ -1075,6 +1075,14 @@ static NEO::SubDeviceIdsVec getSubDeviceIds(CommandStreamReceiver &csr) {
|
||||
return subDeviceIds;
|
||||
};
|
||||
|
||||
void SVMAllocsManager::sharedSystemMemAdvise(Device &device, MemAdvise memAdviseOp, const void *ptr, const size_t size) {
|
||||
|
||||
// All vm_ids on a single device for shared system USM allocation
|
||||
auto subDeviceIds = NEO::SubDevice::getSubDeviceIdsFromDevice(device);
|
||||
|
||||
memoryManager->setSharedSystemMemAdvise(ptr, size, memAdviseOp, subDeviceIds, device.getRootDeviceIndex());
|
||||
}
|
||||
|
||||
void SVMAllocsManager::prefetchMemory(Device &device, CommandStreamReceiver &commandStreamReceiver, const void *ptr, const size_t size) {
|
||||
|
||||
auto svmData = getSVMAlloc(ptr);
|
||||
@@ -1112,6 +1120,14 @@ void SVMAllocsManager::prefetchSVMAllocs(Device &device, CommandStreamReceiver &
|
||||
}
|
||||
}
|
||||
|
||||
void SVMAllocsManager::sharedSystemAtomicAccess(Device &device, AtomicAccessMode mode, const void *ptr, const size_t size) {
|
||||
|
||||
// All vm_ids on a single device for shared system USM allocation
|
||||
auto subDeviceIds = NEO::SubDevice::getSubDeviceIdsFromDevice(device);
|
||||
|
||||
memoryManager->setSharedSystemAtomicAccess(ptr, size, mode, subDeviceIds, device.getRootDeviceIndex());
|
||||
}
|
||||
|
||||
std::unique_lock<std::mutex> SVMAllocsManager::obtainOwnership() {
|
||||
return std::unique_lock<std::mutex>(mtxForIndirectAccess);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user