diff --git a/opencl/test/unit_test/device/device_caps_tests.cpp b/opencl/test/unit_test/device/device_caps_tests.cpp index 945fc2e981..8a69ba7d23 100644 --- a/opencl/test/unit_test/device/device_caps_tests.cpp +++ b/opencl/test/unit_test/device/device_caps_tests.cpp @@ -1750,8 +1750,6 @@ TEST_F(DeviceGetCapsTest, givenRootDeviceWithSubDevicesWhenQueriedForCacheSizeTh } TEST_F(DeviceGetCapsTest, givenClKhrExternalMemoryExtensionEnabledWhenCapsAreCreatedThenDeviceInfoReportsSupportOfExternalMemorySharing) { - DebugManagerStateRestore dbgRestorer; - DebugManager.flags.ClKhrExternalMemoryExtension.set(1); auto device = std::make_unique(MockDevice::createWithNewExecutionEnvironment(defaultHwInfo.get())); EXPECT_TRUE(device->deviceInfo.externalMemorySharing); } diff --git a/opencl/test/unit_test/os_interface/linux/device_os_tests.cpp b/opencl/test/unit_test/os_interface/linux/device_os_tests.cpp index 3d76ac6abc..0e6b3375fe 100644 --- a/opencl/test/unit_test/os_interface/linux/device_os_tests.cpp +++ b/opencl/test/unit_test/os_interface/linux/device_os_tests.cpp @@ -49,8 +49,6 @@ TEST(DeviceOsTest, GivenDefaultClDeviceWhenCheckingForOsSpecificExtensionsThenCo TEST(DeviceOsTest, GivenDefaultClDeviceWhenCheckingForOsSpecificExtensionsThenDeviceInfoReportsSupportOfExternalMemorySharing) { VariableBackup backup(&ultHwConfig); - DebugManagerStateRestore stateRestore; - DebugManager.flags.ClKhrExternalMemoryExtension.set(1); ultHwConfig.useMockedPrepareDeviceEnvironmentsFunc = false; auto hwInfo = defaultHwInfo.get(); diff --git a/opencl/test/unit_test/os_interface/linux/platform_tests_lin.cpp b/opencl/test/unit_test/os_interface/linux/platform_tests_lin.cpp index 9d5cca8c55..0e32d20892 100644 --- a/opencl/test/unit_test/os_interface/linux/platform_tests_lin.cpp +++ b/opencl/test/unit_test/os_interface/linux/platform_tests_lin.cpp @@ -13,17 +13,7 @@ using namespace NEO; -struct GetPlatformInfoLinuxTest : Test { - void SetUp() override { - DebugManager.flags.ClKhrExternalMemoryExtension.set(1); - Test::SetUp(); - } - - void TearDown() override { - Test::TearDown(); - } - DebugManagerStateRestore stateRestore; -}; +using GetPlatformInfoLinuxTest = Test; TEST_F(GetPlatformInfoLinuxTest, GivenPlatformWhenGettingInfoForExternalMemoryThenCorrectHandlesAreReturned) { size_t retSize = 0; diff --git a/opencl/test/unit_test/os_interface/windows/device_os_tests.cpp b/opencl/test/unit_test/os_interface/windows/device_os_tests.cpp index d50b1597b5..9566abb636 100644 --- a/opencl/test/unit_test/os_interface/windows/device_os_tests.cpp +++ b/opencl/test/unit_test/os_interface/windows/device_os_tests.cpp @@ -46,8 +46,6 @@ TEST(DeviceOsTest, GivenDefaultClDeviceWhenCheckingForOsSpecificExtensionsThenCo TEST(DeviceOsTest, GivenDefaultClDeviceWhenCheckingForOsSpecificExtensionsThenDeviceInfoReportsSupportOfExternalMemorySharing) { VariableBackup backup(&ultHwConfig); - DebugManagerStateRestore stateRestore; - DebugManager.flags.ClKhrExternalMemoryExtension.set(1); ultHwConfig.useMockedPrepareDeviceEnvironmentsFunc = false; auto hwInfo = defaultHwInfo.get(); diff --git a/opencl/test/unit_test/os_interface/windows/platform_tests_win.cpp b/opencl/test/unit_test/os_interface/windows/platform_tests_win.cpp index f275c854ed..11ab339909 100644 --- a/opencl/test/unit_test/os_interface/windows/platform_tests_win.cpp +++ b/opencl/test/unit_test/os_interface/windows/platform_tests_win.cpp @@ -13,17 +13,7 @@ using namespace NEO; -struct GetPlatformInfoWindowsTest : Test { - void SetUp() override { - DebugManager.flags.ClKhrExternalMemoryExtension.set(1); - Test::SetUp(); - } - - void TearDown() override { - Test::TearDown(); - } - DebugManagerStateRestore stateRestore; -}; +using GetPlatformInfoWindowsTest = Test; TEST_F(GetPlatformInfoWindowsTest, GivenPlatformWhenGettingInfoForExternalMemoryThenCorrectHandlesAreReturned) { size_t retSize = 0; diff --git a/shared/source/debug_settings/debug_variables_base.inl b/shared/source/debug_settings/debug_variables_base.inl index 19b095aee5..2eec9fe36b 100644 --- a/shared/source/debug_settings/debug_variables_base.inl +++ b/shared/source/debug_settings/debug_variables_base.inl @@ -80,7 +80,7 @@ DECLARE_DEBUG_VARIABLE(bool, ForceTheoreticalMaxWorkGroupCount, false, "Do not a DECLARE_DEBUG_VARIABLE(bool, DontDisableZebinIfVmeUsed, false, "When enabled, driver will not add -cl-intel-disable-zebin internal option when vme is used") DECLARE_DEBUG_VARIABLE(bool, AppendMemoryPrefetchForKmdMigratedSharedAllocations, true, "Allow prefetching shared memory to the device associated with the specified command list") DECLARE_DEBUG_VARIABLE(bool, ForceMemoryPrefetchForKmdMigratedSharedAllocations, false, "Force prefetch of shared memory in command queue execute command lists") -DECLARE_DEBUG_VARIABLE(bool, ClKhrExternalMemoryExtension, false, "Enable cl_khr_external_memory extension") +DECLARE_DEBUG_VARIABLE(bool, ClKhrExternalMemoryExtension, true, "Enable cl_khr_external_memory extension") DECLARE_DEBUG_VARIABLE(bool, WaitForMemoryRelease, false, "Wait for memory release when out of memory") DECLARE_DEBUG_VARIABLE(bool, RemoveRestrictionsOnNumberOfThreadsInGpgpuThreadGroup, 0, "0 - default disabled, 1- remove restrictions on NumberOfThreadsInGpgpuThreadGroup in INTERFACE_DESCRIPTOR_DATA") DECLARE_DEBUG_VARIABLE(std::string, ForceDeviceId, std::string("unk"), "Override device id in AUB/TBX mode") diff --git a/shared/test/common/test_files/igdrcl.config b/shared/test/common/test_files/igdrcl.config index bc01bbbfac..72ec3446fc 100644 --- a/shared/test/common/test_files/igdrcl.config +++ b/shared/test/common/test_files/igdrcl.config @@ -443,7 +443,7 @@ LimitEngineCountForVirtualCcs = -1 ForceRunAloneContext = -1 AppendMemoryPrefetchForKmdMigratedSharedAllocations = 1 ForceMemoryPrefetchForKmdMigratedSharedAllocations = 0 -ClKhrExternalMemoryExtension = 0 +ClKhrExternalMemoryExtension = 1 WaitForMemoryRelease = 0 KMDSupportForCrossTileMigrationPolicy = -1 CreateContextWithAccessCounters = -1 diff --git a/shared/test/unit_test/helpers/compiler_product_helper_tests.cpp b/shared/test/unit_test/helpers/compiler_product_helper_tests.cpp index 8930a2e5e9..8ce802a173 100644 --- a/shared/test/unit_test/helpers/compiler_product_helper_tests.cpp +++ b/shared/test/unit_test/helpers/compiler_product_helper_tests.cpp @@ -245,18 +245,18 @@ TEST_F(CompilerProductHelperFixture, givenHwInfoWithCLVersion30ThenReportsClKhrE hwInfo.capabilityTable.clVersionSupport = 30; auto extensions = compilerProductHelper.getDeviceExtensions(hwInfo, releaseHelper); - EXPECT_FALSE(hasSubstr(extensions, std::string("cl_khr_external_memory"))); - - DebugManagerStateRestore dbgRestorer; - DebugManager.flags.ClKhrExternalMemoryExtension.set(1); + EXPECT_TRUE(hasSubstr(extensions, std::string("cl_khr_external_memory"))); hwInfo.capabilityTable.clVersionSupport = 21; extensions = compilerProductHelper.getDeviceExtensions(hwInfo, releaseHelper); EXPECT_FALSE(hasSubstr(extensions, std::string("cl_khr_external_memory"))); + DebugManagerStateRestore dbgRestorer; + DebugManager.flags.ClKhrExternalMemoryExtension.set(0); + hwInfo.capabilityTable.clVersionSupport = 30; extensions = compilerProductHelper.getDeviceExtensions(hwInfo, releaseHelper); - EXPECT_TRUE(hasSubstr(extensions, std::string("cl_khr_external_memory"))); + EXPECT_FALSE(hasSubstr(extensions, std::string("cl_khr_external_memory"))); } HWTEST2_F(CompilerProductHelperFixture, GivenAtMostGen11DeviceWhenCheckingIfIntegerDotExtensionIsSupportedThenFalseReturned, IsAtMostGen11) {