From 9815f1e99bf19ff1deb373757e0de47774700bfb Mon Sep 17 00:00:00 2001 From: Zbigniew Zdanowicz Date: Wed, 13 Mar 2024 18:00:00 +0000 Subject: [PATCH] refactor: group template implementations and change inl file names Signed-off-by: Zbigniew Zdanowicz --- shared/source/os_interface/CMakeLists.txt | 10 +++------- .../product_helper_dg2_and_later.inl | 17 ----------------- ...inl => product_helper_xe_hpg_and_xe_hpc.inl} | 5 +++++ .../xe_hpc_core/linux/product_helper_pvc.cpp | 4 +--- .../pvc/os_agnostic_product_helper_pvc.inl | 1 + .../xe_hpc_core/windows/product_helper_pvc.cpp | 4 +--- .../dg2/os_agnostic_product_helper_dg2.inl | 1 + .../xe_hpg_core/linux/product_helper_dg2.cpp | 2 -- .../xe_hpg_core/windows/product_helper_dg2.cpp | 4 +--- .../os_agnostic_product_helper_xe_lpg.inl | 3 +-- 10 files changed, 14 insertions(+), 37 deletions(-) delete mode 100644 shared/source/os_interface/product_helper_dg2_and_later.inl rename shared/source/os_interface/{product_helper_xehp_and_later.inl => product_helper_xe_hpg_and_xe_hpc.inl} (96%) diff --git a/shared/source/os_interface/CMakeLists.txt b/shared/source/os_interface/CMakeLists.txt index 27a87d8739..0a4eb47504 100644 --- a/shared/source/os_interface/CMakeLists.txt +++ b/shared/source/os_interface/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright (C) 2019-2023 Intel Corporation +# Copyright (C) 2019-2024 Intel Corporation # # SPDX-License-Identifier: MIT # @@ -47,12 +47,8 @@ set(NEO_CORE_OS_INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/sys_calls_common.h ) -if(SUPPORT_XEHP_AND_LATER) - list(APPEND NEO_CORE_OS_INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/product_helper_xehp_and_later.inl) -endif() - -if(SUPPORT_DG2_AND_LATER) - list(APPEND NEO_CORE_OS_INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/product_helper_dg2_and_later.inl) +if(SUPPORT_XE_HPC_CORE OR SUPPORT_XE_HPG_CORE) + list(APPEND NEO_CORE_OS_INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/product_helper_xe_hpg_and_xe_hpc.inl) endif() set_property(GLOBAL PROPERTY NEO_CORE_OS_INTERFACE ${NEO_CORE_OS_INTERFACE}) diff --git a/shared/source/os_interface/product_helper_dg2_and_later.inl b/shared/source/os_interface/product_helper_dg2_and_later.inl deleted file mode 100644 index c846ed04ad..0000000000 --- a/shared/source/os_interface/product_helper_dg2_and_later.inl +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright (C) 2021-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/os_interface/product_helper.h" - -namespace NEO { - -template -bool ProductHelperHw::heapInLocalMem(const HardwareInfo &hwInfo) const { - return true; -} - -} // namespace NEO diff --git a/shared/source/os_interface/product_helper_xehp_and_later.inl b/shared/source/os_interface/product_helper_xe_hpg_and_xe_hpc.inl similarity index 96% rename from shared/source/os_interface/product_helper_xehp_and_later.inl rename to shared/source/os_interface/product_helper_xe_hpg_and_xe_hpc.inl index 92d7a55597..4c68b097b6 100644 --- a/shared/source/os_interface/product_helper_xehp_and_later.inl +++ b/shared/source/os_interface/product_helper_xe_hpg_and_xe_hpc.inl @@ -112,4 +112,9 @@ bool ProductHelperHw::useLocalPreferredForCacheableBuffers() const { return false; } +template +bool ProductHelperHw::heapInLocalMem(const HardwareInfo &hwInfo) const { + return true; +} + } // namespace NEO diff --git a/shared/source/xe_hpc_core/linux/product_helper_pvc.cpp b/shared/source/xe_hpc_core/linux/product_helper_pvc.cpp index 35687b54a1..bc7df45b84 100644 --- a/shared/source/xe_hpc_core/linux/product_helper_pvc.cpp +++ b/shared/source/xe_hpc_core/linux/product_helper_pvc.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Intel Corporation + * Copyright (C) 2021-2024 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -16,8 +16,6 @@ #include "shared/source/os_interface/linux/sys_calls.h" #include "shared/source/os_interface/product_helper.h" #include "shared/source/os_interface/product_helper.inl" -#include "shared/source/os_interface/product_helper_dg2_and_later.inl" -#include "shared/source/os_interface/product_helper_xehp_and_later.inl" #include "shared/source/utilities/directory.h" #include "shared/source/xe_hpc_core/hw_cmds_pvc.h" diff --git a/shared/source/xe_hpc_core/pvc/os_agnostic_product_helper_pvc.inl b/shared/source/xe_hpc_core/pvc/os_agnostic_product_helper_pvc.inl index 11e25f2d48..8e7a0b0a06 100644 --- a/shared/source/xe_hpc_core/pvc/os_agnostic_product_helper_pvc.inl +++ b/shared/source/xe_hpc_core/pvc/os_agnostic_product_helper_pvc.inl @@ -7,6 +7,7 @@ #include "shared/source/execution_environment/root_device_environment.h" #include "shared/source/kernel/kernel_descriptor.h" +#include "shared/source/os_interface/product_helper_xe_hpg_and_xe_hpc.inl" #include "aubstream/product_family.h" diff --git a/shared/source/xe_hpc_core/windows/product_helper_pvc.cpp b/shared/source/xe_hpc_core/windows/product_helper_pvc.cpp index 08423a08b1..d5675b6724 100644 --- a/shared/source/xe_hpc_core/windows/product_helper_pvc.cpp +++ b/shared/source/xe_hpc_core/windows/product_helper_pvc.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Intel Corporation + * Copyright (C) 2021-2024 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -8,8 +8,6 @@ #include "shared/source/kernel/kernel_properties.h" #include "shared/source/os_interface/product_helper.h" #include "shared/source/os_interface/product_helper.inl" -#include "shared/source/os_interface/product_helper_dg2_and_later.inl" -#include "shared/source/os_interface/product_helper_xehp_and_later.inl" #include "shared/source/xe_hpc_core/hw_cmds_pvc.h" constexpr static auto gfxProduct = IGFX_PVC; diff --git a/shared/source/xe_hpg_core/dg2/os_agnostic_product_helper_dg2.inl b/shared/source/xe_hpg_core/dg2/os_agnostic_product_helper_dg2.inl index 360bfbd1f4..915f89d598 100644 --- a/shared/source/xe_hpg_core/dg2/os_agnostic_product_helper_dg2.inl +++ b/shared/source/xe_hpg_core/dg2/os_agnostic_product_helper_dg2.inl @@ -8,6 +8,7 @@ #include "shared/source/command_stream/command_stream_receiver.h" #include "shared/source/helpers/gfx_core_helper.h" #include "shared/source/memory_manager/memory_manager.h" +#include "shared/source/os_interface/product_helper_xe_hpg_and_xe_hpc.inl" #include "aubstream/product_family.h" diff --git a/shared/source/xe_hpg_core/linux/product_helper_dg2.cpp b/shared/source/xe_hpg_core/linux/product_helper_dg2.cpp index ed2e539961..75c6db2882 100644 --- a/shared/source/xe_hpg_core/linux/product_helper_dg2.cpp +++ b/shared/source/xe_hpg_core/linux/product_helper_dg2.cpp @@ -16,8 +16,6 @@ #include "shared/source/os_interface/linux/drm_neo.h" #include "shared/source/os_interface/product_helper.h" #include "shared/source/os_interface/product_helper.inl" -#include "shared/source/os_interface/product_helper_dg2_and_later.inl" -#include "shared/source/os_interface/product_helper_xehp_and_later.inl" #include "shared/source/xe_hpg_core/hw_cmds_dg2.h" constexpr static auto gfxProduct = IGFX_DG2; diff --git a/shared/source/xe_hpg_core/windows/product_helper_dg2.cpp b/shared/source/xe_hpg_core/windows/product_helper_dg2.cpp index 4266640483..1a0f48f533 100644 --- a/shared/source/xe_hpg_core/windows/product_helper_dg2.cpp +++ b/shared/source/xe_hpg_core/windows/product_helper_dg2.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Intel Corporation + * Copyright (C) 2021-2024 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -11,8 +11,6 @@ #include "shared/source/kernel/kernel_properties.h" #include "shared/source/os_interface/product_helper.h" #include "shared/source/os_interface/product_helper.inl" -#include "shared/source/os_interface/product_helper_dg2_and_later.inl" -#include "shared/source/os_interface/product_helper_xehp_and_later.inl" #include "shared/source/xe_hpg_core/hw_cmds_dg2.h" constexpr static auto gfxProduct = IGFX_DG2; diff --git a/shared/source/xe_hpg_core/xe_lpg/os_agnostic_product_helper_xe_lpg.inl b/shared/source/xe_hpg_core/xe_lpg/os_agnostic_product_helper_xe_lpg.inl index 47f0af11fd..93b5283fe2 100644 --- a/shared/source/xe_hpg_core/xe_lpg/os_agnostic_product_helper_xe_lpg.inl +++ b/shared/source/xe_hpg_core/xe_lpg/os_agnostic_product_helper_xe_lpg.inl @@ -11,8 +11,7 @@ #include "shared/source/memory_manager/allocation_type.h" #include "shared/source/os_interface/product_helper.h" #include "shared/source/os_interface/product_helper.inl" -#include "shared/source/os_interface/product_helper_dg2_and_later.inl" -#include "shared/source/os_interface/product_helper_xehp_and_later.inl" +#include "shared/source/os_interface/product_helper_xe_hpg_and_xe_hpc.inl" #include "aubstream/product_family.h" #include "platforms.h"