Add debug flag to override shared system memory capabilities.

Change-Id: I241221757aaab8780c1f2542ed835a03e710adb6
Signed-off-by: Mrozek, Michal <michal.mrozek@intel.com>
This commit is contained in:
Mrozek, Michal
2019-09-04 16:05:27 +02:00
committed by sys_ocldev
parent 118dd39e16
commit bf3210c1cd
4 changed files with 22 additions and 0 deletions

View File

@ -851,6 +851,19 @@ TEST(DeviceGetCapsTest, GivenFlagEnabled64kbPagesWhenSetThenReturnCorrectValue)
EXPECT_TRUE(memoryManager->peek64kbPagesEnabled());
}
TEST(DeviceGetCapsTest, givenUnifiedMemoryShardeSystemFlagWhenDeviceIsCreatedItContainsProperSystemMemorySetting) {
DebugManagerStateRestore restorer;
DebugManager.flags.EnableSharedSystemUsmSupport.set(0u);
std::unique_ptr<MockDevice> device(MockDevice::createWithNewExecutionEnvironment<MockDevice>(platformDevices[0]));
EXPECT_EQ(0u, device->getDeviceInfo().sharedSystemMemCapabilities);
DebugManager.flags.EnableSharedSystemUsmSupport.set(1u);
device.reset(MockDevice::createWithNewExecutionEnvironment<MockDevice>(platformDevices[0]));
cl_unified_shared_memory_capabilities_intel expectedProperties = CL_UNIFIED_SHARED_MEMORY_ACCESS_INTEL | CL_UNIFIED_SHARED_MEMORY_ATOMIC_ACCESS_INTEL | CL_UNIFIED_SHARED_MEMORY_CONCURRENT_ACCESS_INTEL | CL_UNIFIED_SHARED_MEMORY_CONCURRENT_ATOMIC_ACCESS_INTEL;
EXPECT_EQ(expectedProperties, device->getDeviceInfo().sharedSystemMemCapabilities);
}
TEST(DeviceGetCapsTest, givenDeviceWithNullSourceLevelDebuggerWhenCapsAreInitializedThenSourceLevelDebuggerActiveIsSetToFalse) {
std::unique_ptr<Device> device(MockDevice::createWithNewExecutionEnvironment<MockDevice>(platformDevices[0]));

View File

@ -116,3 +116,4 @@ DisableAuxTranslation = 0
EnableFreeMemory = 0
OverrideStatelessMocsIndex = -1
AllocateSharedAllocationsWithCpuAndGpuStorage = -1
EnableSharedSystemUsmSupport = -1