From 0eac749fcc5613abb25a0b3d6265b16045829d86 Mon Sep 17 00:00:00 2001 From: "Warchulski, Jaroslaw" Date: Mon, 2 Jan 2023 16:19:30 +0000 Subject: [PATCH] Cleanup includes 19 Cleaned up files: opencl/source/api/cl_types.h shared/source/compiler_interface/external_functions.h shared/source/compiler_interface/linker.h shared/source/device_binary_format/elf/elf.h shared/source/helpers/preamble.h shared/source/memory_manager/definitions/storage_info.h shared/source/memory_manager/memory_manager.h shared/source/memory_manager/os_agnostic_memory_manager.h shared/source/program/program_info.h Related-To: NEO-5548 Signed-off-by: Warchulski, Jaroslaw --- level_zero/core/source/image/image_hw.inl | 3 ++- level_zero/core/source/module/module_imp.cpp | 1 + .../sources/debugger/test_module_with_debug.cpp | 3 ++- .../test/unit_tests/sources/kernel/test_kernel.cpp | 1 + .../test/unit_tests/sources/kernel/test_kernel_2.cpp | 3 ++- .../test/unit_tests/sources/module/test_module.cpp | 3 ++- level_zero/tools/source/debug/debug_session_imp.cpp | 1 + level_zero/tools/source/debug/debug_session_imp.h | 3 ++- .../tools/source/debug/linux/prelim/debug_session.h | 3 ++- level_zero/tools/source/sysman/sysman_imp.cpp | 3 ++- opencl/source/api/cl_types.h | 4 +--- opencl/source/mem_obj/buffer.cpp | 3 ++- opencl/source/program/build.cpp | 1 + opencl/source/program/compile.cpp | 1 + opencl/source/program/create.cpp | 1 + opencl/source/program/get_info.cpp | 1 + opencl/source/program/link.cpp | 1 + opencl/source/program/process_device_binary.cpp | 1 + opencl/source/program/process_intermediate_binary.cpp | 1 + opencl/source/program/program.h | 1 + .../unit_test/accelerators/media_image_arg_tests.cpp | 3 ++- opencl/test/unit_test/api/cl_api_tests.cpp | 3 ++- .../api/cl_get_device_info_pvc_and_later_tests.cpp | 3 ++- opencl/test/unit_test/device/device_caps_tests.cpp | 3 ++- opencl/test/unit_test/linux/main_linux_dll.cpp | 6 +++--- opencl/test/unit_test/mocks/mock_context.cpp | 3 ++- opencl/test/unit_test/mocks/mock_kernel.cpp | 4 +++- opencl/test/unit_test/mocks/mock_program.cpp | 3 ++- shared/offline_compiler/source/ocloc_validator.cpp | 3 ++- .../command_stream/aub_command_stream_receiver.cpp | 4 ++-- ...mmand_stream_receiver_simulated_common_hw_base.inl | 3 ++- shared/source/compiler_interface/external_functions.h | 4 +--- shared/source/compiler_interface/linker.cpp | 3 ++- shared/source/compiler_interface/linker.h | 6 ++++-- .../device_binary_format_zebin.cpp | 1 + shared/source/device_binary_format/elf/elf.h | 3 +-- shared/source/device_binary_format/zebin_decoder.cpp | 3 ++- .../create_direct_submission_hw.inl | 3 ++- .../source/dll/create_memory_manager_drm_or_wddm.cpp | 3 ++- shared/source/gmm_helper/gmm_helper.cpp | 3 ++- shared/source/helpers/blit_commands_helper_base.inl | 4 +++- shared/source/helpers/preamble.h | 6 ++---- shared/source/image/image_surface_state.h | 3 ++- .../memory_manager/definitions/storage_info.cpp | 7 ++++++- .../source/memory_manager/definitions/storage_info.h | 5 ++--- shared/source/memory_manager/memory_manager.cpp | 3 ++- shared/source/memory_manager/memory_manager.h | 11 ++++++----- .../memory_manager/os_agnostic_memory_manager.h | 3 +-- shared/source/memory_manager/surface.h | 3 ++- .../source/memory_manager/unified_memory_manager.cpp | 4 +++- .../source/os_interface/linux/drm_memory_manager.cpp | 4 +++- shared/source/program/kernel_info.cpp | 1 + shared/source/program/program_info.cpp | 9 ++++++++- shared/source/program/program_info.h | 10 ++-------- shared/test/common/libult/linux/drm_mock.cpp | 3 ++- shared/test/common/mocks/mock_memory_manager.h | 3 ++- .../unit_test/compiler_interface/linker_tests.cpp | 3 ++- .../device_binary_format_ocl_elf_tests.cpp | 1 + .../device_binary_format_patchtokens_tests.cpp | 1 + .../device_binary_formats_tests.cpp | 1 + .../device_binary_format/zebin_decoder_tests.cpp | 1 + .../linux/drm_query_topology_prelim_tests.cpp | 4 +++- .../program/program_info_from_patchtokens_tests.cpp | 3 ++- shared/test/unit_test/program/program_info_tests.cpp | 3 ++- .../program/program_initialization_tests.cpp | 3 ++- 65 files changed, 131 insertions(+), 74 deletions(-) diff --git a/level_zero/core/source/image/image_hw.inl b/level_zero/core/source/image/image_hw.inl index 2a00f7e392..6d44ec13ae 100644 --- a/level_zero/core/source/image/image_hw.inl +++ b/level_zero/core/source/image/image_hw.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2022 Intel Corporation + * Copyright (C) 2020-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -10,6 +10,7 @@ #include "shared/source/command_container/command_encoder.h" #include "shared/source/execution_environment/root_device_environment.h" #include "shared/source/gmm_helper/gmm.h" +#include "shared/source/helpers/basic_math.h" #include "shared/source/helpers/string.h" #include "shared/source/helpers/surface_format_info.h" #include "shared/source/image/image_surface_state.h" diff --git a/level_zero/core/source/module/module_imp.cpp b/level_zero/core/source/module/module_imp.cpp index 27fae96c04..4f5a79e3b8 100644 --- a/level_zero/core/source/module/module_imp.cpp +++ b/level_zero/core/source/module/module_imp.cpp @@ -10,6 +10,7 @@ #include "shared/source/compiler_interface/compiler_cache.h" #include "shared/source/compiler_interface/compiler_options.h" #include "shared/source/compiler_interface/compiler_warnings/compiler_warnings.h" +#include "shared/source/compiler_interface/external_functions.h" #include "shared/source/compiler_interface/intermediate_representations.h" #include "shared/source/compiler_interface/linker.h" #include "shared/source/debugger/debugger_l0.h" diff --git a/level_zero/core/test/unit_tests/sources/debugger/test_module_with_debug.cpp b/level_zero/core/test/unit_tests/sources/debugger/test_module_with_debug.cpp index 5f500c2162..0b9e93d481 100644 --- a/level_zero/core/test/unit_tests/sources/debugger/test_module_with_debug.cpp +++ b/level_zero/core/test/unit_tests/sources/debugger/test_module_with_debug.cpp @@ -1,10 +1,11 @@ /* - * Copyright (C) 2020-2022 Intel Corporation + * Copyright (C) 2020-2023 Intel Corporation * * SPDX-License-Identifier: MIT * */ +#include "shared/source/compiler_interface/external_functions.h" #include "shared/source/device_binary_format/patchtokens_decoder.h" #include "shared/source/kernel/kernel_descriptor_from_patchtokens.h" #include "shared/source/os_interface/os_interface.h" diff --git a/level_zero/core/test/unit_tests/sources/kernel/test_kernel.cpp b/level_zero/core/test/unit_tests/sources/kernel/test_kernel.cpp index 05bc1ec688..98e99bba50 100644 --- a/level_zero/core/test/unit_tests/sources/kernel/test_kernel.cpp +++ b/level_zero/core/test/unit_tests/sources/kernel/test_kernel.cpp @@ -5,6 +5,7 @@ * */ +#include "shared/source/compiler_interface/external_functions.h" #include "shared/source/debugger/debugger_l0.h" #include "shared/source/device_binary_format/patchtokens_decoder.h" #include "shared/source/helpers/bindless_heaps_helper.h" diff --git a/level_zero/core/test/unit_tests/sources/kernel/test_kernel_2.cpp b/level_zero/core/test/unit_tests/sources/kernel/test_kernel_2.cpp index fd6702c744..30a966cee7 100644 --- a/level_zero/core/test/unit_tests/sources/kernel/test_kernel_2.cpp +++ b/level_zero/core/test/unit_tests/sources/kernel/test_kernel_2.cpp @@ -1,10 +1,11 @@ /* - * Copyright (C) 2022 Intel Corporation + * Copyright (C) 2022-2023 Intel Corporation * * SPDX-License-Identifier: MIT * */ +#include "shared/source/helpers/basic_math.h" #include "shared/test/common/mocks/mock_graphics_allocation.h" #include "shared/test/common/mocks/mock_l0_debugger.h" #include "shared/test/common/test_macros/hw_test.h" diff --git a/level_zero/core/test/unit_tests/sources/module/test_module.cpp b/level_zero/core/test/unit_tests/sources/module/test_module.cpp index 641ebf9d2c..fdaf3c5aa5 100644 --- a/level_zero/core/test/unit_tests/sources/module/test_module.cpp +++ b/level_zero/core/test/unit_tests/sources/module/test_module.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2022 Intel Corporation + * Copyright (C) 2020-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -8,6 +8,7 @@ #include "shared/source/compiler_interface/compiler_interface.h" #include "shared/source/compiler_interface/compiler_options.h" #include "shared/source/compiler_interface/compiler_warnings/compiler_warnings.h" +#include "shared/source/compiler_interface/external_functions.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/debug_zebin.h" diff --git a/level_zero/tools/source/debug/debug_session_imp.cpp b/level_zero/tools/source/debug/debug_session_imp.cpp index 2597f6f756..b5ff1beeca 100644 --- a/level_zero/tools/source/debug/debug_session_imp.cpp +++ b/level_zero/tools/source/debug/debug_session_imp.cpp @@ -10,6 +10,7 @@ #include "shared/source/built_ins/sip.h" #include "shared/source/execution_environment/root_device_environment.h" #include "shared/source/gmm_helper/gmm_helper.h" +#include "shared/source/helpers/basic_math.h" #include "shared/source/helpers/hw_helper.h" #include "shared/source/helpers/sleep.h" #include "shared/source/helpers/string.h" diff --git a/level_zero/tools/source/debug/debug_session_imp.h b/level_zero/tools/source/debug/debug_session_imp.h index e3a5600ebc..258b17d9e3 100644 --- a/level_zero/tools/source/debug/debug_session_imp.h +++ b/level_zero/tools/source/debug/debug_session_imp.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2022 Intel Corporation + * Copyright (C) 2021-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -15,6 +15,7 @@ #include "common/StateSaveAreaHeader.h" #include +#include #include #include #include diff --git a/level_zero/tools/source/debug/linux/prelim/debug_session.h b/level_zero/tools/source/debug/linux/prelim/debug_session.h index 55bb912d5b..f78d54c594 100644 --- a/level_zero/tools/source/debug/linux/prelim/debug_session.h +++ b/level_zero/tools/source/debug/linux/prelim/debug_session.h @@ -1,11 +1,12 @@ /* - * Copyright (C) 2022 Intel Corporation + * Copyright (C) 2022-2023 Intel Corporation * * SPDX-License-Identifier: MIT * */ #pragma once +#include "shared/source/helpers/basic_math.h" #include "shared/source/helpers/topology_map.h" #include "shared/source/os_interface/linux/drm_debug.h" #include "shared/source/os_interface/linux/i915_prelim.h" diff --git a/level_zero/tools/source/sysman/sysman_imp.cpp b/level_zero/tools/source/sysman/sysman_imp.cpp index 3a709728ff..05ba76f8b6 100644 --- a/level_zero/tools/source/sysman/sysman_imp.cpp +++ b/level_zero/tools/source/sysman/sysman_imp.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2022 Intel Corporation + * Copyright (C) 2020-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -8,6 +8,7 @@ #include "level_zero/tools/source/sysman/sysman_imp.h" #include "shared/source/device/sub_device.h" +#include "shared/source/helpers/basic_math.h" #include "shared/source/helpers/hw_helper.h" #include "shared/source/helpers/sleep.h" diff --git a/opencl/source/api/cl_types.h b/opencl/source/api/cl_types.h index 51d1d50c3e..78c4bda65b 100644 --- a/opencl/source/api/cl_types.h +++ b/opencl/source/api/cl_types.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -8,8 +8,6 @@ #pragma once #include "opencl/source/api/dispatch.h" -#include - struct ClDispatch { SEntryPointsTable dispatch; ClDispatch() : dispatch(globalDispatchTable) { diff --git a/opencl/source/mem_obj/buffer.cpp b/opencl/source/mem_obj/buffer.cpp index cbaaf0e1b0..ee5e2f43e8 100644 --- a/opencl/source/mem_obj/buffer.cpp +++ b/opencl/source/mem_obj/buffer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -11,6 +11,7 @@ #include "shared/source/helpers/local_memory_access_modes.h" #include "shared/source/memory_manager/host_ptr_manager.h" #include "shared/source/memory_manager/memory_operations_handler.h" +#include "shared/source/os_interface/os_interface.h" #include "opencl/source/command_queue/command_queue.h" #include "opencl/source/context/context.h" diff --git a/opencl/source/program/build.cpp b/opencl/source/program/build.cpp index 5ee030ef7b..4f4c11ca1a 100644 --- a/opencl/source/program/build.cpp +++ b/opencl/source/program/build.cpp @@ -9,6 +9,7 @@ #include "shared/source/compiler_interface/compiler_interface.h" #include "shared/source/compiler_interface/compiler_options.h" #include "shared/source/compiler_interface/compiler_warnings/compiler_warnings.h" +#include "shared/source/compiler_interface/external_functions.h" #include "shared/source/device/device.h" #include "shared/source/device_binary_format/device_binary_formats.h" #include "shared/source/execution_environment/execution_environment.h" diff --git a/opencl/source/program/compile.cpp b/opencl/source/program/compile.cpp index 07f1e03398..0a6553d49d 100644 --- a/opencl/source/program/compile.cpp +++ b/opencl/source/program/compile.cpp @@ -9,6 +9,7 @@ #include "shared/source/compiler_interface/compiler_interface.h" #include "shared/source/compiler_interface/compiler_options.h" #include "shared/source/compiler_interface/compiler_warnings/compiler_warnings.h" +#include "shared/source/compiler_interface/external_functions.h" #include "shared/source/device/device.h" #include "shared/source/device_binary_format/elf/elf.h" #include "shared/source/device_binary_format/elf/elf_encoder.h" diff --git a/opencl/source/program/create.cpp b/opencl/source/program/create.cpp index 0acb197fff..0875eb059e 100644 --- a/opencl/source/program/create.cpp +++ b/opencl/source/program/create.cpp @@ -8,6 +8,7 @@ #include "opencl/source/program/create.inl" #include "shared/source/compiler_interface/compiler_cache.h" +#include "shared/source/compiler_interface/external_functions.h" #include "opencl/source/program/program.h" diff --git a/opencl/source/program/get_info.cpp b/opencl/source/program/get_info.cpp index d86c73bad3..d974fdf292 100644 --- a/opencl/source/program/get_info.cpp +++ b/opencl/source/program/get_info.cpp @@ -8,6 +8,7 @@ #include "shared/source/helpers/get_info.h" #include "shared/source/compiler_interface/compiler_cache.h" +#include "shared/source/compiler_interface/external_functions.h" #include "shared/source/device/device.h" #include "shared/source/device_binary_format/device_binary_formats.h" #include "shared/source/program/kernel_info.h" diff --git a/opencl/source/program/link.cpp b/opencl/source/program/link.cpp index 063f30ed14..265fe9babd 100644 --- a/opencl/source/program/link.cpp +++ b/opencl/source/program/link.cpp @@ -8,6 +8,7 @@ #include "shared/source/compiler_interface/compiler_cache.h" #include "shared/source/compiler_interface/compiler_interface.h" #include "shared/source/compiler_interface/compiler_options.h" +#include "shared/source/compiler_interface/external_functions.h" #include "shared/source/device/device.h" #include "shared/source/device_binary_format/device_binary_formats.h" #include "shared/source/device_binary_format/elf/elf.h" diff --git a/opencl/source/program/process_device_binary.cpp b/opencl/source/program/process_device_binary.cpp index 4a3aad3060..4b95edab7c 100644 --- a/opencl/source/program/process_device_binary.cpp +++ b/opencl/source/program/process_device_binary.cpp @@ -6,6 +6,7 @@ */ #include "shared/source/compiler_interface/compiler_cache.h" +#include "shared/source/compiler_interface/external_functions.h" #include "shared/source/device/device.h" #include "shared/source/device_binary_format/device_binary_formats.h" #include "shared/source/device_binary_format/zebin_decoder.h" diff --git a/opencl/source/program/process_intermediate_binary.cpp b/opencl/source/program/process_intermediate_binary.cpp index de9f33ea33..4ea7be22ba 100644 --- a/opencl/source/program/process_intermediate_binary.cpp +++ b/opencl/source/program/process_intermediate_binary.cpp @@ -6,6 +6,7 @@ */ #include "shared/source/compiler_interface/compiler_cache.h" +#include "shared/source/compiler_interface/external_functions.h" #include "shared/source/helpers/string.h" #include "program.h" diff --git a/opencl/source/program/program.h b/opencl/source/program/program.h index 48534bd93e..a760a6b0e5 100644 --- a/opencl/source/program/program.h +++ b/opencl/source/program/program.h @@ -8,6 +8,7 @@ #pragma once #include "shared/source/compiler_interface/compiler_cache.h" #include "shared/source/compiler_interface/compiler_interface.h" +#include "shared/source/compiler_interface/external_functions.h" #include "shared/source/device_binary_format/debug_zebin.h" #include "shared/source/helpers/non_copyable_or_moveable.h" #include "shared/source/program/program_info.h" diff --git a/opencl/test/unit_test/accelerators/media_image_arg_tests.cpp b/opencl/test/unit_test/accelerators/media_image_arg_tests.cpp index 91e83ca15f..6aa4c23de2 100644 --- a/opencl/test/unit_test/accelerators/media_image_arg_tests.cpp +++ b/opencl/test/unit_test/accelerators/media_image_arg_tests.cpp @@ -1,10 +1,11 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * */ +#include "shared/source/compiler_interface/external_functions.h" #include "shared/source/helpers/aligned_memory.h" #include "shared/source/helpers/ptr_math.h" #include "shared/source/memory_manager/surface.h" diff --git a/opencl/test/unit_test/api/cl_api_tests.cpp b/opencl/test/unit_test/api/cl_api_tests.cpp index 4f199eab7a..fd070c9dfd 100644 --- a/opencl/test/unit_test/api/cl_api_tests.cpp +++ b/opencl/test/unit_test/api/cl_api_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -7,6 +7,7 @@ #include "cl_api_tests.h" +#include "shared/source/compiler_interface/external_functions.h" #include "shared/test/common/mocks/mock_device.h" #include "opencl/test/unit_test/mocks/mock_cl_device.h" diff --git a/opencl/test/unit_test/api/cl_get_device_info_pvc_and_later_tests.cpp b/opencl/test/unit_test/api/cl_get_device_info_pvc_and_later_tests.cpp index fae94881a0..bf4347250a 100644 --- a/opencl/test/unit_test/api/cl_get_device_info_pvc_and_later_tests.cpp +++ b/opencl/test/unit_test/api/cl_get_device_info_pvc_and_later_tests.cpp @@ -1,10 +1,11 @@ /* - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2023 Intel Corporation * * SPDX-License-Identifier: MIT * */ +#include "shared/source/compiler_interface/external_functions.h" #include "shared/test/common/test_macros/test.h" #include "opencl/test/unit_test/api/cl_api_tests.h" diff --git a/opencl/test/unit_test/device/device_caps_tests.cpp b/opencl/test/unit_test/device/device_caps_tests.cpp index 3e8607f8ae..bbaa6f02c8 100644 --- a/opencl/test/unit_test/device/device_caps_tests.cpp +++ b/opencl/test/unit_test/device/device_caps_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -7,6 +7,7 @@ #include "shared/source/command_stream/command_stream_receiver.h" #include "shared/source/compiler_interface/oclc_extensions.h" +#include "shared/source/helpers/basic_math.h" #include "shared/source/helpers/bit_helpers.h" #include "shared/source/helpers/hw_helper.h" #include "shared/source/memory_manager/os_agnostic_memory_manager.h" diff --git a/opencl/test/unit_test/linux/main_linux_dll.cpp b/opencl/test/unit_test/linux/main_linux_dll.cpp index 365247808e..04104cc5b2 100644 --- a/opencl/test/unit_test/linux/main_linux_dll.cpp +++ b/opencl/test/unit_test/linux/main_linux_dll.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -667,7 +667,7 @@ TEST(DrmMemoryManagerCreate, whenCallCreateMemoryManagerThenDrmMemoryManagerIsCr executionEnvironment.rootDeviceEnvironments[0]->osInterface = std::make_unique(); executionEnvironment.rootDeviceEnvironments[0]->osInterface->setDriverModel(std::unique_ptr(drm)); - auto drmMemoryManager = MemoryManager::createMemoryManager(executionEnvironment); + auto drmMemoryManager = MemoryManager::createMemoryManager(executionEnvironment, DriverModelType::UNKNOWN); EXPECT_NE(nullptr, drmMemoryManager.get()); executionEnvironment.memoryManager = std::move(drmMemoryManager); } @@ -688,7 +688,7 @@ TEST(DrmMemoryManagerCreate, givenEnableHostPtrValidationSetToZeroWhenCreateDrmM executionEnvironment.rootDeviceEnvironments[0]->osInterface = std::make_unique(); executionEnvironment.rootDeviceEnvironments[0]->osInterface->setDriverModel(std::unique_ptr(drm)); - auto drmMemoryManager = MemoryManager::createMemoryManager(executionEnvironment); + auto drmMemoryManager = MemoryManager::createMemoryManager(executionEnvironment, DriverModelType::UNKNOWN); EXPECT_NE(nullptr, drmMemoryManager.get()); EXPECT_FALSE(static_cast(drmMemoryManager.get())->isValidateHostMemoryEnabled()); executionEnvironment.memoryManager = std::move(drmMemoryManager); diff --git a/opencl/test/unit_test/mocks/mock_context.cpp b/opencl/test/unit_test/mocks/mock_context.cpp index 91c1780194..d13a2d5870 100644 --- a/opencl/test/unit_test/mocks/mock_context.cpp +++ b/opencl/test/unit_test/mocks/mock_context.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -9,6 +9,7 @@ #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/memory_manager/deferred_deleter.h" #include "shared/source/memory_manager/os_agnostic_memory_manager.h" #include "shared/source/memory_manager/unified_memory_manager.h" diff --git a/opencl/test/unit_test/mocks/mock_kernel.cpp b/opencl/test/unit_test/mocks/mock_kernel.cpp index 253bc047a0..29ae7a50dd 100644 --- a/opencl/test/unit_test/mocks/mock_kernel.cpp +++ b/opencl/test/unit_test/mocks/mock_kernel.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -7,6 +7,8 @@ #include "opencl/test/unit_test/mocks/mock_kernel.h" +#include "shared/source/compiler_interface/external_functions.h" + #include "opencl/source/program/printf_handler.h" namespace NEO { diff --git a/opencl/test/unit_test/mocks/mock_program.cpp b/opencl/test/unit_test/mocks/mock_program.cpp index 1bded46803..819e6d3c2e 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-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -8,6 +8,7 @@ #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/program/program_info_from_patchtokens.h" diff --git a/shared/offline_compiler/source/ocloc_validator.cpp b/shared/offline_compiler/source/ocloc_validator.cpp index 1d6757b579..770639f5f5 100644 --- a/shared/offline_compiler/source/ocloc_validator.cpp +++ b/shared/offline_compiler/source/ocloc_validator.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2022 Intel Corporation + * Copyright (C) 2020-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -8,6 +8,7 @@ #include "shared/offline_compiler/source/ocloc_validator.h" #include "shared/offline_compiler/source/ocloc_arg_helper.h" +#include "shared/source/compiler_interface/external_functions.h" #include "shared/source/device_binary_format/zebin_decoder.h" #include "shared/source/program/kernel_info.h" #include "shared/source/program/program_info.h" diff --git a/shared/source/command_stream/aub_command_stream_receiver.cpp b/shared/source/command_stream/aub_command_stream_receiver.cpp index 1483d90610..0d638c7e37 100644 --- a/shared/source/command_stream/aub_command_stream_receiver.cpp +++ b/shared/source/command_stream/aub_command_stream_receiver.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -10,11 +10,11 @@ #include "shared/source/debug_settings/debug_settings_manager.h" #include "shared/source/execution_environment/execution_environment.h" #include "shared/source/execution_environment/root_device_environment.h" +#include "shared/source/helpers/basic_math.h" #include "shared/source/helpers/debug_helpers.h" #include "shared/source/helpers/hw_helper.h" #include "shared/source/helpers/hw_info.h" #include "shared/source/helpers/options.h" -#include "shared/source/memory_manager/os_agnostic_memory_manager.h" #include "shared/source/os_interface/os_inc_base.h" #include "shared/source/os_interface/sys_calls_common.h" diff --git a/shared/source/command_stream/command_stream_receiver_simulated_common_hw_base.inl b/shared/source/command_stream/command_stream_receiver_simulated_common_hw_base.inl index d150361c16..042928b2cf 100644 --- a/shared/source/command_stream/command_stream_receiver_simulated_common_hw_base.inl +++ b/shared/source/command_stream/command_stream_receiver_simulated_common_hw_base.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2022 Intel Corporation + * Copyright (C) 2019-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -15,6 +15,7 @@ #include "shared/source/gmm_helper/gmm_helper.h" #include "shared/source/gmm_helper/resource_info.h" #include "shared/source/helpers/aligned_memory.h" +#include "shared/source/helpers/basic_math.h" #include "shared/source/helpers/hardware_context_controller.h" #include "shared/source/memory_manager/address_mapper.h" #include "shared/source/memory_manager/memory_manager.h" diff --git a/shared/source/compiler_interface/external_functions.h b/shared/source/compiler_interface/external_functions.h index 87edd10734..1dbe54296a 100644 --- a/shared/source/compiler_interface/external_functions.h +++ b/shared/source/compiler_interface/external_functions.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 Intel Corporation + * Copyright (C) 2022-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -7,8 +7,6 @@ #pragma once -#include "shared/source/utilities/arrayref.h" - #include #include #include diff --git a/shared/source/compiler_interface/linker.cpp b/shared/source/compiler_interface/linker.cpp index fe3c7dc74b..d63a2748b4 100644 --- a/shared/source/compiler_interface/linker.cpp +++ b/shared/source/compiler_interface/linker.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2022 Intel Corporation + * Copyright (C) 2019-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -8,6 +8,7 @@ #include "shared/source/compiler_interface/linker.h" #include "shared/source/command_stream/command_stream_receiver.h" +#include "shared/source/compiler_interface/external_functions.h" #include "shared/source/device/device.h" #include "shared/source/device_binary_format/elf/zebin_elf.h" #include "shared/source/helpers/blit_commands_helper.h" diff --git a/shared/source/compiler_interface/linker.h b/shared/source/compiler_interface/linker.h index 850c514b98..b5b9e604b5 100644 --- a/shared/source/compiler_interface/linker.h +++ b/shared/source/compiler_interface/linker.h @@ -1,12 +1,11 @@ /* - * Copyright (C) 2019-2022 Intel Corporation + * Copyright (C) 2019-2023 Intel Corporation * * SPDX-License-Identifier: MIT * */ #pragma once -#include "shared/source/compiler_interface/external_functions.h" #include "shared/source/device_binary_format/elf/elf_decoder.h" #include @@ -17,6 +16,9 @@ #include namespace NEO { +struct ExternalFunctionInfo; +struct ExternalFunctionUsageExtFunc; +struct ExternalFunctionUsageKernel; class Device; class GraphicsAllocation; diff --git a/shared/source/device_binary_format/device_binary_format_zebin.cpp b/shared/source/device_binary_format/device_binary_format_zebin.cpp index b61106afc6..514fc39530 100644 --- a/shared/source/device_binary_format/device_binary_format_zebin.cpp +++ b/shared/source/device_binary_format/device_binary_format_zebin.cpp @@ -6,6 +6,7 @@ */ #include "shared/source/compiler_interface/intermediate_representations.h" +#include "shared/source/compiler_interface/linker.h" #include "shared/source/device_binary_format/device_binary_formats.h" #include "shared/source/device_binary_format/elf/elf_decoder.h" #include "shared/source/device_binary_format/elf/elf_encoder.h" diff --git a/shared/source/device_binary_format/elf/elf.h b/shared/source/device_binary_format/elf/elf.h index 69033fa841..112e6d0c56 100644 --- a/shared/source/device_binary_format/elf/elf.h +++ b/shared/source/device_binary_format/elf/elf.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2022 Intel Corporation + * Copyright (C) 2020-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -9,7 +9,6 @@ #include "shared/source/utilities/const_stringref.h" -#include #include namespace NEO { diff --git a/shared/source/device_binary_format/zebin_decoder.cpp b/shared/source/device_binary_format/zebin_decoder.cpp index 34b9ca228a..802fbd1885 100644 --- a/shared/source/device_binary_format/zebin_decoder.cpp +++ b/shared/source/device_binary_format/zebin_decoder.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 Intel Corporation + * Copyright (C) 2022-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -7,6 +7,7 @@ #include "shared/source/device_binary_format/zebin_decoder.h" +#include "shared/source/compiler_interface/external_functions.h" #include "shared/source/compiler_interface/intermediate_representations.h" #include "shared/source/debug_settings/debug_settings_manager.h" #include "shared/source/device_binary_format/device_binary_formats.h" diff --git a/shared/source/direct_submission/create_direct_submission_drm_or_wddm/create_direct_submission_hw.inl b/shared/source/direct_submission/create_direct_submission_drm_or_wddm/create_direct_submission_hw.inl index 033c56e2f9..d7600e10b1 100644 --- a/shared/source/direct_submission/create_direct_submission_drm_or_wddm/create_direct_submission_hw.inl +++ b/shared/source/direct_submission/create_direct_submission_drm_or_wddm/create_direct_submission_hw.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2022 Intel Corporation + * Copyright (C) 2021-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -7,6 +7,7 @@ #include "shared/source/direct_submission/linux/drm_direct_submission.h" #include "shared/source/direct_submission/windows/wddm_direct_submission.h" +#include "shared/source/os_interface/os_interface.h" namespace NEO { template diff --git a/shared/source/dll/create_memory_manager_drm_or_wddm.cpp b/shared/source/dll/create_memory_manager_drm_or_wddm.cpp index f25424fd9e..41c1b57122 100644 --- a/shared/source/dll/create_memory_manager_drm_or_wddm.cpp +++ b/shared/source/dll/create_memory_manager_drm_or_wddm.cpp @@ -1,10 +1,11 @@ /* - * Copyright (C) 2019-2021 Intel Corporation + * Copyright (C) 2019-2023 Intel Corporation * * SPDX-License-Identifier: MIT * */ +#include "shared/source/helpers/driver_model_type.h" #include "shared/source/os_interface/linux/drm_memory_manager.h" #include "shared/source/os_interface/windows/wddm_memory_manager.h" diff --git a/shared/source/gmm_helper/gmm_helper.cpp b/shared/source/gmm_helper/gmm_helper.cpp index f035f06813..3a92378c68 100644 --- a/shared/source/gmm_helper/gmm_helper.cpp +++ b/shared/source/gmm_helper/gmm_helper.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2022 Intel Corporation + * Copyright (C) 2019-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -10,6 +10,7 @@ #include "shared/source/debug_settings/debug_settings_manager.h" #include "shared/source/execution_environment/root_device_environment.h" #include "shared/source/gmm_helper/client_context/gmm_client_context.h" +#include "shared/source/helpers/basic_math.h" #include "shared/source/helpers/debug_helpers.h" #include "shared/source/helpers/hw_helper.h" #include "shared/source/helpers/hw_info.h" diff --git a/shared/source/helpers/blit_commands_helper_base.inl b/shared/source/helpers/blit_commands_helper_base.inl index 0507ecce64..bef912ec91 100644 --- a/shared/source/helpers/blit_commands_helper_base.inl +++ b/shared/source/helpers/blit_commands_helper_base.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2022 Intel Corporation + * Copyright (C) 2019-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -14,6 +14,8 @@ #include "shared/source/helpers/register_offsets.h" #include "shared/source/helpers/timestamp_packet.h" +#include + namespace NEO { template diff --git a/shared/source/helpers/preamble.h b/shared/source/helpers/preamble.h index c60299499d..4e99a487a4 100644 --- a/shared/source/helpers/preamble.h +++ b/shared/source/helpers/preamble.h @@ -1,13 +1,11 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * */ #pragma once -#include "shared/source/helpers/definitions/engine_group_types.h" - #include "igfxfmid.h" #include @@ -15,7 +13,7 @@ #include namespace NEO { - +enum class EngineGroupType : uint32_t; struct HardwareInfo; class Device; struct DispatchFlags; diff --git a/shared/source/image/image_surface_state.h b/shared/source/image/image_surface_state.h index 1e2246c3ef..c2cdf9763b 100644 --- a/shared/source/image/image_surface_state.h +++ b/shared/source/image/image_surface_state.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2022 Intel Corporation + * Copyright (C) 2020-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -11,6 +11,7 @@ #include "shared/source/gmm_helper/gmm.h" #include "shared/source/gmm_helper/gmm_helper.h" #include "shared/source/gmm_helper/resource_info.h" +#include "shared/source/helpers/basic_math.h" #include "shared/source/helpers/surface_format_info.h" #include "shared/source/memory_manager/graphics_allocation.h" diff --git a/shared/source/memory_manager/definitions/storage_info.cpp b/shared/source/memory_manager/definitions/storage_info.cpp index bcf7bc8124..dec4106fc6 100644 --- a/shared/source/memory_manager/definitions/storage_info.cpp +++ b/shared/source/memory_manager/definitions/storage_info.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2022 Intel Corporation + * Copyright (C) 2020-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -9,6 +9,7 @@ #include "shared/source/execution_environment/execution_environment.h" #include "shared/source/execution_environment/root_device_environment.h" #include "shared/source/helpers/app_resource_helper.h" +#include "shared/source/helpers/basic_math.h" #include "shared/source/helpers/hw_helper.h" #include "shared/source/memory_manager/allocation_properties.h" #include "shared/source/memory_manager/local_memory_usage.h" @@ -206,4 +207,8 @@ uint32_t StorageInfo::getNumBanks() const { } return static_cast(memoryBanks.count()); } + +uint32_t StorageInfo::getTotalBanksCnt() const { + return Math::log2(getMemoryBanks()) + 1; +} } // namespace NEO diff --git a/shared/source/memory_manager/definitions/storage_info.h b/shared/source/memory_manager/definitions/storage_info.h index 71cc6784eb..42e4eae3c3 100644 --- a/shared/source/memory_manager/definitions/storage_info.h +++ b/shared/source/memory_manager/definitions/storage_info.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2022 Intel Corporation + * Copyright (C) 2020-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -7,7 +7,6 @@ #pragma once #include "shared/source/helpers/app_resource_defines.h" -#include "shared/source/helpers/basic_math.h" #include "shared/source/helpers/common_types.h" #include "shared/source/helpers/constants.h" @@ -34,6 +33,6 @@ struct StorageInfo { bool systemMemoryPlacement = true; char resourceTag[AppResourceDefines::maxStrLen + 1] = ""; uint32_t getMemoryBanks() const { return static_cast(memoryBanks.to_ulong()); } - uint32_t getTotalBanksCnt() const { return Math::log2(getMemoryBanks()) + 1; } + uint32_t getTotalBanksCnt() const; }; } // namespace NEO diff --git a/shared/source/memory_manager/memory_manager.cpp b/shared/source/memory_manager/memory_manager.cpp index ab56086c66..3bdc92541c 100644 --- a/shared/source/memory_manager/memory_manager.cpp +++ b/shared/source/memory_manager/memory_manager.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -35,6 +35,7 @@ #include "shared/source/os_interface/hw_info_config.h" #include "shared/source/os_interface/os_context.h" #include "shared/source/os_interface/os_interface.h" +#include "shared/source/page_fault_manager/cpu_page_fault_manager.h" #include diff --git a/shared/source/memory_manager/memory_manager.h b/shared/source/memory_manager/memory_manager.h index ca2b352163..8b3fd222a0 100644 --- a/shared/source/memory_manager/memory_manager.h +++ b/shared/source/memory_manager/memory_manager.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -12,10 +12,9 @@ #include "shared/source/memory_manager/alignment_selector.h" #include "shared/source/memory_manager/graphics_allocation.h" #include "shared/source/memory_manager/memadvise_flags.h" -#include "shared/source/memory_manager/multi_graphics_allocation.h" -#include "shared/source/os_interface/os_interface.h" #include "shared/source/os_interface/os_memory.h" -#include "shared/source/page_fault_manager/cpu_page_fault_manager.h" + +#include "memory_properties_flags.h" #include #include @@ -25,6 +24,8 @@ #include namespace NEO { +class MultiGraphicsAllocation; +class PageFaultManager; class GfxPartition; struct ImageInfo; struct AllocationData; @@ -202,7 +203,7 @@ class MemoryManager { virtual bool copyMemoryToAllocation(GraphicsAllocation *graphicsAllocation, size_t destinationOffset, const void *memoryToCopy, size_t sizeToCopy); virtual bool copyMemoryToAllocationBanks(GraphicsAllocation *graphicsAllocation, size_t destinationOffset, const void *memoryToCopy, size_t sizeToCopy, DeviceBitfield handleMask); HeapIndex selectHeap(const GraphicsAllocation *allocation, bool hasPointer, bool isFullRangeSVM, bool useFrontWindow); - static std::unique_ptr createMemoryManager(ExecutionEnvironment &executionEnvironment, DriverModelType driverModel = DriverModelType::UNKNOWN); + static std::unique_ptr createMemoryManager(ExecutionEnvironment &executionEnvironment, DriverModelType driverModel); virtual void *reserveCpuAddressRange(size_t size, uint32_t rootDeviceIndex) { return nullptr; }; virtual void releaseReservedCpuAddressRange(void *reserved, size_t size, uint32_t rootDeviceIndex){}; void *getReservedMemory(size_t size, size_t alignment); diff --git a/shared/source/memory_manager/os_agnostic_memory_manager.h b/shared/source/memory_manager/os_agnostic_memory_manager.h index 52a744a6cd..831c52b406 100644 --- a/shared/source/memory_manager/os_agnostic_memory_manager.h +++ b/shared/source/memory_manager/os_agnostic_memory_manager.h @@ -1,12 +1,11 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * */ #pragma once -#include "shared/source/helpers/basic_math.h" #include "shared/source/memory_manager/memory_manager.h" namespace NEO { diff --git a/shared/source/memory_manager/surface.h b/shared/source/memory_manager/surface.h index d3a8137785..95fe7c4fe1 100644 --- a/shared/source/memory_manager/surface.h +++ b/shared/source/memory_manager/surface.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2022 Intel Corporation + * Copyright (C) 2020-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -10,6 +10,7 @@ #include "shared/source/helpers/cache_policy.h" #include "shared/source/memory_manager/graphics_allocation.h" #include "shared/source/memory_manager/memory_manager.h" +#include "shared/source/page_fault_manager/cpu_page_fault_manager.h" namespace NEO { diff --git a/shared/source/memory_manager/unified_memory_manager.cpp b/shared/source/memory_manager/unified_memory_manager.cpp index 8610606e60..32c186105d 100644 --- a/shared/source/memory_manager/unified_memory_manager.cpp +++ b/shared/source/memory_manager/unified_memory_manager.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2022 Intel Corporation + * Copyright (C) 2019-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -13,9 +13,11 @@ #include "shared/source/execution_environment/root_device_environment.h" #include "shared/source/helpers/aligned_memory.h" #include "shared/source/helpers/api_specific_config.h" +#include "shared/source/helpers/basic_math.h" #include "shared/source/helpers/memory_properties_helpers.h" #include "shared/source/memory_manager/memory_manager.h" #include "shared/source/os_interface/hw_info_config.h" +#include "shared/source/page_fault_manager/cpu_page_fault_manager.h" namespace NEO { diff --git a/shared/source/os_interface/linux/drm_memory_manager.cpp b/shared/source/os_interface/linux/drm_memory_manager.cpp index feef39c9bc..d5a6e5e396 100644 --- a/shared/source/os_interface/linux/drm_memory_manager.cpp +++ b/shared/source/os_interface/linux/drm_memory_manager.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -16,6 +16,7 @@ #include "shared/source/gmm_helper/gmm_helper.h" #include "shared/source/gmm_helper/resource_info.h" #include "shared/source/helpers/aligned_memory.h" +#include "shared/source/helpers/basic_math.h" #include "shared/source/helpers/heap_assigner.h" #include "shared/source/helpers/hw_helper.h" #include "shared/source/helpers/hw_info.h" @@ -27,6 +28,7 @@ #include "shared/source/memory_manager/host_ptr_manager.h" #include "shared/source/memory_manager/memory_banks.h" #include "shared/source/memory_manager/memory_pool.h" +#include "shared/source/memory_manager/multi_graphics_allocation.h" #include "shared/source/memory_manager/residency.h" #include "shared/source/os_interface/linux/allocator_helper.h" #include "shared/source/os_interface/linux/drm_allocation.h" diff --git a/shared/source/program/kernel_info.cpp b/shared/source/program/kernel_info.cpp index 0c71c316a3..fcd262fca9 100644 --- a/shared/source/program/kernel_info.cpp +++ b/shared/source/program/kernel_info.cpp @@ -20,6 +20,7 @@ #include "shared/source/memory_manager/allocation_properties.h" #include "shared/source/memory_manager/memory_manager.h" +#include #include #include #include diff --git a/shared/source/program/program_info.cpp b/shared/source/program/program_info.cpp index 4ccb0cb99a..76ceb8908e 100644 --- a/shared/source/program/program_info.cpp +++ b/shared/source/program/program_info.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2022 Intel Corporation + * Copyright (C) 2020-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -7,6 +7,7 @@ #include "shared/source/program/program_info.h" +#include "shared/source/compiler_interface/external_functions.h" #include "shared/source/device/device.h" #include "shared/source/program/kernel_info.h" @@ -19,6 +20,12 @@ ProgramInfo::~ProgramInfo() { kernelInfos.clear(); } +void ProgramInfo::prepareLinkerInputStorage() { + if (this->linkerInput == nullptr) { + this->linkerInput = std::make_unique(); + } +} + size_t getMaxInlineSlmNeeded(const ProgramInfo &programInfo) { uint32_t ret = 0U; for (const auto &kernelInfo : programInfo.kernelInfos) { diff --git a/shared/source/program/program_info.h b/shared/source/program/program_info.h index 6f00f7afe6..6aca709dd2 100644 --- a/shared/source/program/program_info.h +++ b/shared/source/program/program_info.h @@ -1,13 +1,11 @@ /* - * Copyright (C) 2020-2022 Intel Corporation + * Copyright (C) 2020-2023 Intel Corporation * * SPDX-License-Identifier: MIT * */ #pragma once - -#include "shared/source/compiler_interface/external_functions.h" #include "shared/source/compiler_interface/linker.h" #include @@ -31,11 +29,7 @@ struct ProgramInfo { size_t size = 0U; }; - void prepareLinkerInputStorage() { - if (this->linkerInput == nullptr) { - this->linkerInput = std::make_unique(); - } - } + void prepareLinkerInputStorage(); GlobalSurfaceInfo globalConstants; GlobalSurfaceInfo globalVariables; diff --git a/shared/test/common/libult/linux/drm_mock.cpp b/shared/test/common/libult/linux/drm_mock.cpp index ef768fb7e5..b8d75e31d1 100644 --- a/shared/test/common/libult/linux/drm_mock.cpp +++ b/shared/test/common/libult/linux/drm_mock.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2022 Intel Corporation + * Copyright (C) 2019-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -14,6 +14,7 @@ #include "gtest/gtest.h" +#include #include const int DrmMock::mockFd; diff --git a/shared/test/common/mocks/mock_memory_manager.h b/shared/test/common/mocks/mock_memory_manager.h index 20015127cf..1eb70a4c3b 100644 --- a/shared/test/common/mocks/mock_memory_manager.h +++ b/shared/test/common/mocks/mock_memory_manager.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -11,6 +11,7 @@ #include "shared/source/helpers/aligned_memory.h" #include "shared/source/memory_manager/allocation_properties.h" #include "shared/source/memory_manager/gfx_partition.h" +#include "shared/source/memory_manager/multi_graphics_allocation.h" #include "shared/source/memory_manager/os_agnostic_memory_manager.h" #include "shared/test/common/helpers/default_hw_info.h" #include "shared/test/common/mocks/mock_execution_environment.h" diff --git a/shared/test/unit_test/compiler_interface/linker_tests.cpp b/shared/test/unit_test/compiler_interface/linker_tests.cpp index f88543a243..cb402eca31 100644 --- a/shared/test/unit_test/compiler_interface/linker_tests.cpp +++ b/shared/test/unit_test/compiler_interface/linker_tests.cpp @@ -1,10 +1,11 @@ /* - * Copyright (C) 2019-2022 Intel Corporation + * Copyright (C) 2019-2023 Intel Corporation * * SPDX-License-Identifier: MIT * */ +#include "shared/source/compiler_interface/external_functions.h" #include "shared/source/device_binary_format/elf/zebin_elf.h" #include "shared/source/helpers/ptr_math.h" #include "shared/source/helpers/string.h" diff --git a/shared/test/unit_test/device_binary_format/device_binary_format_ocl_elf_tests.cpp b/shared/test/unit_test/device_binary_format/device_binary_format_ocl_elf_tests.cpp index 8de63662b7..ca898dacfa 100644 --- a/shared/test/unit_test/device_binary_format/device_binary_format_ocl_elf_tests.cpp +++ b/shared/test/unit_test/device_binary_format/device_binary_format_ocl_elf_tests.cpp @@ -5,6 +5,7 @@ * */ +#include "shared/source/compiler_interface/external_functions.h" #include "shared/source/compiler_interface/intermediate_representations.h" #include "shared/source/device_binary_format/device_binary_formats.h" #include "shared/source/device_binary_format/elf/elf_decoder.h" diff --git a/shared/test/unit_test/device_binary_format/device_binary_format_patchtokens_tests.cpp b/shared/test/unit_test/device_binary_format/device_binary_format_patchtokens_tests.cpp index 4102652707..f5aa9d140f 100644 --- a/shared/test/unit_test/device_binary_format/device_binary_format_patchtokens_tests.cpp +++ b/shared/test/unit_test/device_binary_format/device_binary_format_patchtokens_tests.cpp @@ -5,6 +5,7 @@ * */ +#include "shared/source/compiler_interface/external_functions.h" #include "shared/source/device_binary_format/device_binary_formats.h" #include "shared/source/program/program_info.h" #include "shared/test/common/device_binary_format/patchtokens_tests.h" diff --git a/shared/test/unit_test/device_binary_format/device_binary_formats_tests.cpp b/shared/test/unit_test/device_binary_format/device_binary_formats_tests.cpp index 3c7f75e1ac..7c0591c867 100644 --- a/shared/test/unit_test/device_binary_format/device_binary_formats_tests.cpp +++ b/shared/test/unit_test/device_binary_format/device_binary_formats_tests.cpp @@ -5,6 +5,7 @@ * */ +#include "shared/source/compiler_interface/external_functions.h" #include "shared/source/device_binary_format/ar/ar_encoder.h" #include "shared/source/device_binary_format/device_binary_formats.h" #include "shared/source/device_binary_format/elf/elf_encoder.h" diff --git a/shared/test/unit_test/device_binary_format/zebin_decoder_tests.cpp b/shared/test/unit_test/device_binary_format/zebin_decoder_tests.cpp index fa76e585f0..a921279b64 100644 --- a/shared/test/unit_test/device_binary_format/zebin_decoder_tests.cpp +++ b/shared/test/unit_test/device_binary_format/zebin_decoder_tests.cpp @@ -5,6 +5,7 @@ * */ +#include "shared/source/compiler_interface/external_functions.h" #include "shared/source/device_binary_format/device_binary_formats.h" #include "shared/source/device_binary_format/elf/zebin_elf.h" #include "shared/source/device_binary_format/elf/zeinfo_enum_lookup.h" diff --git a/shared/test/unit_test/os_interface/linux/drm_query_topology_prelim_tests.cpp b/shared/test/unit_test/os_interface/linux/drm_query_topology_prelim_tests.cpp index d536166130..b68c4fabc8 100644 --- a/shared/test/unit_test/os_interface/linux/drm_query_topology_prelim_tests.cpp +++ b/shared/test/unit_test/os_interface/linux/drm_query_topology_prelim_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 Intel Corporation + * Copyright (C) 2022-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -18,6 +18,8 @@ #include "gtest/gtest.h" +#include + TEST(DrmQueryTopologyTest, givenDrmWhenQueryTopologyCalledThenPassNoFlags) { auto executionEnvironment = std::make_unique(); DrmQueryMock drm{*executionEnvironment->rootDeviceEnvironments[0]}; diff --git a/shared/test/unit_test/program/program_info_from_patchtokens_tests.cpp b/shared/test/unit_test/program/program_info_from_patchtokens_tests.cpp index eba7ce36c4..9135d68d0e 100644 --- a/shared/test/unit_test/program/program_info_from_patchtokens_tests.cpp +++ b/shared/test/unit_test/program/program_info_from_patchtokens_tests.cpp @@ -1,10 +1,11 @@ /* - * Copyright (C) 2020-2022 Intel Corporation + * Copyright (C) 2020-2023 Intel Corporation * * SPDX-License-Identifier: MIT * */ +#include "shared/source/compiler_interface/external_functions.h" #include "shared/source/compiler_interface/linker.h" #include "shared/source/device_binary_format/patchtokens_decoder.h" #include "shared/source/program/kernel_info.h" diff --git a/shared/test/unit_test/program/program_info_tests.cpp b/shared/test/unit_test/program/program_info_tests.cpp index 4f7e363ab7..065523949c 100644 --- a/shared/test/unit_test/program/program_info_tests.cpp +++ b/shared/test/unit_test/program/program_info_tests.cpp @@ -1,10 +1,11 @@ /* - * Copyright (C) 2020-2022 Intel Corporation + * Copyright (C) 2020-2023 Intel Corporation * * SPDX-License-Identifier: MIT * */ +#include "shared/source/compiler_interface/external_functions.h" #include "shared/source/program/kernel_info.h" #include "shared/source/program/program_info.h" #include "shared/test/common/mocks/mock_device.h" diff --git a/shared/test/unit_test/program/program_initialization_tests.cpp b/shared/test/unit_test/program/program_initialization_tests.cpp index cd605616be..5909a5f648 100644 --- a/shared/test/unit_test/program/program_initialization_tests.cpp +++ b/shared/test/unit_test/program/program_initialization_tests.cpp @@ -1,10 +1,11 @@ /* - * Copyright (C) 2020-2022 Intel Corporation + * Copyright (C) 2020-2023 Intel Corporation * * SPDX-License-Identifier: MIT * */ +#include "shared/source/compiler_interface/external_functions.h" #include "shared/source/helpers/local_memory_access_modes.h" #include "shared/source/program/program_initialization.h" #include "shared/test/common/compiler_interface/linker_mock.h"