diff --git a/level_zero/CMakeLists.txt b/level_zero/CMakeLists.txt index 1991dfca1f..73a909c0a5 100644 --- a/level_zero/CMakeLists.txt +++ b/level_zero/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright (C) 2020-2024 Intel Corporation +# Copyright (C) 2020-2025 Intel Corporation # # SPDX-License-Identifier: MIT # @@ -221,6 +221,7 @@ if(BUILD_WITH_L0) ${NEO_SHARED_DIRECTORY}/dll/device_dll.cpp ${NEO_SHARED_DIRECTORY}/dll/direct_submission_controller_enabled.cpp ${NEO_SHARED_DIRECTORY}/dll/options_dll.cpp + ${NEO_SHARED_DIRECTORY}/dll/unified_memory_reuse_cleaner_enabled.cpp ${NEO_SHARED_DIRECTORY}/gmm_helper/page_table_mngr.cpp ${NEO_SHARED_DIRECTORY}/gmm_helper/resource_info.cpp ${NEO_SHARED_DIRECTORY}/helpers/abort.cpp diff --git a/opencl/source/dll/CMakeLists.txt b/opencl/source/dll/CMakeLists.txt index be6afa3adb..9b27e18ba7 100644 --- a/opencl/source/dll/CMakeLists.txt +++ b/opencl/source/dll/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright (C) 2018-2024 Intel Corporation +# Copyright (C) 2018-2025 Intel Corporation # # SPDX-License-Identifier: MIT # @@ -19,6 +19,7 @@ set(RUNTIME_SRCS_DLL_BASE ${NEO_SHARED_DIRECTORY}/dll/device_dll.cpp ${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}/built_ins/sip_init.cpp ${NEO_SHARED_DIRECTORY}/dll/create_command_stream.cpp ${NEO_SHARED_DIRECTORY}/dll/options_dll.cpp diff --git a/opencl/test/unit_test/linux/CMakeLists.txt b/opencl/test/unit_test/linux/CMakeLists.txt index 3c07817e0f..70343f2664 100644 --- a/opencl/test/unit_test/linux/CMakeLists.txt +++ b/opencl/test/unit_test/linux/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright (C) 2018-2024 Intel Corporation +# Copyright (C) 2018-2025 Intel Corporation # # SPDX-License-Identifier: MIT # @@ -26,6 +26,7 @@ add_executable(igdrcl_${target_name} ${NEO_SHARED_DIRECTORY}/dll/create_memory_manager_drm.cpp ${NEO_SHARED_DIRECTORY}/dll/device_dll.cpp ${NEO_SHARED_DIRECTORY}/dll/direct_submission_controller_enabled.cpp + ${NEO_SHARED_DIRECTORY}/dll/unified_memory_reuse_cleaner_enabled.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/options_linux.inl diff --git a/opencl/test/unit_test/windows/CMakeLists.txt b/opencl/test/unit_test/windows/CMakeLists.txt index 85f1e9f6e0..211be3b0b4 100644 --- a/opencl/test/unit_test/windows/CMakeLists.txt +++ b/opencl/test/unit_test/windows/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright (C) 2018-2024 Intel Corporation +# Copyright (C) 2018-2025 Intel Corporation # # SPDX-License-Identifier: MIT # @@ -24,6 +24,7 @@ if(WIN32) ${NEO_SHARED_DIRECTORY}/dll/device_dll.cpp ${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 diff --git a/shared/source/dll/unified_memory_reuse_cleaner_enabled.cpp b/shared/source/dll/unified_memory_reuse_cleaner_enabled.cpp new file mode 100644 index 0000000000..91ab82a783 --- /dev/null +++ b/shared/source/dll/unified_memory_reuse_cleaner_enabled.cpp @@ -0,0 +1,14 @@ +/* + * Copyright (C) 2025 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +#include "shared/source/memory_manager/unified_memory_reuse_cleaner.h" + +namespace NEO { +bool UnifiedMemoryReuseCleaner::isSupported() { + return true; +} +} // namespace NEO \ No newline at end of file diff --git a/shared/source/memory_manager/unified_memory_reuse_cleaner.h b/shared/source/memory_manager/unified_memory_reuse_cleaner.h index 37c15c3aed..63df28a2d7 100644 --- a/shared/source/memory_manager/unified_memory_reuse_cleaner.h +++ b/shared/source/memory_manager/unified_memory_reuse_cleaner.h @@ -27,7 +27,7 @@ class UnifiedMemoryReuseCleaner { MOCKABLE_VIRTUAL void startThread(); void stopThread(); - static bool isSupported() { return false; } + static bool isSupported(); void registerSvmAllocationCache(SvmAllocationCache *cache); void unregisterSvmAllocationCache(SvmAllocationCache *cache); diff --git a/shared/test/common/libult/CMakeLists.txt b/shared/test/common/libult/CMakeLists.txt index bc0e54d0eb..2d9631d50f 100644 --- a/shared/test/common/libult/CMakeLists.txt +++ b/shared/test/common/libult/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright (C) 2021-2024 Intel Corporation +# Copyright (C) 2021-2025 Intel Corporation # # SPDX-License-Identifier: MIT # @@ -202,6 +202,7 @@ set(neo_libult_SRCS_LINUX ${NEO_SHARED_TEST_DIRECTORY}/common/mocks/linux/mock_drm_memory_manager.h ${NEO_SHARED_TEST_DIRECTORY}/common/mocks/device_ult.cpp ${NEO_SHARED_TEST_DIRECTORY}/common/mocks/mock_direct_submission_controller_enabled.cpp + ${NEO_SHARED_TEST_DIRECTORY}/common/mocks/mock_unified_memory_reuse_cleaner_enabled.cpp ${NEO_SHARED_TEST_DIRECTORY}/common/os_interface/linux/create_drm_memory_manager.cpp ${NEO_SHARED_TEST_DIRECTORY}/common/os_interface/linux/drm_memory_manager_fixture.cpp ${NEO_SHARED_TEST_DIRECTORY}/common/os_interface/linux/drm_neo_create.cpp @@ -216,6 +217,7 @@ set(neo_libult_SRCS_WINDOWS ${NEO_SHARED_TEST_DIRECTORY}/common/libult/os_interface.cpp ${NEO_SHARED_TEST_DIRECTORY}/common/mocks/device_ult.cpp ${NEO_SHARED_TEST_DIRECTORY}/common/mocks/mock_direct_submission_controller_enabled.cpp + ${NEO_SHARED_TEST_DIRECTORY}/common/mocks/mock_unified_memory_reuse_cleaner_enabled.cpp ${NEO_SHARED_TEST_DIRECTORY}/common/os_interface/windows/create_wddm_memory_manager.cpp ${NEO_SHARED_TEST_DIRECTORY}/common/os_interface/windows${BRANCH_DIR_SUFFIX}/options.cpp ${NEO_SHARED_TEST_DIRECTORY}/common/os_interface/windows/options.inl diff --git a/shared/test/common/mocks/mock_unified_memory_reuse_cleaner_enabled.cpp b/shared/test/common/mocks/mock_unified_memory_reuse_cleaner_enabled.cpp new file mode 100644 index 0000000000..bc169884e6 --- /dev/null +++ b/shared/test/common/mocks/mock_unified_memory_reuse_cleaner_enabled.cpp @@ -0,0 +1,14 @@ +/* + * Copyright (C) 2025 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +#include "shared/source/memory_manager/unified_memory_reuse_cleaner.h" + +namespace NEO { +bool UnifiedMemoryReuseCleaner::isSupported() { + return false; +} +} // namespace NEO \ No newline at end of file