mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-10 12:53:42 +08:00
Move memory properties helper tests from opencl to shared project
Related-To: NEO-7092 Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
88ed486f6b
commit
3a58579bbe
@ -10,6 +10,7 @@ set(IGDRCL_SRCS_tests_helpers
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/base_object_tests.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cl_helper_tests.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cl_hw_parse.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cl_memory_properties_helpers_tests.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/dispatch_info_builder_tests.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/dispatch_info_tests.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/get_info_status_mapper_tests.cpp
|
||||
@ -17,7 +18,6 @@ set(IGDRCL_SRCS_tests_helpers
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware_commands_helper_tests.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/heap_assigner_ocl_tests.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/kmd_notify_tests.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/memory_properties_helpers_tests.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mipmap_tests.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/queue_helpers_tests.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sampler_helpers_tests.cpp
|
||||
|
@ -557,43 +557,3 @@ TEST_F(MemoryPropertiesHelperTests, givenSubDeviceIdWhenParsingExtraMemoryProper
|
||||
EXPECT_EQ(0b10u, memoryProperties.pDevice->getDeviceBitfield().to_ulong());
|
||||
EXPECT_EQ(&context.pSubDevice1->getDevice(), memoryProperties.pDevice);
|
||||
}
|
||||
|
||||
TEST_F(MemoryPropertiesHelperTests, whenQueryingUseSystemMemoryForCrossRootDeviceAccessThenReturnTrueForMultiRootDeviceContexts) {
|
||||
for (auto multiRootDevice : {false, true}) {
|
||||
EXPECT_EQ(multiRootDevice, MemoryPropertiesHelper::useSystemMemoryForCrossRootDeviceAccess(multiRootDevice));
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(MemoryPropertiesHelperTests, givenAllocateBuffersInLocalMemoryForMultiRootDeviceContextsWhenQueryingUseSystemMemoryForCrossRootDeviceAccessThenReturnFalseForMultiRootDeviceContexts) {
|
||||
DebugManagerStateRestore restore;
|
||||
|
||||
for (auto localMemory : {false, true}) {
|
||||
DebugManager.flags.AllocateBuffersInLocalMemoryForMultiRootDeviceContexts.set(localMemory);
|
||||
EXPECT_FALSE(MemoryPropertiesHelper::useSystemMemoryForCrossRootDeviceAccess(false));
|
||||
}
|
||||
|
||||
for (auto localMemory : {false, true}) {
|
||||
DebugManager.flags.AllocateBuffersInLocalMemoryForMultiRootDeviceContexts.set(localMemory);
|
||||
EXPECT_NE(localMemory, MemoryPropertiesHelper::useSystemMemoryForCrossRootDeviceAccess(true));
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(MemoryPropertiesHelperTests, whenQueryingUseMultiStorageForCrossRootDeviceAccessThenReturnFalseForMultiRootDeviceContexts) {
|
||||
for (auto multiRootDevice : {false, true}) {
|
||||
EXPECT_FALSE(MemoryPropertiesHelper::useMultiStorageForCrossRootDeviceAccess(multiRootDevice));
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(MemoryPropertiesHelperTests, givenAllocateBuffersInLocalMemoryForMultiRootDeviceContextsWhenQueryingUseMultiStorageForCrossRootDeviceAccessThenReturnTrueForMultiRootDeviceContexts) {
|
||||
DebugManagerStateRestore restore;
|
||||
|
||||
for (auto localMemory : {false, true}) {
|
||||
DebugManager.flags.AllocateBuffersInLocalMemoryForMultiRootDeviceContexts.set(localMemory);
|
||||
EXPECT_FALSE(MemoryPropertiesHelper::useMultiStorageForCrossRootDeviceAccess(false));
|
||||
}
|
||||
|
||||
for (auto localMemory : {false, true}) {
|
||||
DebugManager.flags.AllocateBuffersInLocalMemoryForMultiRootDeviceContexts.set(localMemory);
|
||||
EXPECT_EQ(localMemory, MemoryPropertiesHelper::useMultiStorageForCrossRootDeviceAccess(true));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user