mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-20 08:53:55 +08:00
Keep platform types in a list
Related-To: NEO-3503 Change-Id: I7216d7a5088b0a18aebdedc386208ec398bae5ef Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
acfdb0fc9d
commit
55a1ddab39
@@ -152,6 +152,8 @@ macro(SET_FLAGS_FOR GEN_TYPE)
|
||||
endif()
|
||||
endmacro()
|
||||
macro(ADD_PLATFORM_FOR_GEN LIST_TYPE GEN_TYPE PLATFORM_NAME PLATFORM_TYPE)
|
||||
list(APPEND PLATFORM_TYPES ${PLATFORM_TYPE})
|
||||
list(REMOVE_DUPLICATES PLATFORM_TYPES)
|
||||
ADD_ITEM_FOR_GEN("PLATFORMS" ${LIST_TYPE} ${GEN_TYPE} ${PLATFORM_NAME})
|
||||
set(${GEN_TYPE}_HAS_${PLATFORM_TYPE} TRUE)
|
||||
set(${PLATFORM_NAME}_IS_${PLATFORM_TYPE} TRUE)
|
||||
|
||||
@@ -30,7 +30,7 @@ if(COMPILE_BUILT_INS)
|
||||
endif()
|
||||
|
||||
macro(macro_for_each_gen)
|
||||
foreach(PLATFORM_TYPE "CORE" "LP")
|
||||
foreach(PLATFORM_TYPE ${PLATFORM_TYPES})
|
||||
get_family_name_with_type(${GEN_TYPE} ${PLATFORM_TYPE})
|
||||
foreach(GENERATED_BUILTIN ${GENERATED_BUILTINS})
|
||||
list(APPEND GENERATED_BUILTINS_CPPS ${BUILTINS_INCLUDE_DIR}/${RUNTIME_GENERATED_${GENERATED_BUILTIN}_${family_name_with_type}})
|
||||
|
||||
@@ -65,7 +65,7 @@ function(compile_builtin gen_type platform_type builtin)
|
||||
endfunction()
|
||||
|
||||
macro(macro_for_each_gen)
|
||||
foreach(PLATFORM_TYPE "CORE" "LP")
|
||||
foreach(PLATFORM_TYPE ${PLATFORM_TYPES})
|
||||
if(${GEN_TYPE}_HAS_${PLATFORM_TYPE})
|
||||
get_family_name_with_type(${GEN_TYPE} ${PLATFORM_TYPE})
|
||||
string(TOLOWER ${PLATFORM_TYPE} PLATFORM_TYPE_LOWER)
|
||||
|
||||
@@ -61,7 +61,7 @@ const RuntimeCapabilityTable EHL::capabilityTable{
|
||||
true, // ftr64KBpages
|
||||
true, // instrumentationEnabled
|
||||
true, // forceStatelessCompilationFor32Bit
|
||||
false, // isCore
|
||||
"lp", // platformType
|
||||
true, // sourceLevelDebuggerSupported
|
||||
true, // supportsVme
|
||||
false, // supportCacheFlushAfterWalker
|
||||
|
||||
@@ -62,7 +62,7 @@ const RuntimeCapabilityTable ICLLP::capabilityTable{
|
||||
false, // ftr64KBpages
|
||||
true, // instrumentationEnabled
|
||||
true, // forceStatelessCompilationFor32Bit
|
||||
false, // isCore
|
||||
"lp", // platformType
|
||||
true, // sourceLevelDebuggerSupported
|
||||
true, // supportsVme
|
||||
false, // supportCacheFlushAfterWalker
|
||||
|
||||
@@ -61,7 +61,7 @@ const RuntimeCapabilityTable LKF::capabilityTable{
|
||||
true, // ftr64KBpages
|
||||
true, // instrumentationEnabled
|
||||
true, // forceStatelessCompilationFor32Bit
|
||||
false, // isCore
|
||||
"lp", // platformType
|
||||
true, // sourceLevelDebuggerSupported
|
||||
false, // supportsVme
|
||||
false, // supportCacheFlushAfterWalker
|
||||
|
||||
@@ -66,7 +66,7 @@ const RuntimeCapabilityTable BDW::capabilityTable{
|
||||
false, // ftr64KBpages
|
||||
true, // instrumentationEnabled
|
||||
true, // forceStatelessCompilationFor32Bit
|
||||
true, // isCore
|
||||
"core", // platformType
|
||||
false, // sourceLevelDebuggerSupported
|
||||
true, // supportsVme
|
||||
false, // supportCacheFlushAfterWalker
|
||||
|
||||
@@ -63,7 +63,7 @@ const RuntimeCapabilityTable BXT::capabilityTable{
|
||||
false, // ftr64KBpages
|
||||
true, // instrumentationEnabled
|
||||
false, // forceStatelessCompilationFor32Bit
|
||||
false, // isCore
|
||||
"lp", // platformType
|
||||
true, // sourceLevelDebuggerSupported
|
||||
true, // supportsVme
|
||||
false, // supportCacheFlushAfterWalker
|
||||
|
||||
@@ -58,7 +58,7 @@ const RuntimeCapabilityTable CFL::capabilityTable{
|
||||
true, // ftr64KBpages
|
||||
true, // instrumentationEnabled
|
||||
true, // forceStatelessCompilationFor32Bit
|
||||
true, // isCore
|
||||
"core", // platformType
|
||||
true, // sourceLevelDebuggerSupported
|
||||
true, // supportsVme
|
||||
false, // supportCacheFlushAfterWalker
|
||||
|
||||
@@ -58,7 +58,7 @@ const RuntimeCapabilityTable GLK::capabilityTable{
|
||||
false, // ftr64KBpages
|
||||
true, // instrumentationEnabled
|
||||
false, // forceStatelessCompilationFor32Bit
|
||||
false, // isCore
|
||||
"lp", // platformType
|
||||
true, // sourceLevelDebuggerSupported
|
||||
true, // supportsVme
|
||||
false, // supportCacheFlushAfterWalker
|
||||
|
||||
@@ -58,7 +58,7 @@ const RuntimeCapabilityTable KBL::capabilityTable{
|
||||
true, // ftr64KBpages
|
||||
true, // instrumentationEnabled
|
||||
true, // forceStatelessCompilationFor32Bit
|
||||
true, // isCore
|
||||
"core", // platformType
|
||||
true, // sourceLevelDebuggerSupported
|
||||
true, // supportsVme
|
||||
false, // supportCacheFlushAfterWalker
|
||||
|
||||
@@ -66,7 +66,7 @@ const RuntimeCapabilityTable SKL::capabilityTable{
|
||||
true, // ftr64KBpages
|
||||
true, // instrumentationEnabled
|
||||
true, // forceStatelessCompilationFor32Bit
|
||||
true, // isCore
|
||||
"core", // platformType
|
||||
true, // sourceLevelDebuggerSupported
|
||||
true, // supportsVme
|
||||
false, // supportCacheFlushAfterWalker
|
||||
|
||||
@@ -25,10 +25,7 @@ void (*hardwareInfoSetup[IGFX_MAX_PRODUCT])(HardwareInfo *, bool, const std::str
|
||||
};
|
||||
|
||||
const char *getPlatformType(const HardwareInfo &hwInfo) {
|
||||
if (hwInfo.capabilityTable.isCore) {
|
||||
return "core";
|
||||
}
|
||||
return "lp";
|
||||
return hwInfo.capabilityTable.platformType;
|
||||
}
|
||||
|
||||
bool getHwInfoForPlatformString(std::string &platform, const HardwareInfo *&hwInfoIn) {
|
||||
|
||||
@@ -50,7 +50,7 @@ struct RuntimeCapabilityTable {
|
||||
bool ftr64KBpages;
|
||||
bool instrumentationEnabled;
|
||||
bool forceStatelessCompilationFor32Bit;
|
||||
bool isCore;
|
||||
const char *platformType;
|
||||
bool sourceLevelDebuggerSupported;
|
||||
bool supportsVme;
|
||||
bool supportCacheFlushAfterWalker;
|
||||
|
||||
@@ -55,7 +55,7 @@ function(compile_kernel target gen_type platform_type kernel)
|
||||
endfunction()
|
||||
|
||||
macro(macro_for_each_gen)
|
||||
foreach(PLATFORM_TYPE "CORE" "LP")
|
||||
foreach(PLATFORM_TYPE ${PLATFORM_TYPES})
|
||||
if(${GEN_TYPE}_HAS_${PLATFORM_TYPE} AND SUPPORT_DEVICE_ENQUEUE_${GEN_TYPE})
|
||||
get_family_name_with_type(${GEN_TYPE} ${PLATFORM_TYPE})
|
||||
set(PLATFORM_2_0_LOWER ${DEFAULT_SUPPORTED_2_0_${GEN_TYPE}_${PLATFORM_TYPE}_PLATFORM})
|
||||
|
||||
@@ -395,7 +395,7 @@ endmacro()
|
||||
macro(macro_for_each_platform)
|
||||
PLATFORM_TESTED_WITH_APPVERIFIER(${GEN_TYPE} ${PLATFORM_IT} TESTED_WITH_APPVERIFIER)
|
||||
apply_macro_for_each_test_config("UNIT_TESTS")
|
||||
foreach(PLATFORM_TYPE "CORE" "LP")
|
||||
foreach(PLATFORM_TYPE ${PLATFORM_TYPES})
|
||||
if(${PLATFORM_IT}_IS_${PLATFORM_TYPE})
|
||||
get_family_name_with_type(${GEN_TYPE} ${PLATFORM_TYPE})
|
||||
add_dependencies(unit_tests test_kernels_${family_name_with_type})
|
||||
@@ -412,7 +412,7 @@ macro(macro_for_each_platform)
|
||||
endmacro()
|
||||
|
||||
macro(macro_for_each_gen)
|
||||
foreach(PLATFORM_TYPE "CORE" "LP")
|
||||
foreach(PLATFORM_TYPE ${PLATFORM_TYPES})
|
||||
if(${GEN_TYPE}_HAS_${PLATFORM_TYPE})
|
||||
get_family_name_with_type(${GEN_TYPE} ${PLATFORM_TYPE})
|
||||
string(TOLOWER ${PLATFORM_TYPE} PLATFORM_TYPE_LOWER)
|
||||
|
||||
@@ -74,7 +74,7 @@ macro(macro_for_each_test_config)
|
||||
DEPENDS igdrcl_aub_tests
|
||||
DEPENDS copy_test_files_${PLATFORM_IT_LOWER}
|
||||
)
|
||||
foreach(PLATFORM_TYPE "CORE" "LP")
|
||||
foreach(PLATFORM_TYPE ${PLATFORM_TYPES})
|
||||
if(${PLATFORM_IT}_IS_${PLATFORM_TYPE})
|
||||
get_family_name_with_type(${GEN_TYPE} ${PLATFORM_TYPE})
|
||||
add_dependencies(${PLATFORM_IT_LOWER}_aub_tests test_kernels_${family_name_with_type})
|
||||
|
||||
@@ -229,16 +229,16 @@ HWTEST_F(PipeControlHelperTests, givenPostSyncWriteImmediateDataModeWhenHelperIs
|
||||
EXPECT_TRUE(memcmp(pipeControl, &expectedPipeControl, sizeof(PIPE_CONTROL)) == 0);
|
||||
}
|
||||
|
||||
TEST(HwInfoTest, givenHwInfoWhenIsCoreThenPlatformTypeIsCore) {
|
||||
TEST(HwInfoTest, givenHwInfoWhenPlatformTypeIsCoreThenPlatformTypeIsCore) {
|
||||
HardwareInfo hwInfo;
|
||||
hwInfo.capabilityTable.isCore = true;
|
||||
hwInfo.capabilityTable.platformType = "core";
|
||||
auto platformType = getPlatformType(hwInfo);
|
||||
EXPECT_STREQ("core", platformType);
|
||||
}
|
||||
|
||||
TEST(HwInfoTest, givenHwInfoWhenIsNotCoreThenPlatformTypeIsLp) {
|
||||
TEST(HwInfoTest, givenHwInfoWhenlatformTypeIsLpThenPlatformTypeIsLp) {
|
||||
HardwareInfo hwInfo;
|
||||
hwInfo.capabilityTable.isCore = false;
|
||||
hwInfo.capabilityTable.platformType = "lp";
|
||||
auto platformType = getPlatformType(hwInfo);
|
||||
EXPECT_STREQ("lp", platformType);
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ target_include_directories(igdrcl_mt_tests BEFORE PRIVATE ${IGDRCL_SOURCE_DIR}/u
|
||||
macro(macro_for_each_test_config)
|
||||
run_mt_tests(${PLATFORM_IT_LOWER} ${SLICES} ${SUBSLICES} ${EU_PER_SS})
|
||||
if(MSVC OR CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
foreach(PLATFORM_TYPE "CORE" "LP")
|
||||
foreach(PLATFORM_TYPE ${PLATFORM_TYPES})
|
||||
if(${PLATFORM_IT}_IS_${PLATFORM_TYPE})
|
||||
get_family_name_with_type(${GEN_TYPE} ${PLATFORM_TYPE})
|
||||
add_dependencies(run_${PLATFORM_IT_LOWER}_mt_unit_tests test_kernels_${family_name_with_type})
|
||||
|
||||
@@ -100,7 +100,7 @@ add_custom_target(run_ocloc_tests ALL
|
||||
)
|
||||
macro(macro_for_each_platform)
|
||||
if("${PLATFORM_IT_LOWER}" STREQUAL "${CLOC_DEFAULT_DEVICE}")
|
||||
foreach(PLATFORM_TYPE "CORE" "LP")
|
||||
foreach(PLATFORM_TYPE ${PLATFORM_TYPES})
|
||||
if(${PLATFORM_IT}_IS_${PLATFORM_TYPE})
|
||||
get_family_name_with_type(${GEN_TYPE} ${PLATFORM_TYPE})
|
||||
add_dependencies(run_ocloc_tests test_kernels_${family_name_with_type})
|
||||
|
||||
Reference in New Issue
Block a user