From f8a2070c86c1e533cb915077bc634a52b7436574 Mon Sep 17 00:00:00 2001 From: "Naklicki, Mateusz" Date: Fri, 27 Jun 2025 11:03:08 +0000 Subject: [PATCH] test: cleanup header includes 3/n Related-To: NEO-15383 Signed-off-by: Naklicki, Mateusz --- .../indirect_heap/indirect_heap_fixture.cpp | 4 +++- .../indirect_heap/indirect_heap_fixture.h | 5 ++--- .../test/unit_test/kernel/debug_kernel_tests.cpp | 3 +-- .../kernel/kernel_accelerator_arg_tests.cpp | 5 +---- .../kernel/kernel_arg_buffer_fixture.cpp | 7 +------ .../unit_test/kernel/kernel_arg_buffer_fixture.h | 11 ++++++++--- .../unit_test/kernel/kernel_arg_buffer_tests.cpp | 3 --- .../unit_test/kernel/kernel_arg_info_tests.cpp | 4 +--- .../unit_test/kernel/kernel_image_arg_tests.cpp | 5 +---- .../kernel/kernel_immediate_arg_tests.cpp | 3 --- .../unit_test/kernel/kernel_slm_arg_tests.cpp | 4 +--- .../test/unit_test/kernel/kernel_slm_tests.cpp | 2 -- opencl/test/unit_test/linux/mock_os_layer.h | 7 ++++++- .../test/unit_test/mem_obj/buffer_pin_tests.cpp | 10 +++++----- .../mem_obj/buffer_tests_pvc_and_later.cpp | 5 ++++- .../mem_obj/buffer_tests_xehp_and_later.cpp | 2 -- .../mem_obj/get_mem_object_info_tests.cpp | 3 --- opencl/test/unit_test/mem_obj/image2d_tests.cpp | 3 +-- opencl/test/unit_test/mem_obj/image3d_tests.cpp | 4 +--- .../unit_test/mem_obj/image_array_size_tests.cpp | 4 +--- .../mem_obj/image_from_subbuffer_tests.cpp | 3 ++- .../unit_test/mem_obj/image_redescribe_tests.cpp | 3 --- .../mem_obj/image_release_mapped_ptr_tests.cpp | 11 ++++++----- .../unit_test/mem_obj/image_set_arg_tests.cpp | 3 --- opencl/test/unit_test/mem_obj/image_tests.cpp | 6 +++++- .../mem_obj/image_tests_tgllp_and_later.cpp | 1 - .../mem_obj/linux/image_linux_tests.cpp | 3 +-- .../unit_test/mem_obj/mem_obj_helper_tests.cpp | 9 ++++----- opencl/test/unit_test/mem_obj/mem_obj_tests.cpp | 11 ++++++----- .../test/unit_test/mem_obj/zero_copy_tests.cpp | 3 +-- .../memory_manager/cl_memory_manager_tests.cpp | 5 +---- .../cpu_page_fault_manager_memory_sync_tests.cpp | 6 ++++-- .../memory_manager/migraton_controller_tests.cpp | 2 -- .../mocks/gl/linux/mock_gl_sharing_linux.cpp | 4 +--- .../unit_test/mocks/mock_async_event_handler.h | 6 +++++- opencl/test/unit_test/mocks/mock_buffer.cpp | 7 ++++++- opencl/test/unit_test/mocks/mock_buffer.h | 7 +++++-- opencl/test/unit_test/mocks/mock_cl_device.h | 6 ++++++ opencl/test/unit_test/mocks/mock_context.cpp | 8 -------- opencl/test/unit_test/mocks/mock_context.h | 5 +++++ .../test/unit_test/mocks/mock_debug_program.cpp | 3 +-- opencl/test/unit_test/mocks/mock_platform.cpp | 4 +--- opencl/test/unit_test/mocks/mock_program.cpp | 13 +------------ opencl/test/unit_test/mocks/mock_program.h | 5 ++++- .../unit_test/mocks/ult_cl_device_factory.cpp | 7 +------ .../offline_compiler/decoder/encoder_tests.cpp | 4 ---- .../decoder/zebin_manipulator_tests.cpp | 4 ---- .../offline_compiler/mock/mock_iga_dll.cpp | 4 +--- .../offline_compiler/mock/mock_iga_dll.h | 3 ++- .../mock/mock_ocloc_fcl_facade.cpp | 4 +++- .../mock/mock_ocloc_fcl_facade.h | 4 +++- .../mock/mock_ocloc_igc_facade.cpp | 4 +++- .../mock/mock_ocloc_igc_facade.h | 4 +++- .../mock/mock_offline_compiler.h | 1 + .../offline_compiler/ocloc_fatbinary_tests.cpp | 3 --- .../offline_compiler/ocloc_igc_facade_tests.cpp | 1 - .../ocloc_product_config_tests.cpp | 3 +-- .../ocloc_supported_devices_helper_tests.cpp | 3 +-- .../offline_compiler/ocloc_validator_tests.cpp | 3 +-- .../offline_compiler/offline_compiler_tests.h | 5 +++++ .../linux/cl_drm_memory_manager_tests.cpp | 16 ---------------- .../linux/cl_mem_cache_clos_tests_xe_hpc.cpp | 3 --- .../linux/mock_performance_counters_linux.h | 6 +----- .../os_interface/linux/platform_tests_lin.cpp | 3 +-- .../os_interface/mock_performance_counters.cpp | 4 +--- .../os_interface/performance_counters_tests.cpp | 3 +-- opencl/test/unit_test/program/kernel_data.cpp | 4 +--- .../unit_test/program/kernel_data_OCL2_0.cpp | 6 +----- .../program/process_debug_data_tests.cpp | 3 ++- .../program/process_elf_binary_tests.cpp | 7 +------ .../program/process_spir_binary_tests.cpp | 3 +-- .../program/program_spec_constants_tests.cpp | 4 +--- opencl/test/unit_test/program/program_tests.h | 3 ++- .../test/unit_test/program/program_with_zebin.h | 4 +++- .../program/program_with_zebin_tests.cpp | 4 ++-- .../sampler/sampler_tests_xehp_and_later.cpp | 6 +----- .../sharings/gl/linux/gl_types_tests.cpp | 3 +-- .../unit_test/sharings/sharing_factory_tests.cpp | 6 +----- .../unified/unified_sharing_image_tests.cpp | 7 +++++-- .../sharings/unified/unified_sharing_tests.cpp | 4 ++++ .../sharings/va/va_base_object_tests.cpp | 3 +-- .../sharings/va/va_sharing_enable_tests.cpp | 3 +-- .../unit_test/sharings/va/va_sharing_tests.cpp | 6 +++++- .../unit_test/utilities/file_logger_tests.cpp | 4 +--- .../xe2_hpg_core/test_preamble_xe2_hpg_core.cpp | 3 +-- .../test_preemption_xe2_hpg_core.cpp | 4 +--- ...mand_stream_receiver_hw_tests_xe_hpc_core.cpp | 1 - .../xe_hpc_core_test_ocl_fixtures.cpp | 3 +-- .../xe_hpc_core/xe_hpc_core_test_ocl_fixtures.h | 3 ++- .../test_cl_device_caps_xe_hpg_core.cpp | 4 +--- 90 files changed, 171 insertions(+), 247 deletions(-) diff --git a/opencl/test/unit_test/indirect_heap/indirect_heap_fixture.cpp b/opencl/test/unit_test/indirect_heap/indirect_heap_fixture.cpp index 05d9d71e78..1c5e80b326 100644 --- a/opencl/test/unit_test/indirect_heap/indirect_heap_fixture.cpp +++ b/opencl/test/unit_test/indirect_heap/indirect_heap_fixture.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2023 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -7,6 +7,8 @@ #include "opencl/test/unit_test/indirect_heap/indirect_heap_fixture.h" +#include "shared/source/indirect_heap/indirect_heap.h" + #include "opencl/source/command_queue/command_queue.h" namespace NEO { diff --git a/opencl/test/unit_test/indirect_heap/indirect_heap_fixture.h b/opencl/test/unit_test/indirect_heap/indirect_heap_fixture.h index 5dee793794..16a996753c 100644 --- a/opencl/test/unit_test/indirect_heap/indirect_heap_fixture.h +++ b/opencl/test/unit_test/indirect_heap/indirect_heap_fixture.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -7,11 +7,10 @@ #pragma once -#include "shared/source/indirect_heap/indirect_heap.h" - namespace NEO { class CommandQueue; +class IndirectHeap; struct IndirectHeapFixture { void setUp(CommandQueue *pCmdQ); diff --git a/opencl/test/unit_test/kernel/debug_kernel_tests.cpp b/opencl/test/unit_test/kernel/debug_kernel_tests.cpp index 818393e78c..34675992d7 100644 --- a/opencl/test/unit_test/kernel/debug_kernel_tests.cpp +++ b/opencl/test/unit_test/kernel/debug_kernel_tests.cpp @@ -1,12 +1,11 @@ /* - * Copyright (C) 2018-2023 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * */ #include "shared/test/common/mocks/mock_device.h" -#include "shared/test/common/test_macros/test.h" #include "opencl/test/unit_test/mocks/mock_cl_device.h" #include "opencl/test/unit_test/mocks/mock_kernel.h" diff --git a/opencl/test/unit_test/kernel/kernel_accelerator_arg_tests.cpp b/opencl/test/unit_test/kernel/kernel_accelerator_arg_tests.cpp index af770b620a..0a79aaf1e6 100644 --- a/opencl/test/unit_test/kernel/kernel_accelerator_arg_tests.cpp +++ b/opencl/test/unit_test/kernel/kernel_accelerator_arg_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2023 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -7,13 +7,10 @@ #include "shared/test/common/test_macros/test.h" -#include "opencl/source/accelerators/intel_accelerator.h" #include "opencl/source/accelerators/intel_motion_estimation.h" #include "opencl/source/kernel/kernel.h" -#include "opencl/source/mem_obj/buffer.h" #include "opencl/test/unit_test/fixtures/cl_device_fixture.h" #include "opencl/test/unit_test/fixtures/context_fixture.h" -#include "opencl/test/unit_test/mocks/mock_buffer.h" #include "opencl/test/unit_test/mocks/mock_cl_device.h" #include "opencl/test/unit_test/mocks/mock_context.h" #include "opencl/test/unit_test/mocks/mock_kernel.h" diff --git a/opencl/test/unit_test/kernel/kernel_arg_buffer_fixture.cpp b/opencl/test/unit_test/kernel/kernel_arg_buffer_fixture.cpp index 0ef9fb7c3d..f8a562a0f7 100644 --- a/opencl/test/unit_test/kernel/kernel_arg_buffer_fixture.cpp +++ b/opencl/test/unit_test/kernel/kernel_arg_buffer_fixture.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2024 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -7,14 +7,9 @@ #include "kernel_arg_buffer_fixture.h" -#include "shared/source/helpers/api_specific_config.h" -#include "shared/test/common/test_macros/test.h" - #include "opencl/source/kernel/kernel.h" -#include "opencl/source/mem_obj/buffer.h" #include "opencl/test/unit_test/fixtures/cl_device_fixture.h" #include "opencl/test/unit_test/fixtures/context_fixture.h" -#include "opencl/test/unit_test/mocks/mock_buffer.h" #include "opencl/test/unit_test/mocks/mock_cl_device.h" #include "opencl/test/unit_test/mocks/mock_context.h" #include "opencl/test/unit_test/mocks/mock_kernel.h" diff --git a/opencl/test/unit_test/kernel/kernel_arg_buffer_fixture.h b/opencl/test/unit_test/kernel/kernel_arg_buffer_fixture.h index f7a90848c2..b0585e4850 100644 --- a/opencl/test/unit_test/kernel/kernel_arg_buffer_fixture.h +++ b/opencl/test/unit_test/kernel/kernel_arg_buffer_fixture.h @@ -1,20 +1,25 @@ /* - * Copyright (C) 2018-2023 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * */ #pragma once +#include "shared/test/common/mocks/mock_kernel_info.h" + #include "opencl/test/unit_test/fixtures/cl_device_fixture.h" #include "opencl/test/unit_test/fixtures/context_fixture.h" -#include "opencl/test/unit_test/mocks/mock_kernel.h" -#include "opencl/test/unit_test/mocks/mock_program.h" #include "CL/cl.h" #include +namespace NEO { +class MockKernel; +class MockProgram; +} // namespace NEO + using namespace NEO; class KernelArgBufferFixture : public ContextFixture, public ClDeviceFixture { diff --git a/opencl/test/unit_test/kernel/kernel_arg_buffer_tests.cpp b/opencl/test/unit_test/kernel/kernel_arg_buffer_tests.cpp index 3c8f4b3fb6..e81e999a44 100644 --- a/opencl/test/unit_test/kernel/kernel_arg_buffer_tests.cpp +++ b/opencl/test/unit_test/kernel/kernel_arg_buffer_tests.cpp @@ -9,14 +9,11 @@ #include "shared/source/helpers/gfx_core_helper.h" #include "shared/source/memory_manager/unified_memory_manager.h" #include "shared/source/unified_memory/unified_memory.h" -#include "shared/test/common/fixtures/memory_management_fixture.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" #include "shared/test/common/test_macros/hw_test.h" #include "opencl/source/kernel/kernel.h" #include "opencl/source/mem_obj/buffer.h" -#include "opencl/test/unit_test/fixtures/cl_device_fixture.h" -#include "opencl/test/unit_test/fixtures/context_fixture.h" #include "opencl/test/unit_test/kernel/kernel_arg_buffer_fixture.h" #include "opencl/test/unit_test/mocks/mock_buffer.h" #include "opencl/test/unit_test/mocks/mock_cl_device.h" diff --git a/opencl/test/unit_test/kernel/kernel_arg_info_tests.cpp b/opencl/test/unit_test/kernel/kernel_arg_info_tests.cpp index 771a8eec82..f61a2ca0a6 100644 --- a/opencl/test/unit_test/kernel/kernel_arg_info_tests.cpp +++ b/opencl/test/unit_test/kernel/kernel_arg_info_tests.cpp @@ -1,14 +1,12 @@ /* - * Copyright (C) 2018-2023 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * */ #include "shared/test/common/test_macros/test.h" -#include -#include "opencl/source/kernel/kernel.h" #include "opencl/test/unit_test/mocks/mock_cl_device.h" #include "opencl/test/unit_test/mocks/mock_kernel.h" #include "opencl/test/unit_test/mocks/mock_program.h" diff --git a/opencl/test/unit_test/kernel/kernel_image_arg_tests.cpp b/opencl/test/unit_test/kernel/kernel_image_arg_tests.cpp index 840fb1c5c6..b258e97fb4 100644 --- a/opencl/test/unit_test/kernel/kernel_image_arg_tests.cpp +++ b/opencl/test/unit_test/kernel/kernel_image_arg_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2024 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -11,17 +11,14 @@ #include "shared/test/common/mocks/mock_allocation_properties.h" #include "shared/test/common/mocks/mock_csr.h" #include "shared/test/common/mocks/mock_device.h" -#include "shared/test/common/mocks/mock_graphics_allocation.h" #include "shared/test/common/test_macros/test.h" #include "opencl/source/helpers/cl_memory_properties_helpers.h" -#include "opencl/source/kernel/kernel.h" #include "opencl/source/sharings/sharing.h" #include "opencl/test/unit_test/fixtures/kernel_arg_fixture.h" #include "opencl/test/unit_test/mocks/mock_context.h" #include "opencl/test/unit_test/mocks/mock_image.h" #include "opencl/test/unit_test/mocks/mock_kernel.h" -#include "opencl/test/unit_test/mocks/mock_program.h" #include "gtest/gtest.h" diff --git a/opencl/test/unit_test/kernel/kernel_immediate_arg_tests.cpp b/opencl/test/unit_test/kernel/kernel_immediate_arg_tests.cpp index 3e87dc2ea7..4e002d2b0d 100644 --- a/opencl/test/unit_test/kernel/kernel_immediate_arg_tests.cpp +++ b/opencl/test/unit_test/kernel/kernel_immediate_arg_tests.cpp @@ -5,9 +5,6 @@ * */ -#include "shared/test/common/test_macros/test.h" - -#include "opencl/source/kernel/kernel.h" #include "opencl/test/unit_test/fixtures/multi_root_device_fixture.h" #include "opencl/test/unit_test/mocks/mock_context.h" #include "opencl/test/unit_test/mocks/mock_kernel.h" diff --git a/opencl/test/unit_test/kernel/kernel_slm_arg_tests.cpp b/opencl/test/unit_test/kernel/kernel_slm_arg_tests.cpp index 867050b643..4070dfbc73 100644 --- a/opencl/test/unit_test/kernel/kernel_slm_arg_tests.cpp +++ b/opencl/test/unit_test/kernel/kernel_slm_arg_tests.cpp @@ -1,15 +1,13 @@ /* - * Copyright (C) 2018-2023 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * */ -#include "shared/source/helpers/basic_math.h" #include "shared/source/helpers/ptr_math.h" #include "shared/test/common/test_macros/test.h" -#include "opencl/source/kernel/kernel.h" #include "opencl/test/unit_test/fixtures/multi_root_device_fixture.h" #include "opencl/test/unit_test/mocks/mock_context.h" #include "opencl/test/unit_test/mocks/mock_kernel.h" diff --git a/opencl/test/unit_test/kernel/kernel_slm_tests.cpp b/opencl/test/unit_test/kernel/kernel_slm_tests.cpp index 56b4b2ee38..ad65225cd6 100644 --- a/opencl/test/unit_test/kernel/kernel_slm_tests.cpp +++ b/opencl/test/unit_test/kernel/kernel_slm_tests.cpp @@ -6,13 +6,11 @@ */ #include "shared/source/command_container/encode_surface_state.h" -#include "shared/source/program/kernel_info.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" #include "shared/test/common/test_macros/hw_test.h" #include "opencl/source/command_queue/command_queue_hw.h" #include "opencl/source/helpers/hardware_commands_helper.h" -#include "opencl/source/kernel/kernel.h" #include "opencl/test/unit_test/fixtures/cl_device_fixture.h" #include "opencl/test/unit_test/mocks/mock_cl_device.h" #include "opencl/test/unit_test/mocks/mock_kernel.h" diff --git a/opencl/test/unit_test/linux/mock_os_layer.h b/opencl/test/unit_test/linux/mock_os_layer.h index f3f05729ef..d8bd829c8b 100644 --- a/opencl/test/unit_test/linux/mock_os_layer.h +++ b/opencl/test/unit_test/linux/mock_os_layer.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2024 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -20,6 +20,11 @@ #include #include +namespace NEO { +struct GemVmControl; +struct Query; +} // namespace NEO + extern int (*openFunc)(const char *pathname, int flags, ...); extern int (*openFull)(const char *pathname, int flags, ...); diff --git a/opencl/test/unit_test/mem_obj/buffer_pin_tests.cpp b/opencl/test/unit_test/mem_obj/buffer_pin_tests.cpp index bec2373665..acf45137d0 100644 --- a/opencl/test/unit_test/mem_obj/buffer_pin_tests.cpp +++ b/opencl/test/unit_test/mem_obj/buffer_pin_tests.cpp @@ -1,24 +1,24 @@ /* - * Copyright (C) 2018-2023 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * */ #include "shared/source/helpers/aligned_memory.h" -#include "shared/test/common/fixtures/memory_management_fixture.h" #include "shared/test/common/helpers/default_hw_info.h" #include "shared/test/common/mocks/mock_execution_environment.h" #include "shared/test/common/mocks/mock_memory_manager.h" -#include "shared/test/common/test_macros/test.h" #include "opencl/source/mem_obj/buffer.h" -#include "opencl/test/unit_test/fixtures/cl_device_fixture.h" -#include "opencl/test/unit_test/fixtures/platform_fixture.h" #include "opencl/test/unit_test/mocks/mock_context.h" #include "gtest/gtest.h" +namespace NEO { +class ExecutionEnvironment; +} // namespace NEO + using namespace NEO; class TestedMemoryManager : public OsAgnosticMemoryManager { diff --git a/opencl/test/unit_test/mem_obj/buffer_tests_pvc_and_later.cpp b/opencl/test/unit_test/mem_obj/buffer_tests_pvc_and_later.cpp index 13560f5367..919f8fe0c8 100644 --- a/opencl/test/unit_test/mem_obj/buffer_tests_pvc_and_later.cpp +++ b/opencl/test/unit_test/mem_obj/buffer_tests_pvc_and_later.cpp @@ -9,7 +9,6 @@ #include "shared/source/helpers/bit_helpers.h" #include "shared/source/memory_manager/gfx_partition.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" -#include "shared/test/common/mocks/mock_device.h" #include "shared/test/common/mocks/mock_memory_manager.h" #include "shared/test/common/test_macros/hw_test.h" #include "shared/test/common/utilities/base_object_utils.h" @@ -22,6 +21,10 @@ #include "opencl/test/unit_test/mocks/mock_context.h" #include "opencl/test/unit_test/mocks/mock_platform.h" +namespace NEO { +class Device; +} // namespace NEO + using namespace NEO; using PvcAndLaterBufferTests = ::testing::Test; diff --git a/opencl/test/unit_test/mem_obj/buffer_tests_xehp_and_later.cpp b/opencl/test/unit_test/mem_obj/buffer_tests_xehp_and_later.cpp index 27572cd5e3..f749521417 100644 --- a/opencl/test/unit_test/mem_obj/buffer_tests_xehp_and_later.cpp +++ b/opencl/test/unit_test/mem_obj/buffer_tests_xehp_and_later.cpp @@ -18,8 +18,6 @@ #include "opencl/source/mem_obj/buffer.h" #include "opencl/test/unit_test/mocks/mock_context.h" -#include - using namespace NEO; using XeHPAndLaterBufferTests = ::testing::Test; diff --git a/opencl/test/unit_test/mem_obj/get_mem_object_info_tests.cpp b/opencl/test/unit_test/mem_obj/get_mem_object_info_tests.cpp index 21ac5e7705..bdb26daa13 100644 --- a/opencl/test/unit_test/mem_obj/get_mem_object_info_tests.cpp +++ b/opencl/test/unit_test/mem_obj/get_mem_object_info_tests.cpp @@ -6,10 +6,7 @@ */ #include "shared/source/debug_settings/debug_settings_manager.h" -#include "shared/source/helpers/aligned_memory.h" -#include "shared/source/helpers/ptr_math.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" -#include "shared/test/common/mocks/mock_gmm.h" #include "opencl/test/unit_test/fixtures/buffer_fixture.h" #include "opencl/test/unit_test/fixtures/cl_device_fixture.h" diff --git a/opencl/test/unit_test/mem_obj/image2d_tests.cpp b/opencl/test/unit_test/mem_obj/image2d_tests.cpp index 4ba70033bd..ab58eced19 100644 --- a/opencl/test/unit_test/mem_obj/image2d_tests.cpp +++ b/opencl/test/unit_test/mem_obj/image2d_tests.cpp @@ -1,11 +1,10 @@ /* - * Copyright (C) 2018-2024 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * */ -#include "shared/test/common/helpers/unit_test_helper.h" #include "shared/test/common/test_macros/hw_test.h" #include "opencl/source/helpers/cl_memory_properties_helpers.h" diff --git a/opencl/test/unit_test/mem_obj/image3d_tests.cpp b/opencl/test/unit_test/mem_obj/image3d_tests.cpp index ddd1fc7737..8bed0c192d 100644 --- a/opencl/test/unit_test/mem_obj/image3d_tests.cpp +++ b/opencl/test/unit_test/mem_obj/image3d_tests.cpp @@ -1,12 +1,10 @@ /* - * Copyright (C) 2018-2023 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * */ -#include "shared/source/helpers/aligned_memory.h" -#include "shared/test/common/helpers/unit_test_helper.h" #include "shared/test/common/mocks/mock_gmm.h" #include "shared/test/common/test_macros/hw_test.h" diff --git a/opencl/test/unit_test/mem_obj/image_array_size_tests.cpp b/opencl/test/unit_test/mem_obj/image_array_size_tests.cpp index 420de6419f..dbeba031cc 100644 --- a/opencl/test/unit_test/mem_obj/image_array_size_tests.cpp +++ b/opencl/test/unit_test/mem_obj/image_array_size_tests.cpp @@ -1,12 +1,10 @@ /* - * Copyright (C) 2018-2024 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * */ -#include "shared/source/helpers/aligned_memory.h" -#include "shared/test/common/helpers/unit_test_helper.h" #include "shared/test/common/test_macros/hw_test.h" #include "opencl/source/helpers/cl_memory_properties_helpers.h" diff --git a/opencl/test/unit_test/mem_obj/image_from_subbuffer_tests.cpp b/opencl/test/unit_test/mem_obj/image_from_subbuffer_tests.cpp index f932a002e6..43f6f203a1 100644 --- a/opencl/test/unit_test/mem_obj/image_from_subbuffer_tests.cpp +++ b/opencl/test/unit_test/mem_obj/image_from_subbuffer_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2023 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -16,6 +16,7 @@ #include "opencl/test/unit_test/mocks/mock_context.h" #include + using namespace NEO; // Tests for cl_khr_image2d_from_buffer diff --git a/opencl/test/unit_test/mem_obj/image_redescribe_tests.cpp b/opencl/test/unit_test/mem_obj/image_redescribe_tests.cpp index 1e13d48a7c..af7d2250ca 100644 --- a/opencl/test/unit_test/mem_obj/image_redescribe_tests.cpp +++ b/opencl/test/unit_test/mem_obj/image_redescribe_tests.cpp @@ -5,19 +5,16 @@ * */ -#include "shared/source/helpers/aligned_memory.h" #include "shared/source/memory_manager/os_agnostic_memory_manager.h" #include "opencl/source/helpers/cl_memory_properties_helpers.h" #include "opencl/source/helpers/surface_formats.h" #include "opencl/source/mem_obj/image.h" -#include "opencl/test/unit_test/fixtures/cl_device_fixture.h" #include "opencl/test/unit_test/fixtures/image_fixture.h" #include "opencl/test/unit_test/mocks/mock_cl_device.h" #include "opencl/test/unit_test/mocks/mock_context.h" #include "gtest/gtest.h" -#include "neo_igfxfmid.h" extern GFXCORE_FAMILY renderCoreFamily; diff --git a/opencl/test/unit_test/mem_obj/image_release_mapped_ptr_tests.cpp b/opencl/test/unit_test/mem_obj/image_release_mapped_ptr_tests.cpp index 7e07c53067..bd307c5afb 100644 --- a/opencl/test/unit_test/mem_obj/image_release_mapped_ptr_tests.cpp +++ b/opencl/test/unit_test/mem_obj/image_release_mapped_ptr_tests.cpp @@ -7,17 +7,18 @@ #include "shared/source/memory_manager/allocation_properties.h" #include "shared/source/memory_manager/memory_manager.h" -#include "shared/test/common/helpers/unit_test_helper.h" -#include "shared/test/common/test_macros/test.h" #include "opencl/source/command_queue/command_queue_hw.h" -#include "opencl/source/event/user_event.h" #include "opencl/source/mem_obj/image.h" -#include "opencl/test/unit_test/fixtures/cl_device_fixture.h" #include "opencl/test/unit_test/fixtures/image_fixture.h" #include "opencl/test/unit_test/mocks/mock_cl_device.h" #include "opencl/test/unit_test/mocks/mock_context.h" -#include "opencl/test/unit_test/mocks/mock_event.h" + +namespace NEO { +class ClDevice; +class Context; +class GraphicsAllocation; +} // namespace NEO using namespace NEO; diff --git a/opencl/test/unit_test/mem_obj/image_set_arg_tests.cpp b/opencl/test/unit_test/mem_obj/image_set_arg_tests.cpp index c54cf19832..1c5556749a 100644 --- a/opencl/test/unit_test/mem_obj/image_set_arg_tests.cpp +++ b/opencl/test/unit_test/mem_obj/image_set_arg_tests.cpp @@ -8,8 +8,6 @@ #include "shared/source/command_container/encode_surface_state.h" #include "shared/source/gmm_helper/gmm.h" #include "shared/source/gmm_helper/gmm_helper.h" -#include "shared/source/helpers/aligned_memory.h" -#include "shared/source/helpers/basic_math.h" #include "shared/source/helpers/ptr_math.h" #include "shared/source/memory_manager/graphics_allocation.h" #include "shared/source/memory_manager/surface.h" @@ -17,7 +15,6 @@ #include "shared/test/common/mocks/mock_gmm.h" #include "shared/test/common/mocks/mock_gmm_resource_info.h" #include "shared/test/common/mocks/mock_graphics_allocation.h" -#include "shared/test/common/test_macros/test.h" #include "opencl/source/helpers/surface_formats.h" #include "opencl/source/kernel/kernel.h" diff --git a/opencl/test/unit_test/mem_obj/image_tests.cpp b/opencl/test/unit_test/mem_obj/image_tests.cpp index 62ffa564d0..420798b93b 100644 --- a/opencl/test/unit_test/mem_obj/image_tests.cpp +++ b/opencl/test/unit_test/mem_obj/image_tests.cpp @@ -6,7 +6,6 @@ */ #include "shared/source/command_stream/command_stream_receiver.h" -#include "shared/source/direct_submission/dispatchers/render_dispatcher.h" #include "shared/source/gmm_helper/gmm.h" #include "shared/source/helpers/aligned_memory.h" #include "shared/source/helpers/bit_helpers.h" @@ -43,6 +42,11 @@ #include "CL/cl.h" #include "memory_properties_flags.h" +namespace NEO { +template +class RenderDispatcher; +} // namespace NEO + using namespace NEO; static const unsigned int testImageDimensions = 45; diff --git a/opencl/test/unit_test/mem_obj/image_tests_tgllp_and_later.cpp b/opencl/test/unit_test/mem_obj/image_tests_tgllp_and_later.cpp index bd3389fb10..4e133e7a12 100644 --- a/opencl/test/unit_test/mem_obj/image_tests_tgllp_and_later.cpp +++ b/opencl/test/unit_test/mem_obj/image_tests_tgllp_and_later.cpp @@ -7,7 +7,6 @@ #include "shared/source/gmm_helper/gmm.h" #include "shared/source/gmm_helper/resource_info.h" -#include "shared/test/common/test_macros/test.h" #include "opencl/source/mem_obj/image.h" #include "opencl/test/unit_test/fixtures/cl_device_fixture.h" diff --git a/opencl/test/unit_test/mem_obj/linux/image_linux_tests.cpp b/opencl/test/unit_test/mem_obj/linux/image_linux_tests.cpp index 68b43aa9c4..8331676cdc 100644 --- a/opencl/test/unit_test/mem_obj/linux/image_linux_tests.cpp +++ b/opencl/test/unit_test/mem_obj/linux/image_linux_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 Intel Corporation + * Copyright (C) 2023-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -8,7 +8,6 @@ #include "shared/test/common/test_macros/test.h" #include "opencl/source/mem_obj/image.h" -#include "opencl/source/sharings/unified/unified_sharing_types.h" #include "opencl/test/unit_test/fixtures/cl_device_fixture.h" #include "opencl/test/unit_test/mocks/mock_context.h" #include "opencl/test/unit_test/sharings/unified/unified_sharing_fixtures.h" diff --git a/opencl/test/unit_test/mem_obj/mem_obj_helper_tests.cpp b/opencl/test/unit_test/mem_obj/mem_obj_helper_tests.cpp index 2e4ab64fb1..6849ce1404 100644 --- a/opencl/test/unit_test/mem_obj/mem_obj_helper_tests.cpp +++ b/opencl/test/unit_test/mem_obj/mem_obj_helper_tests.cpp @@ -5,23 +5,22 @@ * */ -#include "shared/source/helpers/gfx_core_helper.h" -#include "shared/source/os_interface/product_helper.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" -#include "shared/test/common/mocks/mock_execution_environment.h" #include "shared/test/common/mocks/ult_device_factory.h" #include "shared/test/common/utilities/base_object_utils.h" -#include "opencl/source/helpers/cl_gfx_core_helper.h" #include "opencl/source/helpers/cl_memory_properties_helpers.h" #include "opencl/source/mem_obj/mem_obj_helper.h" #include "opencl/test/unit_test/fixtures/image_fixture.h" -#include "opencl/test/unit_test/mocks/mock_buffer.h" #include "opencl/test/unit_test/mocks/mock_cl_device.h" #include "opencl/test/unit_test/mocks/mock_context.h" #include "gtest/gtest.h" +namespace NEO { +class Context; +} // namespace NEO + using namespace NEO; TEST(MemObjHelper, givenValidMemFlagsForSubBufferWhenFlagsAreCheckedThenTrueIsReturned) { diff --git a/opencl/test/unit_test/mem_obj/mem_obj_tests.cpp b/opencl/test/unit_test/mem_obj/mem_obj_tests.cpp index b654d0b743..58ff5f8289 100644 --- a/opencl/test/unit_test/mem_obj/mem_obj_tests.cpp +++ b/opencl/test/unit_test/mem_obj/mem_obj_tests.cpp @@ -1,18 +1,16 @@ /* - * Copyright (C) 2018-2024 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * */ #include "shared/source/command_stream/command_stream_receiver.h" -#include "shared/source/device/device.h" #include "shared/source/gmm_helper/gmm.h" #include "shared/source/helpers/aligned_memory.h" #include "shared/source/memory_manager/allocations_list.h" #include "shared/source/os_interface/os_context.h" #include "shared/test/common/mocks/mock_allocation_properties.h" -#include "shared/test/common/mocks/mock_deferred_deleter.h" #include "shared/test/common/mocks/mock_device.h" #include "shared/test/common/mocks/mock_graphics_allocation.h" #include "shared/test/common/mocks/mock_memory_manager.h" @@ -22,14 +20,17 @@ #include "opencl/source/mem_obj/mem_obj.h" #include "opencl/source/platform/platform.h" #include "opencl/source/sharings/sharing.h" -#include "opencl/test/unit_test/command_queue/command_queue_fixture.h" #include "opencl/test/unit_test/fixtures/multi_root_device_fixture.h" -#include "opencl/test/unit_test/mocks/mock_buffer.h" #include "opencl/test/unit_test/mocks/mock_context.h" #include "opencl/test/unit_test/mocks/mock_platform.h" #include "gtest/gtest.h" +namespace NEO { +class Context; +class GmmHelper; +} // namespace NEO + using namespace NEO; struct MySharingHandler : public SharingHandler { diff --git a/opencl/test/unit_test/mem_obj/zero_copy_tests.cpp b/opencl/test/unit_test/mem_obj/zero_copy_tests.cpp index 028bdcdabd..b739888f76 100644 --- a/opencl/test/unit_test/mem_obj/zero_copy_tests.cpp +++ b/opencl/test/unit_test/mem_obj/zero_copy_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2024 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -7,7 +7,6 @@ #include "shared/source/helpers/aligned_memory.h" #include "shared/source/memory_manager/graphics_allocation.h" -#include "shared/test/common/fixtures/memory_management_fixture.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" #include "opencl/source/cl_device/cl_device.h" diff --git a/opencl/test/unit_test/memory_manager/cl_memory_manager_tests.cpp b/opencl/test/unit_test/memory_manager/cl_memory_manager_tests.cpp index dfe4c2ce2b..860218d484 100644 --- a/opencl/test/unit_test/memory_manager/cl_memory_manager_tests.cpp +++ b/opencl/test/unit_test/memory_manager/cl_memory_manager_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2024 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -19,9 +19,6 @@ #include "opencl/test/unit_test/mocks/mock_kernel.h" #include "opencl/test/unit_test/mocks/mock_mdi.h" -#include -#include - using namespace NEO; using ClMemoryAllocatorTest = ::Test; diff --git a/opencl/test/unit_test/memory_manager/cpu_page_fault_manager_memory_sync_tests.cpp b/opencl/test/unit_test/memory_manager/cpu_page_fault_manager_memory_sync_tests.cpp index fedda73c39..f462c7d67e 100644 --- a/opencl/test/unit_test/memory_manager/cpu_page_fault_manager_memory_sync_tests.cpp +++ b/opencl/test/unit_test/memory_manager/cpu_page_fault_manager_memory_sync_tests.cpp @@ -7,16 +7,18 @@ #include "shared/source/memory_manager/unified_memory_manager.h" #include "shared/test/common/fixtures/cpu_page_fault_manager_tests_fixture.h" -#include "shared/test/common/mocks/mock_graphics_allocation.h" #include "shared/test/common/mocks/mock_memory_manager.h" #include "shared/test/common/test_macros/test_checks_shared.h" -#include "opencl/source/command_queue/command_queue.h" #include "opencl/test/unit_test/mocks/mock_cl_device.h" #include "opencl/test/unit_test/mocks/mock_command_queue.h" #include "gtest/gtest.h" +namespace NEO { +class MemoryManager; +} // namespace NEO + using namespace NEO; struct CommandQueueMock : public MockCommandQueue { diff --git a/opencl/test/unit_test/memory_manager/migraton_controller_tests.cpp b/opencl/test/unit_test/memory_manager/migraton_controller_tests.cpp index 740f3bebc3..7298c5ac4d 100644 --- a/opencl/test/unit_test/memory_manager/migraton_controller_tests.cpp +++ b/opencl/test/unit_test/memory_manager/migraton_controller_tests.cpp @@ -12,8 +12,6 @@ #include "shared/test/common/helpers/debug_manager_state_restore.h" #include "shared/test/common/mocks/mock_memory_manager.h" #include "shared/test/common/mocks/mock_migration_sync_data.h" -#include "shared/test/common/mocks/mock_multi_graphics_allocation.h" -#include "shared/test/common/test_macros/test.h" #include "opencl/source/memory_manager/migration_controller.h" #include "opencl/test/unit_test/fixtures/buffer_fixture.h" diff --git a/opencl/test/unit_test/mocks/gl/linux/mock_gl_sharing_linux.cpp b/opencl/test/unit_test/mocks/gl/linux/mock_gl_sharing_linux.cpp index b4685e8863..77b3e35353 100644 --- a/opencl/test/unit_test/mocks/gl/linux/mock_gl_sharing_linux.cpp +++ b/opencl/test/unit_test/mocks/gl/linux/mock_gl_sharing_linux.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2023 Intel Corporation + * Copyright (C) 2020-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -7,8 +7,6 @@ #include "opencl/test/unit_test/mocks/gl/linux/mock_gl_sharing_linux.h" -#include "config.h" - namespace NEO { void GlSharingFunctionsMock::initMembers() { GLSharingFunctionsLinux::initGLFunctions(); diff --git a/opencl/test/unit_test/mocks/mock_async_event_handler.h b/opencl/test/unit_test/mocks/mock_async_event_handler.h index 35250cbb61..539496b321 100644 --- a/opencl/test/unit_test/mocks/mock_async_event_handler.h +++ b/opencl/test/unit_test/mocks/mock_async_event_handler.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2023 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -13,6 +13,10 @@ #include #include +namespace NEO { +class Event; +} // namespace NEO + using namespace NEO; namespace MockAsyncEventHandlerGlobals { extern bool destructorCalled; diff --git a/opencl/test/unit_test/mocks/mock_buffer.cpp b/opencl/test/unit_test/mocks/mock_buffer.cpp index f3a1148efe..9a53e795ae 100644 --- a/opencl/test/unit_test/mocks/mock_buffer.cpp +++ b/opencl/test/unit_test/mocks/mock_buffer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023-2024 Intel Corporation + * Copyright (C) 2023-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -13,6 +13,11 @@ #include "opencl/source/helpers/cl_memory_properties_helpers.h" +namespace NEO { +class Context; +class GmmHelper; +} // namespace NEO + MockBufferStorage::MockBufferStorage(bool unaligned) : mockGfxAllocation(unaligned ? alignUp(&data, 4) : alignUp(&data, 64), sizeof(data) / 2), multiGfxAllocation(GraphicsAllocationHelper::toMultiGraphicsAllocation(&mockGfxAllocation)) { initDevice(); diff --git a/opencl/test/unit_test/mocks/mock_buffer.h b/opencl/test/unit_test/mocks/mock_buffer.h index 0b5f3a5003..c66c55ebdf 100644 --- a/opencl/test/unit_test/mocks/mock_buffer.h +++ b/opencl/test/unit_test/mocks/mock_buffer.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2024 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -14,7 +14,10 @@ namespace NEO { class MockDevice; -} +class Context; +class GmmHelper; +class GraphicsAllocation; +} // namespace NEO using namespace NEO; diff --git a/opencl/test/unit_test/mocks/mock_cl_device.h b/opencl/test/unit_test/mocks/mock_cl_device.h index 333f69ac47..3b735c1399 100644 --- a/opencl/test/unit_test/mocks/mock_cl_device.h +++ b/opencl/test/unit_test/mocks/mock_cl_device.h @@ -18,6 +18,12 @@ class SubDevice; template class UltCommandStreamReceiver; struct HardwareInfo; +class BuiltIns; +class ExecutionEnvironment; +class MemoryManager; +enum PreemptionMode : uint32_t; +struct DeviceInfo; +struct EngineControl; extern CommandStreamReceiver *createCommandStream(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex, diff --git a/opencl/test/unit_test/mocks/mock_context.cpp b/opencl/test/unit_test/mocks/mock_context.cpp index 95bbcde0b6..2bb9ee5e0e 100644 --- a/opencl/test/unit_test/mocks/mock_context.cpp +++ b/opencl/test/unit_test/mocks/mock_context.cpp @@ -7,12 +7,8 @@ #include "opencl/test/unit_test/mocks/mock_context.h" -#include "shared/source/built_ins/built_ins.h" -#include "shared/source/compiler_interface/compiler_interface.h" -#include "shared/source/compiler_interface/external_functions.h" #include "shared/source/helpers/blit_properties.h" #include "shared/source/memory_manager/deferred_deleter.h" -#include "shared/source/memory_manager/unified_memory_manager.h" #include "shared/source/os_interface/os_context.h" #include "shared/source/utilities/staging_buffer_manager.h" #include "shared/test/common/helpers/engine_descriptor_helper.h" @@ -20,12 +16,8 @@ #include "opencl/source/command_queue/command_queue.h" #include "opencl/source/sharings/sharing.h" -#include "opencl/test/unit_test/fixtures/cl_device_fixture.h" #include "opencl/test/unit_test/mocks/mock_cl_device.h" #include "opencl/test/unit_test/mocks/mock_cl_execution_environment.h" -#include "opencl/test/unit_test/mocks/mock_kernel.h" - -#include "d3d_sharing_functions.h" namespace NEO { diff --git a/opencl/test/unit_test/mocks/mock_context.h b/opencl/test/unit_test/mocks/mock_context.h index e01f00e5f6..e46c14d569 100644 --- a/opencl/test/unit_test/mocks/mock_context.h +++ b/opencl/test/unit_test/mocks/mock_context.h @@ -19,6 +19,11 @@ namespace NEO { class AsyncEventsHandler; class OsContext; +class ClDevice; +class ClDeviceVector; +class CommandStreamReceiver; +class MockClDevice; +class SharingFunctions; class MockContext : public Context { public: diff --git a/opencl/test/unit_test/mocks/mock_debug_program.cpp b/opencl/test/unit_test/mocks/mock_debug_program.cpp index 887ff0f6f2..6a12ba1276 100644 --- a/opencl/test/unit_test/mocks/mock_debug_program.cpp +++ b/opencl/test/unit_test/mocks/mock_debug_program.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022-2023 Intel Corporation + * Copyright (C) 2022-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -7,7 +7,6 @@ #include "opencl/test/unit_test/mocks/mock_debug_program.h" -#include "shared/source/compiler_interface/external_functions.h" #include "shared/source/device/device.h" #include "shared/source/execution_environment/execution_environment.h" #include "shared/source/execution_environment/root_device_environment.h" diff --git a/opencl/test/unit_test/mocks/mock_platform.cpp b/opencl/test/unit_test/mocks/mock_platform.cpp index 89e7c50e2e..2985888d63 100644 --- a/opencl/test/unit_test/mocks/mock_platform.cpp +++ b/opencl/test/unit_test/mocks/mock_platform.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2024 Intel Corporation + * Copyright (C) 2020-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -7,9 +7,7 @@ #include "opencl/test/unit_test/mocks/mock_platform.h" -#include "shared/source/device/device.h" #include "shared/source/execution_environment/root_device_environment.h" -#include "shared/source/memory_manager/memory_manager.h" #include "shared/source/os_interface/device_factory.h" #include "shared/test/common/helpers/default_hw_info.h" #include "shared/test/common/helpers/unit_test_helper.h" diff --git a/opencl/test/unit_test/mocks/mock_program.cpp b/opencl/test/unit_test/mocks/mock_program.cpp index abadf3a561..2e753eb293 100644 --- a/opencl/test/unit_test/mocks/mock_program.cpp +++ b/opencl/test/unit_test/mocks/mock_program.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2023 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -8,20 +8,9 @@ #include "opencl/test/unit_test/mocks/mock_program.h" #include "shared/source/compiler_interface/compiler_cache.h" -#include "shared/source/compiler_interface/external_functions.h" -#include "shared/source/device_binary_format/patchtokens_decoder.h" -#include "shared/source/helpers/hash.h" #include "shared/source/helpers/hw_info.h" -#include "shared/source/program/program_info_from_patchtokens.h" -#include "shared/test/common/helpers/default_hw_info.h" -#include "shared/test/common/helpers/ult_limits.h" -#include "shared/test/common/mocks/mock_compiler_interface.h" -#include "shared/test/common/mocks/mock_compilers.h" -#include "shared/test/common/mocks/mock_graphics_allocation.h" #include "opencl/source/context/context.h" -#include "opencl/source/program/create.inl" -#include "opencl/test/unit_test/mocks/mock_cl_device.h" namespace NEO { ClDeviceVector toClDeviceVector(ClDevice &clDevice) { diff --git a/opencl/test/unit_test/mocks/mock_program.h b/opencl/test/unit_test/mocks/mock_program.h index 2a10d1664a..0c516f4ade 100644 --- a/opencl/test/unit_test/mocks/mock_program.h +++ b/opencl/test/unit_test/mocks/mock_program.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2024 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -21,6 +21,9 @@ namespace NEO { class GraphicsAllocation; +class BuiltinDispatchInfoBuilder; +class Context; + ClDeviceVector toClDeviceVector(ClDevice &clDevice); //////////////////////////////////////////////////////////////////////////////// // Program - Core implementation diff --git a/opencl/test/unit_test/mocks/ult_cl_device_factory.cpp b/opencl/test/unit_test/mocks/ult_cl_device_factory.cpp index 09c8639efd..658042a55a 100644 --- a/opencl/test/unit_test/mocks/ult_cl_device_factory.cpp +++ b/opencl/test/unit_test/mocks/ult_cl_device_factory.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2023 Intel Corporation + * Copyright (C) 2020-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -7,11 +7,6 @@ #include "opencl/test/unit_test/mocks/ult_cl_device_factory.h" -#include "shared/source/command_stream/create_command_stream_impl.h" -#include "shared/source/memory_manager/multi_graphics_allocation.h" -#include "shared/source/os_interface/device_factory.h" -#include "shared/test/common/helpers/ult_hw_config.h" -#include "shared/test/common/mocks/mock_memory_manager.h" #include "shared/test/common/mocks/ult_device_factory.h" #include "opencl/source/execution_environment/cl_execution_environment.h" diff --git a/opencl/test/unit_test/offline_compiler/decoder/encoder_tests.cpp b/opencl/test/unit_test/offline_compiler/decoder/encoder_tests.cpp index f42152323d..7a4642bfa8 100644 --- a/opencl/test/unit_test/offline_compiler/decoder/encoder_tests.cpp +++ b/opencl/test/unit_test/offline_compiler/decoder/encoder_tests.cpp @@ -5,11 +5,8 @@ * */ -#include "shared/offline_compiler/source/decoder/binary_decoder.h" #include "shared/source/helpers/aligned_memory.h" -#include "shared/source/helpers/array_count.h" #include "shared/test/common/helpers/stream_capture.h" -#include "shared/test/common/helpers/test_files.h" #include "opencl/test/unit_test/offline_compiler/environment.h" @@ -18,7 +15,6 @@ #include #include -#include #include extern Environment *gEnvironment; diff --git a/opencl/test/unit_test/offline_compiler/decoder/zebin_manipulator_tests.cpp b/opencl/test/unit_test/offline_compiler/decoder/zebin_manipulator_tests.cpp index 49790568c9..11b94fd505 100644 --- a/opencl/test/unit_test/offline_compiler/decoder/zebin_manipulator_tests.cpp +++ b/opencl/test/unit_test/offline_compiler/decoder/zebin_manipulator_tests.cpp @@ -13,7 +13,6 @@ #include "shared/test/common/helpers/stream_capture.h" #include "shared/test/common/helpers/variable_backup.h" #include "shared/test/common/mocks/mock_elf.h" -#include "shared/test/common/mocks/mock_io_functions.h" #include "shared/test/common/mocks/mock_modules_zebin.h" #include "shared/test/common/test_macros/test.h" @@ -22,9 +21,6 @@ #include "opencl/test/unit_test/offline_compiler/decoder/mock/mock_zebin_encoder.h" #include "opencl/test/unit_test/offline_compiler/mock/mock_argument_helper.h" -#include "neo_igfxfmid.h" - -#include #include template diff --git a/opencl/test/unit_test/offline_compiler/mock/mock_iga_dll.cpp b/opencl/test/unit_test/offline_compiler/mock/mock_iga_dll.cpp index 3f33619126..3ad9c2289b 100644 --- a/opencl/test/unit_test/offline_compiler/mock/mock_iga_dll.cpp +++ b/opencl/test/unit_test/offline_compiler/mock/mock_iga_dll.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 Intel Corporation + * Copyright (C) 2022-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -7,8 +7,6 @@ #include "mock_iga_dll.h" -#include "shared/source/helpers/debug_helpers.h" - #include #include #include diff --git a/opencl/test/unit_test/offline_compiler/mock/mock_iga_dll.h b/opencl/test/unit_test/offline_compiler/mock/mock_iga_dll.h index 50907b9ee6..5dfbf11933 100644 --- a/opencl/test/unit_test/offline_compiler/mock/mock_iga_dll.h +++ b/opencl/test/unit_test/offline_compiler/mock/mock_iga_dll.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 Intel Corporation + * Copyright (C) 2022-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -9,6 +9,7 @@ #define IGA_BUILDING_DLL #include "igad.h" + #undef IGA_BUILDING_DLL #include diff --git a/opencl/test/unit_test/offline_compiler/mock/mock_ocloc_fcl_facade.cpp b/opencl/test/unit_test/offline_compiler/mock/mock_ocloc_fcl_facade.cpp index d14fd3c9ae..8d97129862 100644 --- a/opencl/test/unit_test/offline_compiler/mock/mock_ocloc_fcl_facade.cpp +++ b/opencl/test/unit_test/offline_compiler/mock/mock_ocloc_fcl_facade.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023 Intel Corporation + * Copyright (C) 2023-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -12,6 +12,8 @@ #include #include +class OclocArgHelper; + namespace NEO { MockOclocFclFacade::MockOclocFclFacade(OclocArgHelper *argHelper) : OclocFclFacade(argHelper){}; diff --git a/opencl/test/unit_test/offline_compiler/mock/mock_ocloc_fcl_facade.h b/opencl/test/unit_test/offline_compiler/mock/mock_ocloc_fcl_facade.h index b1b71169c4..12f3ebd8a5 100644 --- a/opencl/test/unit_test/offline_compiler/mock/mock_ocloc_fcl_facade.h +++ b/opencl/test/unit_test/offline_compiler/mock/mock_ocloc_fcl_facade.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022-2023 Intel Corporation + * Copyright (C) 2022-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -12,6 +12,8 @@ #include #include +class OclocArgHelper; + namespace NEO { class MockOclocFclFacade : public OclocFclFacade { diff --git a/opencl/test/unit_test/offline_compiler/mock/mock_ocloc_igc_facade.cpp b/opencl/test/unit_test/offline_compiler/mock/mock_ocloc_igc_facade.cpp index cf4f8f3396..fd3441b550 100644 --- a/opencl/test/unit_test/offline_compiler/mock/mock_ocloc_igc_facade.cpp +++ b/opencl/test/unit_test/offline_compiler/mock/mock_ocloc_igc_facade.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2023-2024 Intel Corporation + * Copyright (C) 2023-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -9,6 +9,8 @@ #include "shared/source/os_interface/os_library.h" +class OclocArgHelper; + namespace NEO { MockOclocIgcFacade::MockOclocIgcFacade(OclocArgHelper *argHelper) : OclocIgcFacade(argHelper){}; diff --git a/opencl/test/unit_test/offline_compiler/mock/mock_ocloc_igc_facade.h b/opencl/test/unit_test/offline_compiler/mock/mock_ocloc_igc_facade.h index 3d892c1aff..f3e3297b66 100644 --- a/opencl/test/unit_test/offline_compiler/mock/mock_ocloc_igc_facade.h +++ b/opencl/test/unit_test/offline_compiler/mock/mock_ocloc_igc_facade.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022-2024 Intel Corporation + * Copyright (C) 2022-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -12,6 +12,8 @@ #include #include +class OclocArgHelper; + namespace NEO { class MockOclocIgcFacade : public OclocIgcFacade { diff --git a/opencl/test/unit_test/offline_compiler/mock/mock_offline_compiler.h b/opencl/test/unit_test/offline_compiler/mock/mock_offline_compiler.h index a07d162223..4198d32ff6 100644 --- a/opencl/test/unit_test/offline_compiler/mock/mock_offline_compiler.h +++ b/opencl/test/unit_test/offline_compiler/mock/mock_offline_compiler.h @@ -14,6 +14,7 @@ #include class MockOclocArgHelper; + namespace NEO { class MockOclocFclFacade; class MockOclocIgcFacade; diff --git a/opencl/test/unit_test/offline_compiler/ocloc_fatbinary_tests.cpp b/opencl/test/unit_test/offline_compiler/ocloc_fatbinary_tests.cpp index d6b08cde33..6247efd6a5 100644 --- a/opencl/test/unit_test/offline_compiler/ocloc_fatbinary_tests.cpp +++ b/opencl/test/unit_test/offline_compiler/ocloc_fatbinary_tests.cpp @@ -10,19 +10,16 @@ #include "shared/offline_compiler/source/ocloc_api.h" #include "shared/offline_compiler/source/ocloc_arg_helper.h" #include "shared/source/compiler_interface/compiler_options.h" -#include "shared/source/device_binary_format/ar/ar.h" #include "shared/source/device_binary_format/ar/ar_decoder.h" #include "shared/source/device_binary_format/ar/ar_encoder.h" #include "shared/source/device_binary_format/elf/elf_decoder.h" #include "shared/source/device_binary_format/elf/ocl_elf.h" #include "shared/source/helpers/compiler_product_helper.h" -#include "shared/source/helpers/gfx_core_helper.h" #include "shared/source/helpers/product_config_helper.h" #include "shared/source/release_helper/release_helper.h" #include "shared/test/common/helpers/gtest_helpers.h" #include "shared/test/common/helpers/stream_capture.h" #include "shared/test/common/helpers/variable_backup.h" -#include "shared/test/common/mocks/mock_io_functions.h" #include "environment.h" #include "mock/mock_argument_helper.h" diff --git a/opencl/test/unit_test/offline_compiler/ocloc_igc_facade_tests.cpp b/opencl/test/unit_test/offline_compiler/ocloc_igc_facade_tests.cpp index cb2855a700..3f868bdb1a 100644 --- a/opencl/test/unit_test/offline_compiler/ocloc_igc_facade_tests.cpp +++ b/opencl/test/unit_test/offline_compiler/ocloc_igc_facade_tests.cpp @@ -9,7 +9,6 @@ #include "shared/offline_compiler/source/ocloc_api.h" #include "shared/source/debug_settings/debug_settings_manager.h" -#include "shared/source/os_interface/os_inc_base.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" #include "shared/test/common/helpers/stream_capture.h" #include "shared/test/common/mocks/mock_compilers.h" diff --git a/opencl/test/unit_test/offline_compiler/ocloc_product_config_tests.cpp b/opencl/test/unit_test/offline_compiler/ocloc_product_config_tests.cpp index 6babc89fd9..e2aeafd9ed 100644 --- a/opencl/test/unit_test/offline_compiler/ocloc_product_config_tests.cpp +++ b/opencl/test/unit_test/offline_compiler/ocloc_product_config_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022-2024 Intel Corporation + * Copyright (C) 2022-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -10,7 +10,6 @@ #include "shared/offline_compiler/source/ocloc_api.h" #include "shared/offline_compiler/source/ocloc_arg_helper.h" #include "shared/source/helpers/product_config_helper.h" -#include "shared/source/os_interface/os_library.h" namespace NEO { TEST_P(OclocProductConfigTests, GivenProductConfigValuesWhenInitHardwareInfoThenCorrectValuesAreSet) { diff --git a/opencl/test/unit_test/offline_compiler/ocloc_supported_devices_helper_tests.cpp b/opencl/test/unit_test/offline_compiler/ocloc_supported_devices_helper_tests.cpp index ac93d7ac0b..50329cf107 100644 --- a/opencl/test/unit_test/offline_compiler/ocloc_supported_devices_helper_tests.cpp +++ b/opencl/test/unit_test/offline_compiler/ocloc_supported_devices_helper_tests.cpp @@ -1,11 +1,10 @@ /* - * Copyright (C) 2024 Intel Corporation + * Copyright (C) 2024-2025 Intel Corporation * * SPDX-License-Identifier: MIT * */ -#include "shared/offline_compiler/source/ocloc_arg_helper.h" #include "shared/offline_compiler/source/ocloc_supported_devices_helper.h" #include "shared/source/device_binary_format/yaml/yaml_parser.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" diff --git a/opencl/test/unit_test/offline_compiler/ocloc_validator_tests.cpp b/opencl/test/unit_test/offline_compiler/ocloc_validator_tests.cpp index e7f9733219..500530fc05 100644 --- a/opencl/test/unit_test/offline_compiler/ocloc_validator_tests.cpp +++ b/opencl/test/unit_test/offline_compiler/ocloc_validator_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2023 Intel Corporation + * Copyright (C) 2020-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -7,7 +7,6 @@ #include "shared/offline_compiler/source/ocloc_validator.h" #include "shared/source/device_binary_format/device_binary_formats.h" -#include "shared/source/helpers/hw_info.h" #include "shared/test/common/mocks/mock_modules_zebin.h" #include "opencl/test/unit_test/offline_compiler/mock/mock_argument_helper.h" diff --git a/opencl/test/unit_test/offline_compiler/offline_compiler_tests.h b/opencl/test/unit_test/offline_compiler/offline_compiler_tests.h index d4d9caadb6..bd3e75150a 100644 --- a/opencl/test/unit_test/offline_compiler/offline_compiler_tests.h +++ b/opencl/test/unit_test/offline_compiler/offline_compiler_tests.h @@ -23,6 +23,11 @@ #include #include +namespace NEO { +class MultiCommand; +class OfflineCompiler; +} // namespace NEO + extern Environment *gEnvironment; namespace NEO { diff --git a/opencl/test/unit_test/os_interface/linux/cl_drm_memory_manager_tests.cpp b/opencl/test/unit_test/os_interface/linux/cl_drm_memory_manager_tests.cpp index ea0bbb887f..f48eed9e3c 100644 --- a/opencl/test/unit_test/os_interface/linux/cl_drm_memory_manager_tests.cpp +++ b/opencl/test/unit_test/os_interface/linux/cl_drm_memory_manager_tests.cpp @@ -5,33 +5,17 @@ * */ -#include "shared/source/built_ins/sip.h" -#include "shared/source/command_stream/device_command_stream.h" -#include "shared/source/command_stream/linear_stream.h" -#include "shared/source/command_stream/preemption.h" -#include "shared/source/gmm_helper/gmm_helper.h" #include "shared/source/helpers/aligned_memory.h" #include "shared/source/helpers/constants.h" #include "shared/source/helpers/ptr_math.h" -#include "shared/source/helpers/timestamp_packet.h" -#include "shared/source/os_interface/linux/allocator_helper.h" #include "shared/source/os_interface/linux/drm_allocation.h" #include "shared/source/os_interface/linux/drm_buffer_object.h" -#include "shared/source/os_interface/linux/drm_command_stream.h" -#include "shared/source/os_interface/linux/drm_memory_manager.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" -#include "shared/test/common/helpers/gtest_helpers.h" -#include "shared/test/common/helpers/unit_test_helper.h" -#include "shared/test/common/libult/linux/drm_mock.h" -#include "shared/test/common/mocks/linux/mock_drm_allocation.h" -#include "shared/test/common/mocks/linux/mock_drm_command_stream_receiver.h" #include "shared/test/common/mocks/linux/mock_drm_memory_manager.h" #include "shared/test/common/mocks/mock_gmm.h" #include "shared/test/common/os_interface/linux/drm_memory_manager_fixture.h" #include "shared/test/common/test_macros/hw_test.h" -#include "opencl/source/command_queue/command_queue.h" -#include "opencl/source/event/event.h" #include "opencl/source/helpers/cl_memory_properties_helpers.h" #include "opencl/source/mem_obj/buffer.h" #include "opencl/source/mem_obj/image.h" diff --git a/opencl/test/unit_test/os_interface/linux/cl_mem_cache_clos_tests_xe_hpc.cpp b/opencl/test/unit_test/os_interface/linux/cl_mem_cache_clos_tests_xe_hpc.cpp index 155ed9ed00..eddfacefaf 100644 --- a/opencl/test/unit_test/os_interface/linux/cl_mem_cache_clos_tests_xe_hpc.cpp +++ b/opencl/test/unit_test/os_interface/linux/cl_mem_cache_clos_tests_xe_hpc.cpp @@ -5,16 +5,13 @@ * */ -#include "shared/source/memory_manager/unified_memory_manager.h" #include "shared/source/os_interface/linux/drm_allocation.h" #include "shared/source/os_interface/linux/drm_buffer_object.h" -#include "shared/source/xe_hpc_core/hw_cmds_xe_hpc_core_base.h" #include "shared/test/common/mocks/mock_allocation_properties.h" #include "shared/test/common/os_interface/linux/drm_memory_manager_prelim_fixtures.h" #include "shared/test/common/os_interface/linux/drm_mock_cache_info.h" #include "shared/test/common/os_interface/linux/drm_mock_memory_info.h" #include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" #include "opencl/source/helpers/cl_memory_properties_helpers.h" #include "opencl/source/mem_obj/buffer.h" diff --git a/opencl/test/unit_test/os_interface/linux/mock_performance_counters_linux.h b/opencl/test/unit_test/os_interface/linux/mock_performance_counters_linux.h index 81310f626f..8d20119f18 100644 --- a/opencl/test/unit_test/os_interface/linux/mock_performance_counters_linux.h +++ b/opencl/test/unit_test/os_interface/linux/mock_performance_counters_linux.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -8,12 +8,8 @@ #pragma once #include "shared/source/os_interface/linux/performance_counters_linux.h" -#include "opencl/test/unit_test/os_interface/mock_performance_counters.h" - namespace NEO { -using MetricsLibraryApi::LinuxAdapterType; - class MockPerformanceCountersLinux : public PerformanceCountersLinux { public: MockPerformanceCountersLinux(); 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 0e32d20892..55bff4ce15 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 @@ -1,11 +1,10 @@ /* - * Copyright (C) 2023 Intel Corporation + * Copyright (C) 2023-2025 Intel Corporation * * SPDX-License-Identifier: MIT * */ -#include "shared/test/common/helpers/debug_manager_state_restore.h" #include "shared/test/common/test_macros/test.h" #include "opencl/source/cl_device/cl_device.h" diff --git a/opencl/test/unit_test/os_interface/mock_performance_counters.cpp b/opencl/test/unit_test/os_interface/mock_performance_counters.cpp index f5bc0bfa8c..a48782f3e5 100644 --- a/opencl/test/unit_test/os_interface/mock_performance_counters.cpp +++ b/opencl/test/unit_test/os_interface/mock_performance_counters.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2023 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -7,8 +7,6 @@ #include "mock_performance_counters.h" -#include "shared/source/execution_environment/root_device_environment.h" -#include "shared/source/os_interface/os_interface.h" #include "shared/source/utilities/perf_counter.h" #include "shared/test/common/mocks/mock_execution_environment.h" diff --git a/opencl/test/unit_test/os_interface/performance_counters_tests.cpp b/opencl/test/unit_test/os_interface/performance_counters_tests.cpp index 69d2fec64d..8930b162de 100644 --- a/opencl/test/unit_test/os_interface/performance_counters_tests.cpp +++ b/opencl/test/unit_test/os_interface/performance_counters_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2024 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -10,7 +10,6 @@ #include "shared/source/utilities/perf_counter.h" #include "shared/source/utilities/tag_allocator.h" #include "shared/test/common/helpers/engine_descriptor_helper.h" -#include "shared/test/common/mocks/mock_device.h" #include "shared/test/common/mocks/mock_execution_environment.h" #include "shared/test/common/mocks/mock_os_context.h" diff --git a/opencl/test/unit_test/program/kernel_data.cpp b/opencl/test/unit_test/program/kernel_data.cpp index 7f966abf67..064912f0cc 100644 --- a/opencl/test/unit_test/program/kernel_data.cpp +++ b/opencl/test/unit_test/program/kernel_data.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2024 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -9,8 +9,6 @@ #include "shared/source/helpers/string.h" #include "shared/test/common/helpers/gtest_helpers.h" -#include "opencl/source/platform/platform.h" -#include "opencl/source/program/program.h" #include "opencl/test/unit_test/fixtures/kernel_data_fixture.h" TEST_F(KernelDataTest, GivenKernelNameWhenBuildingThenProgramIsCorrect) { diff --git a/opencl/test/unit_test/program/kernel_data_OCL2_0.cpp b/opencl/test/unit_test/program/kernel_data_OCL2_0.cpp index 5979b4bd5a..4a85f37d31 100644 --- a/opencl/test/unit_test/program/kernel_data_OCL2_0.cpp +++ b/opencl/test/unit_test/program/kernel_data_OCL2_0.cpp @@ -1,16 +1,12 @@ /* - * Copyright (C) 2018-2024 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * */ -#include "shared/test/common/helpers/gtest_helpers.h" - #include "opencl/test/unit_test/fixtures/kernel_data_fixture.h" -#include "patch_g7.h" - TEST_F(KernelDataTest, givenDataParameterPreferredWorkgroupMultipleTokenWhenBinaryIsdecodedThenCorrectOffsetIsAssigned) { const uint32_t offset = 0x100; diff --git a/opencl/test/unit_test/program/process_debug_data_tests.cpp b/opencl/test/unit_test/program/process_debug_data_tests.cpp index d892615868..4451c3b08d 100644 --- a/opencl/test/unit_test/program/process_debug_data_tests.cpp +++ b/opencl/test/unit_test/program/process_debug_data_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2023 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -14,6 +14,7 @@ #include "program_debug_data.h" #include + using namespace iOpenCL; using namespace NEO; diff --git a/opencl/test/unit_test/program/process_elf_binary_tests.cpp b/opencl/test/unit_test/program/process_elf_binary_tests.cpp index 4bbf26b46f..857109e0bd 100644 --- a/opencl/test/unit_test/program/process_elf_binary_tests.cpp +++ b/opencl/test/unit_test/program/process_elf_binary_tests.cpp @@ -1,24 +1,19 @@ /* - * Copyright (C) 2018-2024 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * */ #include "shared/source/compiler_interface/compiler_options.h" -#include "shared/source/compiler_interface/intermediate_representations.h" -#include "shared/source/device/device.h" #include "shared/source/device_binary_format/elf/elf.h" #include "shared/source/device_binary_format/elf/elf_decoder.h" #include "shared/source/device_binary_format/elf/ocl_elf.h" -#include "shared/source/helpers/file_io.h" #include "shared/source/helpers/string.h" #include "shared/test/common/device_binary_format/elf/elf_tests_data.h" #include "shared/test/common/device_binary_format/patchtokens_tests.h" #include "shared/test/common/helpers/gtest_helpers.h" -#include "shared/test/common/helpers/test_files.h" #include "shared/test/common/mocks/mock_device.h" -#include "shared/test/common/mocks/mock_elf.h" #include "opencl/test/unit_test/mocks/mock_cl_device.h" #include "opencl/test/unit_test/mocks/mock_program.h" diff --git a/opencl/test/unit_test/program/process_spir_binary_tests.cpp b/opencl/test/unit_test/program/process_spir_binary_tests.cpp index bf3a70c71f..f3e8d5f418 100644 --- a/opencl/test/unit_test/program/process_spir_binary_tests.cpp +++ b/opencl/test/unit_test/program/process_spir_binary_tests.cpp @@ -1,11 +1,10 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * */ -#include "shared/source/device/device.h" #include "shared/source/helpers/string.h" #include "opencl/test/unit_test/mocks/mock_cl_device.h" diff --git a/opencl/test/unit_test/program/program_spec_constants_tests.cpp b/opencl/test/unit_test/program/program_spec_constants_tests.cpp index 2a0fc2719b..f1c6c13b5d 100644 --- a/opencl/test/unit_test/program/program_spec_constants_tests.cpp +++ b/opencl/test/unit_test/program/program_spec_constants_tests.cpp @@ -1,14 +1,12 @@ /* - * Copyright (C) 2019-2022 Intel Corporation + * Copyright (C) 2019-2025 Intel Corporation * * SPDX-License-Identifier: MIT * */ #include "shared/source/compiler_interface/compiler_interface.h" -#include "shared/source/compiler_interface/compiler_interface.inl" #include "shared/test/common/mocks/mock_cif.h" -#include "shared/test/common/mocks/mock_compilers.h" #include "opencl/test/unit_test/mocks/mock_cl_device.h" #include "opencl/test/unit_test/mocks/mock_program.h" diff --git a/opencl/test/unit_test/program/program_tests.h b/opencl/test/unit_test/program/program_tests.h index 82735a86c1..1d4f012163 100644 --- a/opencl/test/unit_test/program/program_tests.h +++ b/opencl/test/unit_test/program/program_tests.h @@ -1,11 +1,12 @@ /* - * Copyright (C) 2018-2023 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * */ #pragma once + #include "opencl/test/unit_test/fixtures/cl_device_fixture.h" #include "opencl/test/unit_test/fixtures/context_fixture.h" #include "opencl/test/unit_test/fixtures/platform_fixture.h" diff --git a/opencl/test/unit_test/program/program_with_zebin.h b/opencl/test/unit_test/program/program_with_zebin.h index 43ccc1fe99..eca7a31bb4 100644 --- a/opencl/test/unit_test/program/program_with_zebin.h +++ b/opencl/test/unit_test/program/program_with_zebin.h @@ -1,11 +1,12 @@ /* - * Copyright (C) 2022-2023 Intel Corporation + * Copyright (C) 2022-2025 Intel Corporation * * SPDX-License-Identifier: MIT * */ #pragma once + #include "opencl/test/unit_test/program/program_tests.h" namespace NEO { @@ -17,6 +18,7 @@ class MockProgram; using namespace NEO; class MockBuffer; + class ProgramWithZebinFixture : public ProgramTests { public: std::unique_ptr program; diff --git a/opencl/test/unit_test/program/program_with_zebin_tests.cpp b/opencl/test/unit_test/program/program_with_zebin_tests.cpp index a429dc00cc..8ece2a14b6 100644 --- a/opencl/test/unit_test/program/program_with_zebin_tests.cpp +++ b/opencl/test/unit_test/program/program_with_zebin_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022-2023 Intel Corporation + * Copyright (C) 2022-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -9,12 +9,12 @@ #include "shared/test/common/mocks/mock_modules_zebin.h" #include "shared/test/common/test_macros/test.h" -#include "opencl/test/unit_test/mocks/mock_buffer.h" #include "opencl/test/unit_test/mocks/mock_cl_device.h" #include "opencl/test/unit_test/mocks/mock_program.h" #include "opencl/test/unit_test/program/program_with_zebin.h" #include + using namespace NEO; TEST_F(ProgramWithZebinFixture, givenNoZebinThenSegmentsAreEmpty) { diff --git a/opencl/test/unit_test/sampler/sampler_tests_xehp_and_later.cpp b/opencl/test/unit_test/sampler/sampler_tests_xehp_and_later.cpp index 77c181d646..101a1f787c 100644 --- a/opencl/test/unit_test/sampler/sampler_tests_xehp_and_later.cpp +++ b/opencl/test/unit_test/sampler/sampler_tests_xehp_and_later.cpp @@ -1,18 +1,14 @@ /* - * Copyright (C) 2021-2022 Intel Corporation + * Copyright (C) 2021-2025 Intel Corporation * * SPDX-License-Identifier: MIT * */ -#include "shared/source/debug_settings/debug_settings_manager.h" -#include "shared/test/common/helpers/debug_manager_state_restore.h" #include "shared/test/common/test_macros/hw_test.h" #include "opencl/test/unit_test/fixtures/cl_device_fixture.h" -#include - using namespace NEO; using XeHPAndLaterSamplerTest = Test; diff --git a/opencl/test/unit_test/sharings/gl/linux/gl_types_tests.cpp b/opencl/test/unit_test/sharings/gl/linux/gl_types_tests.cpp index 1e2c72b469..fc46a3b558 100644 --- a/opencl/test/unit_test/sharings/gl/linux/gl_types_tests.cpp +++ b/opencl/test/unit_test/sharings/gl/linux/gl_types_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2024 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -7,7 +7,6 @@ #include "opencl/source/sharings/gl/gl_texture.h" -#include "config.h" #include "gtest/gtest.h" namespace NEO { diff --git a/opencl/test/unit_test/sharings/sharing_factory_tests.cpp b/opencl/test/unit_test/sharings/sharing_factory_tests.cpp index 7aae3d5a1a..91c8581d7f 100644 --- a/opencl/test/unit_test/sharings/sharing_factory_tests.cpp +++ b/opencl/test/unit_test/sharings/sharing_factory_tests.cpp @@ -1,15 +1,12 @@ /* - * Copyright (C) 2018-2023 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * */ -#include "shared/source/command_stream/command_stream_receiver.h" #include "shared/source/compiler_interface/oclc_extensions.h" -#include "shared/source/device/device.h" #include "shared/source/helpers/string.h" -#include "shared/test/common/fixtures/memory_management_fixture.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" #include "shared/test/common/helpers/gtest_helpers.h" #include "shared/test/common/mocks/mock_device.h" @@ -21,7 +18,6 @@ #include "opencl/test/unit_test/mocks/mock_cl_device.h" #include "opencl/test/unit_test/mocks/mock_context.h" #include "opencl/test/unit_test/mocks/mock_platform.h" -#include "opencl/test/unit_test/mocks/mock_sharing_factory.h" #include "gtest/gtest.h" diff --git a/opencl/test/unit_test/sharings/unified/unified_sharing_image_tests.cpp b/opencl/test/unit_test/sharings/unified/unified_sharing_image_tests.cpp index da15d8b21f..89f3a9e3a0 100644 --- a/opencl/test/unit_test/sharings/unified/unified_sharing_image_tests.cpp +++ b/opencl/test/unit_test/sharings/unified/unified_sharing_image_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2024 Intel Corporation + * Copyright (C) 2019-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -13,7 +13,10 @@ #include "opencl/source/mem_obj/image.h" #include "opencl/source/sharings/unified/unified_image.h" #include "opencl/test/unit_test/sharings/unified/unified_sharing_fixtures.h" -#include "opencl/test/unit_test/sharings/unified/unified_sharing_mocks.h" + +namespace NEO { +class MemoryManager; +} // namespace NEO using namespace NEO; diff --git a/opencl/test/unit_test/sharings/unified/unified_sharing_tests.cpp b/opencl/test/unit_test/sharings/unified/unified_sharing_tests.cpp index d43711302c..40f49c5c37 100644 --- a/opencl/test/unit_test/sharings/unified/unified_sharing_tests.cpp +++ b/opencl/test/unit_test/sharings/unified/unified_sharing_tests.cpp @@ -18,6 +18,10 @@ #include "opencl/test/unit_test/mocks/mock_context.h" #include "opencl/test/unit_test/sharings/unified/unified_sharing_fixtures.h" +namespace NEO { +class MemoryManager; +} // namespace NEO + using namespace NEO; TEST(UnifiedSharingTests, givenContextCreatedWithExternalDeviceHandlePropertyWhenGettingUnifiedSharingThenReturnIt) { diff --git a/opencl/test/unit_test/sharings/va/va_base_object_tests.cpp b/opencl/test/unit_test/sharings/va/va_base_object_tests.cpp index 76ce6ac2f1..8af5606b41 100644 --- a/opencl/test/unit_test/sharings/va/va_base_object_tests.cpp +++ b/opencl/test/unit_test/sharings/va/va_base_object_tests.cpp @@ -1,12 +1,11 @@ /* - * Copyright (C) 2018-2024 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * */ #include "opencl/source/accelerators/intel_accelerator.h" -#include "opencl/source/helpers/base_object.h" #include "opencl/source/sharings/sharing_factory.h" #include "opencl/test/unit_test/mocks/mock_command_queue.h" #include "opencl/test/unit_test/mocks/mock_platform.h" diff --git a/opencl/test/unit_test/sharings/va/va_sharing_enable_tests.cpp b/opencl/test/unit_test/sharings/va/va_sharing_enable_tests.cpp index a5a829ee4b..8d98ce1fe6 100644 --- a/opencl/test/unit_test/sharings/va/va_sharing_enable_tests.cpp +++ b/opencl/test/unit_test/sharings/va/va_sharing_enable_tests.cpp @@ -1,11 +1,10 @@ /* - * Copyright (C) 2018-2023 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * */ -#include "shared/source/helpers/string.h" #include "shared/source/os_interface/driver_info.h" #include "shared/test/common/fixtures/memory_management_fixture.h" #include "shared/test/common/helpers/variable_backup.h" diff --git a/opencl/test/unit_test/sharings/va/va_sharing_tests.cpp b/opencl/test/unit_test/sharings/va/va_sharing_tests.cpp index 40ed63bf45..8d8568e6ea 100644 --- a/opencl/test/unit_test/sharings/va/va_sharing_tests.cpp +++ b/opencl/test/unit_test/sharings/va/va_sharing_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2023 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -32,6 +32,10 @@ #include +namespace NEO { +class Context; +} // namespace NEO + using namespace NEO; class VaSharingTests : public ::testing::Test, public PlatformFixture { diff --git a/opencl/test/unit_test/utilities/file_logger_tests.cpp b/opencl/test/unit_test/utilities/file_logger_tests.cpp index e783cbda7e..3245bfd771 100644 --- a/opencl/test/unit_test/utilities/file_logger_tests.cpp +++ b/opencl/test/unit_test/utilities/file_logger_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2024 Intel Corporation + * Copyright (C) 2019-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -7,14 +7,12 @@ #include "opencl/test/unit_test/utilities/file_logger_tests.h" -#include "shared/test/common/helpers/debug_manager_state_restore.h" #include "shared/test/common/helpers/gtest_helpers.h" #include "shared/test/common/helpers/mock_file_io.h" #include "shared/test/common/utilities/base_object_utils.h" #include "shared/test/common/utilities/logger_tests.h" #include "opencl/test/unit_test/fixtures/buffer_fixture.h" -#include "opencl/test/unit_test/fixtures/image_fixture.h" #include "opencl/test/unit_test/mocks/mock_buffer.h" #include "opencl/test/unit_test/mocks/mock_cl_device.h" #include "opencl/test/unit_test/mocks/mock_context.h" diff --git a/opencl/test/unit_test/xe2_hpg_core/test_preamble_xe2_hpg_core.cpp b/opencl/test/unit_test/xe2_hpg_core/test_preamble_xe2_hpg_core.cpp index 75ff454b63..f5e59cc7e9 100644 --- a/opencl/test/unit_test/xe2_hpg_core/test_preamble_xe2_hpg_core.cpp +++ b/opencl/test/unit_test/xe2_hpg_core/test_preamble_xe2_hpg_core.cpp @@ -1,12 +1,11 @@ /* - * Copyright (C) 2024 Intel Corporation + * Copyright (C) 2024-2025 Intel Corporation * * SPDX-License-Identifier: MIT * */ #include "shared/source/command_stream/stream_properties.h" -#include "shared/source/helpers/gfx_core_helper.h" #include "shared/test/common/fixtures/preamble_fixture.h" using namespace NEO; diff --git a/opencl/test/unit_test/xe2_hpg_core/test_preemption_xe2_hpg_core.cpp b/opencl/test/unit_test/xe2_hpg_core/test_preemption_xe2_hpg_core.cpp index beee93cead..a43c0f5c19 100644 --- a/opencl/test/unit_test/xe2_hpg_core/test_preemption_xe2_hpg_core.cpp +++ b/opencl/test/unit_test/xe2_hpg_core/test_preemption_xe2_hpg_core.cpp @@ -1,12 +1,10 @@ /* - * Copyright (C) 2024 Intel Corporation + * Copyright (C) 2024-2025 Intel Corporation * * SPDX-License-Identifier: MIT * */ -#include "shared/test/common/test_macros/test.h" - #include "opencl/source/helpers/cl_preemption_helper.h" #include "opencl/test/unit_test/fixtures/cl_preemption_fixture.h" diff --git a/opencl/test/unit_test/xe_hpc_core/command_stream_receiver_hw_tests_xe_hpc_core.cpp b/opencl/test/unit_test/xe_hpc_core/command_stream_receiver_hw_tests_xe_hpc_core.cpp index 53e62698ec..3a0e593f49 100644 --- a/opencl/test/unit_test/xe_hpc_core/command_stream_receiver_hw_tests_xe_hpc_core.cpp +++ b/opencl/test/unit_test/xe_hpc_core/command_stream_receiver_hw_tests_xe_hpc_core.cpp @@ -11,7 +11,6 @@ #include "shared/test/common/mocks/mock_timestamp_container.h" #include "shared/test/common/test_macros/hw_test.h" -#include "opencl/source/command_queue/gpgpu_walker.h" #include "opencl/source/command_queue/hardware_interface.h" #include "opencl/source/event/event.h" #include "opencl/test/unit_test/command_queue/hardware_interface_helper.h" diff --git a/opencl/test/unit_test/xe_hpc_core/xe_hpc_core_test_ocl_fixtures.cpp b/opencl/test/unit_test/xe_hpc_core/xe_hpc_core_test_ocl_fixtures.cpp index eb97ac2b14..4ae5f9efcf 100644 --- a/opencl/test/unit_test/xe_hpc_core/xe_hpc_core_test_ocl_fixtures.cpp +++ b/opencl/test/unit_test/xe_hpc_core/xe_hpc_core_test_ocl_fixtures.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022-2024 Intel Corporation + * Copyright (C) 2022-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -11,7 +11,6 @@ #include "shared/source/execution_environment/root_device_environment.h" #include "shared/source/helpers/engine_control.h" #include "shared/source/indirect_heap/indirect_heap.h" -#include "shared/test/common/helpers/debug_manager_state_restore.h" #include "opencl/source/cl_device/cl_device.h" #include "opencl/test/unit_test/mocks/mock_platform.h" diff --git a/opencl/test/unit_test/xe_hpc_core/xe_hpc_core_test_ocl_fixtures.h b/opencl/test/unit_test/xe_hpc_core/xe_hpc_core_test_ocl_fixtures.h index d38f2c1dcc..48541e100e 100644 --- a/opencl/test/unit_test/xe_hpc_core/xe_hpc_core_test_ocl_fixtures.h +++ b/opencl/test/unit_test/xe_hpc_core/xe_hpc_core_test_ocl_fixtures.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022-2023 Intel Corporation + * Copyright (C) 2022-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -15,6 +15,7 @@ namespace NEO { class ClDevice; +struct HardwareInfo; struct ClGfxCoreHelperXeHpcCoreFixture : public ClDeviceFixture { void checkIfSingleTileCsrWhenAllocatingCsrSpecificAllocationsThenStoredInProperMemoryPool(HardwareInfo *hwInfo); diff --git a/opencl/test/unit_test/xe_hpg_core/test_cl_device_caps_xe_hpg_core.cpp b/opencl/test/unit_test/xe_hpg_core/test_cl_device_caps_xe_hpg_core.cpp index ecccdf6706..3ea4034121 100644 --- a/opencl/test/unit_test/xe_hpg_core/test_cl_device_caps_xe_hpg_core.cpp +++ b/opencl/test/unit_test/xe_hpg_core/test_cl_device_caps_xe_hpg_core.cpp @@ -1,13 +1,11 @@ /* - * Copyright (C) 2022-2024 Intel Corporation + * Copyright (C) 2022-2025 Intel Corporation * * SPDX-License-Identifier: MIT * */ #include "shared/source/helpers/compiler_product_helper.h" -#include "shared/source/xe_hpg_core/hw_cmds.h" -#include "shared/source/xe_hpg_core/hw_cmds_xe_hpg_core_base.h" #include "shared/test/common/helpers/gtest_helpers.h" #include "shared/test/common/test_macros/header/per_product_test_definitions.h" #include "shared/test/common/test_macros/hw_test.h"