From aa7455568271b88433c0d75c83b452dd33d8783e Mon Sep 17 00:00:00 2001 From: Lukasz Jobczyk Date: Thu, 11 Sep 2025 08:17:47 +0000 Subject: [PATCH] refactor: remove unused variable Signed-off-by: Lukasz Jobczyk --- level_zero/CMakeLists.txt | 2 - .../unit_tests/fixtures/cmdlist_fixture.cpp | 1 - .../test/unit_tests/fixtures/device_fixture.h | 10 ++-- .../fixtures/multi_tile_fixture.cpp | 4 +- .../unit_tests/fixtures/multi_tile_fixture.h | 1 - .../sources/device/test_l0_device.cpp | 14 ++--- opencl/source/dll/CMakeLists.txt | 2 - .../dispatch_walker_tests_xehp_and_later.cpp | 57 ------------------- .../enqueue_with_walker_partition_tests.cpp | 5 +- opencl/test/unit_test/linux/CMakeLists.txt | 1 - .../test/unit_test/linux/main_linux_dll.cpp | 4 -- opencl/test/unit_test/windows/CMakeLists.txt | 1 - .../command_container/implicit_scaling.cpp | 4 +- shared/source/dll/linux/os_interface.cpp | 16 ------ shared/source/dll/windows/os_interface.cpp | 14 ----- .../source/helpers/gfx_core_helper_base.inl | 2 +- shared/source/os_interface/os_interface.h | 1 - shared/test/common/libult/os_interface.cpp | 4 +- ..._encode_dispatch_kernel_xehp_and_later.cpp | 2 - .../encoders/test_implicit_scaling.cpp | 13 +---- .../fixtures/implicit_scaling_fixture.cpp | 1 - .../helpers/gfx_core_helper_tests.cpp | 20 ------- ...rm_command_stream_xehp_and_later_tests.cpp | 1 - .../windows/os_interface_win_tests.cpp | 4 -- 24 files changed, 15 insertions(+), 169 deletions(-) delete mode 100644 shared/source/dll/linux/os_interface.cpp delete mode 100644 shared/source/dll/windows/os_interface.cpp diff --git a/level_zero/CMakeLists.txt b/level_zero/CMakeLists.txt index 3ed065f87a..860f899ae7 100644 --- a/level_zero/CMakeLists.txt +++ b/level_zero/CMakeLists.txt @@ -251,7 +251,6 @@ if(BUILD_WITH_L0) ${NEO_SHARED_DIRECTORY}/dll/wddm/wddm_create.cpp ${NEO_SHARED_DIRECTORY}/dll/windows/debugger_l0_windows.cpp ${NEO_SHARED_DIRECTORY}/dll/windows${BRANCH_DIR_SUFFIX}/options_windows.cpp - ${NEO_SHARED_DIRECTORY}/dll/windows/os_interface.cpp ${NEO_SHARED_DIRECTORY}/gmm_helper/windows/gmm_memory_base.cpp ${NEO_SHARED_DIRECTORY}/gmm_helper/windows/gmm_memory.cpp ${NEO_SHARED_DIRECTORY}/os_interface/windows/gmm_interface_win.cpp @@ -278,7 +277,6 @@ if(BUILD_WITH_L0) ${NEO_SHARED_DIRECTORY}/dll/linux/debugger_l0_dll_linux.cpp ${NEO_SHARED_DIRECTORY}/dll/linux/drm_neo_create.cpp ${NEO_SHARED_DIRECTORY}/dll/linux${BRANCH_DIR_SUFFIX}/options_linux.cpp - ${NEO_SHARED_DIRECTORY}/dll/linux/os_interface.cpp ${NEO_SHARED_DIRECTORY}/os_interface/linux/gmm_interface_linux.cpp ) if(NOT DISABLE_WDDM_LINUX) diff --git a/level_zero/core/test/unit_tests/fixtures/cmdlist_fixture.cpp b/level_zero/core/test/unit_tests/fixtures/cmdlist_fixture.cpp index 8138116ce0..8d00f2353e 100644 --- a/level_zero/core/test/unit_tests/fixtures/cmdlist_fixture.cpp +++ b/level_zero/core/test/unit_tests/fixtures/cmdlist_fixture.cpp @@ -71,7 +71,6 @@ void DirectSubmissionCommandListFixture::tearDown() { void MultiTileCommandListFixtureInit::setUp() { debugManager.flags.EnableImplicitScaling.set(1); - osLocalMemoryBackup = std::make_unique>(&NEO::OSInterface::osEnableLocalMemory, true); apiSupportBackup = std::make_unique>(&NEO::ImplicitScaling::apiSupport, true); SingleRootMultiSubDeviceFixture::setUp(); diff --git a/level_zero/core/test/unit_tests/fixtures/device_fixture.h b/level_zero/core/test/unit_tests/fixtures/device_fixture.h index 1dc3844bb9..2f8eed1418 100644 --- a/level_zero/core/test/unit_tests/fixtures/device_fixture.h +++ b/level_zero/core/test/unit_tests/fixtures/device_fixture.h @@ -287,7 +287,7 @@ class FalseUnSupportedFeatureGpuCpuTime : public NEO::OSTime { } }; -template +template struct MultiSubDeviceFixture : public DeviceFixture { void setUp() { setUp(nullptr); @@ -297,7 +297,6 @@ struct MultiSubDeviceFixture : public DeviceFixture { debugManager.flags.CreateMultipleSubDevices.set(2); debugManager.flags.EnableWalkerPartition.set(enablePartitionWalker); debugManager.flags.EnableImplicitScaling.set(enableImplicitScaling); - osLocalMemoryBackup = std::make_unique>(&NEO::OSInterface::osEnableLocalMemory, osLocalMemory); apiSupportBackup = std::make_unique>(&NEO::ImplicitScaling::apiSupport, apiSupport); if (hwInfo == nullptr) { @@ -313,11 +312,10 @@ struct MultiSubDeviceFixture : public DeviceFixture { L0::DeviceImp *deviceImp = nullptr; NEO::Device *subDevice = nullptr; DebugManagerStateRestore restorer; - std::unique_ptr> osLocalMemoryBackup; std::unique_ptr> apiSupportBackup; }; -struct MultiSubDeviceWithContextGroupAndImplicitScalingTest : public MultiSubDeviceFixture, public ::testing::Test { +struct MultiSubDeviceWithContextGroupAndImplicitScalingTest : public MultiSubDeviceFixture, public ::testing::Test { void SetUp() override { debugManager.flags.ContextGroupSize.set(8); @@ -325,11 +323,11 @@ struct MultiSubDeviceWithContextGroupAndImplicitScalingTest : public MultiSubDev hardwareInfo.featureTable.ftrBcsInfo = 0b1111; hardwareInfo.capabilityTable.blitterOperationsSupported = true; - MultiSubDeviceFixture::setUp(&hardwareInfo); + MultiSubDeviceFixture::setUp(&hardwareInfo); } void TearDown() override { - MultiSubDeviceFixture::tearDown(); + MultiSubDeviceFixture::tearDown(); } DebugManagerStateRestore restorer; HardwareInfo hardwareInfo; diff --git a/level_zero/core/test/unit_tests/fixtures/multi_tile_fixture.cpp b/level_zero/core/test/unit_tests/fixtures/multi_tile_fixture.cpp index 5bf44d62ba..6f245894f7 100644 --- a/level_zero/core/test/unit_tests/fixtures/multi_tile_fixture.cpp +++ b/level_zero/core/test/unit_tests/fixtures/multi_tile_fixture.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022-2024 Intel Corporation + * Copyright (C) 2022-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -18,7 +18,7 @@ namespace L0 { namespace ult { MultiTileCommandListAppendLaunchKernelFixture::MultiTileCommandListAppendLaunchKernelFixture() : backup({&NEO::ImplicitScaling::apiSupport, true}) {} -MultiTileImmediateCommandListAppendLaunchKernelFixture::MultiTileImmediateCommandListAppendLaunchKernelFixture() : backupApiSupport({&NEO::ImplicitScaling::apiSupport, true}), backupLocalMemory({&NEO::OSInterface::osEnableLocalMemory, true}) {} +MultiTileImmediateCommandListAppendLaunchKernelFixture::MultiTileImmediateCommandListAppendLaunchKernelFixture() : backupApiSupport({&NEO::ImplicitScaling::apiSupport, true}) {} void MultiTileCommandListAppendLaunchKernelFixture::setUp() { debugManager.flags.EnableImplicitScaling.set(1); diff --git a/level_zero/core/test/unit_tests/fixtures/multi_tile_fixture.h b/level_zero/core/test/unit_tests/fixtures/multi_tile_fixture.h index 1a8d7101cd..af55b64597 100644 --- a/level_zero/core/test/unit_tests/fixtures/multi_tile_fixture.h +++ b/level_zero/core/test/unit_tests/fixtures/multi_tile_fixture.h @@ -37,7 +37,6 @@ struct MultiTileImmediateCommandListAppendLaunchKernelFixture : public MultiDevi ContextImp *contextImp = nullptr; L0::Device *device = nullptr; VariableBackup backupApiSupport; - VariableBackup backupLocalMemory; }; } // namespace ult diff --git a/level_zero/core/test/unit_tests/sources/device/test_l0_device.cpp b/level_zero/core/test/unit_tests/sources/device/test_l0_device.cpp index 811a032708..67dc68e2d3 100644 --- a/level_zero/core/test/unit_tests/sources/device/test_l0_device.cpp +++ b/level_zero/core/test/unit_tests/sources/device/test_l0_device.cpp @@ -5029,7 +5029,7 @@ TEST_F(zeDeviceSystemBarrierTest, whenCallingSystemBarrierThenReturnErrorUnsuppo EXPECT_EQ(ZE_RESULT_ERROR_UNSUPPORTED_FEATURE, result); } -using MultiSubDeviceTest = Test>; +using MultiSubDeviceTest = Test>; TEST_F(MultiSubDeviceTest, GivenApiSupportAndLocalMemoryEnabledWhenDeviceContainsSubDevicesThenItIsImplicitScalingCapable) { auto &gfxCoreHelper = neoDevice->getGfxCoreHelper(); if (gfxCoreHelper.platformSupportsImplicitScaling(neoDevice->getRootDeviceEnvironment())) { @@ -5041,25 +5041,19 @@ TEST_F(MultiSubDeviceTest, GivenApiSupportAndLocalMemoryEnabledWhenDeviceContain } } -using MultiSubDeviceTestNoApi = Test>; +using MultiSubDeviceTestNoApi = Test>; TEST_F(MultiSubDeviceTestNoApi, GivenNoApiSupportAndLocalMemoryEnabledWhenDeviceContainsSubDevicesThenItIsNotImplicitScalingCapable) { EXPECT_FALSE(device->isImplicitScalingCapable()); EXPECT_EQ(subDevice, deviceImp->getActiveDevice()); } -using MultiSubDeviceTestNoLocalMemory = Test>; -TEST_F(MultiSubDeviceTestNoLocalMemory, GivenApiSupportAndLocalMemoryDisabledWhenDeviceContainsSubDevicesThenItIsNotImplicitScalingCapable) { - EXPECT_FALSE(device->isImplicitScalingCapable()); - EXPECT_EQ(subDevice, deviceImp->getActiveDevice()); -} - -using MultiSubDeviceTestNoApiForceOn = Test>; +using MultiSubDeviceTestNoApiForceOn = Test>; TEST_F(MultiSubDeviceTestNoApiForceOn, GivenNoApiSupportAndLocalMemoryEnabledWhenForcedImplicitScalingThenItIsImplicitScalingCapable) { EXPECT_TRUE(device->isImplicitScalingCapable()); EXPECT_EQ(neoDevice, deviceImp->getActiveDevice()); } -using MultiSubDeviceEnabledImplicitScalingTest = Test>; +using MultiSubDeviceEnabledImplicitScalingTest = Test>; TEST_F(MultiSubDeviceEnabledImplicitScalingTest, GivenApiSupportAndLocalMemoryEnabledWhenDeviceContainsSubDevicesAndSupportsImplicitScalingThenItIsImplicitScalingCapable) { EXPECT_TRUE(device->isImplicitScalingCapable()); EXPECT_EQ(neoDevice, deviceImp->getActiveDevice()); diff --git a/opencl/source/dll/CMakeLists.txt b/opencl/source/dll/CMakeLists.txt index 226448001a..0a8dbf1cef 100644 --- a/opencl/source/dll/CMakeLists.txt +++ b/opencl/source/dll/CMakeLists.txt @@ -43,7 +43,6 @@ set(RUNTIME_SRCS_DLL_LINUX ${NEO_SHARED_DIRECTORY}/dll/linux/drm_neo_create.cpp ${NEO_SHARED_DIRECTORY}/dll/linux${BRANCH_DIR_SUFFIX}/options_linux.cpp ${NEO_SHARED_DIRECTORY}/dll/linux/options_linux.inl - ${NEO_SHARED_DIRECTORY}/dll/linux/os_interface.cpp ${NEO_SHARED_DIRECTORY}/dll/devices${BRANCH_DIR_SUFFIX}devices.inl ${NEO_SHARED_DIRECTORY}/dll/devices/devices_base.inl ${NEO_SHARED_DIRECTORY}/os_interface/linux/sys_calls_linux.cpp @@ -66,7 +65,6 @@ set(RUNTIME_SRCS_DLL_WINDOWS ${NEO_SHARED_DIRECTORY}/dll/windows/debugger_l0_windows.cpp ${NEO_SHARED_DIRECTORY}/dll/windows${BRANCH_DIR_SUFFIX}/options_windows.cpp ${NEO_SHARED_DIRECTORY}/dll/windows/options_windows.inl - ${NEO_SHARED_DIRECTORY}/dll/windows/os_interface.cpp ${NEO_SHARED_DIRECTORY}/gmm_helper/windows/gmm_memory.cpp ${NEO_SHARED_DIRECTORY}/os_interface/windows/os_memory_virtual_alloc.cpp ${NEO_SHARED_DIRECTORY}/os_interface/windows/sys_calls.cpp diff --git a/opencl/test/unit_test/command_queue/dispatch_walker_tests_xehp_and_later.cpp b/opencl/test/unit_test/command_queue/dispatch_walker_tests_xehp_and_later.cpp index 2b37f7b7fa..4877e75ef5 100644 --- a/opencl/test/unit_test/command_queue/dispatch_walker_tests_xehp_and_later.cpp +++ b/opencl/test/unit_test/command_queue/dispatch_walker_tests_xehp_and_later.cpp @@ -1385,9 +1385,6 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, GivenPipeContr } HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, whenProgramWalkerIsCalledThenWalkerPartitionLogicIsExecuted) { - if (!OSInterface::osEnableLocalMemory) { - GTEST_SKIP(); - } using WalkerType = typename FamilyType::DefaultWalkerType; debugManager.flags.EnableWalkerPartition.set(1u); @@ -1405,9 +1402,6 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, whenProgramWal } HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, whenProgramWalkerIsCalledAndForceSynchronizeWalkerInWpariModeThenWalkerPartitionLogicIsExecuted) { - if (!OSInterface::osEnableLocalMemory) { - GTEST_SKIP(); - } using WalkerType = typename FamilyType::DefaultWalkerType; debugManager.flags.EnableWalkerPartition.set(1u); @@ -1426,9 +1420,6 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, whenProgramWal } HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, whenProgramWalkerIsCalledWithPartitionLogicDisabledThenWalkerPartitionLogicIsNotExecuted) { - if (!OSInterface::osEnableLocalMemory) { - GTEST_SKIP(); - } using WalkerType = typename FamilyType::DefaultWalkerType; debugManager.flags.EnableWalkerPartition.set(0u); @@ -1446,9 +1437,6 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, whenProgramWal } HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, whenQueueIsCreatedWithMultiEngineSupportAndEnqueueIsDoneThenWalkerIsPartitioned) { - if (!OSInterface::osEnableLocalMemory) { - GTEST_SKIP(); - } using WalkerType = typename FamilyType::DefaultWalkerType; debugManager.flags.EnableWalkerPartition.set(1u); @@ -1468,9 +1456,6 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, whenQueueIsCre } HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, whenProgramWalkerIsCalledWithDebugRegistryOverridesThenWalkerContainsProperParameters) { - if (!OSInterface::osEnableLocalMemory) { - GTEST_SKIP(); - } debugManager.flags.EnableWalkerPartition.set(1u); debugManager.flags.ExperimentalSetWalkerPartitionCount.set(2u); debugManager.flags.ExperimentalSetWalkerPartitionType.set(2u); @@ -1514,31 +1499,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, whenProgramWal EXPECT_FALSE(walker->getWorkloadPartitionEnable()); } -HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, whenThereIsNoLocalMemorySupportThenDoNotPartition) { - debugManager.flags.EnableWalkerPartition.set(1u); - debugManager.flags.ExperimentalSetWalkerPartitionCount.set(2u); - debugManager.flags.ExperimentalSetWalkerPartitionType.set(2u); - VariableBackup backup(&OSInterface::osEnableLocalMemory, false); - using WalkerType = typename FamilyType::DefaultWalkerType; - - auto cmdQ = std::make_unique>(context.get(), device.get(), nullptr); - size_t gws[] = {1, 1, 1}; - cmdQ->enqueueKernel(kernel->mockKernel, 1, nullptr, gws, nullptr, 0, nullptr, nullptr); - - ClHardwareParse hwParser; - hwParser.parseCommands(*cmdQ); - - auto walker = genCmdCast(hwParser.cmdWalker); - ASSERT_NE(nullptr, walker); - EXPECT_EQ(WalkerType::PARTITION_TYPE::PARTITION_TYPE_DISABLED, walker->getPartitionType()); - EXPECT_EQ(0u, walker->getPartitionSize()); - EXPECT_FALSE(walker->getWorkloadPartitionEnable()); -} - HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, whenEnqueueIsBlockedOnUserEventThenDoNotPartition) { - if (!OSInterface::osEnableLocalMemory) { - GTEST_SKIP(); - } debugManager.flags.EnableWalkerPartition.set(1u); debugManager.flags.ExperimentalSetWalkerPartitionCount.set(2u); debugManager.flags.ExperimentalSetWalkerPartitionType.set(2u); @@ -1583,9 +1544,6 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, whenDispatchPr HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, givenOpenClWhenEnqueuePartitionWalkerThenExpectNoSelfCleanupSection) { using MI_STORE_DATA_IMM = typename FamilyType::MI_STORE_DATA_IMM; - if (!OSInterface::osEnableLocalMemory) { - GTEST_SKIP(); - } debugManager.flags.EnableWalkerPartition.set(1u); using WalkerType = typename FamilyType::DefaultWalkerType; @@ -1620,9 +1578,6 @@ struct XeHPAndLaterDispatchWalkerBasicTestDynamicPartition : public XeHPAndLater }; HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTestDynamicPartition, givenDynamicPartitioningWhenEnqueueingKernelThenExpectNoMultipleActivePartitionsSetInCsr) { - if (!OSInterface::osEnableLocalMemory) { - GTEST_SKIP(); - } auto cmdQ = std::make_unique>(context.get(), device.get(), nullptr); size_t gws[] = {128, 1, 1}; size_t lws[] = {8, 1, 1}; @@ -1655,9 +1610,6 @@ struct XeHPAndLaterDispatchWalkerBasicTestStaticPartition : public XeHPAndLaterD }; HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTestStaticPartition, givenStaticPartitioningWhenEnqueueingKernelThenMultipleActivePartitionsAreSetInCsr) { - if (!OSInterface::osEnableLocalMemory) { - GTEST_SKIP(); - } auto cmdQ = std::make_unique>(context.get(), device.get(), nullptr); size_t gws[] = {128, 1, 1}; size_t lws[] = {8, 1, 1}; @@ -1681,9 +1633,6 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTestStaticPartition, using WalkerType = typename FamilyType::DefaultWalkerType; using MI_LOAD_REGISTER_MEM = typename FamilyType::MI_LOAD_REGISTER_MEM; - if (!OSInterface::osEnableLocalMemory) { - GTEST_SKIP(); - } auto cmdQ = std::make_unique>(context.get(), device.get(), nullptr); size_t gws[] = {129, 1, 1}; size_t lws[] = {8, 1, 1}; @@ -2042,9 +1991,6 @@ struct KernelWithSingleSubdevicePreferences : public MockKernel { }; HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerTestMultiTileDevice, givenKernelThatPrefersSingleSubdeviceWhenProgramWalkerThenKernelIsExecutedOnSingleTile) { - if (!OSInterface::osEnableLocalMemory) { - GTEST_SKIP(); - } using WalkerType = typename FamilyType::DefaultWalkerType; auto cmdQ = std::make_unique>(context.get(), device.get(), nullptr); @@ -2064,9 +2010,6 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerTestMultiTileDevice, give } HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerTestMultiTileDevice, givenKernelThatDoesntPreferSingleSubdeviceWhenProgramWalkerThenKernelIsExecutedOnAllTiles) { - if (!OSInterface::osEnableLocalMemory) { - GTEST_SKIP(); - } using WalkerType = typename FamilyType::DefaultWalkerType; auto cmdQ = std::make_unique>(context.get(), device.get(), nullptr); diff --git a/opencl/test/unit_test/command_queue/enqueue_with_walker_partition_tests.cpp b/opencl/test/unit_test/command_queue/enqueue_with_walker_partition_tests.cpp index c05665b44c..bdf80a017e 100644 --- a/opencl/test/unit_test/command_queue/enqueue_with_walker_partition_tests.cpp +++ b/opencl/test/unit_test/command_queue/enqueue_with_walker_partition_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2024 Intel Corporation + * Copyright (C) 2021-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -20,9 +20,6 @@ struct EnqueueWithWalkerPartitionTests : public ::testing::Test { void SetUp() override { - if (!OSInterface::osEnableLocalMemory) { - GTEST_SKIP(); - } debugManager.flags.EnableWalkerPartition.set(1u); debugManager.flags.CreateMultipleSubDevices.set(numberOfTiles); diff --git a/opencl/test/unit_test/linux/CMakeLists.txt b/opencl/test/unit_test/linux/CMakeLists.txt index 5c93cea112..e44f10a879 100644 --- a/opencl/test/unit_test/linux/CMakeLists.txt +++ b/opencl/test/unit_test/linux/CMakeLists.txt @@ -31,7 +31,6 @@ add_executable(igdrcl_${target_name} ${NEO_SHARED_DIRECTORY}/dll/linux/drm_neo_create.cpp ${NEO_SHARED_DIRECTORY}/dll/linux${BRANCH_DIR_SUFFIX}/options_linux.cpp ${NEO_SHARED_DIRECTORY}/dll/linux/options_linux.inl - ${NEO_SHARED_DIRECTORY}/dll/linux/os_interface.cpp ${NEO_SOURCE_DIR}/opencl/source/dll/command_queue_dll.cpp ${NEO_SOURCE_DIR}/opencl/source/os_interface/linux/platform_teardown_linux.cpp ) diff --git a/opencl/test/unit_test/linux/main_linux_dll.cpp b/opencl/test/unit_test/linux/main_linux_dll.cpp index ecb0b7b874..010a976100 100644 --- a/opencl/test/unit_test/linux/main_linux_dll.cpp +++ b/opencl/test/unit_test/linux/main_linux_dll.cpp @@ -679,10 +679,6 @@ TEST(DrmMemoryManagerCreate, givenEnableHostPtrValidationSetToZeroWhenCreateDrmM mockExecutionEnvironment.memoryManager = std::move(drmMemoryManager); } -TEST(OsInterfaceTests, givenOsInterfaceWhenEnableLocalMemoryIsSpecifiedThenItIsSetToTrueOn64Bit) { - EXPECT_TRUE(OSInterface::osEnableLocalMemory); -} - TEST_F(DrmTests, whenDrmIsCreatedWithMultipleSubDevicesThenCreateMultipleVirtualMemoryAddressSpaces) { DebugManagerStateRestore restore; debugManager.flags.CreateMultipleSubDevices.set(2); diff --git a/opencl/test/unit_test/windows/CMakeLists.txt b/opencl/test/unit_test/windows/CMakeLists.txt index c5964b6a01..83eece79c9 100644 --- a/opencl/test/unit_test/windows/CMakeLists.txt +++ b/opencl/test/unit_test/windows/CMakeLists.txt @@ -25,7 +25,6 @@ if(WIN32) ${NEO_SHARED_DIRECTORY}/dll/direct_submission_controller_enabled.cpp ${NEO_SHARED_DIRECTORY}/dll/get_devices.cpp ${NEO_SHARED_DIRECTORY}/dll/unified_memory_reuse_cleaner_enabled.cpp - ${NEO_SHARED_DIRECTORY}/dll/windows/os_interface.cpp ${NEO_SHARED_DIRECTORY}/dll/create_command_stream.cpp ${NEO_SHARED_DIRECTORY}/dll/wddm/wddm_create.cpp ${NEO_SHARED_TEST_DIRECTORY}/common/mocks/mock_wddm.cpp diff --git a/shared/source/command_container/implicit_scaling.cpp b/shared/source/command_container/implicit_scaling.cpp index 91934e7fe5..51c2d4ce9f 100644 --- a/shared/source/command_container/implicit_scaling.cpp +++ b/shared/source/command_container/implicit_scaling.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Intel Corporation + * Copyright (C) 2021-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -28,8 +28,6 @@ bool ImplicitScalingHelper::isImplicitScalingEnabled(const DeviceBitfield &devic if (debugManager.flags.EnableWalkerPartition.get() != -1) { partitionWalker = !!debugManager.flags.EnableWalkerPartition.get(); } - // we can't do this without local memory - partitionWalker &= OSInterface::osEnableLocalMemory; return partitionWalker; } diff --git a/shared/source/dll/linux/os_interface.cpp b/shared/source/dll/linux/os_interface.cpp deleted file mode 100644 index f1f8cc87d9..0000000000 --- a/shared/source/dll/linux/os_interface.cpp +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (C) 2018-2021 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/os_interface/os_interface.h" - -#include "shared/source/gmm_helper/gmm_interface.h" - -namespace NEO { - -bool OSInterface::osEnableLocalMemory = true; - -} // namespace NEO diff --git a/shared/source/dll/windows/os_interface.cpp b/shared/source/dll/windows/os_interface.cpp deleted file mode 100644 index c4a11b05db..0000000000 --- a/shared/source/dll/windows/os_interface.cpp +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (C) 2018-2022 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/os_interface/os_interface.h" - -namespace NEO { - -bool OSInterface::osEnableLocalMemory = true; - -} // namespace NEO diff --git a/shared/source/helpers/gfx_core_helper_base.inl b/shared/source/helpers/gfx_core_helper_base.inl index 194c6f8fb4..a6c235e452 100644 --- a/shared/source/helpers/gfx_core_helper_base.inl +++ b/shared/source/helpers/gfx_core_helper_base.inl @@ -173,7 +173,7 @@ bool GfxCoreHelperHw::getEnableLocalMemory(const HardwareInfo &hwInfo) c return true; } - return OSInterface::osEnableLocalMemory && isLocalMemoryEnabled(hwInfo); + return isLocalMemoryEnabled(hwInfo); } template diff --git a/shared/source/os_interface/os_interface.h b/shared/source/os_interface/os_interface.h index 4f3817b249..904f90e26a 100644 --- a/shared/source/os_interface/os_interface.h +++ b/shared/source/os_interface/os_interface.h @@ -121,7 +121,6 @@ class OSInterface : public NonCopyableClass { MOCKABLE_VIRTUAL uint32_t getAggregatedProcessCount() const; static bool osEnabled64kbPages; - static bool osEnableLocalMemory; static bool are64kbPagesEnabled(); static bool newResourceImplicitFlush; static bool gpuIdleImplicitFlush; diff --git a/shared/test/common/libult/os_interface.cpp b/shared/test/common/libult/os_interface.cpp index db2afd634a..835aece3b1 100644 --- a/shared/test/common/libult/os_interface.cpp +++ b/shared/test/common/libult/os_interface.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2024 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -11,8 +11,6 @@ namespace NEO { -bool OSInterface::osEnableLocalMemory = true; - bool returnEmptyFilesVector = false; } // namespace NEO diff --git a/shared/test/unit_test/encoders/test_encode_dispatch_kernel_xehp_and_later.cpp b/shared/test/unit_test/encoders/test_encode_dispatch_kernel_xehp_and_later.cpp index bd5700c8ef..bbe5f1d618 100644 --- a/shared/test/unit_test/encoders/test_encode_dispatch_kernel_xehp_and_later.cpp +++ b/shared/test/unit_test/encoders/test_encode_dispatch_kernel_xehp_and_later.cpp @@ -1111,7 +1111,6 @@ template struct CommandEncodeStatesImplicitScalingFixtureT : public CommandEncodeStatesFixture { void setUp() { debugManager.flags.CreateMultipleSubDevices.set(2); - osLocalMemoryBackup = std::make_unique>(&OSInterface::osEnableLocalMemory, true); mockDeviceBackup = std::make_unique>(&MockDevice::createSingleDevice, false); apiSupportBackup = std::make_unique>(&ImplicitScaling::apiSupport, true); @@ -1126,7 +1125,6 @@ struct CommandEncodeStatesImplicitScalingFixtureT : public CommandEncodeStatesFi } DebugManagerStateRestore restorer; - std::unique_ptr> osLocalMemoryBackup; std::unique_ptr> mockDeviceBackup; std::unique_ptr> apiSupportBackup; }; diff --git a/shared/test/unit_test/encoders/test_implicit_scaling.cpp b/shared/test/unit_test/encoders/test_implicit_scaling.cpp index de12e340f6..5e996eb3d4 100644 --- a/shared/test/unit_test/encoders/test_implicit_scaling.cpp +++ b/shared/test/unit_test/encoders/test_implicit_scaling.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Intel Corporation + * Copyright (C) 2021-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -26,11 +26,6 @@ TEST_F(ImplicitScalingTests, givenMultiTileAndOsSupportWhenApiDisabledThenFeatur EXPECT_FALSE(ImplicitScalingHelper::isImplicitScalingEnabled(twoTile, true)); } -TEST_F(ImplicitScalingTests, givenMultiTileAndApiSupportWhenOsDisabledThenFeatureDisabled) { - OSInterface::osEnableLocalMemory = false; - EXPECT_FALSE(ImplicitScalingHelper::isImplicitScalingEnabled(twoTile, true)); -} - TEST_F(ImplicitScalingTests, givenSingleTileApiDisabledWhenOsSupportAndForcedOnThenFeatureEnabled) { debugManager.flags.EnableWalkerPartition.set(1); ImplicitScaling::apiSupport = false; @@ -42,12 +37,6 @@ TEST_F(ImplicitScalingTests, givenMultiTileApiAndOsSupportEnabledWhenForcedOffTh EXPECT_FALSE(ImplicitScalingHelper::isImplicitScalingEnabled(twoTile, true)); } -TEST_F(ImplicitScalingTests, givenMultiTileApiEnabledWhenOsSupportOffAndForcedOnThenFeatureDisabled) { - debugManager.flags.EnableWalkerPartition.set(1); - OSInterface::osEnableLocalMemory = false; - EXPECT_FALSE(ImplicitScalingHelper::isImplicitScalingEnabled(twoTile, true)); -} - TEST_F(ImplicitScalingTests, givenDefaultSettingsWhenCheckingAtomicsForSelfCleanupThenExpectFalse) { EXPECT_FALSE(ImplicitScalingHelper::isAtomicsUsedForSelfCleanup()); } diff --git a/shared/test/unit_test/fixtures/implicit_scaling_fixture.cpp b/shared/test/unit_test/fixtures/implicit_scaling_fixture.cpp index 44de952f3d..d343af8c40 100644 --- a/shared/test/unit_test/fixtures/implicit_scaling_fixture.cpp +++ b/shared/test/unit_test/fixtures/implicit_scaling_fixture.cpp @@ -17,7 +17,6 @@ void ImplicitScalingFixture::setUp() { CommandEncodeStatesFixture::setUp(); apiSupportBackup = std::make_unique>(&ImplicitScaling::apiSupport, true); - osLocalMemoryBackup = std::make_unique>(&OSInterface::osEnableLocalMemory, true); singleTile = DeviceBitfield(static_cast(maxNBitValue(1))); twoTile = DeviceBitfield(static_cast(maxNBitValue(2))); diff --git a/shared/test/unit_test/helpers/gfx_core_helper_tests.cpp b/shared/test/unit_test/helpers/gfx_core_helper_tests.cpp index 3d8b6c9816..b43334571b 100644 --- a/shared/test/unit_test/helpers/gfx_core_helper_tests.cpp +++ b/shared/test/unit_test/helpers/gfx_core_helper_tests.cpp @@ -911,26 +911,6 @@ HWCMDTEST_F(IGFX_GEN12LP_CORE, GfxCoreHelperTest, givenGfxCoreHelperWhenGettingG EXPECT_EQ(gfxCoreHelper.getGlobalTimeStampBits(), 36U); } -TEST_F(GfxCoreHelperTest, givenEnableLocalMemoryDebugVarAndOsEnableLocalMemoryWhenSetThenGetEnableLocalMemoryReturnsCorrectValue) { - DebugManagerStateRestore dbgRestore; - VariableBackup orgOsEnableLocalMemory(&OSInterface::osEnableLocalMemory); - auto &gfxCoreHelper = getHelper(); - - debugManager.flags.EnableLocalMemory.set(0); - EXPECT_FALSE(gfxCoreHelper.getEnableLocalMemory(hardwareInfo)); - - debugManager.flags.EnableLocalMemory.set(1); - EXPECT_TRUE(gfxCoreHelper.getEnableLocalMemory(hardwareInfo)); - - debugManager.flags.EnableLocalMemory.set(-1); - - OSInterface::osEnableLocalMemory = false; - EXPECT_FALSE(gfxCoreHelper.getEnableLocalMemory(hardwareInfo)); - - OSInterface::osEnableLocalMemory = true; - EXPECT_EQ(gfxCoreHelper.isLocalMemoryEnabled(hardwareInfo), gfxCoreHelper.getEnableLocalMemory(hardwareInfo)); -} - TEST_F(GfxCoreHelperTest, givenAUBDumpForceAllToLocalMemoryDebugVarWhenSetThenGetEnableLocalMemoryReturnsCorrectValue) { DebugManagerStateRestore dbgRestore; std::unique_ptr device(MockDevice::createWithNewExecutionEnvironment(&hardwareInfo)); diff --git a/shared/test/unit_test/os_interface/linux/drm_command_stream_xehp_and_later_tests.cpp b/shared/test/unit_test/os_interface/linux/drm_command_stream_xehp_and_later_tests.cpp index 7972af2f1a..d9863ba8c5 100644 --- a/shared/test/unit_test/os_interface/linux/drm_command_stream_xehp_and_later_tests.cpp +++ b/shared/test/unit_test/os_interface/linux/drm_command_stream_xehp_and_later_tests.cpp @@ -37,7 +37,6 @@ struct DrmCommandStreamMultiTileMemExecFixture { debugManager.flags.CreateMultipleSubDevices.set(2u); debugManager.flags.EnableImplicitScaling.set(1); debugManager.flags.EnableForcePin.set(false); - osLocalMemoryBackup = std::make_unique>(&OSInterface::osEnableLocalMemory, true); executionEnvironment = new MockExecutionEnvironment(); executionEnvironment->incRefInternal(); diff --git a/shared/test/unit_test/os_interface/windows/os_interface_win_tests.cpp b/shared/test/unit_test/os_interface/windows/os_interface_win_tests.cpp index 66a76dae31..9578ec8a4b 100644 --- a/shared/test/unit_test/os_interface/windows/os_interface_win_tests.cpp +++ b/shared/test/unit_test/os_interface/windows/os_interface_win_tests.cpp @@ -58,10 +58,6 @@ TEST_F(OsInterfaceTest, GivenWindowsOsWhenCheckForGpuIdleImplicitFlushSupportThe EXPECT_FALSE(OSInterface::gpuIdleImplicitFlush); } -TEST_F(OsInterfaceTest, GivenDefaultOsInterfaceThenLocalMemoryEnabled) { - EXPECT_TRUE(OSInterface::osEnableLocalMemory); -} - TEST(OsInterfaceSimpleTest, GivenOsInterfaceWhenCallingGetAggregatedProcessCountThenCallReturnsZero) { OSInterface osInterface; EXPECT_EQ(0u, osInterface.getAggregatedProcessCount());