feature: support SVM heap in reserveVirtualMem

Related-To: NEO-11981

Signed-off-by: Wenbin Lu <wenbin.lu@intel.com>
This commit is contained in:
Wenbin Lu
2024-09-09 19:54:52 +00:00
committed by Compute-Runtime-Automation
parent e30b8c0300
commit bfaeeb01d6
18 changed files with 518 additions and 30 deletions

View File

@@ -14,7 +14,6 @@
#include "shared/source/os_interface/windows/dxgi_wrapper.h"
#include "shared/source/os_interface/windows/wddm/um_km_data_translator.h"
#include "shared/source/os_interface/windows/windows_wrapper.h"
#include "shared/source/release_helper/release_helper.h"
#include "shared/source/utilities/tag_allocator.h"
#include "shared/test/common/helpers/debug_manager_state_restore.h"
#include "shared/test/common/helpers/execution_environment_helper.h"
@@ -29,7 +28,6 @@
#include "shared/test/common/mocks/mock_gmm_page_table_mngr.h"
#include "shared/test/common/mocks/mock_gmm_resource_info.h"
#include "shared/test/common/mocks/mock_memory_manager.h"
#include "shared/test/common/mocks/mock_os_context.h"
#include "shared/test/common/mocks/mock_product_helper.h"
#include "shared/test/common/mocks/mock_release_helper.h"
#include "shared/test/common/mocks/windows/mock_wddm_allocation.h"
@@ -1318,6 +1316,13 @@ TEST_F(WddmMemoryManagerSimpleTest, givenWddmMemoryManagerWhenGpuAddressIsReserv
memoryManager->freeGpuAddress(addressRange, 0);
}
TEST_F(WddmMemoryManagerSimpleTest, givenWddmMemoryManagerWhenCpuAddressIsReservedAndFreedThenAddressRangeIsNonZero) {
auto addressRange = memoryManager->reserveCpuAddress(0, 1234);
EXPECT_NE(0u, addressRange.address);
EXPECT_EQ(1234u, addressRange.size);
memoryManager->freeCpuAddress(addressRange);
}
TEST_F(WddmMemoryManagerSimpleTest, givenWddmMemoryManagerWhenAllocatingWithGpuVaThenNullptrIsReturned) {
AllocationData allocationData;