From b224ec947e2a493294de59c15cff874336312945 Mon Sep 17 00:00:00 2001 From: "Warchulski, Jaroslaw" Date: Tue, 7 Feb 2023 12:53:53 +0000 Subject: [PATCH] Cleanup includes 50 Cleaned up files: shared/source/helpers/hw_info.h Related-To: NEO-5548 Signed-off-by: Warchulski, Jaroslaw --- level_zero/core/source/cmdlist/cmdlist_hw.h | 2 +- .../source/cmdlist/cmdlist_hw_immediate.h | 2 ++ .../core/source/cmdlist/cmdlist_imp.cpp | 1 + level_zero/core/source/cmdqueue/cmdqueue_hw.h | 2 +- .../core/source/cmdqueue/cmdqueue_imp.h | 1 + .../core/source/driver/driver_handle_imp.cpp | 1 + .../l0_gfx_core_helper_pvc_and_later.inl | 1 + .../l0_gfx_core_helper_tgllp_to_dg2.inl | 1 + level_zero/core/source/module/module_imp.cpp | 1 + .../test/unit_tests/fixtures/device_fixture.h | 3 ++- .../tools/source/debug/debug_session_imp.cpp | 1 + .../debug/linux/prelim/debug_session.cpp | 1 + .../linux/os_metric_ip_sampling_imp_linux.cpp | 1 + .../sources/debug/mock_debug_session.h | 3 ++- opencl/source/event/event.cpp | 1 + .../gtpin_gfx_core_helper_bdw_and_later.inl | 1 + .../helpers/hardware_commands_helper_base.inl | 1 + opencl/source/program/program.cpp | 1 + shared/source/gen11/hw_cmds_ehl.h | 3 ++- shared/source/gen11/hw_cmds_icllp.h | 3 ++- shared/source/gen11/hw_cmds_lkf.h | 3 ++- shared/source/gen11/hw_info_gen11.h | 4 +-- shared/source/gen11/preamble_gen11.cpp | 1 + shared/source/gen12lp/hw_cmds_adln.h | 3 ++- shared/source/gen12lp/hw_cmds_adlp.h | 3 ++- shared/source/gen12lp/hw_cmds_adls.h | 3 ++- shared/source/gen12lp/hw_cmds_base.h | 3 ++- shared/source/gen12lp/hw_cmds_dg1.h | 4 ++- shared/source/gen12lp/hw_cmds_rkl.h | 4 ++- shared/source/gen12lp/hw_cmds_tgllp.h | 4 ++- shared/source/gen12lp/hw_info_gen12lp.h | 4 +-- shared/source/gen12lp/preamble_gen12lp.cpp | 1 + shared/source/gen8/hw_cmds_bdw.h | 3 ++- shared/source/gen8/hw_info_gen8.h | 4 +-- shared/source/gen8/preamble_gen8.cpp | 1 + shared/source/gen8/preemption_gen8.cpp | 3 ++- shared/source/gen9/hw_cmds_bxt.h | 3 ++- shared/source/gen9/hw_cmds_cfl.h | 3 ++- shared/source/gen9/hw_cmds_glk.h | 3 ++- shared/source/gen9/hw_cmds_kbl.h | 3 ++- shared/source/gen9/hw_cmds_skl.h | 3 ++- shared/source/gen9/hw_info_gen9.h | 4 +-- shared/source/gen9/preamble_gen9.cpp | 1 + shared/source/gen9/preemption_gen9.cpp | 3 ++- shared/source/helpers/CMakeLists.txt | 1 + shared/source/helpers/cache_flush.inl | 1 + .../helpers/cache_policy_dg2_and_later.inl | 4 +-- .../source/helpers/compiler_product_helper.h | 2 +- shared/source/helpers/enable_product.inl | 3 ++- shared/source/helpers/hw_info.h | 13 --------- shared/source/helpers/hw_mapper.h | 27 +++++++++++++++++++ shared/source/os_interface/device_factory.cpp | 1 + .../source/os_interface/product_helper_hw.h | 2 +- shared/source/xe_hpc_core/hw_cmds_pvc.h | 3 ++- .../source/xe_hpc_core/hw_info_xe_hpc_core.h | 4 +-- shared/source/xe_hpg_core/hw_cmds_dg2.h | 1 + shared/source/xe_hpg_core/hw_cmds_mtl.h | 4 ++- .../source/xe_hpg_core/hw_info_xe_hpg_core.h | 4 +-- .../device_binary_format/elf/elf_tests_data.h | 1 + .../device_binary_format/patchtokens_tests.h | 1 + .../common/helpers/mock_hw_info_config_hw.h | 1 + .../os_interface/linux/drm_mock_impl.h | 3 +++ 62 files changed, 124 insertions(+), 54 deletions(-) create mode 100644 shared/source/helpers/hw_mapper.h diff --git a/level_zero/core/source/cmdlist/cmdlist_hw.h b/level_zero/core/source/cmdlist/cmdlist_hw.h index 6b9d9818df..824b34e79a 100644 --- a/level_zero/core/source/cmdlist/cmdlist_hw.h +++ b/level_zero/core/source/cmdlist/cmdlist_hw.h @@ -7,7 +7,7 @@ #pragma once -#include "shared/source/helpers/hw_info.h" +#include "shared/source/helpers/hw_mapper.h" #include "shared/source/helpers/pipe_control_args.h" #include "shared/source/helpers/vec.h" #include "shared/source/kernel/kernel_arg_descriptor.h" diff --git a/level_zero/core/source/cmdlist/cmdlist_hw_immediate.h b/level_zero/core/source/cmdlist/cmdlist_hw_immediate.h index e7f235ced7..0ce08edd1d 100644 --- a/level_zero/core/source/cmdlist/cmdlist_hw_immediate.h +++ b/level_zero/core/source/cmdlist/cmdlist_hw_immediate.h @@ -11,6 +11,8 @@ #include "level_zero/core/source/cmdlist/cmdlist_hw.h" +#include + namespace NEO { struct SvmAllocationData; struct CompletionStamp; diff --git a/level_zero/core/source/cmdlist/cmdlist_imp.cpp b/level_zero/core/source/cmdlist/cmdlist_imp.cpp index aee04cd318..6f0af74236 100644 --- a/level_zero/core/source/cmdlist/cmdlist_imp.cpp +++ b/level_zero/core/source/cmdlist/cmdlist_imp.cpp @@ -9,6 +9,7 @@ #include "shared/source/command_stream/command_stream_receiver.h" #include "shared/source/command_stream/linear_stream.h" +#include "shared/source/command_stream/wait_status.h" #include "shared/source/device/device.h" #include "shared/source/helpers/engine_node_helper.h" #include "shared/source/helpers/gfx_core_helper.h" diff --git a/level_zero/core/source/cmdqueue/cmdqueue_hw.h b/level_zero/core/source/cmdqueue/cmdqueue_hw.h index 40e5623635..ea4e0fc1d4 100644 --- a/level_zero/core/source/cmdqueue/cmdqueue_hw.h +++ b/level_zero/core/source/cmdqueue/cmdqueue_hw.h @@ -8,7 +8,7 @@ #pragma once #include "shared/source/command_stream/stream_properties.h" -#include "shared/source/helpers/hw_info.h" +#include "shared/source/helpers/hw_mapper.h" #include "shared/source/unified_memory/unified_memory.h" #include "level_zero/core/source/cmdqueue/cmdqueue_imp.h" diff --git a/level_zero/core/source/cmdqueue/cmdqueue_imp.h b/level_zero/core/source/cmdqueue/cmdqueue_imp.h index ccbfa0a339..131338a359 100644 --- a/level_zero/core/source/cmdqueue/cmdqueue_imp.h +++ b/level_zero/core/source/cmdqueue/cmdqueue_imp.h @@ -16,6 +16,7 @@ #include "level_zero/core/source/cmdqueue/cmdqueue.h" +#include #include struct UnifiedMemoryControls; diff --git a/level_zero/core/source/driver/driver_handle_imp.cpp b/level_zero/core/source/driver/driver_handle_imp.cpp index bd1030d59c..b89b7809b2 100644 --- a/level_zero/core/source/driver/driver_handle_imp.cpp +++ b/level_zero/core/source/driver/driver_handle_imp.cpp @@ -12,6 +12,7 @@ #include "shared/source/device/device.h" #include "shared/source/execution_environment/execution_environment.h" #include "shared/source/execution_environment/root_device_environment.h" +#include "shared/source/helpers/hw_info.h" #include "shared/source/helpers/string.h" #include "shared/source/memory_manager/allocation_properties.h" #include "shared/source/memory_manager/memory_manager.h" diff --git a/level_zero/core/source/gfx_core_helpers/l0_gfx_core_helper_pvc_and_later.inl b/level_zero/core/source/gfx_core_helpers/l0_gfx_core_helper_pvc_and_later.inl index f3179dd1ec..55a3365a15 100644 --- a/level_zero/core/source/gfx_core_helpers/l0_gfx_core_helper_pvc_and_later.inl +++ b/level_zero/core/source/gfx_core_helpers/l0_gfx_core_helper_pvc_and_later.inl @@ -10,6 +10,7 @@ #include "shared/source/helpers/aligned_memory.h" #include "shared/source/helpers/definitions/engine_group_types.h" #include "shared/source/helpers/engine_node_helper.h" +#include "shared/source/helpers/hw_info.h" #include "shared/source/helpers/ptr_math.h" #include "level_zero/core/source/gfx_core_helpers/l0_gfx_core_helper.h" diff --git a/level_zero/core/source/gfx_core_helpers/l0_gfx_core_helper_tgllp_to_dg2.inl b/level_zero/core/source/gfx_core_helpers/l0_gfx_core_helper_tgllp_to_dg2.inl index 8a1d340356..d237a937b0 100644 --- a/level_zero/core/source/gfx_core_helpers/l0_gfx_core_helper_tgllp_to_dg2.inl +++ b/level_zero/core/source/gfx_core_helpers/l0_gfx_core_helper_tgllp_to_dg2.inl @@ -6,6 +6,7 @@ */ #include "shared/source/helpers/aligned_memory.h" +#include "shared/source/helpers/hw_info.h" #include "shared/source/helpers/ptr_math.h" #include "level_zero/core/source/gfx_core_helpers/l0_gfx_core_helper.h" diff --git a/level_zero/core/source/module/module_imp.cpp b/level_zero/core/source/module/module_imp.cpp index 56c2e8b310..10be269e6c 100644 --- a/level_zero/core/source/module/module_imp.cpp +++ b/level_zero/core/source/module/module_imp.cpp @@ -27,6 +27,7 @@ #include "shared/source/helpers/compiler_product_helper.h" #include "shared/source/helpers/constants.h" #include "shared/source/helpers/gfx_core_helper.h" +#include "shared/source/helpers/hw_info.h" #include "shared/source/helpers/kernel_helpers.h" #include "shared/source/helpers/string.h" #include "shared/source/kernel/kernel_descriptor.h" diff --git a/level_zero/core/test/unit_tests/fixtures/device_fixture.h b/level_zero/core/test/unit_tests/fixtures/device_fixture.h index 139fc53b00..474a23c1a8 100644 --- a/level_zero/core/test/unit_tests/fixtures/device_fixture.h +++ b/level_zero/core/test/unit_tests/fixtures/device_fixture.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2022 Intel Corporation + * Copyright (C) 2020-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -7,6 +7,7 @@ #pragma once +#include "shared/source/helpers/hw_info.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" #include "shared/test/common/mocks/mock_compilers.h" #include "shared/test/common/mocks/mock_device.h" diff --git a/level_zero/tools/source/debug/debug_session_imp.cpp b/level_zero/tools/source/debug/debug_session_imp.cpp index d05c0b3af6..b38ef42115 100644 --- a/level_zero/tools/source/debug/debug_session_imp.cpp +++ b/level_zero/tools/source/debug/debug_session_imp.cpp @@ -12,6 +12,7 @@ #include "shared/source/gmm_helper/gmm_helper.h" #include "shared/source/helpers/basic_math.h" #include "shared/source/helpers/gfx_core_helper.h" +#include "shared/source/helpers/hw_info.h" #include "shared/source/helpers/sleep.h" #include "shared/source/helpers/string.h" #include "shared/source/os_interface/os_interface.h" diff --git a/level_zero/tools/source/debug/linux/prelim/debug_session.cpp b/level_zero/tools/source/debug/linux/prelim/debug_session.cpp index 9f9178a5ad..2e46d923c3 100644 --- a/level_zero/tools/source/debug/linux/prelim/debug_session.cpp +++ b/level_zero/tools/source/debug/linux/prelim/debug_session.cpp @@ -12,6 +12,7 @@ #include "shared/source/gmm_helper/gmm_helper.h" #include "shared/source/helpers/aligned_memory.h" #include "shared/source/helpers/array_count.h" +#include "shared/source/helpers/hw_info.h" #include "shared/source/helpers/string.h" #include "shared/source/memory_manager/memory_manager.h" #include "shared/source/os_interface/linux/drm_debug.h" diff --git a/level_zero/tools/source/metrics/linux/os_metric_ip_sampling_imp_linux.cpp b/level_zero/tools/source/metrics/linux/os_metric_ip_sampling_imp_linux.cpp index 0ae116d40e..48a9cf5212 100644 --- a/level_zero/tools/source/metrics/linux/os_metric_ip_sampling_imp_linux.cpp +++ b/level_zero/tools/source/metrics/linux/os_metric_ip_sampling_imp_linux.cpp @@ -7,6 +7,7 @@ #include "shared/source/debug_settings/debug_settings_manager.h" #include "shared/source/helpers/constants.h" +#include "shared/source/helpers/hw_info.h" #include "shared/source/os_interface/hw_info_config.h" #include "shared/source/os_interface/linux/drm_neo.h" #include "shared/source/os_interface/linux/engine_info.h" diff --git a/level_zero/tools/test/unit_tests/sources/debug/mock_debug_session.h b/level_zero/tools/test/unit_tests/sources/debug/mock_debug_session.h index 935c5fa50f..f037b9c439 100644 --- a/level_zero/tools/test/unit_tests/sources/debug/mock_debug_session.h +++ b/level_zero/tools/test/unit_tests/sources/debug/mock_debug_session.h @@ -1,11 +1,12 @@ /* - * Copyright (C) 2021-2022 Intel Corporation + * Copyright (C) 2021-2023 Intel Corporation * * SPDX-License-Identifier: MIT * */ #pragma once +#include "shared/source/helpers/hw_info.h" #include "shared/source/os_interface/os_interface.h" #include "level_zero/core/source/device/device_imp.h" diff --git a/opencl/source/event/event.cpp b/opencl/source/event/event.cpp index 28c58a349e..9a03910e0f 100644 --- a/opencl/source/event/event.cpp +++ b/opencl/source/event/event.cpp @@ -9,6 +9,7 @@ #include "shared/source/command_stream/command_stream_receiver.h" #include "shared/source/command_stream/task_count_helper.h" +#include "shared/source/command_stream/wait_status.h" #include "shared/source/device/device.h" #include "shared/source/execution_environment/root_device_environment.h" #include "shared/source/helpers/aligned_memory.h" diff --git a/opencl/source/gtpin/gtpin_gfx_core_helper_bdw_and_later.inl b/opencl/source/gtpin/gtpin_gfx_core_helper_bdw_and_later.inl index fa88cfbeb1..09d28750a6 100644 --- a/opencl/source/gtpin/gtpin_gfx_core_helper_bdw_and_later.inl +++ b/opencl/source/gtpin/gtpin_gfx_core_helper_bdw_and_later.inl @@ -6,6 +6,7 @@ */ #include "shared/source/debug_settings/debug_settings_manager.h" +#include "shared/source/helpers/hw_info.h" #include "opencl/source/gtpin/gtpin_gfx_core_helper.h" diff --git a/opencl/source/helpers/hardware_commands_helper_base.inl b/opencl/source/helpers/hardware_commands_helper_base.inl index e4105e0758..b764b1b7a4 100644 --- a/opencl/source/helpers/hardware_commands_helper_base.inl +++ b/opencl/source/helpers/hardware_commands_helper_base.inl @@ -14,6 +14,7 @@ #include "shared/source/helpers/aligned_memory.h" #include "shared/source/helpers/basic_math.h" #include "shared/source/helpers/gfx_core_helper.h" +#include "shared/source/helpers/hw_info.h" #include "shared/source/helpers/local_id_gen.h" #include "shared/source/helpers/ptr_math.h" #include "shared/source/helpers/string.h" diff --git a/opencl/source/program/program.cpp b/opencl/source/program/program.cpp index 5853a1337c..e0817035b3 100644 --- a/opencl/source/program/program.cpp +++ b/opencl/source/program/program.cpp @@ -20,6 +20,7 @@ #include "shared/source/helpers/compiler_options_parser.h" #include "shared/source/helpers/compiler_product_helper.h" #include "shared/source/helpers/gfx_core_helper.h" +#include "shared/source/helpers/hw_info.h" #include "shared/source/memory_manager/memory_manager.h" #include "shared/source/memory_manager/unified_memory_manager.h" #include "shared/source/os_interface/os_context.h" diff --git a/shared/source/gen11/hw_cmds_ehl.h b/shared/source/gen11/hw_cmds_ehl.h index 8dae956f08..7d0c8d8e17 100644 --- a/shared/source/gen11/hw_cmds_ehl.h +++ b/shared/source/gen11/hw_cmds_ehl.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2022 Intel Corporation + * Copyright (C) 2019-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -7,6 +7,7 @@ #pragma once #include "shared/source/gen11/hw_cmds_base.h" +#include "shared/source/helpers/hw_info.h" namespace NEO { diff --git a/shared/source/gen11/hw_cmds_icllp.h b/shared/source/gen11/hw_cmds_icllp.h index bca7794bc1..39f65c8f7f 100644 --- a/shared/source/gen11/hw_cmds_icllp.h +++ b/shared/source/gen11/hw_cmds_icllp.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2022 Intel Corporation + * Copyright (C) 2019-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -7,6 +7,7 @@ #pragma once #include "shared/source/gen11/hw_cmds_base.h" +#include "shared/source/helpers/hw_info.h" namespace NEO { diff --git a/shared/source/gen11/hw_cmds_lkf.h b/shared/source/gen11/hw_cmds_lkf.h index b08eb038ff..73f0115a87 100644 --- a/shared/source/gen11/hw_cmds_lkf.h +++ b/shared/source/gen11/hw_cmds_lkf.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2022 Intel Corporation + * Copyright (C) 2019-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -7,6 +7,7 @@ #pragma once #include "shared/source/gen11/hw_cmds_base.h" +#include "shared/source/helpers/hw_info.h" namespace NEO { diff --git a/shared/source/gen11/hw_info_gen11.h b/shared/source/gen11/hw_info_gen11.h index 734a3d817c..0b241b28d3 100644 --- a/shared/source/gen11/hw_info_gen11.h +++ b/shared/source/gen11/hw_info_gen11.h @@ -1,12 +1,12 @@ /* - * Copyright (C) 2019-2022 Intel Corporation + * Copyright (C) 2019-2023 Intel Corporation * * SPDX-License-Identifier: MIT * */ #pragma once -#include "shared/source/helpers/hw_info.h" +#include "shared/source/helpers/hw_mapper.h" namespace NEO { diff --git a/shared/source/gen11/preamble_gen11.cpp b/shared/source/gen11/preamble_gen11.cpp index 39a8d35cbb..1b7ea39815 100644 --- a/shared/source/gen11/preamble_gen11.cpp +++ b/shared/source/gen11/preamble_gen11.cpp @@ -7,6 +7,7 @@ #include "shared/source/command_stream/csr_definitions.h" #include "shared/source/gen11/hw_cmds_base.h" +#include "shared/source/helpers/hw_info.h" #include "shared/source/helpers/pipe_control_args.h" #include "shared/source/helpers/pipeline_select_helper.h" #include "shared/source/helpers/preamble_bdw_and_later.inl" diff --git a/shared/source/gen12lp/hw_cmds_adln.h b/shared/source/gen12lp/hw_cmds_adln.h index 9cace02da5..ca139f4961 100644 --- a/shared/source/gen12lp/hw_cmds_adln.h +++ b/shared/source/gen12lp/hw_cmds_adln.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 Intel Corporation + * Copyright (C) 2022-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -7,6 +7,7 @@ #pragma once #include "shared/source/gen12lp/hw_cmds_base.h" +#include "shared/source/helpers/hw_info.h" namespace NEO { struct ADLN : public Gen12LpFamily { diff --git a/shared/source/gen12lp/hw_cmds_adlp.h b/shared/source/gen12lp/hw_cmds_adlp.h index 9bc67bc7b4..7b347ebcd9 100644 --- a/shared/source/gen12lp/hw_cmds_adlp.h +++ b/shared/source/gen12lp/hw_cmds_adlp.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2022 Intel Corporation + * Copyright (C) 2021-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -7,6 +7,7 @@ #pragma once #include "shared/source/gen12lp/hw_cmds_base.h" +#include "shared/source/helpers/hw_info.h" namespace NEO { struct ADLP : public Gen12LpFamily { diff --git a/shared/source/gen12lp/hw_cmds_adls.h b/shared/source/gen12lp/hw_cmds_adls.h index 4b2163a9d0..6d00c54379 100644 --- a/shared/source/gen12lp/hw_cmds_adls.h +++ b/shared/source/gen12lp/hw_cmds_adls.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2022 Intel Corporation + * Copyright (C) 2020-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -7,6 +7,7 @@ #pragma once #include "shared/source/gen12lp/hw_cmds_base.h" +#include "shared/source/helpers/hw_info.h" namespace NEO { struct ADLS : public Gen12LpFamily { diff --git a/shared/source/gen12lp/hw_cmds_base.h b/shared/source/gen12lp/hw_cmds_base.h index b47493490f..8dc47105aa 100644 --- a/shared/source/gen12lp/hw_cmds_base.h +++ b/shared/source/gen12lp/hw_cmds_base.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2022 Intel Corporation + * Copyright (C) 2019-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -11,6 +11,7 @@ #include "shared/source/helpers/debug_helpers.h" #include +#include template struct CmdParse; diff --git a/shared/source/gen12lp/hw_cmds_dg1.h b/shared/source/gen12lp/hw_cmds_dg1.h index 59bd42cd1a..840a1cb73e 100644 --- a/shared/source/gen12lp/hw_cmds_dg1.h +++ b/shared/source/gen12lp/hw_cmds_dg1.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2022 Intel Corporation + * Copyright (C) 2020-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -7,6 +7,8 @@ #pragma once #include "shared/source/gen12lp/hw_cmds_base.h" +#include "shared/source/helpers/hw_info.h" + namespace NEO { struct DG1 : public Gen12LpFamily { static const PLATFORM platform; diff --git a/shared/source/gen12lp/hw_cmds_rkl.h b/shared/source/gen12lp/hw_cmds_rkl.h index a515a2eeec..3bb49627b5 100644 --- a/shared/source/gen12lp/hw_cmds_rkl.h +++ b/shared/source/gen12lp/hw_cmds_rkl.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2022 Intel Corporation + * Copyright (C) 2020-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -7,6 +7,8 @@ #pragma once #include "shared/source/gen12lp/hw_cmds_base.h" +#include "shared/source/helpers/hw_info.h" + namespace NEO { struct RKL : public Gen12LpFamily { static const PLATFORM platform; diff --git a/shared/source/gen12lp/hw_cmds_tgllp.h b/shared/source/gen12lp/hw_cmds_tgllp.h index f13953efe6..0ce91709ba 100644 --- a/shared/source/gen12lp/hw_cmds_tgllp.h +++ b/shared/source/gen12lp/hw_cmds_tgllp.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2022 Intel Corporation + * Copyright (C) 2019-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -7,6 +7,8 @@ #pragma once #include "shared/source/gen12lp/hw_cmds_base.h" +#include "shared/source/helpers/hw_info.h" + namespace NEO { struct TGLLP : public Gen12LpFamily { diff --git a/shared/source/gen12lp/hw_info_gen12lp.h b/shared/source/gen12lp/hw_info_gen12lp.h index 78e262bbbe..bc59fdcff7 100644 --- a/shared/source/gen12lp/hw_info_gen12lp.h +++ b/shared/source/gen12lp/hw_info_gen12lp.h @@ -1,12 +1,12 @@ /* - * Copyright (C) 2019-2022 Intel Corporation + * Copyright (C) 2019-2023 Intel Corporation * * SPDX-License-Identifier: MIT * */ #pragma once -#include "shared/source/helpers/hw_info.h" +#include "shared/source/helpers/hw_mapper.h" namespace NEO { diff --git a/shared/source/gen12lp/preamble_gen12lp.cpp b/shared/source/gen12lp/preamble_gen12lp.cpp index 64dd016389..fa62721f6c 100644 --- a/shared/source/gen12lp/preamble_gen12lp.cpp +++ b/shared/source/gen12lp/preamble_gen12lp.cpp @@ -8,6 +8,7 @@ #include "shared/source/command_stream/csr_definitions.h" #include "shared/source/execution_environment/root_device_environment.h" #include "shared/source/gen12lp/hw_cmds_base.h" +#include "shared/source/helpers/hw_info.h" #include "shared/source/helpers/pipe_control_args.h" #include "shared/source/helpers/pipeline_select_helper.h" #include "shared/source/helpers/preamble_bdw_and_later.inl" diff --git a/shared/source/gen8/hw_cmds_bdw.h b/shared/source/gen8/hw_cmds_bdw.h index 6111529973..1818f44c78 100644 --- a/shared/source/gen8/hw_cmds_bdw.h +++ b/shared/source/gen8/hw_cmds_bdw.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -7,6 +7,7 @@ #pragma once #include "shared/source/gen8/hw_cmds_base.h" +#include "shared/source/helpers/hw_info.h" #include diff --git a/shared/source/gen8/hw_info_gen8.h b/shared/source/gen8/hw_info_gen8.h index 9b3bea3ce2..fc5eef2a72 100644 --- a/shared/source/gen8/hw_info_gen8.h +++ b/shared/source/gen8/hw_info_gen8.h @@ -1,12 +1,12 @@ /* - * Copyright (C) 2019-2022 Intel Corporation + * Copyright (C) 2019-2023 Intel Corporation * * SPDX-License-Identifier: MIT * */ #pragma once -#include "shared/source/helpers/hw_info.h" +#include "shared/source/helpers/hw_mapper.h" namespace NEO { diff --git a/shared/source/gen8/preamble_gen8.cpp b/shared/source/gen8/preamble_gen8.cpp index 630e58f9ec..1db2212745 100644 --- a/shared/source/gen8/preamble_gen8.cpp +++ b/shared/source/gen8/preamble_gen8.cpp @@ -6,6 +6,7 @@ */ #include "shared/source/gen8/hw_cmds_base.h" +#include "shared/source/helpers/hw_info.h" #include "shared/source/helpers/pipe_control_args.h" #include "shared/source/helpers/pipeline_select_helper.h" #include "shared/source/helpers/preamble_bdw_and_later.inl" diff --git a/shared/source/gen8/preemption_gen8.cpp b/shared/source/gen8/preemption_gen8.cpp index de1c00c16b..ea3c98dd5a 100644 --- a/shared/source/gen8/preemption_gen8.cpp +++ b/shared/source/gen8/preemption_gen8.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 "shared/source/command_stream/preemption.h" #include "shared/source/command_stream/preemption.inl" #include "shared/source/gen8/hw_cmds_base.h" +#include "shared/source/helpers/hw_info.h" #include "shared/source/helpers/register_offsets.h" namespace NEO { diff --git a/shared/source/gen9/hw_cmds_bxt.h b/shared/source/gen9/hw_cmds_bxt.h index 26c6fb780c..af56cc51ec 100644 --- a/shared/source/gen9/hw_cmds_bxt.h +++ b/shared/source/gen9/hw_cmds_bxt.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -7,6 +7,7 @@ #pragma once #include "shared/source/gen9/hw_cmds_base.h" +#include "shared/source/helpers/hw_info.h" namespace NEO { diff --git a/shared/source/gen9/hw_cmds_cfl.h b/shared/source/gen9/hw_cmds_cfl.h index febf9c1910..85bd8ffcb7 100644 --- a/shared/source/gen9/hw_cmds_cfl.h +++ b/shared/source/gen9/hw_cmds_cfl.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -7,6 +7,7 @@ #pragma once #include "shared/source/gen9/hw_cmds_base.h" +#include "shared/source/helpers/hw_info.h" namespace NEO { diff --git a/shared/source/gen9/hw_cmds_glk.h b/shared/source/gen9/hw_cmds_glk.h index 0f383cf0b8..4c6436dcc8 100644 --- a/shared/source/gen9/hw_cmds_glk.h +++ b/shared/source/gen9/hw_cmds_glk.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -7,6 +7,7 @@ #pragma once #include "shared/source/gen9/hw_cmds_base.h" +#include "shared/source/helpers/hw_info.h" namespace NEO { diff --git a/shared/source/gen9/hw_cmds_kbl.h b/shared/source/gen9/hw_cmds_kbl.h index ba35be68ec..6b6f3397f8 100644 --- a/shared/source/gen9/hw_cmds_kbl.h +++ b/shared/source/gen9/hw_cmds_kbl.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -7,6 +7,7 @@ #pragma once #include "shared/source/gen9/hw_cmds_base.h" +#include "shared/source/helpers/hw_info.h" namespace NEO { diff --git a/shared/source/gen9/hw_cmds_skl.h b/shared/source/gen9/hw_cmds_skl.h index 8dfb6d6544..496b785e0c 100644 --- a/shared/source/gen9/hw_cmds_skl.h +++ b/shared/source/gen9/hw_cmds_skl.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -7,6 +7,7 @@ #pragma once #include "shared/source/gen9/hw_cmds_base.h" +#include "shared/source/helpers/hw_info.h" namespace NEO { diff --git a/shared/source/gen9/hw_info_gen9.h b/shared/source/gen9/hw_info_gen9.h index 75ae70fb66..025c599c03 100644 --- a/shared/source/gen9/hw_info_gen9.h +++ b/shared/source/gen9/hw_info_gen9.h @@ -1,12 +1,12 @@ /* - * Copyright (C) 2019-2022 Intel Corporation + * Copyright (C) 2019-2023 Intel Corporation * * SPDX-License-Identifier: MIT * */ #pragma once -#include "shared/source/helpers/hw_info.h" +#include "shared/source/helpers/hw_mapper.h" namespace NEO { diff --git a/shared/source/gen9/preamble_gen9.cpp b/shared/source/gen9/preamble_gen9.cpp index 1ab56090ac..98085ab104 100644 --- a/shared/source/gen9/preamble_gen9.cpp +++ b/shared/source/gen9/preamble_gen9.cpp @@ -7,6 +7,7 @@ #include "shared/source/command_stream/csr_definitions.h" #include "shared/source/gen9/hw_cmds_base.h" +#include "shared/source/helpers/hw_info.h" #include "shared/source/helpers/pipe_control_args.h" #include "shared/source/helpers/pipeline_select_helper.h" #include "shared/source/helpers/preamble_bdw_and_later.inl" diff --git a/shared/source/gen9/preemption_gen9.cpp b/shared/source/gen9/preemption_gen9.cpp index 89d616bdc3..cddade6edf 100644 --- a/shared/source/gen9/preemption_gen9.cpp +++ b/shared/source/gen9/preemption_gen9.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -10,6 +10,7 @@ #include "shared/source/command_stream/preemption.h" #include "shared/source/command_stream/preemption.inl" #include "shared/source/gen9/hw_cmds_base.h" +#include "shared/source/helpers/hw_info.h" #include "shared/source/helpers/register_offsets.h" #include diff --git a/shared/source/helpers/CMakeLists.txt b/shared/source/helpers/CMakeLists.txt index 98c18d354b..daa68b1e79 100644 --- a/shared/source/helpers/CMakeLists.txt +++ b/shared/source/helpers/CMakeLists.txt @@ -87,6 +87,7 @@ set(NEO_CORE_HELPERS ${CMAKE_CURRENT_SOURCE_DIR}/hw_info.cpp ${CMAKE_CURRENT_SOURCE_DIR}/hw_info.h ${CMAKE_CURRENT_SOURCE_DIR}/hw_ip_version.h + ${CMAKE_CURRENT_SOURCE_DIR}/hw_mapper.h ${CMAKE_CURRENT_SOURCE_DIR}/hw_walk_order.h ${CMAKE_CURRENT_SOURCE_DIR}/kernel_helpers.cpp ${CMAKE_CURRENT_SOURCE_DIR}/kernel_helpers.h diff --git a/shared/source/helpers/cache_flush.inl b/shared/source/helpers/cache_flush.inl index d7bb6a7a37..40e9d19d8c 100644 --- a/shared/source/helpers/cache_flush.inl +++ b/shared/source/helpers/cache_flush.inl @@ -8,6 +8,7 @@ #include "shared/source/command_stream/linear_stream.h" #include "shared/source/execution_environment/root_device_environment.h" #include "shared/source/helpers/gfx_core_helper.h" +#include "shared/source/helpers/hw_info.h" #include "shared/source/helpers/l3_range.h" #include "shared/source/utilities/range.h" diff --git a/shared/source/helpers/cache_policy_dg2_and_later.inl b/shared/source/helpers/cache_policy_dg2_and_later.inl index 9d1278f595..eaaca92f6a 100644 --- a/shared/source/helpers/cache_policy_dg2_and_later.inl +++ b/shared/source/helpers/cache_policy_dg2_and_later.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 Intel Corporation + * Copyright (C) 2022-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -7,7 +7,7 @@ #include "shared/source/helpers/cache_policy.h" #include "shared/source/helpers/cache_policy_base.inl" -#include "shared/source/helpers/hw_info.h" +#include "shared/source/helpers/hw_mapper.h" namespace NEO { diff --git a/shared/source/helpers/compiler_product_helper.h b/shared/source/helpers/compiler_product_helper.h index 0832171006..4e343797c6 100644 --- a/shared/source/helpers/compiler_product_helper.h +++ b/shared/source/helpers/compiler_product_helper.h @@ -7,7 +7,7 @@ #pragma once -#include "shared/source/helpers/hw_info.h" +#include "shared/source/helpers/hw_mapper.h" #include "shared/source/helpers/product_config_helper.h" #include "igfxfmid.h" diff --git a/shared/source/helpers/enable_product.inl b/shared/source/helpers/enable_product.inl index 8d3e3cf18e..b917e02b9a 100644 --- a/shared/source/helpers/enable_product.inl +++ b/shared/source/helpers/enable_product.inl @@ -1,11 +1,12 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * */ #include "shared/source/helpers/hw_info.h" +#include "shared/source/helpers/hw_mapper.h" namespace NEO { template diff --git a/shared/source/helpers/hw_info.h b/shared/source/helpers/hw_info.h index d4e89ecc25..88b7e98da6 100644 --- a/shared/source/helpers/hw_info.h +++ b/shared/source/helpers/hw_info.h @@ -146,12 +146,6 @@ struct HardwareInfo { uint8_t reserved[4]{}; // to keep optimal alignment }; -template -struct HwMapper {}; - -template -struct GfxFamilyMapper {}; - // Global table of hardware prefixes extern bool familyEnabled[IGFX_MAX_CORE]; extern const char *hardwarePrefix[IGFX_MAX_PRODUCT]; @@ -172,11 +166,4 @@ void setHwInfoValuesFromConfig(const uint64_t hwInfoConfig, HardwareInfo &hwInfo bool parseHwInfoConfigString(const std::string &hwInfoConfigStr, uint64_t &hwInfoConfig); aub_stream::EngineType getChosenEngineType(const HardwareInfo &hwInfo); -// Utility conversion -template -struct ToGfxCoreFamily { - static const GFXCORE_FAMILY gfxCoreFamily = - static_cast(NEO::HwMapper::gfxFamily); - static constexpr GFXCORE_FAMILY get() { return gfxCoreFamily; } -}; } // namespace NEO diff --git a/shared/source/helpers/hw_mapper.h b/shared/source/helpers/hw_mapper.h new file mode 100644 index 0000000000..25ed8e31f3 --- /dev/null +++ b/shared/source/helpers/hw_mapper.h @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2023 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +#pragma once +#include "igfxfmid.h" + +namespace NEO { + +template +struct HwMapper {}; + +// Utility conversion +template +struct ToGfxCoreFamily { + static const GFXCORE_FAMILY gfxCoreFamily = + static_cast(NEO::HwMapper::gfxFamily); + static constexpr GFXCORE_FAMILY get() { return gfxCoreFamily; } +}; + +template +struct GfxFamilyMapper {}; + +} // namespace NEO \ No newline at end of file diff --git a/shared/source/os_interface/device_factory.cpp b/shared/source/os_interface/device_factory.cpp index 5baead0242..436f596377 100644 --- a/shared/source/os_interface/device_factory.cpp +++ b/shared/source/os_interface/device_factory.cpp @@ -14,6 +14,7 @@ #include "shared/source/execution_environment/root_device_environment.h" #include "shared/source/helpers/compiler_product_helper.h" #include "shared/source/helpers/gfx_core_helper.h" +#include "shared/source/helpers/hw_info.h" #include "shared/source/helpers/product_config_helper.h" #include "shared/source/memory_manager/memory_manager.h" #include "shared/source/os_interface/aub_memory_operations_handler.h" diff --git a/shared/source/os_interface/product_helper_hw.h b/shared/source/os_interface/product_helper_hw.h index b35f988d0f..ecfdf43dd7 100644 --- a/shared/source/os_interface/product_helper_hw.h +++ b/shared/source/os_interface/product_helper_hw.h @@ -6,7 +6,7 @@ */ #pragma once -#include "shared/source/helpers/hw_info.h" +#include "shared/source/helpers/hw_mapper.h" #include "shared/source/os_interface/hw_info_config.h" namespace NEO { diff --git a/shared/source/xe_hpc_core/hw_cmds_pvc.h b/shared/source/xe_hpc_core/hw_cmds_pvc.h index 70fe657a53..707cbbce8b 100644 --- a/shared/source/xe_hpc_core/hw_cmds_pvc.h +++ b/shared/source/xe_hpc_core/hw_cmds_pvc.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2022 Intel Corporation + * Copyright (C) 2021-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -7,6 +7,7 @@ #pragma once +#include "shared/source/helpers/hw_info.h" #include "shared/source/xe_hpc_core/hw_cmds_xe_hpc_core_base.h" #include "shared/source/xe_hpc_core/pvc/device_ids_configs_pvc.h" diff --git a/shared/source/xe_hpc_core/hw_info_xe_hpc_core.h b/shared/source/xe_hpc_core/hw_info_xe_hpc_core.h index 593074583b..eeb8af1e02 100644 --- a/shared/source/xe_hpc_core/hw_info_xe_hpc_core.h +++ b/shared/source/xe_hpc_core/hw_info_xe_hpc_core.h @@ -1,12 +1,12 @@ /* - * Copyright (C) 2021-2022 Intel Corporation + * Copyright (C) 2021-2023 Intel Corporation * * SPDX-License-Identifier: MIT * */ #pragma once -#include "shared/source/helpers/hw_info.h" +#include "shared/source/helpers/hw_mapper.h" namespace NEO { diff --git a/shared/source/xe_hpg_core/hw_cmds_dg2.h b/shared/source/xe_hpg_core/hw_cmds_dg2.h index 2c305816d2..1c0422b0e9 100644 --- a/shared/source/xe_hpg_core/hw_cmds_dg2.h +++ b/shared/source/xe_hpg_core/hw_cmds_dg2.h @@ -6,6 +6,7 @@ */ #pragma once +#include "shared/source/helpers/hw_info.h" #include "shared/source/xe_hpg_core/dg2/definitions/device_ids_configs_dg2_base.h" #include "shared/source/xe_hpg_core/hw_cmds_xe_hpg_core_base.h" diff --git a/shared/source/xe_hpg_core/hw_cmds_mtl.h b/shared/source/xe_hpg_core/hw_cmds_mtl.h index 660a4c0da0..d855442d3d 100644 --- a/shared/source/xe_hpg_core/hw_cmds_mtl.h +++ b/shared/source/xe_hpg_core/hw_cmds_mtl.h @@ -1,12 +1,14 @@ /* - * Copyright (C) 2022 Intel Corporation + * Copyright (C) 2022-2023 Intel Corporation * * SPDX-License-Identifier: MIT * */ #pragma once +#include "shared/source/helpers/hw_info.h" #include "shared/source/xe_hpg_core/hw_cmds_xe_hpg_core_base.h" + namespace NEO { struct MTL : public XeHpgCoreFamily { diff --git a/shared/source/xe_hpg_core/hw_info_xe_hpg_core.h b/shared/source/xe_hpg_core/hw_info_xe_hpg_core.h index 8b5f719c51..db06a1200f 100644 --- a/shared/source/xe_hpg_core/hw_info_xe_hpg_core.h +++ b/shared/source/xe_hpg_core/hw_info_xe_hpg_core.h @@ -1,12 +1,12 @@ /* - * Copyright (C) 2021-2022 Intel Corporation + * Copyright (C) 2021-2023 Intel Corporation * * SPDX-License-Identifier: MIT * */ #pragma once -#include "shared/source/helpers/hw_info.h" +#include "shared/source/helpers/hw_mapper.h" namespace NEO { diff --git a/shared/test/common/device_binary_format/elf/elf_tests_data.h b/shared/test/common/device_binary_format/elf/elf_tests_data.h index ea5a99a002..bb8202c835 100644 --- a/shared/test/common/device_binary_format/elf/elf_tests_data.h +++ b/shared/test/common/device_binary_format/elf/elf_tests_data.h @@ -11,6 +11,7 @@ #include "shared/source/device_binary_format/elf/elf_encoder.h" #include "shared/source/device_binary_format/elf/ocl_elf.h" #include "shared/source/helpers/compiler_product_helper.h" +#include "shared/source/helpers/hw_info.h" #include "shared/source/helpers/string.h" #include "patch_list.h" diff --git a/shared/test/common/device_binary_format/patchtokens_tests.h b/shared/test/common/device_binary_format/patchtokens_tests.h index 4617fda417..4c68441086 100644 --- a/shared/test/common/device_binary_format/patchtokens_tests.h +++ b/shared/test/common/device_binary_format/patchtokens_tests.h @@ -10,6 +10,7 @@ #include "shared/source/device_binary_format/patchtokens_decoder.h" #include "shared/source/helpers/api_specific_config.h" #include "shared/source/helpers/compiler_product_helper.h" +#include "shared/source/helpers/hw_info.h" #include "shared/source/helpers/string.h" #include "shared/test/common/helpers/default_hw_info.h" diff --git a/shared/test/common/helpers/mock_hw_info_config_hw.h b/shared/test/common/helpers/mock_hw_info_config_hw.h index d70d4b4bcb..f8aa562e51 100644 --- a/shared/test/common/helpers/mock_hw_info_config_hw.h +++ b/shared/test/common/helpers/mock_hw_info_config_hw.h @@ -6,6 +6,7 @@ */ #pragma once +#include "shared/source/helpers/hw_info.h" #include "shared/source/os_interface/hw_info_config.h" #include "shared/source/os_interface/product_helper_hw.h" diff --git a/shared/test/unit_test/os_interface/linux/drm_mock_impl.h b/shared/test/unit_test/os_interface/linux/drm_mock_impl.h index 95413382be..3af72384e2 100644 --- a/shared/test/unit_test/os_interface/linux/drm_mock_impl.h +++ b/shared/test/unit_test/os_interface/linux/drm_mock_impl.h @@ -7,10 +7,13 @@ #pragma once +#include "shared/source/execution_environment/root_device_environment.h" +#include "shared/source/helpers/hw_mapper.h" #include "shared/source/os_interface/linux/i915.h" #include "shared/test/common/helpers/default_hw_info.h" #include "shared/test/common/libult/linux/drm_mock.h" +#include "gtest/gtest.h" #include "test_traits_common.h" using namespace NEO;