mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Move some xehp config files to definitions subdirectory
Signed-off-by: Katarzyna Cencelewska <katarzyna.cencelewska@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
95966711fe
commit
89c84d5942
@ -952,7 +952,10 @@ if(MSVC)
|
||||
else()
|
||||
include_directories(${NEO_SHARED_DIRECTORY}/os_interface/linux/flags${BRANCH_DIR_SUFFIX})
|
||||
endif()
|
||||
|
||||
if(SUPPORT_XE_HP_CORE)
|
||||
include_directories(${NEO_SHARED_DIRECTORY}/xe_hp_core/definitions${BRANCH_DIR_SUFFIX})
|
||||
include_directories(${NEO_SOURCE_DIR}/opencl/source/xe_hp_core/definitions${BRANCH_DIR_SUFFIX})
|
||||
endif()
|
||||
# Define where to put binaries
|
||||
set(TargetDir ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
|
||||
if(MSVC)
|
||||
|
@ -40,13 +40,18 @@ macro(macro_for_each_platform)
|
||||
string(TOLOWER ${PLATFORM_IT} PLATFORM_IT_LOWER)
|
||||
|
||||
foreach(BRANCH_DIR ${BRANCH_DIR_LIST})
|
||||
foreach(PLATFORM_FILE "hw_info_${PLATFORM_IT_LOWER}.inl")
|
||||
foreach(BRANCH ${BRANCH_DIR_LIST})
|
||||
set(SRC_FILE ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR}${GEN_TYPE_LOWER}${BRANCH}${PLATFORM_FILE})
|
||||
set(PLATFORM_FILE "hw_info_config_${PLATFORM_IT_LOWER}.inl")
|
||||
set(SRC_FILE ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR}${GEN_TYPE_LOWER}/definitions${BRANCH_DIR_SUFFIX}/${PLATFORM_FILE})
|
||||
if(EXISTS ${SRC_FILE})
|
||||
list(APPEND RUNTIME_SRCS_${GEN_TYPE}_CPP_BASE ${SRC_FILE})
|
||||
endif()
|
||||
|
||||
foreach(BRANCH ${BRANCH_DIR_LIST})
|
||||
set(PLATFORM_FILE "hw_info_${PLATFORM_IT_LOWER}.inl")
|
||||
set(SRC_FILE ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR}${GEN_TYPE_LOWER}${BRANCH}${PLATFORM_FILE})
|
||||
if(EXISTS ${SRC_FILE})
|
||||
list(APPEND RUNTIME_SRCS_${GEN_TYPE}_CPP_BASE ${SRC_FILE})
|
||||
endif()
|
||||
string(REGEX REPLACE "/$" "" _BRANCH_FILENAME_SUFFIX "${BRANCH_DIR}")
|
||||
string(REGEX REPLACE "^/" "_" _BRANCH_FILENAME_SUFFIX "${_BRANCH_FILENAME_SUFFIX}")
|
||||
set(SRC_FILE ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR}${GEN_TYPE_LOWER}${BRANCH}linux/hw_info_config_${PLATFORM_IT_LOWER}${_BRANCH_FILENAME_SUFFIX}.inl)
|
||||
@ -55,7 +60,6 @@ macro(macro_for_each_platform)
|
||||
endif()
|
||||
endforeach()
|
||||
endforeach()
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
macro(macro_for_each_gen)
|
||||
|
20
opencl/source/xe_hp_core/definitions/hw_info_config_xehp.inl
Normal file
20
opencl/source/xe_hp_core/definitions/hw_info_config_xehp.inl
Normal file
@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
const HardwareInfo XEHP::hwInfo = XEHP_CONFIG::hwInfo;
|
||||
const uint64_t XEHP::defaultHardwareInfoConfig = 0;
|
||||
|
||||
void setupXEHPHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig) {
|
||||
if (hwInfoConfig == 0x0) {
|
||||
// Default config
|
||||
XEHP_CONFIG::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
|
||||
} else {
|
||||
UNRECOVERABLE_IF(true);
|
||||
}
|
||||
}
|
||||
|
||||
void (*XEHP::setupHardwareInfo)(HardwareInfo *, bool, const uint64_t) = setupXEHPHardwareInfoImpl;
|
@ -146,18 +146,5 @@ void XEHP_CONFIG::setupHardwareInfoMultiTile(HardwareInfo *hwInfo, bool setupFea
|
||||
XEHP::setupFeatureAndWorkaroundTable(hwInfo);
|
||||
}
|
||||
};
|
||||
|
||||
const HardwareInfo XEHP::hwInfo = XEHP_CONFIG::hwInfo;
|
||||
const uint64_t XEHP::defaultHardwareInfoConfig = 0;
|
||||
|
||||
void setupXEHPHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig) {
|
||||
if (hwInfoConfig == 0x0) {
|
||||
// Default config
|
||||
XEHP_CONFIG::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
|
||||
} else {
|
||||
UNRECOVERABLE_IF(true);
|
||||
}
|
||||
}
|
||||
|
||||
void (*XEHP::setupHardwareInfo)(HardwareInfo *, bool, const uint64_t) = setupXEHPHardwareInfoImpl;
|
||||
#include "hw_info_config_xehp.inl"
|
||||
} // namespace NEO
|
||||
|
@ -107,8 +107,13 @@ set(RUNTIME_GENX_CPP_FILES
|
||||
macro(macro_for_each_platform)
|
||||
foreach(BRANCH_DIR ${BRANCH_DIR_LIST})
|
||||
foreach(BRANCH ${BRANCH_DIR_LIST})
|
||||
if(EXISTS ${NEO_SOURCE_DIR}/opencl/source${BRANCH}${GEN_TYPE_LOWER}${BRANCH_DIR}hw_info_${PLATFORM_IT_LOWER}.inl)
|
||||
list(APPEND CLOC_LIB_SRCS_LIB ${NEO_SOURCE_DIR}/opencl/source${BRANCH}${GEN_TYPE_LOWER}/${BRANCH_DIR}hw_info_${PLATFORM_IT_LOWER}.inl)
|
||||
set(SRC_FILE ${NEO_SOURCE_DIR}/opencl/source${BRANCH}${GEN_TYPE_LOWER}/definitions${BRANCH_DIR_SUFFIX}hw_info_config_${PLATFORM_IT_LOWER}.inl)
|
||||
if(EXISTS ${SRC_FILE})
|
||||
list(APPEND CLOC_LIB_SRCS_LIB ${SRC_FILE})
|
||||
endif()
|
||||
set(SRC_FILE ${NEO_SOURCE_DIR}/opencl/source${BRANCH}${GEN_TYPE_LOWER}${BRANCH_DIR}hw_info_${PLATFORM_IT_LOWER}.inl)
|
||||
if(EXISTS ${SRC_FILE})
|
||||
list(APPEND CLOC_LIB_SRCS_LIB ${SRC_FILE})
|
||||
endif()
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
@ -32,20 +32,15 @@ set(CORE_RUNTIME_SRCS_GENX_CPP_LINUX
|
||||
macro(macro_for_each_platform)
|
||||
string(TOLOWER ${PLATFORM_IT} PLATFORM_IT_LOWER)
|
||||
|
||||
foreach(PLATFORM_FILE "hw_cmds_${PLATFORM_IT_LOWER}.h" "hw_info_${PLATFORM_IT_LOWER}.h")
|
||||
if(EXISTS ${CORE_GENX_PREFIX}/${PLATFORM_FILE})
|
||||
list(APPEND CORE_SRCS_${GEN_TYPE}_H_BASE ${CORE_GENX_PREFIX}/${PLATFORM_FILE})
|
||||
foreach(BRANCH_DIR ${BRANCH_DIR_LIST})
|
||||
foreach(BRANCH ${BRANCH_DIR_LIST})
|
||||
foreach(PLATFORM_FILE "hw_cmds_${PLATFORM_IT_LOWER}.h")
|
||||
set(PATH_TO_FILE ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR}${GEN_TYPE_LOWER}${BRANCH}/${PLATFORM_FILE})
|
||||
if(EXISTS ${PATH_TO_FILE})
|
||||
list(APPEND CORE_SRCS_${GEN_TYPE}_H_BASE ${PATH_TO_FILE})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
foreach(BRANCH_DIR ${BRANCH_DIR_LIST})
|
||||
foreach(PLATFORM_FILE "hw_info_${PLATFORM_IT_LOWER}.inl")
|
||||
foreach(BRANCH ${BRANCH_DIR_LIST})
|
||||
set(SRC_FILE ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR}${GEN_TYPE_LOWER}${BRANCH}${PLATFORM_FILE})
|
||||
if(EXISTS ${SRC_FILE})
|
||||
list(APPEND RUNTIME_SRCS_${GEN_TYPE}_CPP_BASE ${SRC_FILE})
|
||||
endif()
|
||||
|
||||
string(REGEX REPLACE "/$" "" _BRANCH_FILENAME_SUFFIX "${BRANCH_DIR}")
|
||||
string(REGEX REPLACE "^/" "_" _BRANCH_FILENAME_SUFFIX "${_BRANCH_FILENAME_SUFFIX}")
|
||||
set(SRC_FILE ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR}${GEN_TYPE_LOWER}${BRANCH}linux/hw_info_config_${PLATFORM_IT_LOWER}${_BRANCH_FILENAME_SUFFIX}.inl)
|
||||
@ -54,7 +49,6 @@ macro(macro_for_each_platform)
|
||||
endif()
|
||||
endforeach()
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
||||
endmacro()
|
||||
|
||||
|
12
shared/source/xe_hp_core/CMakeLists.txt
Normal file
12
shared/source/xe_hp_core/CMakeLists.txt
Normal file
@ -0,0 +1,12 @@
|
||||
#
|
||||
# Copyright (C) 2021 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
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_GENX_ALL_BASE ${HW_DEFINITIONS_XE_HP_CORE})
|
||||
|
6
shared/source/xe_hp_core/definitions/hw_cmds_xehp.inl
Normal file
6
shared/source/xe_hp_core/definitions/hw_cmds_xehp.inl
Normal file
@ -0,0 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
@ -8,7 +8,6 @@
|
||||
#pragma once
|
||||
#include "shared/source/xe_hp_core/hw_cmds_base.h"
|
||||
namespace NEO {
|
||||
|
||||
struct XEHP : public XeHpFamily {
|
||||
static const PLATFORM platform;
|
||||
static const HardwareInfo hwInfo;
|
||||
@ -34,4 +33,5 @@ class XEHP_CONFIG : public XEHP {
|
||||
private:
|
||||
static GT_SYSTEM_INFO gtSystemInfo;
|
||||
};
|
||||
#include "hw_cmds_xehp.inl"
|
||||
} // namespace NEO
|
||||
|
Reference in New Issue
Block a user