Skip to content

Commit

Permalink
Clean up headers & cmake files
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
daariahinz authored and Compute-Runtime-Automation committed Apr 13, 2022
1 parent b67b1bd commit 7a32405
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 26 deletions.
11 changes: 11 additions & 0 deletions shared/source/enable_cores.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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})

Expand All @@ -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})
Expand Down
10 changes: 1 addition & 9 deletions shared/source/gen12lp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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()
8 changes: 1 addition & 7 deletions shared/source/xe_hp_core/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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()
9 changes: 0 additions & 9 deletions shared/source/xe_hpc_core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
File renamed without changes.
1 change: 0 additions & 1 deletion shared/source/xe_hpg_core/hw_cmds_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <cstddef>
Expand Down
3 changes: 3 additions & 0 deletions shared/source/xe_hpg_core/hw_cmds_dg2.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 7a32405

Please sign in to comment.