mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
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:

committed by
sys_ocldev

parent
118dd39e16
commit
bf3210c1cd
@ -353,5 +353,12 @@ void Device::initializeCaps() {
|
||||
deviceInfo.singleDeviceSharedMemCapabilities = hwInfoConfig->getSingleDeviceSharedMemCapabilities();
|
||||
deviceInfo.crossDeviceSharedMemCapabilities = hwInfoConfig->getCrossDeviceSharedMemCapabilities();
|
||||
deviceInfo.sharedSystemMemCapabilities = hwInfoConfig->getSharedSystemMemCapabilities();
|
||||
if (DebugManager.flags.EnableSharedSystemUsmSupport.get() != -1) {
|
||||
if (DebugManager.flags.EnableSharedSystemUsmSupport.get() == 0) {
|
||||
deviceInfo.sharedSystemMemCapabilities = 0u;
|
||||
} else {
|
||||
deviceInfo.sharedSystemMemCapabilities = 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace NEO
|
||||
|
@ -122,6 +122,7 @@ DECLARE_DEBUG_VARIABLE(int32_t, CsrDispatchMode, 0, "Chooses DispatchMode for Cs
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, OverrideDefaultFP64Settings, -1, "-1: dont override, 0: disable, 1: enable.")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, RenderCompressedImagesEnabled, -1, "-1: default, 0: disabled, 1: enabled")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, RenderCompressedBuffersEnabled, -1, "-1: default, 0: disabled, 1: enabled")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, EnableSharedSystemUsmSupport, -1, "-1: default, 0: shared system memory disabled, 1: shared system memory enabled")
|
||||
|
||||
/*DRIVER TOGGLES*/
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, ForceOCLVersion, 0, "Force specific OpenCL API version")
|
||||
|
@ -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]));
|
||||
|
||||
|
@ -116,3 +116,4 @@ DisableAuxTranslation = 0
|
||||
EnableFreeMemory = 0
|
||||
OverrideStatelessMocsIndex = -1
|
||||
AllocateSharedAllocationsWithCpuAndGpuStorage = -1
|
||||
EnableSharedSystemUsmSupport = -1
|
Reference in New Issue
Block a user