fix: allocate in system memory when system memory bitfield is set in properties

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2024-04-11 12:23:06 +00:00
committed by Compute-Runtime-Automation
parent e47b88f6e4
commit b24ad6a1b0
5 changed files with 23 additions and 29 deletions

View File

@@ -71,10 +71,6 @@ TEST_F(DrmGlobalBindlessAllocatorTests, givenLocalMemoryWhenSurfaceStatesAllocat
TEST_F(DrmGlobalBindlessAllocatorTests, givenLocalMemoryWhenSpecialSshHeapCreatedInDevicePoolThenGpuAddressIsSetToBindlessBaseAddress) {
debugManager.flags.ForceLocalMemoryAccessMode.set(0);
AllocationData allocData = {};
allocData.type = AllocationType::linearStream;
allocData.size = MemoryConstants::pageSize64k;
executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]->createBindlessHeapsHelper(device.get(), false);
auto gmmHelper = memoryManager->getGmmHelper(rootDeviceIndex);
@@ -88,13 +84,10 @@ TEST_F(DrmGlobalBindlessAllocatorTests, givenLocalMemoryWhenSpecialSshHeapCreate
}
TEST_F(DrmGlobalBindlessAllocatorTests, givenLocalMemoryWhenSurfaceStatesAllocationCreatedInPreferredPoolThenGpuBaseAddressIsSetToCorrectBaseAddress) {
AllocationData allocData = {};
allocData.type = AllocationType::linearStream;
allocData.size = MemoryConstants::pageSize64k;
executionEnvironment->rootDeviceEnvironments[0]->createBindlessHeapsHelper(device.get(), false);
AllocationProperties properties = {rootDeviceIndex, MemoryConstants::pageSize64k, AllocationType::linearStream, {}};
DeviceBitfield localMemoryBitfield{1};
AllocationProperties properties = {rootDeviceIndex, MemoryConstants::pageSize64k, AllocationType::linearStream, localMemoryBitfield};
auto allocation = memoryManager->allocateGraphicsMemoryInPreferredPool(properties, nullptr);
ASSERT_NE(nullptr, allocation);
auto gmmHelper = memoryManager->getGmmHelper(rootDeviceIndex);