From 64f735481dafa2c25bdc69062cf1dfde11513856 Mon Sep 17 00:00:00 2001 From: "Warchulski, Jaroslaw" Date: Mon, 6 Feb 2023 09:05:43 +0000 Subject: [PATCH] Cleanup includes 48 Cleaned up files: shared/source/command_container/command_encoder.inl shared/source/os_interface/hw_info_config.h Related-To: NEO-5548 Signed-off-by: Warchulski, Jaroslaw --- level_zero/core/source/device/device.h | 1 + level_zero/core/source/image/image_imp.cpp | 1 + .../source/debug/windows/debug_session.cpp | 1 + .../source/sysman/frequency/frequency_imp.cpp | 3 +- .../linux/os_frequency_imp_prelim.cpp | 1 + .../global_operations_imp.cpp | 4 +- .../memory/linux/os_memory_imp_prelim.cpp | 1 + .../linux/os_performance_imp_prelim.cpp | 1 + .../source/sysman/performance/performance.cpp | 4 +- .../source/sysman/scheduler/scheduler.cpp | 4 +- level_zero/tools/source/sysman/sysman_imp.cpp | 1 + opencl/source/cl_device/cl_device.cpp | 1 + opencl/source/cl_device/cl_device_caps.cpp | 1 + opencl/source/cl_device/cl_device_info.cpp | 1 + opencl/source/command_queue/command_queue.cpp | 1 + .../source/command_queue/command_queue_hw.h | 1 + opencl/source/context/context.cpp | 1 + opencl/source/event/event.cpp | 1 + opencl/source/event/user_event.cpp | 1 + opencl/source/gtpin/gtpin_callbacks.cpp | 1 + opencl/source/kernel/kernel.cpp | 1 + opencl/source/mem_obj/buffer.cpp | 1 + opencl/source/platform/platform.cpp | 1 + opencl/source/program/create.inl | 1 + .../source/program/process_device_binary.cpp | 1 + opencl/source/sharings/d3d/d3d_texture.cpp | 1 + .../source/sharings/unified/unified_image.cpp | 1 + .../get_supported_image_formats_tests.cpp | 3 +- .../device/get_device_name_tests.cpp | 1 + .../device_instrumentation_fixture.cpp | 3 +- .../cl_memory_properties_helpers_tests.cpp | 1 + .../create_image_in_local_memory_tests.cpp | 1 + ...nager_allocate_in_preferred_pool_tests.cpp | 1 + .../test/unit_test/mocks/mock_cl_device.cpp | 1 + opencl/test/unit_test/mocks/mock_program.cpp | 1 + .../unified/unified_sharing_image_tests.cpp | 1 + shared/source/built_ins/built_ins_storage.cpp | 1 + .../source/command_container/cmdcontainer.cpp | 1 + .../command_container/command_encoder.inl | 1 - .../command_stream_receiver_hw_base.inl | 1 + shared/source/command_stream/preemption.cpp | 1 + shared/source/device/device.h | 2 + shared/source/device/device_caps.cpp | 1 + shared/source/device/root_device.cpp | 1 + .../dll/linux/debugger_l0_dll_linux.cpp | 3 +- .../dll/windows/debugger_l0_windows.cpp | 3 +- .../gen11/enable_hw_info_config_ehl.cpp | 3 +- .../gen11/enable_hw_info_config_icllp.cpp | 3 +- .../gen11/enable_hw_info_config_lkf.cpp | 3 +- .../gen12lp/enable_hw_info_config_adln.cpp | 3 +- .../gen12lp/enable_hw_info_config_adlp.cpp | 3 +- .../gen12lp/enable_hw_info_config_adls.cpp | 3 +- .../gen12lp/enable_hw_info_config_dg1.cpp | 3 +- .../gen12lp/enable_hw_info_config_rkl.cpp | 3 +- .../gen12lp/enable_hw_info_config_tgllp.cpp | 3 +- .../source/gen8/enable_hw_info_config_bdw.cpp | 3 +- .../source/gen9/enable_hw_info_config_bxt.cpp | 3 +- .../source/gen9/enable_hw_info_config_cfl.cpp | 3 +- .../source/gen9/enable_hw_info_config_glk.cpp | 3 +- .../source/gen9/enable_hw_info_config_kbl.cpp | 3 +- .../source/gen9/enable_hw_info_config_skl.cpp | 3 +- shared/source/helpers/blit_helper.cpp | 1 + shared/source/helpers/engine_node_helper.cpp | 1 + shared/source/helpers/ray_tracing_helper.h | 3 +- shared/source/os_interface/CMakeLists.txt | 3 +- shared/source/os_interface/hw_info_config.h | 176 +---------------- shared/source/os_interface/hw_info_config.inl | 1 + .../drm_memory_operations_handler_bind.cpp | 1 + .../source/os_interface/product_helper_hw.h | 184 ++++++++++++++++++ .../windows/performance_counters_win.cpp | 1 + .../source/os_interface/windows/wddm/wddm.cpp | 1 + .../windows/wddm_memory_manager.cpp | 1 + .../xe_hpc_core/enable_hw_info_config_pvc.cpp | 3 +- .../xe_hpg_core/enable_hw_info_config_dg2.cpp | 3 +- .../xe_hpg_core/enable_hw_info_config_mtl.cpp | 3 +- .../common/helpers/mock_hw_info_config_hw.h | 1 + .../test/common/mocks/debugger_l0_create.cpp | 3 +- shared/test/common/mocks/mock_device.cpp | 1 + .../test/common/mocks/mock_hw_info_config.cpp | 2 + .../test/common/mocks/ult_device_factory.cpp | 1 + .../execution_environment_tests.cpp | 1 + .../helpers/engine_node_helper_tests.cpp | 3 +- .../unit_test/preemption/preemption_tests.cpp | 1 + ...est_encode_dispatch_kernel_xe_hpg_core.cpp | 1 + 84 files changed, 303 insertions(+), 204 deletions(-) create mode 100644 shared/source/os_interface/product_helper_hw.h diff --git a/level_zero/core/source/device/device.h b/level_zero/core/source/device/device.h index 7767c45497..c9657d29d5 100644 --- a/level_zero/core/source/device/device.h +++ b/level_zero/core/source/device/device.h @@ -7,6 +7,7 @@ #pragma once +#include "shared/source/command_stream/preemption_mode.h" #include "shared/source/os_interface/hw_info_config.h" #include diff --git a/level_zero/core/source/image/image_imp.cpp b/level_zero/core/source/image/image_imp.cpp index 76c4c5cbee..870514364e 100644 --- a/level_zero/core/source/image/image_imp.cpp +++ b/level_zero/core/source/image/image_imp.cpp @@ -8,6 +8,7 @@ #include "level_zero/core/source/image/image_imp.h" #include "shared/source/device/device.h" +#include "shared/source/helpers/hw_info.h" #include "shared/source/memory_manager/memory_manager.h" #include "level_zero/core/source/device/device.h" diff --git a/level_zero/tools/source/debug/windows/debug_session.cpp b/level_zero/tools/source/debug/windows/debug_session.cpp index 9654411523..b777e52d68 100644 --- a/level_zero/tools/source/debug/windows/debug_session.cpp +++ b/level_zero/tools/source/debug/windows/debug_session.cpp @@ -10,6 +10,7 @@ #include "shared/source/device/device.h" #include "shared/source/execution_environment/root_device_environment.h" #include "shared/source/gmm_helper/gmm_helper.h" +#include "shared/source/helpers/hw_info.h" #include "shared/source/helpers/register_offsets.h" #include "shared/source/os_interface/windows/wddm/wddm.h" #include "shared/source/os_interface/windows/wddm_debug.h" diff --git a/level_zero/tools/source/sysman/frequency/frequency_imp.cpp b/level_zero/tools/source/sysman/frequency/frequency_imp.cpp index e624a0d060..30a485acb5 100644 --- a/level_zero/tools/source/sysman/frequency/frequency_imp.cpp +++ b/level_zero/tools/source/sysman/frequency/frequency_imp.cpp @@ -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 "level_zero/tools/source/sysman/sysman_imp.h" +#include #include namespace L0 { diff --git a/level_zero/tools/source/sysman/frequency/linux/os_frequency_imp_prelim.cpp b/level_zero/tools/source/sysman/frequency/linux/os_frequency_imp_prelim.cpp index b72a935ab8..462d6fbc3b 100644 --- a/level_zero/tools/source/sysman/frequency/linux/os_frequency_imp_prelim.cpp +++ b/level_zero/tools/source/sysman/frequency/linux/os_frequency_imp_prelim.cpp @@ -9,6 +9,7 @@ #include "shared/source/debug_settings/debug_settings_manager.h" #include "shared/source/device/device.h" +#include "shared/source/helpers/hw_info.h" #include "igfxfmid.h" #include "sysman/linux/os_sysman_imp.h" diff --git a/level_zero/tools/source/sysman/global_operations/global_operations_imp.cpp b/level_zero/tools/source/sysman/global_operations/global_operations_imp.cpp index 7f5a957432..285feb4b10 100644 --- a/level_zero/tools/source/sysman/global_operations/global_operations_imp.cpp +++ b/level_zero/tools/source/sysman/global_operations/global_operations_imp.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2022 Intel Corporation + * Copyright (C) 2020-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -13,6 +13,8 @@ #include "level_zero/core/source/device/device.h" #include "level_zero/tools/source/sysman/sysman_const.h" +#include + namespace L0 { ze_result_t GlobalOperationsImp::processesGetState(uint32_t *pCount, zes_process_state_t *pProcesses) { diff --git a/level_zero/tools/source/sysman/memory/linux/os_memory_imp_prelim.cpp b/level_zero/tools/source/sysman/memory/linux/os_memory_imp_prelim.cpp index c901a0c757..f815910094 100644 --- a/level_zero/tools/source/sysman/memory/linux/os_memory_imp_prelim.cpp +++ b/level_zero/tools/source/sysman/memory/linux/os_memory_imp_prelim.cpp @@ -9,6 +9,7 @@ #include "shared/source/debug_settings/debug_settings_manager.h" #include "shared/source/device/device.h" +#include "shared/source/helpers/hw_info.h" #include "shared/source/memory_manager/memory_manager.h" #include "shared/source/os_interface/linux/i915.h" #include "shared/source/os_interface/linux/ioctl_helper.h" diff --git a/level_zero/tools/source/sysman/performance/linux/os_performance_imp_prelim.cpp b/level_zero/tools/source/sysman/performance/linux/os_performance_imp_prelim.cpp index c8321f1d30..9ca012cd9a 100644 --- a/level_zero/tools/source/sysman/performance/linux/os_performance_imp_prelim.cpp +++ b/level_zero/tools/source/sysman/performance/linux/os_performance_imp_prelim.cpp @@ -8,6 +8,7 @@ #include "level_zero/tools/source/sysman/performance/linux/os_performance_imp_prelim.h" #include "shared/source/device/device.h" +#include "shared/source/helpers/hw_info.h" #include diff --git a/level_zero/tools/source/sysman/performance/performance.cpp b/level_zero/tools/source/sysman/performance/performance.cpp index 682f6f514e..a6fde6710a 100644 --- a/level_zero/tools/source/sysman/performance/performance.cpp +++ b/level_zero/tools/source/sysman/performance/performance.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2022 Intel Corporation + * Copyright (C) 2021-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -11,6 +11,8 @@ #include "performance_imp.h" +#include + namespace L0 { PerformanceHandleContext::~PerformanceHandleContext() { diff --git a/level_zero/tools/source/sysman/scheduler/scheduler.cpp b/level_zero/tools/source/sysman/scheduler/scheduler.cpp index 5bda20fa65..2356ef7bac 100644 --- a/level_zero/tools/source/sysman/scheduler/scheduler.cpp +++ b/level_zero/tools/source/sysman/scheduler/scheduler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2022 Intel Corporation + * Copyright (C) 2020-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -8,6 +8,8 @@ #include "level_zero/tools/source/sysman/os_sysman.h" #include "level_zero/tools/source/sysman/scheduler/scheduler_imp.h" +#include + class OsScheduler; namespace L0 { diff --git a/level_zero/tools/source/sysman/sysman_imp.cpp b/level_zero/tools/source/sysman/sysman_imp.cpp index 24a0d528dc..afaf5d6e82 100644 --- a/level_zero/tools/source/sysman/sysman_imp.cpp +++ b/level_zero/tools/source/sysman/sysman_imp.cpp @@ -10,6 +10,7 @@ #include "shared/source/device/sub_device.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 "level_zero/core/source/driver/driver.h" diff --git a/opencl/source/cl_device/cl_device.cpp b/opencl/source/cl_device/cl_device.cpp index 107d530a7a..ae4205a271 100644 --- a/opencl/source/cl_device/cl_device.cpp +++ b/opencl/source/cl_device/cl_device.cpp @@ -14,6 +14,7 @@ #include "shared/source/execution_environment/root_device_environment.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/string.h" #include "shared/source/os_interface/driver_info.h" #include "shared/source/os_interface/os_interface.h" diff --git a/opencl/source/cl_device/cl_device_caps.cpp b/opencl/source/cl_device/cl_device_caps.cpp index c03741d9a4..a135c4dbcc 100644 --- a/opencl/source/cl_device/cl_device_caps.cpp +++ b/opencl/source/cl_device/cl_device_caps.cpp @@ -9,6 +9,7 @@ #include "shared/source/device/device.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/string.h" #include "shared/source/os_interface/driver_info.h" diff --git a/opencl/source/cl_device/cl_device_info.cpp b/opencl/source/cl_device/cl_device_info.cpp index 4c0cc9f9e4..bf5b60b46e 100644 --- a/opencl/source/cl_device/cl_device_info.cpp +++ b/opencl/source/cl_device/cl_device_info.cpp @@ -12,6 +12,7 @@ #include "shared/source/execution_environment/root_device_environment.h" #include "shared/source/helpers/get_info.h" #include "shared/source/helpers/gfx_core_helper.h" +#include "shared/source/helpers/hw_info.h" #include "shared/source/os_interface/os_time.h" #include "opencl/source/cl_device/cl_device.h" diff --git a/opencl/source/command_queue/command_queue.cpp b/opencl/source/command_queue/command_queue.cpp index 678ab1f39c..acb8ff7b55 100644 --- a/opencl/source/command_queue/command_queue.cpp +++ b/opencl/source/command_queue/command_queue.cpp @@ -20,6 +20,7 @@ #include "shared/source/helpers/engine_node_helper.h" #include "shared/source/helpers/flush_stamp.h" #include "shared/source/helpers/get_info.h" +#include "shared/source/helpers/hw_info.h" #include "shared/source/helpers/ptr_math.h" #include "shared/source/helpers/string.h" #include "shared/source/helpers/timestamp_packet.h" diff --git a/opencl/source/command_queue/command_queue_hw.h b/opencl/source/command_queue/command_queue_hw.h index d9225c3727..4595b20006 100644 --- a/opencl/source/command_queue/command_queue_hw.h +++ b/opencl/source/command_queue/command_queue_hw.h @@ -9,6 +9,7 @@ #include "shared/source/command_stream/command_stream_receiver.h" #include "shared/source/command_stream/preemption.h" #include "shared/source/helpers/engine_control.h" +#include "shared/source/helpers/hw_info.h" #include "shared/source/memory_manager/graphics_allocation.h" #include "shared/source/os_interface/os_context.h" diff --git a/opencl/source/context/context.cpp b/opencl/source/context/context.cpp index b1fec26fd9..914c1d8170 100644 --- a/opencl/source/context/context.cpp +++ b/opencl/source/context/context.cpp @@ -13,6 +13,7 @@ #include "shared/source/debug_settings/debug_settings_manager.h" #include "shared/source/device/sub_device.h" #include "shared/source/helpers/get_info.h" +#include "shared/source/helpers/hw_info.h" #include "shared/source/helpers/ptr_math.h" #include "shared/source/memory_manager/deferred_deleter.h" #include "shared/source/memory_manager/memory_manager.h" diff --git a/opencl/source/event/event.cpp b/opencl/source/event/event.cpp index c257518913..28c58a349e 100644 --- a/opencl/source/event/event.cpp +++ b/opencl/source/event/event.cpp @@ -14,6 +14,7 @@ #include "shared/source/helpers/aligned_memory.h" #include "shared/source/helpers/flush_stamp.h" #include "shared/source/helpers/get_info.h" +#include "shared/source/helpers/hw_info.h" #include "shared/source/helpers/mt_helpers.h" #include "shared/source/helpers/timestamp_packet.h" #include "shared/source/memory_manager/internal_allocation_storage.h" diff --git a/opencl/source/event/user_event.cpp b/opencl/source/event/user_event.cpp index 5a0b902413..d3e1c9dcce 100644 --- a/opencl/source/event/user_event.cpp +++ b/opencl/source/event/user_event.cpp @@ -8,6 +8,7 @@ #include "user_event.h" #include "shared/source/command_stream/command_stream_receiver.h" +#include "shared/source/command_stream/wait_status.h" #include "shared/source/device/device.h" #include "opencl/source/command_queue/command_queue.h" diff --git a/opencl/source/gtpin/gtpin_callbacks.cpp b/opencl/source/gtpin/gtpin_callbacks.cpp index 94af6df6ea..7db7f8f785 100644 --- a/opencl/source/gtpin/gtpin_callbacks.cpp +++ b/opencl/source/gtpin/gtpin_callbacks.cpp @@ -6,6 +6,7 @@ */ #include "shared/source/command_stream/command_stream_receiver.h" +#include "shared/source/helpers/hw_info.h" #include "shared/source/memory_manager/memory_manager.h" #include "shared/source/memory_manager/surface.h" #include "shared/source/memory_manager/unified_memory_manager.h" diff --git a/opencl/source/kernel/kernel.cpp b/opencl/source/kernel/kernel.cpp index 3865dca370..4d2108e111 100644 --- a/opencl/source/kernel/kernel.cpp +++ b/opencl/source/kernel/kernel.cpp @@ -22,6 +22,7 @@ #include "shared/source/helpers/debug_helpers.h" #include "shared/source/helpers/get_info.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/ptr_math.h" #include "shared/source/helpers/surface_format_info.h" diff --git a/opencl/source/mem_obj/buffer.cpp b/opencl/source/mem_obj/buffer.cpp index 29063a2a5e..d1d16fdfb7 100644 --- a/opencl/source/mem_obj/buffer.cpp +++ b/opencl/source/mem_obj/buffer.cpp @@ -16,6 +16,7 @@ #include "shared/source/helpers/aligned_memory.h" #include "shared/source/helpers/blit_helper.h" #include "shared/source/helpers/gfx_core_helper.h" +#include "shared/source/helpers/hw_info.h" #include "shared/source/helpers/local_memory_access_modes.h" #include "shared/source/helpers/memory_properties_helpers.h" #include "shared/source/memory_manager/allocation_properties.h" diff --git a/opencl/source/platform/platform.cpp b/opencl/source/platform/platform.cpp index 7355ded8a6..02cc041e98 100644 --- a/opencl/source/platform/platform.cpp +++ b/opencl/source/platform/platform.cpp @@ -16,6 +16,7 @@ #include "shared/source/execution_environment/root_device_environment.h" #include "shared/source/helpers/debug_helpers.h" #include "shared/source/helpers/get_info.h" +#include "shared/source/helpers/hw_info.h" #include "shared/source/source_level_debugger/source_level_debugger.h" #include "opencl/source/api/api.h" diff --git a/opencl/source/program/create.inl b/opencl/source/program/create.inl index 28bab2219a..89770412ff 100644 --- a/opencl/source/program/create.inl +++ b/opencl/source/program/create.inl @@ -7,6 +7,7 @@ #include "shared/source/ail/ail_configuration.h" #include "shared/source/device/device.h" +#include "shared/source/helpers/hw_info.h" #include "shared/source/helpers/string_helpers.h" #include "opencl/source/cl_device/cl_device.h" diff --git a/opencl/source/program/process_device_binary.cpp b/opencl/source/program/process_device_binary.cpp index 30946ea259..3ed54f08f7 100644 --- a/opencl/source/program/process_device_binary.cpp +++ b/opencl/source/program/process_device_binary.cpp @@ -12,6 +12,7 @@ #include "shared/source/execution_environment/execution_environment.h" #include "shared/source/helpers/aligned_memory.h" #include "shared/source/helpers/debug_helpers.h" +#include "shared/source/helpers/hw_info.h" #include "shared/source/helpers/ptr_math.h" #include "shared/source/helpers/string.h" #include "shared/source/memory_manager/memory_manager.h" diff --git a/opencl/source/sharings/d3d/d3d_texture.cpp b/opencl/source/sharings/d3d/d3d_texture.cpp index 49b5f8227a..4e0d517c9a 100644 --- a/opencl/source/sharings/d3d/d3d_texture.cpp +++ b/opencl/source/sharings/d3d/d3d_texture.cpp @@ -13,6 +13,7 @@ #include "shared/source/gmm_helper/resource_info.h" #include "shared/source/helpers/get_info.h" #include "shared/source/helpers/gfx_core_helper.h" +#include "shared/source/helpers/hw_info.h" #include "shared/source/memory_manager/allocation_properties.h" #include "shared/source/memory_manager/memory_manager.h" #include "shared/source/os_interface/hw_info_config.h" diff --git a/opencl/source/sharings/unified/unified_image.cpp b/opencl/source/sharings/unified/unified_image.cpp index 4c87a4e5a1..532fa347f9 100644 --- a/opencl/source/sharings/unified/unified_image.cpp +++ b/opencl/source/sharings/unified/unified_image.cpp @@ -12,6 +12,7 @@ #include "shared/source/gmm_helper/resource_info.h" #include "shared/source/helpers/get_info.h" #include "shared/source/helpers/gfx_core_helper.h" +#include "shared/source/helpers/hw_info.h" #include "shared/source/memory_manager/graphics_allocation.h" #include "shared/source/memory_manager/memory_manager.h" #include "shared/source/os_interface/hw_info_config.h" diff --git a/opencl/test/unit_test/context/get_supported_image_formats_tests.cpp b/opencl/test/unit_test/context/get_supported_image_formats_tests.cpp index cc10c6a27b..330460a393 100644 --- a/opencl/test/unit_test/context/get_supported_image_formats_tests.cpp +++ b/opencl/test/unit_test/context/get_supported_image_formats_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/helpers/hw_info.h" #include "shared/test/common/mocks/mock_device.h" #include "opencl/source/helpers/surface_formats.h" diff --git a/opencl/test/unit_test/device/get_device_name_tests.cpp b/opencl/test/unit_test/device/get_device_name_tests.cpp index 165033a000..5deac0330a 100644 --- a/opencl/test/unit_test/device/get_device_name_tests.cpp +++ b/opencl/test/unit_test/device/get_device_name_tests.cpp @@ -5,6 +5,7 @@ * */ +#include "shared/source/helpers/hw_info.h" #include "shared/test/common/helpers/default_hw_info.h" #include "shared/test/common/mocks/mock_device.h" diff --git a/opencl/test/unit_test/fixtures/device_instrumentation_fixture.cpp b/opencl/test/unit_test/fixtures/device_instrumentation_fixture.cpp index 119d625e2c..c2c16bfbb0 100644 --- a/opencl/test/unit_test/fixtures/device_instrumentation_fixture.cpp +++ b/opencl/test/unit_test/fixtures/device_instrumentation_fixture.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 "opencl/test/unit_test/fixtures/device_instrumentation_fixture.h" +#include "shared/source/helpers/hw_info.h" #include "shared/test/common/helpers/execution_environment_helper.h" #include "shared/test/common/mocks/mock_device.h" diff --git a/opencl/test/unit_test/helpers/cl_memory_properties_helpers_tests.cpp b/opencl/test/unit_test/helpers/cl_memory_properties_helpers_tests.cpp index aaf3b55aa2..ae3e5c5003 100644 --- a/opencl/test/unit_test/helpers/cl_memory_properties_helpers_tests.cpp +++ b/opencl/test/unit_test/helpers/cl_memory_properties_helpers_tests.cpp @@ -5,6 +5,7 @@ * */ +#include "shared/source/helpers/hw_info.h" #include "shared/source/helpers/memory_properties_helpers.h" #include "shared/source/memory_manager/allocation_properties.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" diff --git a/opencl/test/unit_test/mem_obj/create_image_in_local_memory_tests.cpp b/opencl/test/unit_test/mem_obj/create_image_in_local_memory_tests.cpp index 3140fa513a..3300251359 100644 --- a/opencl/test/unit_test/mem_obj/create_image_in_local_memory_tests.cpp +++ b/opencl/test/unit_test/mem_obj/create_image_in_local_memory_tests.cpp @@ -7,6 +7,7 @@ #include "shared/source/gmm_helper/gmm.h" #include "shared/source/gmm_helper/gmm_helper.h" +#include "shared/source/helpers/hw_info.h" #include "shared/source/memory_manager/gfx_partition.h" #include "shared/source/memory_manager/memory_pool.h" #include "shared/test/common/mocks/mock_device.h" diff --git a/opencl/test/unit_test/memory_manager/cl_memory_manager_allocate_in_preferred_pool_tests.cpp b/opencl/test/unit_test/memory_manager/cl_memory_manager_allocate_in_preferred_pool_tests.cpp index a479a9bc5f..444071fd22 100644 --- a/opencl/test/unit_test/memory_manager/cl_memory_manager_allocate_in_preferred_pool_tests.cpp +++ b/opencl/test/unit_test/memory_manager/cl_memory_manager_allocate_in_preferred_pool_tests.cpp @@ -7,6 +7,7 @@ #include "shared/source/execution_environment/execution_environment.h" #include "shared/source/gmm_helper/gmm_helper.h" +#include "shared/source/helpers/hw_info.h" #include "shared/source/memory_manager/gfx_partition.h" #include "shared/test/common/mocks/mock_gmm.h" #include "shared/test/common/mocks/mock_memory_manager.h" diff --git a/opencl/test/unit_test/mocks/mock_cl_device.cpp b/opencl/test/unit_test/mocks/mock_cl_device.cpp index 61254f8d0b..c8fe1900b7 100644 --- a/opencl/test/unit_test/mocks/mock_cl_device.cpp +++ b/opencl/test/unit_test/mocks/mock_cl_device.cpp @@ -7,6 +7,7 @@ #include "opencl/test/unit_test/mocks/mock_cl_device.h" +#include "shared/source/helpers/hw_info.h" #include "shared/test/common/mocks/mock_device.h" #include "opencl/test/unit_test/mocks/mock_cl_execution_environment.h" diff --git a/opencl/test/unit_test/mocks/mock_program.cpp b/opencl/test/unit_test/mocks/mock_program.cpp index 819e6d3c2e..541f8493cb 100644 --- a/opencl/test/unit_test/mocks/mock_program.cpp +++ b/opencl/test/unit_test/mocks/mock_program.cpp @@ -11,6 +11,7 @@ #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" 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 9d54c896d4..e13f867ccf 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 @@ -6,6 +6,7 @@ */ #include "shared/source/gmm_helper/gmm.h" +#include "shared/source/os_interface/product_helper_hw.h" #include "shared/test/common/helpers/raii_hw_info_config.h" #include "shared/test/common/mocks/mock_gmm_resource_info.h" diff --git a/shared/source/built_ins/built_ins_storage.cpp b/shared/source/built_ins/built_ins_storage.cpp index 62646ed86a..6cb48a7200 100644 --- a/shared/source/built_ins/built_ins_storage.cpp +++ b/shared/source/built_ins/built_ins_storage.cpp @@ -11,6 +11,7 @@ #include "shared/source/execution_environment/root_device_environment.h" #include "shared/source/helpers/api_specific_config.h" #include "shared/source/helpers/gfx_core_helper.h" +#include "shared/source/helpers/hw_info.h" #include "os_inc.h" diff --git a/shared/source/command_container/cmdcontainer.cpp b/shared/source/command_container/cmdcontainer.cpp index e5ca3545bb..1448f5401e 100644 --- a/shared/source/command_container/cmdcontainer.cpp +++ b/shared/source/command_container/cmdcontainer.cpp @@ -15,6 +15,7 @@ #include "shared/source/helpers/debug_helpers.h" #include "shared/source/helpers/gfx_core_helper.h" #include "shared/source/helpers/heap_helper.h" +#include "shared/source/helpers/hw_info.h" #include "shared/source/helpers/string.h" #include "shared/source/indirect_heap/indirect_heap.h" #include "shared/source/memory_manager/allocation_properties.h" diff --git a/shared/source/command_container/command_encoder.inl b/shared/source/command_container/command_encoder.inl index e45fa58f3f..0b20fec635 100644 --- a/shared/source/command_container/command_encoder.inl +++ b/shared/source/command_container/command_encoder.inl @@ -7,7 +7,6 @@ #pragma once #include "shared/source/command_container/command_encoder.h" -#include "shared/source/command_container/encode_surface_state.h" #include "shared/source/command_stream/linear_stream.h" #include "shared/source/debugger/debugger_l0.h" #include "shared/source/device/device.h" diff --git a/shared/source/command_stream/command_stream_receiver_hw_base.inl b/shared/source/command_stream/command_stream_receiver_hw_base.inl index b83723349f..f908d25ef4 100644 --- a/shared/source/command_stream/command_stream_receiver_hw_base.inl +++ b/shared/source/command_stream/command_stream_receiver_hw_base.inl @@ -32,6 +32,7 @@ #include "shared/source/helpers/flat_batch_buffer_helper_hw.h" #include "shared/source/helpers/flush_stamp.h" #include "shared/source/helpers/gfx_core_helper.h" +#include "shared/source/helpers/hw_info.h" #include "shared/source/helpers/logical_state_helper.h" #include "shared/source/helpers/pause_on_gpu_properties.h" #include "shared/source/helpers/preamble.h" diff --git a/shared/source/command_stream/preemption.cpp b/shared/source/command_stream/preemption.cpp index c6599c98cf..6f8d7e28ad 100644 --- a/shared/source/command_stream/preemption.cpp +++ b/shared/source/command_stream/preemption.cpp @@ -12,6 +12,7 @@ #include "shared/source/debug_settings/debug_settings_manager.h" #include "shared/source/device/device.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/kernel/kernel_descriptor.h" diff --git a/shared/source/device/device.h b/shared/source/device/device.h index c299948bd7..b2b394a11f 100644 --- a/shared/source/device/device.h +++ b/shared/source/device/device.h @@ -15,6 +15,8 @@ #include "shared/source/os_interface/performance_counters.h" #include "shared/source/utilities/reference_tracked_object.h" +#include + namespace NEO { class BindlessHeapsHelper; class BuiltIns; diff --git a/shared/source/device/device_caps.cpp b/shared/source/device/device_caps.cpp index 187c0c806d..a68b8b8e1a 100644 --- a/shared/source/device/device_caps.cpp +++ b/shared/source/device/device_caps.cpp @@ -16,6 +16,7 @@ #include "shared/source/helpers/api_specific_config.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/memory_manager/memory_manager.h" #include "shared/source/os_interface/hw_info_config.h" #include "shared/source/os_interface/os_interface.h" diff --git a/shared/source/device/root_device.cpp b/shared/source/device/root_device.cpp index 790dc89a3b..d22bfcf243 100644 --- a/shared/source/device/root_device.cpp +++ b/shared/source/device/root_device.cpp @@ -15,6 +15,7 @@ #include "shared/source/execution_environment/root_device_environment.h" #include "shared/source/helpers/api_specific_config.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/utilities/software_tags_manager.h" diff --git a/shared/source/dll/linux/debugger_l0_dll_linux.cpp b/shared/source/dll/linux/debugger_l0_dll_linux.cpp index e98e1323d5..7a395ba9b9 100644 --- a/shared/source/dll/linux/debugger_l0_dll_linux.cpp +++ b/shared/source/dll/linux/debugger_l0_dll_linux.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/debugger/debugger_l0.h" #include "shared/source/device/device.h" #include "shared/source/execution_environment/root_device_environment.h" +#include "shared/source/helpers/hw_info.h" #include "shared/source/os_interface/linux/drm_neo.h" #include "shared/source/os_interface/os_interface.h" diff --git a/shared/source/dll/windows/debugger_l0_windows.cpp b/shared/source/dll/windows/debugger_l0_windows.cpp index 92dba47ddd..9c40febedd 100644 --- a/shared/source/dll/windows/debugger_l0_windows.cpp +++ b/shared/source/dll/windows/debugger_l0_windows.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/debugger/debugger_l0.h" #include "shared/source/device/device.h" #include "shared/source/execution_environment/root_device_environment.h" +#include "shared/source/helpers/hw_info.h" namespace NEO { std::unique_ptr DebuggerL0::create(NEO::Device *device) { diff --git a/shared/source/gen11/enable_hw_info_config_ehl.cpp b/shared/source/gen11/enable_hw_info_config_ehl.cpp index 6b1a89e422..2e638432af 100644 --- a/shared/source/gen11/enable_hw_info_config_ehl.cpp +++ b/shared/source/gen11/enable_hw_info_config_ehl.cpp @@ -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/gen11/hw_cmds_ehl.h" #include "shared/source/os_interface/hw_info_config.h" +#include "shared/source/os_interface/product_helper_hw.h" namespace NEO { diff --git a/shared/source/gen11/enable_hw_info_config_icllp.cpp b/shared/source/gen11/enable_hw_info_config_icllp.cpp index 3e5a357f4b..1e54cdaf36 100644 --- a/shared/source/gen11/enable_hw_info_config_icllp.cpp +++ b/shared/source/gen11/enable_hw_info_config_icllp.cpp @@ -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/gen11/hw_cmds_icllp.h" #include "shared/source/os_interface/hw_info_config.h" +#include "shared/source/os_interface/product_helper_hw.h" namespace NEO { diff --git a/shared/source/gen11/enable_hw_info_config_lkf.cpp b/shared/source/gen11/enable_hw_info_config_lkf.cpp index 602a70b854..3956e46b40 100644 --- a/shared/source/gen11/enable_hw_info_config_lkf.cpp +++ b/shared/source/gen11/enable_hw_info_config_lkf.cpp @@ -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/gen11/hw_cmds_lkf.h" #include "shared/source/os_interface/hw_info_config.h" +#include "shared/source/os_interface/product_helper_hw.h" namespace NEO { diff --git a/shared/source/gen12lp/enable_hw_info_config_adln.cpp b/shared/source/gen12lp/enable_hw_info_config_adln.cpp index 68e2f4a456..2b6d0064f8 100644 --- a/shared/source/gen12lp/enable_hw_info_config_adln.cpp +++ b/shared/source/gen12lp/enable_hw_info_config_adln.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/gen12lp/hw_cmds_adln.h" #include "shared/source/os_interface/hw_info_config.h" +#include "shared/source/os_interface/product_helper_hw.h" namespace NEO { diff --git a/shared/source/gen12lp/enable_hw_info_config_adlp.cpp b/shared/source/gen12lp/enable_hw_info_config_adlp.cpp index ca68b362ad..195ac0be6e 100644 --- a/shared/source/gen12lp/enable_hw_info_config_adlp.cpp +++ b/shared/source/gen12lp/enable_hw_info_config_adlp.cpp @@ -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/gen12lp/hw_cmds_adlp.h" #include "shared/source/os_interface/hw_info_config.h" +#include "shared/source/os_interface/product_helper_hw.h" namespace NEO { diff --git a/shared/source/gen12lp/enable_hw_info_config_adls.cpp b/shared/source/gen12lp/enable_hw_info_config_adls.cpp index 9590ad3d07..31ffce2c95 100644 --- a/shared/source/gen12lp/enable_hw_info_config_adls.cpp +++ b/shared/source/gen12lp/enable_hw_info_config_adls.cpp @@ -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/gen12lp/hw_cmds_adls.h" #include "shared/source/os_interface/hw_info_config.h" +#include "shared/source/os_interface/product_helper_hw.h" namespace NEO { diff --git a/shared/source/gen12lp/enable_hw_info_config_dg1.cpp b/shared/source/gen12lp/enable_hw_info_config_dg1.cpp index c829dcbc2a..758b9d831e 100644 --- a/shared/source/gen12lp/enable_hw_info_config_dg1.cpp +++ b/shared/source/gen12lp/enable_hw_info_config_dg1.cpp @@ -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/gen12lp/hw_cmds_dg1.h" #include "shared/source/os_interface/hw_info_config.h" +#include "shared/source/os_interface/product_helper_hw.h" namespace NEO { diff --git a/shared/source/gen12lp/enable_hw_info_config_rkl.cpp b/shared/source/gen12lp/enable_hw_info_config_rkl.cpp index 5fdd686d5f..0b26f67fd0 100644 --- a/shared/source/gen12lp/enable_hw_info_config_rkl.cpp +++ b/shared/source/gen12lp/enable_hw_info_config_rkl.cpp @@ -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/gen12lp/hw_cmds_rkl.h" #include "shared/source/os_interface/hw_info_config.h" +#include "shared/source/os_interface/product_helper_hw.h" namespace NEO { diff --git a/shared/source/gen12lp/enable_hw_info_config_tgllp.cpp b/shared/source/gen12lp/enable_hw_info_config_tgllp.cpp index dec66b5bfd..faa02315cc 100644 --- a/shared/source/gen12lp/enable_hw_info_config_tgllp.cpp +++ b/shared/source/gen12lp/enable_hw_info_config_tgllp.cpp @@ -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/gen12lp/hw_cmds_tgllp.h" #include "shared/source/os_interface/hw_info_config.h" +#include "shared/source/os_interface/product_helper_hw.h" namespace NEO { diff --git a/shared/source/gen8/enable_hw_info_config_bdw.cpp b/shared/source/gen8/enable_hw_info_config_bdw.cpp index c33ffae6b6..1de61ef6fd 100644 --- a/shared/source/gen8/enable_hw_info_config_bdw.cpp +++ b/shared/source/gen8/enable_hw_info_config_bdw.cpp @@ -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/gen8/hw_cmds_bdw.h" #include "shared/source/os_interface/hw_info_config.h" +#include "shared/source/os_interface/product_helper_hw.h" namespace NEO { diff --git a/shared/source/gen9/enable_hw_info_config_bxt.cpp b/shared/source/gen9/enable_hw_info_config_bxt.cpp index 81eaad07a1..7e2a7790ce 100644 --- a/shared/source/gen9/enable_hw_info_config_bxt.cpp +++ b/shared/source/gen9/enable_hw_info_config_bxt.cpp @@ -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/gen9/hw_cmds_bxt.h" #include "shared/source/os_interface/hw_info_config.h" +#include "shared/source/os_interface/product_helper_hw.h" namespace NEO { diff --git a/shared/source/gen9/enable_hw_info_config_cfl.cpp b/shared/source/gen9/enable_hw_info_config_cfl.cpp index b716bfe36f..8cdd1026bf 100644 --- a/shared/source/gen9/enable_hw_info_config_cfl.cpp +++ b/shared/source/gen9/enable_hw_info_config_cfl.cpp @@ -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/gen9/hw_cmds_cfl.h" #include "shared/source/os_interface/hw_info_config.h" +#include "shared/source/os_interface/product_helper_hw.h" namespace NEO { diff --git a/shared/source/gen9/enable_hw_info_config_glk.cpp b/shared/source/gen9/enable_hw_info_config_glk.cpp index df54d8d13e..a4c498226c 100644 --- a/shared/source/gen9/enable_hw_info_config_glk.cpp +++ b/shared/source/gen9/enable_hw_info_config_glk.cpp @@ -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/gen9/hw_cmds_glk.h" #include "shared/source/os_interface/hw_info_config.h" +#include "shared/source/os_interface/product_helper_hw.h" namespace NEO { diff --git a/shared/source/gen9/enable_hw_info_config_kbl.cpp b/shared/source/gen9/enable_hw_info_config_kbl.cpp index 1b67a14dc6..b7d00a1283 100644 --- a/shared/source/gen9/enable_hw_info_config_kbl.cpp +++ b/shared/source/gen9/enable_hw_info_config_kbl.cpp @@ -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/gen9/hw_cmds_kbl.h" #include "shared/source/os_interface/hw_info_config.h" +#include "shared/source/os_interface/product_helper_hw.h" namespace NEO { diff --git a/shared/source/gen9/enable_hw_info_config_skl.cpp b/shared/source/gen9/enable_hw_info_config_skl.cpp index bb4f28ff9c..5384694eb7 100644 --- a/shared/source/gen9/enable_hw_info_config_skl.cpp +++ b/shared/source/gen9/enable_hw_info_config_skl.cpp @@ -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/gen9/hw_cmds_skl.h" #include "shared/source/os_interface/hw_info_config.h" +#include "shared/source/os_interface/product_helper_hw.h" namespace NEO { diff --git a/shared/source/helpers/blit_helper.cpp b/shared/source/helpers/blit_helper.cpp index fa78be8885..61f19a4c49 100644 --- a/shared/source/helpers/blit_helper.cpp +++ b/shared/source/helpers/blit_helper.cpp @@ -11,6 +11,7 @@ #include "shared/source/device/device.h" #include "shared/source/helpers/blit_properties.h" #include "shared/source/helpers/gfx_core_helper.h" +#include "shared/source/helpers/hw_info.h" #include "shared/source/memory_manager/graphics_allocation.h" namespace NEO { diff --git a/shared/source/helpers/engine_node_helper.cpp b/shared/source/helpers/engine_node_helper.cpp index 4f8ccf4723..b68c597132 100644 --- a/shared/source/helpers/engine_node_helper.cpp +++ b/shared/source/helpers/engine_node_helper.cpp @@ -11,6 +11,7 @@ #include "shared/source/device/device.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" namespace NEO::EngineHelpers { diff --git a/shared/source/helpers/ray_tracing_helper.h b/shared/source/helpers/ray_tracing_helper.h index 0284683698..a0539d56e7 100644 --- a/shared/source/helpers/ray_tracing_helper.h +++ b/shared/source/helpers/ray_tracing_helper.h @@ -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/device/device.h" #include "shared/source/helpers/aligned_memory.h" #include "shared/source/helpers/basic_math.h" +#include "shared/source/helpers/hw_info.h" #include "shared/source/helpers/non_copyable_or_moveable.h" #include "ocl_igc_shared/raytracing/ocl_raytracing_structures.h" diff --git a/shared/source/os_interface/CMakeLists.txt b/shared/source/os_interface/CMakeLists.txt index 6f8124dd89..e96b9027af 100644 --- a/shared/source/os_interface/CMakeLists.txt +++ b/shared/source/os_interface/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright (C) 2019-2022 Intel Corporation +# Copyright (C) 2019-2023 Intel Corporation # # SPDX-License-Identifier: MIT # @@ -41,6 +41,7 @@ set(NEO_CORE_OS_INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/performance_counters.cpp ${CMAKE_CURRENT_SOURCE_DIR}/performance_counters.h ${CMAKE_CURRENT_SOURCE_DIR}/print.h + ${CMAKE_CURRENT_SOURCE_DIR}/product_helper_hw.h ${CMAKE_CURRENT_SOURCE_DIR}/os_inc_base.h ${CMAKE_CURRENT_SOURCE_DIR}/sys_calls_common.h ) diff --git a/shared/source/os_interface/hw_info_config.h b/shared/source/os_interface/hw_info_config.h index 3c50d4f7c0..f5c150221c 100644 --- a/shared/source/os_interface/hw_info_config.h +++ b/shared/source/os_interface/hw_info_config.h @@ -6,11 +6,11 @@ */ #pragma once - -#include "shared/source/helpers/hw_info.h" - +#include #include #include +#include +#include namespace AOT { enum PRODUCT_CONFIG : uint32_t; @@ -209,174 +209,4 @@ class ProductHelper { uint32_t threadsPerEu = 0u; }; -template -class ProductHelperHw : public ProductHelper { - public: - static std::unique_ptr create() { - auto productHelper = std::unique_ptr(new ProductHelperHw()); - - using GfxProduct = typename HwMapper::GfxProduct; - productHelper->threadsPerEu = GfxProduct::threadsPerEu; - - return productHelper; - } - - int configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) const override; - void adjustPlatformForProductFamily(HardwareInfo *hwInfo) override; - void adjustSamplerState(void *sampler, const HardwareInfo &hwInfo) const override; - void disableRcsExposure(HardwareInfo *hwInfo) const override; - uint64_t getHostMemCapabilities(const HardwareInfo *hwInfo) const override; - uint64_t getDeviceMemCapabilities() const override; - uint64_t getSingleDeviceSharedMemCapabilities() const override; - uint64_t getCrossDeviceSharedMemCapabilities() const override; - uint64_t getSharedSystemMemCapabilities(const HardwareInfo *hwInfo) const override; - void getKernelExtendedProperties(uint32_t *fp16, uint32_t *fp32, uint32_t *fp64) const override; - std::vector getKernelSupportedThreadArbitrationPolicies() const override; - uint32_t getDeviceMemoryMaxClkRate(const HardwareInfo &hwInfo, const OSInterface *osIface, uint32_t subDeviceIndex) const override; - uint64_t getDeviceMemoryPhysicalSizeInBytes(const OSInterface *osIface, uint32_t subDeviceIndex) const override; - uint64_t getDeviceMemoryMaxBandWidthInBytesPerSecond(const HardwareInfo &hwInfo, const OSInterface *osIface, uint32_t subDeviceIndex) const override; - bool isAdditionalStateBaseAddressWARequired(const HardwareInfo &hwInfo) const override; - bool isMaxThreadsForWorkgroupWARequired(const HardwareInfo &hwInfo) const override; - uint32_t getMaxThreadsForWorkgroupInDSSOrSS(const HardwareInfo &hwInfo, uint32_t maxNumEUsPerSubSlice, uint32_t maxNumEUsPerDualSubSlice) const override; - uint32_t getMaxThreadsForWorkgroup(const HardwareInfo &hwInfo, uint32_t maxNumEUsPerSubSlice) const override; - void setForceNonCoherent(void *const commandPtr, const StateComputeModeProperties &properties) const override; - void updateScmCommand(void *const commandPtr, const StateComputeModeProperties &properties) const override; - void updateIddCommand(void *const commandPtr, uint32_t numGrf, int32_t threadArbitrationPolicy) const override; - bool obtainBlitterPreference(const HardwareInfo &hwInfo) const override; - bool isBlitterFullySupported(const HardwareInfo &hwInfo) const override; - bool isPageTableManagerSupported(const HardwareInfo &hwInfo) const override; - bool overrideGfxPartitionLayoutForWsl() const override; - uint32_t getHwRevIdFromStepping(uint32_t stepping, const HardwareInfo &hwInfo) const override; - AOT::PRODUCT_CONFIG getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const override; - uint32_t getSteppingFromHwRevId(const HardwareInfo &hwInfo) const override; - uint32_t getAubStreamSteppingFromHwRevId(const HardwareInfo &hwInfo) const override; - std::optional getAubStreamProductFamily() const override; - bool isDefaultEngineTypeAdjustmentRequired(const HardwareInfo &hwInfo) const override; - std::string getDeviceMemoryName() const override; - bool isDisableOverdispatchAvailable(const HardwareInfo &hwInfo) const override; - bool allowCompression(const HardwareInfo &hwInfo) const override; - LocalMemoryAccessMode getLocalMemoryAccessMode(const HardwareInfo &hwInfo) const override; - bool isAllocationSizeAdjustmentRequired(const HardwareInfo &hwInfo) const override; - bool isPrefetchDisablingRequired(const HardwareInfo &hwInfo) const override; - bool isNewResidencyModelSupported() const override; - bool isDirectSubmissionSupported(const HardwareInfo &hwInfo) const override; - std::pair isPipeControlPriorToNonPipelinedStateCommandsWARequired(const HardwareInfo &hwInfo, bool isRcs) const override; - bool heapInLocalMem(const HardwareInfo &hwInfo) const override; - void setCapabilityCoherencyFlag(const HardwareInfo &hwInfo, bool &coherencyFlag) override; - bool isAdditionalMediaSamplerProgrammingRequired() const override; - bool isInitialFlagsProgrammingRequired() const override; - bool isReturnedCmdSizeForMediaSamplerAdjustmentRequired() const override; - bool extraParametersInvalid(const HardwareInfo &hwInfo) const override; - bool pipeControlWARequired(const HardwareInfo &hwInfo) const override; - bool imagePitchAlignmentWARequired(const HardwareInfo &hwInfo) const override; - bool isForceEmuInt32DivRemSPWARequired(const HardwareInfo &hwInfo) const override; - bool is3DPipelineSelectWARequired() const override; - bool isStorageInfoAdjustmentRequired() const override; - bool isBlitterForImagesSupported() const override; - bool isPageFaultSupported() const override; - bool isTile64With3DSurfaceOnBCSSupported(const HardwareInfo &hwInfo) const override; - bool isDcFlushAllowed() const override; - uint32_t computeMaxNeededSubSliceSpace(const HardwareInfo &hwInfo) const override; - bool getUuid(Device *device, std::array &uuid) const override; - bool isFlushTaskAllowed() const override; - bool programAllStateComputeCommandFields() const override; - bool isSystolicModeConfigurable(const HardwareInfo &hwInfo) const override; - bool isComputeDispatchAllWalkerEnableInComputeWalkerRequired(const HardwareInfo &hwInfo) const override; - bool isCopyEngineSelectorEnabled(const HardwareInfo &hwInfo) const override; - bool isGlobalFenceInCommandStreamRequired(const HardwareInfo &hwInfo) const override; - bool isGlobalFenceInDirectSubmissionRequired(const HardwareInfo &hwInfo) const override; - bool isAdjustProgrammableIdPreferredSlmSizeRequired(const HardwareInfo &hwInfo) const override; - uint32_t getThreadEuRatioForScratch(const HardwareInfo &hwInfo) const override; - size_t getSvmCpuAlignment() const override; - bool isComputeDispatchAllWalkerEnableInCfeStateRequired(const HardwareInfo &hwInfo) const override; - bool isVmBindPatIndexProgrammingSupported() const override; - bool isBFloat16ConversionSupported(const HardwareInfo &hwInfo) const override; - bool isMatrixMultiplyAccumulateSupported(const HardwareInfo &hwInfo) const override; - bool isIpSamplingSupported(const HardwareInfo &hwInfo) const override; - bool isGrfNumReportedWithScm() const override; - bool isThreadArbitrationPolicyReportedWithScm() const override; - bool isCooperativeEngineSupported(const HardwareInfo &hwInfo) const override; - bool isTimestampWaitSupportedForEvents() const override; - bool isTilePlacementResourceWaRequired(const HardwareInfo &hwInfo) const override; - bool isBlitSplitEnqueueWARequired(const HardwareInfo &hwInfo) const override; - bool isInitDeviceWithFirstSubmissionRequired(const HardwareInfo &hwInfo) const override; - bool allowMemoryPrefetch(const HardwareInfo &hwInfo) const override; - bool isBcsReportWaRequired(const HardwareInfo &hwInfo) const override; - bool isBlitCopyRequiredForLocalMemory(const RootDeviceEnvironment &rootDeviceEnvironment, const GraphicsAllocation &allocation) const override; - bool isImplicitScalingSupported(const HardwareInfo &hwInfo) const override; - bool isCpuCopyNecessary(const void *ptr, MemoryManager *memoryManager) const override; - bool isUnlockingLockedPtrNecessary(const HardwareInfo &hwInfo) const override; - bool isAdjustWalkOrderAvailable(const HardwareInfo &hwInfo) const override; - bool isAssignEngineRoundRobinSupported() const override; - uint32_t getL1CachePolicy(bool isDebuggerActive) const override; - bool isEvictionIfNecessaryFlagSupported() const override; - void adjustNumberOfCcs(HardwareInfo &hwInfo) const override; - bool isPrefetcherDisablingInDirectSubmissionRequired() const override; - bool isStatefulAddressingModeSupported() const override; - bool isPlatformQuerySupported() const override; - bool isNonBlockingGpuSubmissionSupported() const override; - bool isResolveDependenciesByPipeControlsSupported(const HardwareInfo &hwInfo, bool isOOQ) const override; - bool isMidThreadPreemptionDisallowedForRayTracingKernels() const override; - bool isBufferPoolAllocatorSupported() const override; - uint64_t overridePatIndex(AllocationType allocationType, uint64_t patIndex) const override; - bool isTlbFlushRequired() const override; - bool getFrontEndPropertyScratchSizeSupport() const override; - bool getFrontEndPropertyPrivateScratchSizeSupport() const override; - bool getFrontEndPropertyComputeDispatchAllWalkerSupport() const override; - bool getFrontEndPropertyDisableEuFusionSupport() const override; - bool getFrontEndPropertyDisableOverDispatchSupport() const override; - bool getFrontEndPropertySingleSliceDispatchCcsModeSupport() const override; - - bool getScmPropertyThreadArbitrationPolicySupport() const override; - bool getScmPropertyCoherencyRequiredSupport() const override; - bool getScmPropertyZPassAsyncComputeThreadLimitSupport() const override; - bool getScmPropertyPixelAsyncComputeThreadLimitSupport() const override; - bool getScmPropertyLargeGrfModeSupport() const override; - bool getScmPropertyDevicePreemptionModeSupport() const override; - - bool getStateBaseAddressPropertyGlobalAtomicsSupport() const override; - bool getStateBaseAddressPropertyStatelessMocsSupport() const override; - bool getStateBaseAddressPropertyBindingTablePoolBaseAddressSupport() const override; - - bool getPreemptionDbgPropertyPreemptionModeSupport() const override; - bool getPreemptionDbgPropertyStateSipSupport() const override; - bool getPreemptionDbgPropertyCsrSurfaceSupport() const override; - - bool getPipelineSelectPropertyModeSelectedSupport() const override; - bool getPipelineSelectPropertyMediaSamplerDopClockGateSupport() const override; - bool getPipelineSelectPropertySystolicModeSupport() const override; - - void fillScmPropertiesSupportStructure(StateComputeModePropertiesSupport &propertiesSupport) const override; - void fillFrontEndPropertiesSupportStructure(FrontEndPropertiesSupport &propertiesSupport, const HardwareInfo &hwInfo) const override; - void fillPipelineSelectPropertiesSupportStructure(PipelineSelectPropertiesSupport &propertiesSupport, const HardwareInfo &hwInfo) const override; - void fillStateBaseAddressPropertiesSupportStructure(StateBaseAddressPropertiesSupport &propertiesSupport) const override; - uint32_t getDefaultRevisionId() const override; - - bool isMultiContextResourceDeferDeletionSupported() const override; - - ~ProductHelperHw() override = default; - - protected: - ProductHelperHw() = default; - - void enableCompression(HardwareInfo *hwInfo) const; - void enableBlitterOperationsSupport(HardwareInfo *hwInfo) const; - bool getConcurrentAccessMemCapabilitiesSupported(UsmAccessCapabilities capability) const; - uint64_t getHostMemCapabilitiesValue() const; - bool getHostMemCapabilitiesSupported(const HardwareInfo *hwInfo) const; - LocalMemoryAccessMode getDefaultLocalMemoryAccessMode(const HardwareInfo &hwInfo) const override; - void fillScmPropertiesSupportStructureBase(StateComputeModePropertiesSupport &propertiesSupport) const override; -}; - -template -struct EnableProductProductHelper { - - using GfxProduct = typename HwMapper::GfxProduct; - - EnableProductProductHelper() { - auto productHelperCreateFunction = ProductHelperHw::create; - productHelperFactory[gfxProduct] = productHelperCreateFunction; - } -}; - } // namespace NEO diff --git a/shared/source/os_interface/hw_info_config.inl b/shared/source/os_interface/hw_info_config.inl index 86f4149f62..0eeabe6ac9 100644 --- a/shared/source/os_interface/hw_info_config.inl +++ b/shared/source/os_interface/hw_info_config.inl @@ -18,6 +18,7 @@ #include "shared/source/memory_manager/graphics_allocation.h" #include "shared/source/memory_manager/memory_manager.h" #include "shared/source/os_interface/hw_info_config.h" +#include "shared/source/os_interface/product_helper_hw.h" #include "shared/source/unified_memory/usm_memory_support.h" #include diff --git a/shared/source/os_interface/linux/drm_memory_operations_handler_bind.cpp b/shared/source/os_interface/linux/drm_memory_operations_handler_bind.cpp index 51099d1847..13b59d739c 100644 --- a/shared/source/os_interface/linux/drm_memory_operations_handler_bind.cpp +++ b/shared/source/os_interface/linux/drm_memory_operations_handler_bind.cpp @@ -8,6 +8,7 @@ #include "shared/source/os_interface/linux/drm_memory_operations_handler_bind.h" #include "shared/source/command_stream/command_stream_receiver.h" +#include "shared/source/command_stream/wait_status.h" #include "shared/source/debug_settings/debug_settings_manager.h" #include "shared/source/device/device.h" #include "shared/source/execution_environment/execution_environment.h" diff --git a/shared/source/os_interface/product_helper_hw.h b/shared/source/os_interface/product_helper_hw.h new file mode 100644 index 0000000000..b35f988d0f --- /dev/null +++ b/shared/source/os_interface/product_helper_hw.h @@ -0,0 +1,184 @@ +/* + * Copyright (C) 2023 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +#pragma once +#include "shared/source/helpers/hw_info.h" +#include "shared/source/os_interface/hw_info_config.h" + +namespace NEO { + +template +class ProductHelperHw : public ProductHelper { + public: + static std::unique_ptr create() { + auto productHelper = std::unique_ptr(new ProductHelperHw()); + + using GfxProduct = typename HwMapper::GfxProduct; + productHelper->threadsPerEu = GfxProduct::threadsPerEu; + + return productHelper; + } + + int configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) const override; + void adjustPlatformForProductFamily(HardwareInfo *hwInfo) override; + void adjustSamplerState(void *sampler, const HardwareInfo &hwInfo) const override; + void disableRcsExposure(HardwareInfo *hwInfo) const override; + uint64_t getHostMemCapabilities(const HardwareInfo *hwInfo) const override; + uint64_t getDeviceMemCapabilities() const override; + uint64_t getSingleDeviceSharedMemCapabilities() const override; + uint64_t getCrossDeviceSharedMemCapabilities() const override; + uint64_t getSharedSystemMemCapabilities(const HardwareInfo *hwInfo) const override; + void getKernelExtendedProperties(uint32_t *fp16, uint32_t *fp32, uint32_t *fp64) const override; + std::vector getKernelSupportedThreadArbitrationPolicies() const override; + uint32_t getDeviceMemoryMaxClkRate(const HardwareInfo &hwInfo, const OSInterface *osIface, uint32_t subDeviceIndex) const override; + uint64_t getDeviceMemoryPhysicalSizeInBytes(const OSInterface *osIface, uint32_t subDeviceIndex) const override; + uint64_t getDeviceMemoryMaxBandWidthInBytesPerSecond(const HardwareInfo &hwInfo, const OSInterface *osIface, uint32_t subDeviceIndex) const override; + bool isAdditionalStateBaseAddressWARequired(const HardwareInfo &hwInfo) const override; + bool isMaxThreadsForWorkgroupWARequired(const HardwareInfo &hwInfo) const override; + uint32_t getMaxThreadsForWorkgroupInDSSOrSS(const HardwareInfo &hwInfo, uint32_t maxNumEUsPerSubSlice, uint32_t maxNumEUsPerDualSubSlice) const override; + uint32_t getMaxThreadsForWorkgroup(const HardwareInfo &hwInfo, uint32_t maxNumEUsPerSubSlice) const override; + void setForceNonCoherent(void *const commandPtr, const StateComputeModeProperties &properties) const override; + void updateScmCommand(void *const commandPtr, const StateComputeModeProperties &properties) const override; + void updateIddCommand(void *const commandPtr, uint32_t numGrf, int32_t threadArbitrationPolicy) const override; + bool obtainBlitterPreference(const HardwareInfo &hwInfo) const override; + bool isBlitterFullySupported(const HardwareInfo &hwInfo) const override; + bool isPageTableManagerSupported(const HardwareInfo &hwInfo) const override; + bool overrideGfxPartitionLayoutForWsl() const override; + uint32_t getHwRevIdFromStepping(uint32_t stepping, const HardwareInfo &hwInfo) const override; + AOT::PRODUCT_CONFIG getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const override; + uint32_t getSteppingFromHwRevId(const HardwareInfo &hwInfo) const override; + uint32_t getAubStreamSteppingFromHwRevId(const HardwareInfo &hwInfo) const override; + std::optional getAubStreamProductFamily() const override; + bool isDefaultEngineTypeAdjustmentRequired(const HardwareInfo &hwInfo) const override; + std::string getDeviceMemoryName() const override; + bool isDisableOverdispatchAvailable(const HardwareInfo &hwInfo) const override; + bool allowCompression(const HardwareInfo &hwInfo) const override; + LocalMemoryAccessMode getLocalMemoryAccessMode(const HardwareInfo &hwInfo) const override; + bool isAllocationSizeAdjustmentRequired(const HardwareInfo &hwInfo) const override; + bool isPrefetchDisablingRequired(const HardwareInfo &hwInfo) const override; + bool isNewResidencyModelSupported() const override; + bool isDirectSubmissionSupported(const HardwareInfo &hwInfo) const override; + std::pair isPipeControlPriorToNonPipelinedStateCommandsWARequired(const HardwareInfo &hwInfo, bool isRcs) const override; + bool heapInLocalMem(const HardwareInfo &hwInfo) const override; + void setCapabilityCoherencyFlag(const HardwareInfo &hwInfo, bool &coherencyFlag) override; + bool isAdditionalMediaSamplerProgrammingRequired() const override; + bool isInitialFlagsProgrammingRequired() const override; + bool isReturnedCmdSizeForMediaSamplerAdjustmentRequired() const override; + bool extraParametersInvalid(const HardwareInfo &hwInfo) const override; + bool pipeControlWARequired(const HardwareInfo &hwInfo) const override; + bool imagePitchAlignmentWARequired(const HardwareInfo &hwInfo) const override; + bool isForceEmuInt32DivRemSPWARequired(const HardwareInfo &hwInfo) const override; + bool is3DPipelineSelectWARequired() const override; + bool isStorageInfoAdjustmentRequired() const override; + bool isBlitterForImagesSupported() const override; + bool isPageFaultSupported() const override; + bool isTile64With3DSurfaceOnBCSSupported(const HardwareInfo &hwInfo) const override; + bool isDcFlushAllowed() const override; + uint32_t computeMaxNeededSubSliceSpace(const HardwareInfo &hwInfo) const override; + bool getUuid(Device *device, std::array &uuid) const override; + bool isFlushTaskAllowed() const override; + bool programAllStateComputeCommandFields() const override; + bool isSystolicModeConfigurable(const HardwareInfo &hwInfo) const override; + bool isComputeDispatchAllWalkerEnableInComputeWalkerRequired(const HardwareInfo &hwInfo) const override; + bool isCopyEngineSelectorEnabled(const HardwareInfo &hwInfo) const override; + bool isGlobalFenceInCommandStreamRequired(const HardwareInfo &hwInfo) const override; + bool isGlobalFenceInDirectSubmissionRequired(const HardwareInfo &hwInfo) const override; + bool isAdjustProgrammableIdPreferredSlmSizeRequired(const HardwareInfo &hwInfo) const override; + uint32_t getThreadEuRatioForScratch(const HardwareInfo &hwInfo) const override; + size_t getSvmCpuAlignment() const override; + bool isComputeDispatchAllWalkerEnableInCfeStateRequired(const HardwareInfo &hwInfo) const override; + bool isVmBindPatIndexProgrammingSupported() const override; + bool isBFloat16ConversionSupported(const HardwareInfo &hwInfo) const override; + bool isMatrixMultiplyAccumulateSupported(const HardwareInfo &hwInfo) const override; + bool isIpSamplingSupported(const HardwareInfo &hwInfo) const override; + bool isGrfNumReportedWithScm() const override; + bool isThreadArbitrationPolicyReportedWithScm() const override; + bool isCooperativeEngineSupported(const HardwareInfo &hwInfo) const override; + bool isTimestampWaitSupportedForEvents() const override; + bool isTilePlacementResourceWaRequired(const HardwareInfo &hwInfo) const override; + bool isBlitSplitEnqueueWARequired(const HardwareInfo &hwInfo) const override; + bool isInitDeviceWithFirstSubmissionRequired(const HardwareInfo &hwInfo) const override; + bool allowMemoryPrefetch(const HardwareInfo &hwInfo) const override; + bool isBcsReportWaRequired(const HardwareInfo &hwInfo) const override; + bool isBlitCopyRequiredForLocalMemory(const RootDeviceEnvironment &rootDeviceEnvironment, const GraphicsAllocation &allocation) const override; + bool isImplicitScalingSupported(const HardwareInfo &hwInfo) const override; + bool isCpuCopyNecessary(const void *ptr, MemoryManager *memoryManager) const override; + bool isUnlockingLockedPtrNecessary(const HardwareInfo &hwInfo) const override; + bool isAdjustWalkOrderAvailable(const HardwareInfo &hwInfo) const override; + bool isAssignEngineRoundRobinSupported() const override; + uint32_t getL1CachePolicy(bool isDebuggerActive) const override; + bool isEvictionIfNecessaryFlagSupported() const override; + void adjustNumberOfCcs(HardwareInfo &hwInfo) const override; + bool isPrefetcherDisablingInDirectSubmissionRequired() const override; + bool isStatefulAddressingModeSupported() const override; + bool isPlatformQuerySupported() const override; + bool isNonBlockingGpuSubmissionSupported() const override; + bool isResolveDependenciesByPipeControlsSupported(const HardwareInfo &hwInfo, bool isOOQ) const override; + bool isMidThreadPreemptionDisallowedForRayTracingKernels() const override; + bool isBufferPoolAllocatorSupported() const override; + uint64_t overridePatIndex(AllocationType allocationType, uint64_t patIndex) const override; + bool isTlbFlushRequired() const override; + bool getFrontEndPropertyScratchSizeSupport() const override; + bool getFrontEndPropertyPrivateScratchSizeSupport() const override; + bool getFrontEndPropertyComputeDispatchAllWalkerSupport() const override; + bool getFrontEndPropertyDisableEuFusionSupport() const override; + bool getFrontEndPropertyDisableOverDispatchSupport() const override; + bool getFrontEndPropertySingleSliceDispatchCcsModeSupport() const override; + + bool getScmPropertyThreadArbitrationPolicySupport() const override; + bool getScmPropertyCoherencyRequiredSupport() const override; + bool getScmPropertyZPassAsyncComputeThreadLimitSupport() const override; + bool getScmPropertyPixelAsyncComputeThreadLimitSupport() const override; + bool getScmPropertyLargeGrfModeSupport() const override; + bool getScmPropertyDevicePreemptionModeSupport() const override; + + bool getStateBaseAddressPropertyGlobalAtomicsSupport() const override; + bool getStateBaseAddressPropertyStatelessMocsSupport() const override; + bool getStateBaseAddressPropertyBindingTablePoolBaseAddressSupport() const override; + + bool getPreemptionDbgPropertyPreemptionModeSupport() const override; + bool getPreemptionDbgPropertyStateSipSupport() const override; + bool getPreemptionDbgPropertyCsrSurfaceSupport() const override; + + bool getPipelineSelectPropertyModeSelectedSupport() const override; + bool getPipelineSelectPropertyMediaSamplerDopClockGateSupport() const override; + bool getPipelineSelectPropertySystolicModeSupport() const override; + + void fillScmPropertiesSupportStructure(StateComputeModePropertiesSupport &propertiesSupport) const override; + void fillFrontEndPropertiesSupportStructure(FrontEndPropertiesSupport &propertiesSupport, const HardwareInfo &hwInfo) const override; + void fillPipelineSelectPropertiesSupportStructure(PipelineSelectPropertiesSupport &propertiesSupport, const HardwareInfo &hwInfo) const override; + void fillStateBaseAddressPropertiesSupportStructure(StateBaseAddressPropertiesSupport &propertiesSupport) const override; + uint32_t getDefaultRevisionId() const override; + + bool isMultiContextResourceDeferDeletionSupported() const override; + + ~ProductHelperHw() override = default; + + protected: + ProductHelperHw() = default; + + void enableCompression(HardwareInfo *hwInfo) const; + void enableBlitterOperationsSupport(HardwareInfo *hwInfo) const; + bool getConcurrentAccessMemCapabilitiesSupported(UsmAccessCapabilities capability) const; + uint64_t getHostMemCapabilitiesValue() const; + bool getHostMemCapabilitiesSupported(const HardwareInfo *hwInfo) const; + LocalMemoryAccessMode getDefaultLocalMemoryAccessMode(const HardwareInfo &hwInfo) const override; + void fillScmPropertiesSupportStructureBase(StateComputeModePropertiesSupport &propertiesSupport) const override; +}; + +template +struct EnableProductProductHelper { + + using GfxProduct = typename HwMapper::GfxProduct; + + EnableProductProductHelper() { + auto productHelperCreateFunction = ProductHelperHw::create; + productHelperFactory[gfxProduct] = productHelperCreateFunction; + } +}; + +} // namespace NEO \ No newline at end of file diff --git a/shared/source/os_interface/windows/performance_counters_win.cpp b/shared/source/os_interface/windows/performance_counters_win.cpp index efb345420b..4087ae56c9 100644 --- a/shared/source/os_interface/windows/performance_counters_win.cpp +++ b/shared/source/os_interface/windows/performance_counters_win.cpp @@ -9,6 +9,7 @@ #include "shared/source/device/device.h" #include "shared/source/helpers/gfx_core_helper.h" +#include "shared/source/helpers/hw_info.h" #include "shared/source/os_interface/os_interface.h" #include "shared/source/os_interface/windows/os_time_win.h" #include "shared/source/os_interface/windows/wddm/wddm.h" diff --git a/shared/source/os_interface/windows/wddm/wddm.cpp b/shared/source/os_interface/windows/wddm/wddm.cpp index 18a22deb7b..1f18aaf99e 100644 --- a/shared/source/os_interface/windows/wddm/wddm.cpp +++ b/shared/source/os_interface/windows/wddm/wddm.cpp @@ -20,6 +20,7 @@ #include "shared/source/helpers/api_specific_config.h" #include "shared/source/helpers/gfx_core_helper.h" #include "shared/source/helpers/heap_assigner.h" +#include "shared/source/helpers/hw_info.h" #include "shared/source/helpers/mt_helpers.h" #include "shared/source/helpers/string.h" #include "shared/source/helpers/windows/gmm_callbacks.h" diff --git a/shared/source/os_interface/windows/wddm_memory_manager.cpp b/shared/source/os_interface/windows/wddm_memory_manager.cpp index 8ed21e3399..5e412150aa 100644 --- a/shared/source/os_interface/windows/wddm_memory_manager.cpp +++ b/shared/source/os_interface/windows/wddm_memory_manager.cpp @@ -21,6 +21,7 @@ #include "shared/source/helpers/deferred_deleter_helper.h" #include "shared/source/helpers/gfx_core_helper.h" #include "shared/source/helpers/heap_assigner.h" +#include "shared/source/helpers/hw_info.h" #include "shared/source/helpers/ptr_math.h" #include "shared/source/helpers/string.h" #include "shared/source/helpers/surface_format_info.h" diff --git a/shared/source/xe_hpc_core/enable_hw_info_config_pvc.cpp b/shared/source/xe_hpc_core/enable_hw_info_config_pvc.cpp index dc2d3121d1..96bb5d03d9 100644 --- a/shared/source/xe_hpc_core/enable_hw_info_config_pvc.cpp +++ b/shared/source/xe_hpc_core/enable_hw_info_config_pvc.cpp @@ -1,11 +1,12 @@ /* - * Copyright (C) 2021-2022 Intel Corporation + * Copyright (C) 2021-2023 Intel Corporation * * SPDX-License-Identifier: MIT * */ #include "shared/source/os_interface/hw_info_config.h" +#include "shared/source/os_interface/product_helper_hw.h" #include "shared/source/xe_hpc_core/hw_cmds_pvc.h" namespace NEO { diff --git a/shared/source/xe_hpg_core/enable_hw_info_config_dg2.cpp b/shared/source/xe_hpg_core/enable_hw_info_config_dg2.cpp index f78711ec48..b9642b79b4 100644 --- a/shared/source/xe_hpg_core/enable_hw_info_config_dg2.cpp +++ b/shared/source/xe_hpg_core/enable_hw_info_config_dg2.cpp @@ -1,11 +1,12 @@ /* - * Copyright (C) 2021-2022 Intel Corporation + * Copyright (C) 2021-2023 Intel Corporation * * SPDX-License-Identifier: MIT * */ #include "shared/source/os_interface/hw_info_config.h" +#include "shared/source/os_interface/product_helper_hw.h" #include "shared/source/xe_hpg_core/hw_cmds_dg2.h" namespace NEO { diff --git a/shared/source/xe_hpg_core/enable_hw_info_config_mtl.cpp b/shared/source/xe_hpg_core/enable_hw_info_config_mtl.cpp index 7a4fdff36e..e3bdf4f977 100644 --- a/shared/source/xe_hpg_core/enable_hw_info_config_mtl.cpp +++ b/shared/source/xe_hpg_core/enable_hw_info_config_mtl.cpp @@ -1,11 +1,12 @@ /* - * Copyright (C) 2022 Intel Corporation + * Copyright (C) 2022-2023 Intel Corporation * * SPDX-License-Identifier: MIT * */ #include "shared/source/os_interface/hw_info_config.h" +#include "shared/source/os_interface/product_helper_hw.h" #include "shared/source/xe_hpg_core/hw_cmds_mtl.h" namespace NEO { 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 885f495f52..d70d4b4bcb 100644 --- a/shared/test/common/helpers/mock_hw_info_config_hw.h +++ b/shared/test/common/helpers/mock_hw_info_config_hw.h @@ -7,6 +7,7 @@ #pragma once #include "shared/source/os_interface/hw_info_config.h" +#include "shared/source/os_interface/product_helper_hw.h" namespace NEO { diff --git a/shared/test/common/mocks/debugger_l0_create.cpp b/shared/test/common/mocks/debugger_l0_create.cpp index e291b2c43a..37de563596 100644 --- a/shared/test/common/mocks/debugger_l0_create.cpp +++ b/shared/test/common/mocks/debugger_l0_create.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/device/device.h" #include "shared/source/execution_environment/root_device_environment.h" +#include "shared/source/helpers/hw_info.h" #include "shared/test/common/mocks/mock_l0_debugger.h" NEO::DebugerL0CreateFn mockDebuggerL0HwFactory[IGFX_MAX_CORE]; diff --git a/shared/test/common/mocks/mock_device.cpp b/shared/test/common/mocks/mock_device.cpp index f3b6d3021e..34ba3e4165 100644 --- a/shared/test/common/mocks/mock_device.cpp +++ b/shared/test/common/mocks/mock_device.cpp @@ -10,6 +10,7 @@ #include "shared/source/command_stream/command_stream_receiver.h" #include "shared/source/command_stream/preemption.h" #include "shared/source/debug_settings/debug_settings_manager.h" +#include "shared/source/helpers/hw_info.h" #include "shared/source/memory_manager/multi_graphics_allocation.h" #include "shared/source/os_interface/os_context.h" #include "shared/test/common/fixtures/mock_aub_center_fixture.h" diff --git a/shared/test/common/mocks/mock_hw_info_config.cpp b/shared/test/common/mocks/mock_hw_info_config.cpp index e7b28a3be5..b5e40a273e 100644 --- a/shared/test/common/mocks/mock_hw_info_config.cpp +++ b/shared/test/common/mocks/mock_hw_info_config.cpp @@ -8,8 +8,10 @@ #include "shared/source/aub_mem_dump/aub_mem_dump.h" #include "shared/source/helpers/cache_policy.h" #include "shared/source/helpers/constants.h" +#include "shared/source/helpers/hw_info.h" #include "shared/source/helpers/local_memory_access_modes.h" #include "shared/source/os_interface/hw_info_config.h" +#include "shared/source/os_interface/product_helper_hw.h" #include "platforms.h" diff --git a/shared/test/common/mocks/ult_device_factory.cpp b/shared/test/common/mocks/ult_device_factory.cpp index 070cbfd74f..08ba520ad3 100644 --- a/shared/test/common/mocks/ult_device_factory.cpp +++ b/shared/test/common/mocks/ult_device_factory.cpp @@ -8,6 +8,7 @@ #include "shared/test/common/mocks/ult_device_factory.h" #include "shared/source/helpers/gfx_core_helper.h" +#include "shared/source/helpers/hw_info.h" #include "shared/source/memory_manager/multi_graphics_allocation.h" #include "shared/source/os_interface/device_factory.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" diff --git a/shared/test/unit_test/execution_environment/execution_environment_tests.cpp b/shared/test/unit_test/execution_environment/execution_environment_tests.cpp index 03cbd1db66..e36ff3fcba 100644 --- a/shared/test/unit_test/execution_environment/execution_environment_tests.cpp +++ b/shared/test/unit_test/execution_environment/execution_environment_tests.cpp @@ -14,6 +14,7 @@ #include "shared/source/gmm_helper/gmm_helper.h" #include "shared/source/helpers/driver_model_type.h" #include "shared/source/helpers/gfx_core_helper.h" +#include "shared/source/helpers/hw_info.h" #include "shared/source/os_interface/device_factory.h" #include "shared/source/os_interface/driver_info.h" #include "shared/source/os_interface/os_interface.h" diff --git a/shared/test/unit_test/helpers/engine_node_helper_tests.cpp b/shared/test/unit_test/helpers/engine_node_helper_tests.cpp index 76ec357d74..ac27fbbf40 100644 --- a/shared/test/unit_test/helpers/engine_node_helper_tests.cpp +++ b/shared/test/unit_test/helpers/engine_node_helper_tests.cpp @@ -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/device/device.h" #include "shared/source/helpers/engine_node_helper.h" +#include "shared/source/helpers/hw_info.h" #include "shared/test/common/helpers/debug_manager_state_restore.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/preemption/preemption_tests.cpp b/shared/test/unit_test/preemption/preemption_tests.cpp index 7df0c2e9cb..f4e07c3b78 100644 --- a/shared/test/unit_test/preemption/preemption_tests.cpp +++ b/shared/test/unit_test/preemption/preemption_tests.cpp @@ -10,6 +10,7 @@ #include "shared/source/kernel/kernel_descriptor.h" #include "shared/source/memory_manager/allocation_properties.h" #include "shared/source/memory_manager/os_agnostic_memory_manager.h" +#include "shared/source/os_interface/product_helper_hw.h" #include "shared/test/common/cmd_parse/hw_parse.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" #include "shared/test/common/helpers/dispatch_flags_helper.h" diff --git a/shared/test/unit_test/xe_hpg_core/test_encode_dispatch_kernel_xe_hpg_core.cpp b/shared/test/unit_test/xe_hpg_core/test_encode_dispatch_kernel_xe_hpg_core.cpp index 77f20f953c..a8abe08d10 100644 --- a/shared/test/unit_test/xe_hpg_core/test_encode_dispatch_kernel_xe_hpg_core.cpp +++ b/shared/test/unit_test/xe_hpg_core/test_encode_dispatch_kernel_xe_hpg_core.cpp @@ -7,6 +7,7 @@ #include "shared/source/command_container/command_encoder.h" #include "shared/source/os_interface/hw_info_config.h" +#include "shared/source/os_interface/product_helper_hw.h" #include "shared/test//common/helpers/raii_hw_info_config.h" #include "shared/test/common/helpers/default_hw_info.h" #include "shared/test/common/helpers/variable_backup.h"