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:
Chandio, Bibrak Qamar
2025-05-07 00:06:28 +00:00
committed by Compute-Runtime-Automation
parent cb4fa456b7
commit c1867ed981
22 changed files with 841 additions and 93 deletions

View File

@@ -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);
}