Revert "Move kernel globals from SVM to USM device"

This reverts commit 4d00a7ee8c.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
Compute-Runtime-Validation
2022-09-13 18:04:46 +02:00
committed by Compute-Runtime-Automation
parent 0d0d6a300e
commit b874f0840e
3 changed files with 31 additions and 21 deletions

View File

@@ -39,16 +39,14 @@ GraphicsAllocation *allocateGlobalsSurface(NEO::SVMAllocsManager *const svmAlloc
rootDeviceIndices.push_back(rootDeviceIndex);
std::map<uint32_t, DeviceBitfield> subDeviceBitfields;
subDeviceBitfields.insert({rootDeviceIndex, deviceBitfield});
NEO::SVMAllocsManager::UnifiedMemoryProperties unifiedMemoryProperties(InternalMemoryType::DEVICE_UNIFIED_MEMORY, rootDeviceIndices, subDeviceBitfields);
unifiedMemoryProperties.device = &device;
auto ptr = svmAllocManager->createUnifiedMemoryAllocation(size, unifiedMemoryProperties);
auto ptr = svmAllocManager->createSVMAlloc(size, svmProps, rootDeviceIndices, subDeviceBitfields);
DEBUG_BREAK_IF(ptr == nullptr);
if (ptr == nullptr) {
return nullptr;
}
auto usmAlloc = svmAllocManager->getSVMAlloc(ptr);
UNRECOVERABLE_IF(usmAlloc == nullptr);
gpuAllocation = usmAlloc->gpuAllocations.getGraphicsAllocation(rootDeviceIndex);
auto svmAlloc = svmAllocManager->getSVMAlloc(ptr);
UNRECOVERABLE_IF(svmAlloc == nullptr);
gpuAllocation = svmAlloc->gpuAllocations.getGraphicsAllocation(rootDeviceIndex);
} else {
auto allocationType = constant ? AllocationType::CONSTANT_SURFACE : AllocationType::GLOBAL_SURFACE;
gpuAllocation = device.getMemoryManager()->allocateGraphicsMemoryWithProperties({rootDeviceIndex,