From 7a324051efdff5082a74243cb3390903e70d9973 Mon Sep 17 00:00:00 2001 From: Daria Hinz Date: Tue, 12 Apr 2022 09:57:01 +0000 Subject: [PATCH] Clean up headers & cmake files Files that were dedicated to specific platforms were incorrectly attached at the level of the supported gen. Additionally, header inclusion has been corrected. Signed-off-by: Daria Hinz --- shared/source/enable_cores.cmake | 11 +++++++++++ shared/source/gen12lp/CMakeLists.txt | 10 +--------- shared/source/xe_hp_core/CMakeLists.txt | 8 +------- shared/source/xe_hpc_core/CMakeLists.txt | 9 --------- shared/source/xe_hpc_core/{ => pvc}/hw_cmds_pvc.cpp | 0 shared/source/xe_hpg_core/hw_cmds_base.h | 1 - shared/source/xe_hpg_core/hw_cmds_dg2.h | 3 +++ 7 files changed, 16 insertions(+), 26 deletions(-) rename shared/source/xe_hpc_core/{ => pvc}/hw_cmds_pvc.cpp (100%) diff --git a/shared/source/enable_cores.cmake b/shared/source/enable_cores.cmake index 57908b11e6..08d3ed770d 100644 --- a/shared/source/enable_cores.cmake +++ b/shared/source/enable_cores.cmake @@ -50,6 +50,12 @@ macro(macro_for_each_platform) list(APPEND CORE_SRCS_${CORE_TYPE}_CPP_BASE ${SRC_FILE}) endif() + set(PLATFORM_FILE "hw_cmds_${PLATFORM_IT_LOWER}.inl") + set(SRC_FILE ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR}${CORE_TYPE_LOWER}/definitions${BRANCH_DIR_SUFFIX}${PLATFORM_FILE}) + if(EXISTS ${SRC_FILE}) + list(APPEND CORE_SRCS_${CORE_TYPE}_CPP_BASE ${SRC_FILE}) + endif() + foreach(BRANCH ${BRANCH_DIR_LIST}) set(PATH_TO_CORE ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR}${CORE_TYPE_LOWER}${BRANCH}) @@ -58,6 +64,11 @@ macro(macro_for_each_platform) list(APPEND CORE_SRCS_${CORE_TYPE}_H_BASE ${SRC_FILE}) endif() + set(SRC_FILE ${PATH_TO_CORE}${PLATFORM_IT_LOWER}${BRANCH_DIR_SUFFIX}hw_cmds_${PLATFORM_IT_LOWER}.cpp) + if(EXISTS ${SRC_FILE}) + list(APPEND CORE_SRCS_${CORE_TYPE}_H_BASE ${SRC_FILE}) + endif() + set(SRC_FILE ${PATH_TO_CORE}linux/hw_info_extra_${PLATFORM_IT_LOWER}.cpp) if(EXISTS ${SRC_FILE}) list(APPEND CORE_SRCS_${CORE_TYPE}_CPP_LINUX ${SRC_FILE}) diff --git a/shared/source/gen12lp/CMakeLists.txt b/shared/source/gen12lp/CMakeLists.txt index 29fbcbca85..0915423b92 100644 --- a/shared/source/gen12lp/CMakeLists.txt +++ b/shared/source/gen12lp/CMakeLists.txt @@ -1,19 +1,11 @@ # -# Copyright (C) 2020-2021 Intel Corporation +# Copyright (C) 2020-2022 Intel Corporation # # SPDX-License-Identifier: MIT # set_property(GLOBAL PROPERTY SHARED_SRCS_ADDITIONAL_FILES_GEN12LP ${SHARED_SRCS_ADDITIONAL_FILES_GEN12LP}) -if(SUPPORT_ADLP) - set(HW_DEFINITIONS_ADLP - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/definitions${BRANCH_DIR_SUFFIX}hw_cmds_adlp.inl - ) - set_property(GLOBAL APPEND PROPERTY CORE_SRCS_COREX_ALL_BASE ${HW_DEFINITIONS_ADLP}) -endif() - if(SUPPORT_GEN12LP) add_subdirectories() endif() diff --git a/shared/source/xe_hp_core/CMakeLists.txt b/shared/source/xe_hp_core/CMakeLists.txt index 27f23a37d5..55e33b4534 100644 --- a/shared/source/xe_hp_core/CMakeLists.txt +++ b/shared/source/xe_hp_core/CMakeLists.txt @@ -1,15 +1,9 @@ # -# Copyright (C) 2021 Intel Corporation +# Copyright (C) 2021-2022 Intel Corporation # # SPDX-License-Identifier: MIT # if(SUPPORT_XE_HP_CORE) - set(HW_DEFINITIONS_XE_HP_CORE - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/definitions${BRANCH_DIR_SUFFIX}hw_cmds_xehp.inl - ) - set_property(GLOBAL APPEND PROPERTY CORE_SRCS_COREX_ALL_BASE ${HW_DEFINITIONS_XE_HP_CORE}) - add_subdirectories() endif() diff --git a/shared/source/xe_hpc_core/CMakeLists.txt b/shared/source/xe_hpc_core/CMakeLists.txt index eecbf572b6..35b992237c 100644 --- a/shared/source/xe_hpc_core/CMakeLists.txt +++ b/shared/source/xe_hpc_core/CMakeLists.txt @@ -5,14 +5,5 @@ # if(SUPPORT_XE_HPC_CORE) - set(HW_DEFINITIONS_XE_HPC_CORE - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}hw_cmds_pvc.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/definitions${BRANCH_DIR_SUFFIX}hw_cmds_pvc.inl - ${CMAKE_CURRENT_SOURCE_DIR}/compiler_hw_info_config_pvc.inl - ) - - set_property(GLOBAL APPEND PROPERTY NEO_CORE_HELPERS ${HW_DEFINITIONS_XE_HPC_CORE}) - add_subdirectories() endif() diff --git a/shared/source/xe_hpc_core/hw_cmds_pvc.cpp b/shared/source/xe_hpc_core/pvc/hw_cmds_pvc.cpp similarity index 100% rename from shared/source/xe_hpc_core/hw_cmds_pvc.cpp rename to shared/source/xe_hpc_core/pvc/hw_cmds_pvc.cpp diff --git a/shared/source/xe_hpg_core/hw_cmds_base.h b/shared/source/xe_hpg_core/hw_cmds_base.h index 085d7a1b21..4168dd3c45 100644 --- a/shared/source/xe_hpg_core/hw_cmds_base.h +++ b/shared/source/xe_hpg_core/hw_cmds_base.h @@ -10,7 +10,6 @@ #include "shared/source/helpers/debug_helpers.h" #include "shared/source/xe_hpg_core/hw_info.h" -#include "device_ids_configs_dg2.h" #include "igfxfmid.h" #include diff --git a/shared/source/xe_hpg_core/hw_cmds_dg2.h b/shared/source/xe_hpg_core/hw_cmds_dg2.h index e0fc616d26..eb85011134 100644 --- a/shared/source/xe_hpg_core/hw_cmds_dg2.h +++ b/shared/source/xe_hpg_core/hw_cmds_dg2.h @@ -7,6 +7,9 @@ #pragma once #include "shared/source/xe_hpg_core/hw_cmds_base.h" + +#include "device_ids_configs_dg2.h" + namespace NEO { struct DG2 : public XE_HPG_COREFamily {