feature: Add default ip version values to helper
Signed-off-by: Daria Hinz <daria.hinz@intel.com> Related-To: NEO-8021
This commit is contained in:
parent
cf5100c134
commit
68b6cfebd2
|
@ -673,8 +673,16 @@ TEST_F(MockOfflineCompilerTests, givenDeprecatedAcronymsWithRevisionWhenInitHwIn
|
||||||
mockOfflineCompiler.deviceName = acronym.str();
|
mockOfflineCompiler.deviceName = acronym.str();
|
||||||
mockOfflineCompiler.revisionId = 0x3;
|
mockOfflineCompiler.revisionId = 0x3;
|
||||||
EXPECT_EQ(OclocErrorCode::SUCCESS, mockOfflineCompiler.initHardwareInfo(mockOfflineCompiler.deviceName));
|
EXPECT_EQ(OclocErrorCode::SUCCESS, mockOfflineCompiler.initHardwareInfo(mockOfflineCompiler.deviceName));
|
||||||
|
|
||||||
|
auto defaultIpVersion = mockOfflineCompiler.compilerProductHelper->getDefaultHwIpVersion();
|
||||||
|
auto productConfig = mockOfflineCompiler.compilerProductHelper->matchRevisionIdWithProductConfig(defaultIpVersion, mockOfflineCompiler.revisionId);
|
||||||
|
if (mockOfflineCompiler.argHelper->productConfigHelper->isSupportedProductConfig(productConfig)) {
|
||||||
|
EXPECT_EQ(mockOfflineCompiler.hwInfo.ipVersion.value, productConfig);
|
||||||
|
} else {
|
||||||
|
EXPECT_EQ(mockOfflineCompiler.hwInfo.ipVersion.value, defaultIpVersion);
|
||||||
|
}
|
||||||
|
|
||||||
EXPECT_EQ(mockOfflineCompiler.revisionId, static_cast<decltype(mockOfflineCompiler.revisionId)>(mockOfflineCompiler.hwInfo.platform.usRevId));
|
EXPECT_EQ(mockOfflineCompiler.revisionId, static_cast<decltype(mockOfflineCompiler.revisionId)>(mockOfflineCompiler.hwInfo.platform.usRevId));
|
||||||
EXPECT_EQ(mockOfflineCompiler.revisionId, static_cast<decltype(mockOfflineCompiler.revisionId)>(mockOfflineCompiler.hwInfo.ipVersion.revision));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -130,4 +130,34 @@ TEST_F(Dg2OfflineCompilerTests, givenDg2G10DeviceAndUnknownRevisionIdValueWhenIn
|
||||||
EXPECT_EQ(mockOfflineCompiler.deviceConfig, dg2G10Config);
|
EXPECT_EQ(mockOfflineCompiler.deviceConfig, dg2G10Config);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DG2TEST_F(Dg2OfflineCompilerTests, givenDg2DeprecatedAcronymAndRevisionIdValueWhenInitHwInfoThenCorrectValuesAreSet) {
|
||||||
|
MockOfflineCompiler mockOfflineCompiler;
|
||||||
|
std::vector<std::pair<HardwareIpVersion, int>> dg2G10Configs = {
|
||||||
|
{AOT::DG2_G10_A0, REV_ID_A0},
|
||||||
|
{AOT::DG2_G10_A1, REV_ID_A1},
|
||||||
|
{AOT::DG2_G10_B0, REV_ID_B0},
|
||||||
|
{AOT::DG2_G10_C0, REV_ID_C0}};
|
||||||
|
|
||||||
|
std::string deprecatedAcronym = NEO::hardwarePrefix[IGFX_DG2];
|
||||||
|
|
||||||
|
for (const auto &[config, revisionID] : dg2G10Configs) {
|
||||||
|
mockOfflineCompiler.revisionId = revisionID;
|
||||||
|
mockOfflineCompiler.initHardwareInfo(deprecatedAcronym);
|
||||||
|
|
||||||
|
EXPECT_EQ(mockOfflineCompiler.hwInfo.platform.usRevId, revisionID);
|
||||||
|
EXPECT_EQ(mockOfflineCompiler.hwInfo.ipVersion.value, config.value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DG2TEST_F(Dg2OfflineCompilerTests, givenDg2DeprecatedAcronymAndInvalisRevisionIdValueWhenInitHwInfoThenCorrectValuesAreSet) {
|
||||||
|
MockOfflineCompiler mockOfflineCompiler;
|
||||||
|
std::string deprecatedAcronym = NEO::hardwarePrefix[IGFX_DG2];
|
||||||
|
|
||||||
|
mockOfflineCompiler.revisionId = CommonConstants::invalidRevisionID;
|
||||||
|
mockOfflineCompiler.initHardwareInfo(deprecatedAcronym);
|
||||||
|
|
||||||
|
EXPECT_EQ(mockOfflineCompiler.hwInfo.platform.usRevId, CommonConstants::invalidRevisionID);
|
||||||
|
EXPECT_EQ(mockOfflineCompiler.hwInfo.ipVersion.value, AOT::DG2_G10_A0);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace NEO
|
} // namespace NEO
|
|
@ -443,9 +443,12 @@ int OfflineCompiler::initHardwareInfoForDeprecatedAcronyms(std::string deviceNam
|
||||||
hwInfo = *hardwareInfoTable[product];
|
hwInfo = *hardwareInfoTable[product];
|
||||||
if (revisionId != -1) {
|
if (revisionId != -1) {
|
||||||
hwInfo.platform.usRevId = revisionId;
|
hwInfo.platform.usRevId = revisionId;
|
||||||
hwInfo.ipVersion.revision = revisionId;
|
|
||||||
}
|
}
|
||||||
compilerProductHelper = NEO::CompilerProductHelper::create(hwInfo.platform.eProductFamily);
|
compilerProductHelper = NEO::CompilerProductHelper::create(hwInfo.platform.eProductFamily);
|
||||||
|
auto defaultIpVersion = compilerProductHelper->getDefaultHwIpVersion();
|
||||||
|
auto productConfig = compilerProductHelper->matchRevisionIdWithProductConfig(defaultIpVersion, revisionId);
|
||||||
|
hwInfo.ipVersion = argHelper->productConfigHelper->isSupportedProductConfig(productConfig) ? productConfig : defaultIpVersion;
|
||||||
|
|
||||||
uint64_t config = hwInfoConfig ? hwInfoConfig : compilerProductHelper->getHwInfoConfig(hwInfo);
|
uint64_t config = hwInfoConfig ? hwInfoConfig : compilerProductHelper->getHwInfoConfig(hwInfo);
|
||||||
setHwInfoValuesFromConfig(config, hwInfo);
|
setHwInfoValuesFromConfig(config, hwInfo);
|
||||||
hardwareInfoBaseSetup[hwInfo.platform.eProductFamily](&hwInfo, true, *compilerProductHelper);
|
hardwareInfoBaseSetup[hwInfo.platform.eProductFamily](&hwInfo, true, *compilerProductHelper);
|
||||||
|
|
|
@ -101,6 +101,10 @@ macro(macro_for_each_platform)
|
||||||
if(EXISTS ${SRC_FILE})
|
if(EXISTS ${SRC_FILE})
|
||||||
list(APPEND ${CORE_TYPE}_SRC_LINK_BASE ${SRC_FILE})
|
list(APPEND ${CORE_TYPE}_SRC_LINK_BASE ${SRC_FILE})
|
||||||
endif()
|
endif()
|
||||||
|
set(SRC_FILE ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR}${CORE_TYPE_LOWER}/compiler_product_helper_${PLATFORM_IT_LOWER}_base.inl)
|
||||||
|
if(EXISTS ${SRC_FILE})
|
||||||
|
list(APPEND ${CORE_TYPE}_SRC_LINK_BASE ${SRC_FILE})
|
||||||
|
endif()
|
||||||
set(SRC_FILE ${PATH_TO_CORE}enable_compiler_product_helper_${PLATFORM_IT_LOWER}.cpp)
|
set(SRC_FILE ${PATH_TO_CORE}enable_compiler_product_helper_${PLATFORM_IT_LOWER}.cpp)
|
||||||
if(EXISTS ${SRC_FILE})
|
if(EXISTS ${SRC_FILE})
|
||||||
list(APPEND ${CORE_TYPE}_SRC_LINK_BASE ${SRC_FILE})
|
list(APPEND ${CORE_TYPE}_SRC_LINK_BASE ${SRC_FILE})
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
|
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
|
||||||
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
||||||
#include "shared/source/helpers/compiler_product_helper_enable_subgroup_local_block_io.inl"
|
#include "shared/source/helpers/compiler_product_helper_enable_subgroup_local_block_io.inl"
|
||||||
|
#include "shared/source/helpers/compiler_product_helper_product_config_default.inl"
|
||||||
|
|
||||||
#include "platforms.h"
|
#include "platforms.h"
|
||||||
|
|
||||||
|
@ -24,7 +25,7 @@ uint64_t CompilerProductHelperHw<IGFX_ELKHARTLAKE>::getHwInfoConfig(const Hardwa
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
uint32_t CompilerProductHelperHw<IGFX_ELKHARTLAKE>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
uint32_t CompilerProductHelperHw<IGFX_ELKHARTLAKE>::getDefaultHwIpVersion() const {
|
||||||
return AOT::EHL;
|
return AOT::EHL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
|
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
|
||||||
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
||||||
#include "shared/source/helpers/compiler_product_helper_enable_subgroup_local_block_io.inl"
|
#include "shared/source/helpers/compiler_product_helper_enable_subgroup_local_block_io.inl"
|
||||||
|
#include "shared/source/helpers/compiler_product_helper_product_config_default.inl"
|
||||||
|
|
||||||
#include "platforms.h"
|
#include "platforms.h"
|
||||||
|
|
||||||
|
@ -24,7 +25,7 @@ uint64_t CompilerProductHelperHw<IGFX_ICELAKE_LP>::getHwInfoConfig(const Hardwar
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
uint32_t CompilerProductHelperHw<IGFX_ICELAKE_LP>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
uint32_t CompilerProductHelperHw<IGFX_ICELAKE_LP>::getDefaultHwIpVersion() const {
|
||||||
return AOT::ICL;
|
return AOT::ICL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
|
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
|
||||||
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
||||||
#include "shared/source/helpers/compiler_product_helper_enable_subgroup_local_block_io.inl"
|
#include "shared/source/helpers/compiler_product_helper_enable_subgroup_local_block_io.inl"
|
||||||
|
#include "shared/source/helpers/compiler_product_helper_product_config_default.inl"
|
||||||
|
|
||||||
#include "platforms.h"
|
#include "platforms.h"
|
||||||
|
|
||||||
|
@ -24,7 +25,7 @@ uint64_t CompilerProductHelperHw<IGFX_LAKEFIELD>::getHwInfoConfig(const Hardware
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
uint32_t CompilerProductHelperHw<IGFX_LAKEFIELD>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
uint32_t CompilerProductHelperHw<IGFX_LAKEFIELD>::getDefaultHwIpVersion() const {
|
||||||
return AOT::LKF;
|
return AOT::LKF;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,15 +13,15 @@
|
||||||
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
|
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
|
||||||
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
||||||
#include "shared/source/helpers/compiler_product_helper_enable_subgroup_local_block_io.inl"
|
#include "shared/source/helpers/compiler_product_helper_enable_subgroup_local_block_io.inl"
|
||||||
|
#include "shared/source/helpers/compiler_product_helper_product_config_default.inl"
|
||||||
#include "shared/source/helpers/compiler_product_helper_tgllp_and_later.inl"
|
#include "shared/source/helpers/compiler_product_helper_tgllp_and_later.inl"
|
||||||
|
|
||||||
#include "compiler_product_helper_adln.inl"
|
#include "compiler_product_helper_adln.inl"
|
||||||
#include "platforms.h"
|
#include "platforms.h"
|
||||||
|
|
||||||
namespace NEO {
|
namespace NEO {
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
uint32_t CompilerProductHelperHw<IGFX_ALDERLAKE_N>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
uint32_t CompilerProductHelperHw<IGFX_ALDERLAKE_N>::getDefaultHwIpVersion() const {
|
||||||
return AOT::ADL_N;
|
return AOT::ADL_N;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,15 +13,15 @@
|
||||||
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
|
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
|
||||||
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
||||||
#include "shared/source/helpers/compiler_product_helper_enable_subgroup_local_block_io.inl"
|
#include "shared/source/helpers/compiler_product_helper_enable_subgroup_local_block_io.inl"
|
||||||
|
#include "shared/source/helpers/compiler_product_helper_product_config_default.inl"
|
||||||
#include "shared/source/helpers/compiler_product_helper_tgllp_and_later.inl"
|
#include "shared/source/helpers/compiler_product_helper_tgllp_and_later.inl"
|
||||||
|
|
||||||
#include "compiler_product_helper_adlp.inl"
|
#include "compiler_product_helper_adlp.inl"
|
||||||
#include "platforms.h"
|
#include "platforms.h"
|
||||||
|
|
||||||
namespace NEO {
|
namespace NEO {
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
uint32_t CompilerProductHelperHw<IGFX_ALDERLAKE_P>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
uint32_t CompilerProductHelperHw<IGFX_ALDERLAKE_P>::getDefaultHwIpVersion() const {
|
||||||
return AOT::ADL_P;
|
return AOT::ADL_P;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
|
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
|
||||||
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
||||||
#include "shared/source/helpers/compiler_product_helper_enable_subgroup_local_block_io.inl"
|
#include "shared/source/helpers/compiler_product_helper_enable_subgroup_local_block_io.inl"
|
||||||
|
#include "shared/source/helpers/compiler_product_helper_product_config_default.inl"
|
||||||
#include "shared/source/helpers/compiler_product_helper_tgllp_and_later.inl"
|
#include "shared/source/helpers/compiler_product_helper_tgllp_and_later.inl"
|
||||||
|
|
||||||
#include "platforms.h"
|
#include "platforms.h"
|
||||||
|
@ -24,7 +25,7 @@ uint64_t CompilerProductHelperHw<IGFX_ALDERLAKE_S>::getHwInfoConfig(const Hardwa
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
uint32_t CompilerProductHelperHw<IGFX_ALDERLAKE_S>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
uint32_t CompilerProductHelperHw<IGFX_ALDERLAKE_S>::getDefaultHwIpVersion() const {
|
||||||
return AOT::ADL_S;
|
return AOT::ADL_S;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
|
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
|
||||||
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
||||||
#include "shared/source/helpers/compiler_product_helper_enable_subgroup_local_block_io.inl"
|
#include "shared/source/helpers/compiler_product_helper_enable_subgroup_local_block_io.inl"
|
||||||
|
#include "shared/source/helpers/compiler_product_helper_product_config_default.inl"
|
||||||
#include "shared/source/helpers/compiler_product_helper_tgllp_and_later.inl"
|
#include "shared/source/helpers/compiler_product_helper_tgllp_and_later.inl"
|
||||||
|
|
||||||
#include "platforms.h"
|
#include "platforms.h"
|
||||||
|
@ -24,7 +25,7 @@ uint64_t CompilerProductHelperHw<IGFX_DG1>::getHwInfoConfig(const HardwareInfo &
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
uint32_t CompilerProductHelperHw<IGFX_DG1>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
uint32_t CompilerProductHelperHw<IGFX_DG1>::getDefaultHwIpVersion() const {
|
||||||
return AOT::DG1;
|
return AOT::DG1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
|
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
|
||||||
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
||||||
#include "shared/source/helpers/compiler_product_helper_enable_subgroup_local_block_io.inl"
|
#include "shared/source/helpers/compiler_product_helper_enable_subgroup_local_block_io.inl"
|
||||||
|
#include "shared/source/helpers/compiler_product_helper_product_config_default.inl"
|
||||||
#include "shared/source/helpers/compiler_product_helper_tgllp_and_later.inl"
|
#include "shared/source/helpers/compiler_product_helper_tgllp_and_later.inl"
|
||||||
|
|
||||||
#include "platforms.h"
|
#include "platforms.h"
|
||||||
|
@ -29,7 +30,7 @@ bool CompilerProductHelperHw<IGFX_ROCKETLAKE>::isForceEmuInt32DivRemSPRequired()
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
uint32_t CompilerProductHelperHw<IGFX_ROCKETLAKE>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
uint32_t CompilerProductHelperHw<IGFX_ROCKETLAKE>::getDefaultHwIpVersion() const {
|
||||||
return AOT::RKL;
|
return AOT::RKL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
|
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
|
||||||
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
||||||
#include "shared/source/helpers/compiler_product_helper_enable_subgroup_local_block_io.inl"
|
#include "shared/source/helpers/compiler_product_helper_enable_subgroup_local_block_io.inl"
|
||||||
|
#include "shared/source/helpers/compiler_product_helper_product_config_default.inl"
|
||||||
#include "shared/source/helpers/compiler_product_helper_tgllp_and_later.inl"
|
#include "shared/source/helpers/compiler_product_helper_tgllp_and_later.inl"
|
||||||
|
|
||||||
#include "platforms.h"
|
#include "platforms.h"
|
||||||
|
@ -24,7 +25,7 @@ uint64_t CompilerProductHelperHw<IGFX_TIGERLAKE_LP>::getHwInfoConfig(const Hardw
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
uint32_t CompilerProductHelperHw<IGFX_TIGERLAKE_LP>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
uint32_t CompilerProductHelperHw<IGFX_TIGERLAKE_LP>::getDefaultHwIpVersion() const {
|
||||||
return AOT::TGL;
|
return AOT::TGL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,12 +14,13 @@
|
||||||
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
|
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
|
||||||
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
||||||
#include "shared/source/helpers/compiler_product_helper_disable_subgroup_local_block_io.inl"
|
#include "shared/source/helpers/compiler_product_helper_disable_subgroup_local_block_io.inl"
|
||||||
|
#include "shared/source/helpers/compiler_product_helper_product_config_default.inl"
|
||||||
|
|
||||||
#include "platforms.h"
|
#include "platforms.h"
|
||||||
|
|
||||||
namespace NEO {
|
namespace NEO {
|
||||||
template <>
|
template <>
|
||||||
uint32_t CompilerProductHelperHw<IGFX_BROADWELL>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
uint32_t CompilerProductHelperHw<IGFX_BROADWELL>::getDefaultHwIpVersion() const {
|
||||||
return AOT::BDW;
|
return AOT::BDW;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
|
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
|
||||||
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
||||||
#include "shared/source/helpers/compiler_product_helper_disable_subgroup_local_block_io.inl"
|
#include "shared/source/helpers/compiler_product_helper_disable_subgroup_local_block_io.inl"
|
||||||
|
#include "shared/source/helpers/compiler_product_helper_product_config_default.inl"
|
||||||
|
|
||||||
#include "platforms.h"
|
#include "platforms.h"
|
||||||
|
|
||||||
|
@ -30,7 +31,7 @@ uint32_t CompilerProductHelperHw<IGFX_BROXTON>::getNumThreadsPerEu() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
uint32_t CompilerProductHelperHw<IGFX_BROXTON>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
uint32_t CompilerProductHelperHw<IGFX_BROXTON>::getDefaultHwIpVersion() const {
|
||||||
return AOT::APL;
|
return AOT::APL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,11 @@ uint64_t CompilerProductHelperHw<IGFX_COFFEELAKE>::getHwInfoConfig(const Hardwar
|
||||||
return 0x100030006;
|
return 0x100030006;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <>
|
||||||
|
uint32_t CompilerProductHelperHw<IGFX_COFFEELAKE>::getDefaultHwIpVersion() const {
|
||||||
|
return AOT::CFL;
|
||||||
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
uint32_t CompilerProductHelperHw<IGFX_COFFEELAKE>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
uint32_t CompilerProductHelperHw<IGFX_COFFEELAKE>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
||||||
auto deviceId = hwInfo.platform.usDeviceID;
|
auto deviceId = hwInfo.platform.usDeviceID;
|
||||||
|
@ -40,7 +45,7 @@ uint32_t CompilerProductHelperHw<IGFX_COFFEELAKE>::getProductConfigFromHwInfo(co
|
||||||
} else if (isWhl) {
|
} else if (isWhl) {
|
||||||
return AOT::WHL;
|
return AOT::WHL;
|
||||||
}
|
}
|
||||||
return AOT::UNKNOWN_ISA;
|
return getDefaultHwIpVersion();
|
||||||
}
|
}
|
||||||
|
|
||||||
static EnableCompilerProductHelper<IGFX_COFFEELAKE> enableCompilerProductHelperCFL;
|
static EnableCompilerProductHelper<IGFX_COFFEELAKE> enableCompilerProductHelperCFL;
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
|
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
|
||||||
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
||||||
#include "shared/source/helpers/compiler_product_helper_disable_subgroup_local_block_io.inl"
|
#include "shared/source/helpers/compiler_product_helper_disable_subgroup_local_block_io.inl"
|
||||||
|
#include "shared/source/helpers/compiler_product_helper_product_config_default.inl"
|
||||||
|
|
||||||
#include "platforms.h"
|
#include "platforms.h"
|
||||||
|
|
||||||
|
@ -29,7 +30,7 @@ uint32_t CompilerProductHelperHw<IGFX_GEMINILAKE>::getNumThreadsPerEu() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
uint32_t CompilerProductHelperHw<IGFX_GEMINILAKE>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
uint32_t CompilerProductHelperHw<IGFX_GEMINILAKE>::getDefaultHwIpVersion() const {
|
||||||
return AOT::GLK;
|
return AOT::GLK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,11 @@ uint64_t CompilerProductHelperHw<IGFX_KABYLAKE>::getHwInfoConfig(const HardwareI
|
||||||
return 0x100030006;
|
return 0x100030006;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <>
|
||||||
|
uint32_t CompilerProductHelperHw<IGFX_KABYLAKE>::getDefaultHwIpVersion() const {
|
||||||
|
return AOT::KBL;
|
||||||
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
uint32_t CompilerProductHelperHw<IGFX_KABYLAKE>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
uint32_t CompilerProductHelperHw<IGFX_KABYLAKE>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
||||||
auto deviceId = hwInfo.platform.usDeviceID;
|
auto deviceId = hwInfo.platform.usDeviceID;
|
||||||
|
@ -37,7 +42,7 @@ uint32_t CompilerProductHelperHw<IGFX_KABYLAKE>::getProductConfigFromHwInfo(cons
|
||||||
} else if (isAml) {
|
} else if (isAml) {
|
||||||
return AOT::AML;
|
return AOT::AML;
|
||||||
}
|
}
|
||||||
return AOT::UNKNOWN_ISA;
|
return getDefaultHwIpVersion();
|
||||||
}
|
}
|
||||||
|
|
||||||
static EnableCompilerProductHelper<IGFX_KABYLAKE> enableCompilerProductHelperKBL;
|
static EnableCompilerProductHelper<IGFX_KABYLAKE> enableCompilerProductHelperKBL;
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
|
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
|
||||||
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
||||||
#include "shared/source/helpers/compiler_product_helper_disable_subgroup_local_block_io.inl"
|
#include "shared/source/helpers/compiler_product_helper_disable_subgroup_local_block_io.inl"
|
||||||
|
#include "shared/source/helpers/compiler_product_helper_product_config_default.inl"
|
||||||
|
|
||||||
#include "platforms.h"
|
#include "platforms.h"
|
||||||
|
|
||||||
|
@ -25,7 +26,7 @@ uint64_t CompilerProductHelperHw<IGFX_SKYLAKE>::getHwInfoConfig(const HardwareIn
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
uint32_t CompilerProductHelperHw<IGFX_SKYLAKE>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
uint32_t CompilerProductHelperHw<IGFX_SKYLAKE>::getDefaultHwIpVersion() const {
|
||||||
return AOT::SKL;
|
return AOT::SKL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,6 +50,7 @@ set(NEO_CORE_HELPERS
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/compiler_product_helper_disable_subgroup_local_block_io.inl
|
${CMAKE_CURRENT_SOURCE_DIR}/compiler_product_helper_disable_subgroup_local_block_io.inl
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/compiler_product_helper_enable_split_matrix_multiply_accumulate.inl
|
${CMAKE_CURRENT_SOURCE_DIR}/compiler_product_helper_enable_split_matrix_multiply_accumulate.inl
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/compiler_product_helper_enable_subgroup_local_block_io.inl
|
${CMAKE_CURRENT_SOURCE_DIR}/compiler_product_helper_enable_subgroup_local_block_io.inl
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/compiler_product_helper_product_config_default.inl
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/compiler_product_helper_tgllp_and_later.inl
|
${CMAKE_CURRENT_SOURCE_DIR}/compiler_product_helper_tgllp_and_later.inl
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/compiler_product_helper_xe_hp_and_later.inl
|
${CMAKE_CURRENT_SOURCE_DIR}/compiler_product_helper_xe_hp_and_later.inl
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/compiler_product_helper_xe_hpc_and_later.inl
|
${CMAKE_CURRENT_SOURCE_DIR}/compiler_product_helper_xe_hpc_and_later.inl
|
||||||
|
|
|
@ -51,6 +51,7 @@ class CompilerProductHelper {
|
||||||
virtual void setProductConfigForHwInfo(HardwareInfo &hwInfo, HardwareIpVersion config) const = 0;
|
virtual void setProductConfigForHwInfo(HardwareInfo &hwInfo, HardwareIpVersion config) const = 0;
|
||||||
virtual const char *getCachingPolicyOptions(bool isDebuggerActive) const = 0;
|
virtual const char *getCachingPolicyOptions(bool isDebuggerActive) const = 0;
|
||||||
virtual uint64_t getHwInfoConfig(const HardwareInfo &hwInfo) const = 0;
|
virtual uint64_t getHwInfoConfig(const HardwareInfo &hwInfo) const = 0;
|
||||||
|
virtual uint32_t getDefaultHwIpVersion() const = 0;
|
||||||
virtual uint32_t getNumThreadsPerEu() const = 0;
|
virtual uint32_t getNumThreadsPerEu() const = 0;
|
||||||
virtual uint32_t matchRevisionIdWithProductConfig(HardwareIpVersion ipVersion, uint32_t revisionID) const = 0;
|
virtual uint32_t matchRevisionIdWithProductConfig(HardwareIpVersion ipVersion, uint32_t revisionID) const = 0;
|
||||||
virtual std::string getDeviceExtensions(const HardwareInfo &hwInfo, const ReleaseHelper *releaseHelper) const = 0;
|
virtual std::string getDeviceExtensions(const HardwareInfo &hwInfo, const ReleaseHelper *releaseHelper) const = 0;
|
||||||
|
@ -88,6 +89,7 @@ class CompilerProductHelperHw : public CompilerProductHelper {
|
||||||
void setProductConfigForHwInfo(HardwareInfo &hwInfo, HardwareIpVersion config) const override;
|
void setProductConfigForHwInfo(HardwareInfo &hwInfo, HardwareIpVersion config) const override;
|
||||||
const char *getCachingPolicyOptions(bool isDebuggerActive) const override;
|
const char *getCachingPolicyOptions(bool isDebuggerActive) const override;
|
||||||
uint64_t getHwInfoConfig(const HardwareInfo &hwInfo) const override;
|
uint64_t getHwInfoConfig(const HardwareInfo &hwInfo) const override;
|
||||||
|
uint32_t getDefaultHwIpVersion() const override;
|
||||||
uint32_t getNumThreadsPerEu() const override;
|
uint32_t getNumThreadsPerEu() const override;
|
||||||
uint32_t matchRevisionIdWithProductConfig(HardwareIpVersion ipVersion, uint32_t revisionID) const override;
|
uint32_t matchRevisionIdWithProductConfig(HardwareIpVersion ipVersion, uint32_t revisionID) const override;
|
||||||
std::string getDeviceExtensions(const HardwareInfo &hwInfo, const ReleaseHelper *releaseHelper) const override;
|
std::string getDeviceExtensions(const HardwareInfo &hwInfo, const ReleaseHelper *releaseHelper) const override;
|
||||||
|
|
|
@ -11,10 +11,11 @@
|
||||||
namespace NEO {
|
namespace NEO {
|
||||||
template <PRODUCT_FAMILY gfxProduct>
|
template <PRODUCT_FAMILY gfxProduct>
|
||||||
uint32_t CompilerProductHelperHw<gfxProduct>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
uint32_t CompilerProductHelperHw<gfxProduct>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
||||||
return hwInfo.ipVersion.value;
|
return hwInfo.ipVersion.value ? hwInfo.ipVersion.value : getDefaultHwIpVersion();
|
||||||
}
|
}
|
||||||
template <PRODUCT_FAMILY gfxProduct>
|
template <PRODUCT_FAMILY gfxProduct>
|
||||||
void CompilerProductHelperHw<gfxProduct>::setProductConfigForHwInfo(HardwareInfo &hwInfo, HardwareIpVersion config) const {
|
void CompilerProductHelperHw<gfxProduct>::setProductConfigForHwInfo(HardwareInfo &hwInfo, HardwareIpVersion config) const {
|
||||||
hwInfo.ipVersion = config;
|
hwInfo.ipVersion = config;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace NEO
|
} // namespace NEO
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2023 Intel Corporation
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "shared/source/helpers/compiler_product_helper.h"
|
||||||
|
|
||||||
|
namespace NEO {
|
||||||
|
template <PRODUCT_FAMILY gfxProduct>
|
||||||
|
uint32_t CompilerProductHelperHw<gfxProduct>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
||||||
|
return getDefaultHwIpVersion();
|
||||||
|
}
|
||||||
|
} // namespace NEO
|
|
@ -20,6 +20,10 @@
|
||||||
#include "compiler_product_helper_pvc.inl"
|
#include "compiler_product_helper_pvc.inl"
|
||||||
#include "platforms.h"
|
#include "platforms.h"
|
||||||
namespace NEO {
|
namespace NEO {
|
||||||
|
template <>
|
||||||
|
uint32_t CompilerProductHelperHw<IGFX_PVC>::getDefaultHwIpVersion() const {
|
||||||
|
return AOT::PVC_XT_C0;
|
||||||
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
uint32_t CompilerProductHelperHw<IGFX_PVC>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
uint32_t CompilerProductHelperHw<IGFX_PVC>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
||||||
|
@ -47,7 +51,7 @@ uint32_t CompilerProductHelperHw<IGFX_PVC>::getProductConfigFromHwInfo(const Har
|
||||||
return AOT::PVC_XT_C0;
|
return AOT::PVC_XT_C0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return AOT::UNKNOWN_ISA;
|
return getDefaultHwIpVersion();
|
||||||
}
|
}
|
||||||
template <>
|
template <>
|
||||||
uint32_t CompilerProductHelperHw<IGFX_PVC>::matchRevisionIdWithProductConfig(HardwareIpVersion ipVersion, uint32_t revisionID) const {
|
uint32_t CompilerProductHelperHw<IGFX_PVC>::matchRevisionIdWithProductConfig(HardwareIpVersion ipVersion, uint32_t revisionID) const {
|
||||||
|
|
|
@ -5,19 +5,9 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "shared/source/xe_hpg_core/hw_cmds_dg2.h"
|
#include "shared/source/xe_hpg_core/definitions/compiler_product_helper_dg2_base.inl"
|
||||||
|
|
||||||
#include "platforms.h"
|
|
||||||
|
|
||||||
namespace NEO {
|
namespace NEO {
|
||||||
template <>
|
|
||||||
uint64_t CompilerProductHelperHw<IGFX_DG2>::getHwInfoConfig(const HardwareInfo &hwInfo) const {
|
|
||||||
if (DG2::isG10(hwInfo)) {
|
|
||||||
return 0x800040010;
|
|
||||||
}
|
|
||||||
return 0x200040010;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
uint32_t CompilerProductHelperHw<IGFX_DG2>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
uint32_t CompilerProductHelperHw<IGFX_DG2>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
||||||
if (DG2::isG10(hwInfo)) {
|
if (DG2::isG10(hwInfo)) {
|
||||||
|
@ -43,6 +33,6 @@ uint32_t CompilerProductHelperHw<IGFX_DG2>::getProductConfigFromHwInfo(const Har
|
||||||
} else if (DG2::isG12(hwInfo)) {
|
} else if (DG2::isG12(hwInfo)) {
|
||||||
return AOT::DG2_G12_A0;
|
return AOT::DG2_G12_A0;
|
||||||
}
|
}
|
||||||
return AOT::UNKNOWN_ISA;
|
return getDefaultHwIpVersion();
|
||||||
}
|
}
|
||||||
} // namespace NEO
|
} // namespace NEO
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2023 Intel Corporation
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "shared/source/xe_hpg_core/hw_cmds_dg2.h"
|
||||||
|
|
||||||
|
#include "platforms.h"
|
||||||
|
|
||||||
|
namespace NEO {
|
||||||
|
template <>
|
||||||
|
uint64_t CompilerProductHelperHw<IGFX_DG2>::getHwInfoConfig(const HardwareInfo &hwInfo) const {
|
||||||
|
if (DG2::isG10(hwInfo)) {
|
||||||
|
return 0x800040010;
|
||||||
|
}
|
||||||
|
return 0x200040010;
|
||||||
|
}
|
||||||
|
|
||||||
|
template <>
|
||||||
|
uint32_t CompilerProductHelperHw<IGFX_DG2>::getDefaultHwIpVersion() const {
|
||||||
|
return AOT::DG2_G10_A0;
|
||||||
|
}
|
||||||
|
|
||||||
|
template <>
|
||||||
|
uint32_t CompilerProductHelperHw<IGFX_DG2>::matchRevisionIdWithProductConfig(HardwareIpVersion ipVersion, uint32_t revisionID) const {
|
||||||
|
HardwareIpVersion dg2Config = ipVersion;
|
||||||
|
dg2Config.revision = revisionID;
|
||||||
|
return dg2Config.value;
|
||||||
|
}
|
||||||
|
} // namespace NEO
|
|
@ -16,15 +16,7 @@
|
||||||
#include "shared/source/helpers/compiler_product_helper_xe_hp_and_later.inl"
|
#include "shared/source/helpers/compiler_product_helper_xe_hp_and_later.inl"
|
||||||
|
|
||||||
#include "compiler_product_helper_dg2.inl"
|
#include "compiler_product_helper_dg2.inl"
|
||||||
|
|
||||||
namespace NEO {
|
namespace NEO {
|
||||||
|
|
||||||
static EnableCompilerProductHelper<IGFX_DG2> enableCompilerProductHelperDG2;
|
static EnableCompilerProductHelper<IGFX_DG2> enableCompilerProductHelperDG2;
|
||||||
|
|
||||||
template <>
|
|
||||||
uint32_t CompilerProductHelperHw<IGFX_DG2>::matchRevisionIdWithProductConfig(HardwareIpVersion ipVersion, uint32_t revisionID) const {
|
|
||||||
HardwareIpVersion dg2Config = ipVersion;
|
|
||||||
dg2Config.revision = revisionID;
|
|
||||||
return dg2Config.value;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace NEO
|
} // namespace NEO
|
||||||
|
|
|
@ -16,10 +16,15 @@
|
||||||
#include "shared/source/xe_hpg_core/hw_cmds_mtl.h"
|
#include "shared/source/xe_hpg_core/hw_cmds_mtl.h"
|
||||||
|
|
||||||
#include "compiler_product_helper_mtl.inl"
|
#include "compiler_product_helper_mtl.inl"
|
||||||
|
#include "platforms.h"
|
||||||
|
|
||||||
constexpr auto gfxProduct = IGFX_METEORLAKE;
|
constexpr auto gfxProduct = IGFX_METEORLAKE;
|
||||||
|
|
||||||
namespace NEO {
|
namespace NEO {
|
||||||
|
template <>
|
||||||
|
uint32_t CompilerProductHelperHw<gfxProduct>::getDefaultHwIpVersion() const {
|
||||||
|
return AOT::MTL_M_A0;
|
||||||
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
bool CompilerProductHelperHw<gfxProduct>::isSplitMatrixMultiplyAccumulateSupported(const HardwareInfo &hwInfo) const {
|
bool CompilerProductHelperHw<gfxProduct>::isSplitMatrixMultiplyAccumulateSupported(const HardwareInfo &hwInfo) const {
|
||||||
|
|
|
@ -107,7 +107,13 @@ CFLTEST_F(CflProductHelper, givenCompilerProductHelperWhenGetProductConfigThenCo
|
||||||
}
|
}
|
||||||
|
|
||||||
pInHwInfo.platform.usDeviceID = 0u;
|
pInHwInfo.platform.usDeviceID = 0u;
|
||||||
EXPECT_EQ(compilerProductHelper->getHwIpVersion(pInHwInfo), AOT::UNKNOWN_ISA);
|
EXPECT_EQ(compilerProductHelper->getHwIpVersion(pInHwInfo), AOT::CFL);
|
||||||
|
}
|
||||||
|
|
||||||
|
CFLTEST_F(CflProductHelper, givenCompilerProductHelperWhenGetIpVersionAndDeviceIdIsUnknownThenDefaultConfigIsReturned) {
|
||||||
|
pInHwInfo.platform.usDeviceID = 0u;
|
||||||
|
EXPECT_EQ(compilerProductHelper->getHwIpVersion(pInHwInfo), AOT::CFL);
|
||||||
|
EXPECT_EQ(compilerProductHelper->getDefaultHwIpVersion(), AOT::CFL);
|
||||||
}
|
}
|
||||||
|
|
||||||
CFLTEST_F(CflProductHelper, givenProductHelperWhenGettingEvictIfNecessaryFlagSupportedThenExpectTrue) {
|
CFLTEST_F(CflProductHelper, givenProductHelperWhenGettingEvictIfNecessaryFlagSupportedThenExpectTrue) {
|
||||||
|
|
|
@ -110,9 +110,12 @@ KBLTEST_F(KblProductHelper, givenCompilerProductHelperWhenGetProductConfigThenCo
|
||||||
pInHwInfo.platform.usDeviceID = deviceId;
|
pInHwInfo.platform.usDeviceID = deviceId;
|
||||||
EXPECT_EQ(compilerProductHelper->getHwIpVersion(pInHwInfo), AOT::KBL);
|
EXPECT_EQ(compilerProductHelper->getHwIpVersion(pInHwInfo), AOT::KBL);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
KBLTEST_F(KblProductHelper, givenCompilerProductHelperWhenGetIpVersionAndDeviceIdIsUnknownThenDefaultConfigIsReturned) {
|
||||||
pInHwInfo.platform.usDeviceID = 0u;
|
pInHwInfo.platform.usDeviceID = 0u;
|
||||||
EXPECT_EQ(compilerProductHelper->getHwIpVersion(pInHwInfo), AOT::UNKNOWN_ISA);
|
EXPECT_EQ(compilerProductHelper->getHwIpVersion(pInHwInfo), AOT::KBL);
|
||||||
|
EXPECT_EQ(compilerProductHelper->getDefaultHwIpVersion(), AOT::KBL);
|
||||||
}
|
}
|
||||||
|
|
||||||
KBLTEST_F(KblProductHelper, givenProductHelperWhenGettingEvictIfNecessaryFlagSupportedThenExpectTrue) {
|
KBLTEST_F(KblProductHelper, givenProductHelperWhenGettingEvictIfNecessaryFlagSupportedThenExpectTrue) {
|
||||||
|
|
|
@ -25,10 +25,10 @@ HWTEST2_P(ProductConfigHwInfoTests, givenAotConfigWhenSetHwInfoGmdIdThenCorrectV
|
||||||
EXPECT_EQ(ret, productConfig);
|
EXPECT_EQ(ret, productConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
HWTEST2_P(ProductConfigHwInfoTests, givenUnknownAotConfigWhenGetProductConfigThenUnknownIsaIsReturned, IsAtLeastMtl) {
|
HWTEST2_P(ProductConfigHwInfoTests, givenUnknownAotConfigWhenGetProductConfigThenDefaultConfigIsReturned, IsAtLeastMtl) {
|
||||||
hwInfo.ipVersion = {};
|
hwInfo.ipVersion = {};
|
||||||
auto ret = compilerProductHelper->getHwIpVersion(hwInfo);
|
auto ret = compilerProductHelper->getHwIpVersion(hwInfo);
|
||||||
EXPECT_EQ(ret, AOT::UNKNOWN_ISA);
|
EXPECT_EQ(ret, compilerProductHelper->getDefaultHwIpVersion());
|
||||||
}
|
}
|
||||||
|
|
||||||
HWTEST2_P(ProductConfigHwInfoTests, givenAotConfigWhenGetProductConfigThenCorrectValueIsReturned, IsAtLeastMtl) {
|
HWTEST2_P(ProductConfigHwInfoTests, givenAotConfigWhenGetProductConfigThenCorrectValueIsReturned, IsAtLeastMtl) {
|
||||||
|
|
|
@ -22,3 +22,13 @@ TEST_F(WddmTest, WhenPopulateIpVersionWddmIsCalledThenIpVersionIsSet) {
|
||||||
|
|
||||||
EXPECT_EQ(config, hwInfo.ipVersion.value);
|
EXPECT_EQ(config, hwInfo.ipVersion.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HWTEST2_F(WddmTest, WhenPopulateIpVersionWddmIsCalledAndIpVersionIsZeroThenDefaultValueIsSet, IsAtLeastMtl) {
|
||||||
|
auto &compilerProductHelper = wddm->rootDeviceEnvironment.getHelper<CompilerProductHelper>();
|
||||||
|
HardwareInfo hwInfo = *defaultHwInfo;
|
||||||
|
hwInfo.ipVersion = 0;
|
||||||
|
auto config = compilerProductHelper.getDefaultHwIpVersion();
|
||||||
|
wddm->populateIpVersion(hwInfo);
|
||||||
|
|
||||||
|
EXPECT_EQ(config, hwInfo.ipVersion.value);
|
||||||
|
}
|
||||||
|
|
|
@ -120,14 +120,8 @@ PVCTEST_F(ProductConfigTests, givenInvalidRevisionIdForPvcXlWhenGetProductConfig
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PVCTEST_F(ProductConfigTests, givenInvalidDeviceIdWhenGetProductConfigThenInvalidConfigIsReturned) {
|
PVCTEST_F(ProductConfigTests, givenUnknownDeviceIdWhenGetProductConfigThenDefaultConfigIsReturned) {
|
||||||
hwInfo.platform.usDeviceID = 0;
|
hwInfo.platform.usDeviceID = 0;
|
||||||
|
|
||||||
hwInfo.platform.usRevId = 0x0;
|
|
||||||
productConfig = compilerProductHelper->getHwIpVersion(hwInfo);
|
productConfig = compilerProductHelper->getHwIpVersion(hwInfo);
|
||||||
EXPECT_EQ(productConfig, AOT::UNKNOWN_ISA);
|
EXPECT_EQ(productConfig, AOT::PVC_XT_C0);
|
||||||
|
|
||||||
hwInfo.platform.usRevId = 0x3;
|
|
||||||
productConfig = compilerProductHelper->getHwIpVersion(hwInfo);
|
|
||||||
EXPECT_EQ(productConfig, AOT::UNKNOWN_ISA);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -273,18 +273,22 @@ DG2TEST_F(ProductHelperTestDg2, givenDg2G11OrG12WhenAskingIfMaxThreadsForWorkgro
|
||||||
}
|
}
|
||||||
|
|
||||||
DG2TEST_F(ProductHelperTestDg2, givenDg2G10A0OrA1SteppingWhenAskingIfWAIsRequiredThenReturnTrue) {
|
DG2TEST_F(ProductHelperTestDg2, givenDg2G10A0OrA1SteppingWhenAskingIfWAIsRequiredThenReturnTrue) {
|
||||||
|
|
||||||
auto hwInfo = *defaultHwInfo;
|
auto hwInfo = *defaultHwInfo;
|
||||||
for (uint8_t revision : {REVISION_A0, REVISION_A1, REVISION_B, REVISION_C}) {
|
std::vector<std::pair<unsigned short, uint16_t>> dg2Configs =
|
||||||
for (auto deviceId : {dg2G10DeviceIds[0], dg2G11DeviceIds[0], dg2G12DeviceIds[0]}) {
|
{{dg2G10DeviceIds[0], REV_ID_A0},
|
||||||
hwInfo.platform.usRevId = productHelper->getHwRevIdFromStepping(revision, hwInfo);
|
{dg2G10DeviceIds[0], REV_ID_A1},
|
||||||
hwInfo.platform.usDeviceID = deviceId;
|
{dg2G10DeviceIds[0], REV_ID_B0},
|
||||||
hwInfo.ipVersion.value = compilerProductHelper->getHwIpVersion(hwInfo);
|
{dg2G10DeviceIds[0], REV_ID_C0},
|
||||||
if (hwInfo.ipVersion.value == AOT::UNKNOWN_ISA) {
|
{dg2G11DeviceIds[0], REV_ID_A0},
|
||||||
continue;
|
{dg2G11DeviceIds[0], REV_ID_B0},
|
||||||
}
|
{dg2G11DeviceIds[0], REV_ID_B1},
|
||||||
|
{dg2G12DeviceIds[0], REV_ID_A0}};
|
||||||
|
|
||||||
auto expectedValue = DG2::isG10(hwInfo) && revision < REVISION_B;
|
for (const auto &[deviceID, revisionID] : dg2Configs) {
|
||||||
|
hwInfo.platform.usRevId = revisionID;
|
||||||
|
hwInfo.platform.usDeviceID = deviceID;
|
||||||
|
hwInfo.ipVersion.value = compilerProductHelper->getHwIpVersion(hwInfo);
|
||||||
|
auto expectedValue = DG2::isG10(hwInfo) && revisionID < REV_ID_B0;
|
||||||
refreshReleaseHelper(&hwInfo);
|
refreshReleaseHelper(&hwInfo);
|
||||||
|
|
||||||
EXPECT_EQ(expectedValue, productHelper->isDefaultEngineTypeAdjustmentRequired(hwInfo));
|
EXPECT_EQ(expectedValue, productHelper->isDefaultEngineTypeAdjustmentRequired(hwInfo));
|
||||||
|
@ -292,7 +296,6 @@ DG2TEST_F(ProductHelperTestDg2, givenDg2G10A0OrA1SteppingWhenAskingIfWAIsRequire
|
||||||
EXPECT_EQ(expectedValue, productHelper->isPrefetchDisablingRequired(releaseHelper));
|
EXPECT_EQ(expectedValue, productHelper->isPrefetchDisablingRequired(releaseHelper));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
DG2TEST_F(ProductHelperTestDg2, givenDg2G10WhenAskingForSBAWaThenReturnSuccessOnlyForBStepping) {
|
DG2TEST_F(ProductHelperTestDg2, givenDg2G10WhenAskingForSBAWaThenReturnSuccessOnlyForBStepping) {
|
||||||
auto hwInfo = *defaultHwInfo;
|
auto hwInfo = *defaultHwInfo;
|
||||||
|
@ -325,6 +328,24 @@ DG2TEST_F(ProductHelperTestDg2, givenDg2G12WhenAskingForSBAWaThenReturnSuccess)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DG2TEST_F(ProductHelperTestDg2, givenInvalidArchitectureInIpVersionWhenRefreshReleaseHelperThenNullptrIsReturned) {
|
||||||
|
auto hwInfo = *defaultHwInfo;
|
||||||
|
hwInfo.ipVersion.value = AOT::DG2_G10_A0;
|
||||||
|
hwInfo.ipVersion.architecture = 0;
|
||||||
|
|
||||||
|
refreshReleaseHelper(&hwInfo);
|
||||||
|
EXPECT_EQ(releaseHelper, nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
DG2TEST_F(ProductHelperTestDg2, givenInvalidReleaseInIpVersionWhenRefreshReleaseHelperThenNullptrIsReturned) {
|
||||||
|
auto hwInfo = *defaultHwInfo;
|
||||||
|
hwInfo.ipVersion.value = AOT::DG2_G10_A0;
|
||||||
|
hwInfo.ipVersion.release = 0;
|
||||||
|
|
||||||
|
refreshReleaseHelper(&hwInfo);
|
||||||
|
EXPECT_EQ(releaseHelper, nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
DG2TEST_F(ProductHelperTestDg2, givenProgramExtendedPipeControlPriorToNonPipelinedStateCommandEnabledWhenIsPipeControlPriorToNonPipelinedStateCommandsWARequiredIsCalledOnCcsThenTrueIsReturned) {
|
DG2TEST_F(ProductHelperTestDg2, givenProgramExtendedPipeControlPriorToNonPipelinedStateCommandEnabledWhenIsPipeControlPriorToNonPipelinedStateCommandsWARequiredIsCalledOnCcsThenTrueIsReturned) {
|
||||||
DebugManagerStateRestore restorer;
|
DebugManagerStateRestore restorer;
|
||||||
DebugManager.flags.ProgramExtendedPipeControlPriorToNonPipelinedStateCommand.set(true);
|
DebugManager.flags.ProgramExtendedPipeControlPriorToNonPipelinedStateCommand.set(true);
|
||||||
|
@ -729,12 +750,12 @@ DG2TEST_F(ProductConfigTests, givenDg2G12DeviceIdsWhenConfigIsCheckedThenCorrect
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DG2TEST_F(ProductConfigTests, givenInvalidRevisionIdWhenDeviceIdIsDefaultThenUnknownIsaIsReturned) {
|
DG2TEST_F(ProductConfigTests, givenInvalidRevisionIdWhenDeviceIdIsDefaultThenDefaultConfigIsReturned) {
|
||||||
hwInfo.platform.usDeviceID = 0;
|
hwInfo.platform.usDeviceID = 0;
|
||||||
hwInfo.platform.usRevId = CommonConstants::invalidRevisionID;
|
hwInfo.platform.usRevId = CommonConstants::invalidRevisionID;
|
||||||
|
|
||||||
productConfig = compilerProductHelper->getHwIpVersion(hwInfo);
|
productConfig = compilerProductHelper->getHwIpVersion(hwInfo);
|
||||||
EXPECT_EQ(productConfig, AOT::UNKNOWN_ISA);
|
EXPECT_EQ(productConfig, AOT::DG2_G10_A0);
|
||||||
}
|
}
|
||||||
|
|
||||||
DG2TEST_F(ProductConfigTests, givenDg2G10DeviceIdWhenDifferentRevisionIsPassedThenCorrectProductConfigIsReturned) {
|
DG2TEST_F(ProductConfigTests, givenDg2G10DeviceIdWhenDifferentRevisionIsPassedThenCorrectProductConfigIsReturned) {
|
||||||
|
@ -759,13 +780,13 @@ DG2TEST_F(ProductConfigTests, givenDg2G10DeviceIdWhenDifferentRevisionIsPassedTh
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DG2TEST_F(ProductConfigTests, givenDg2DeviceIdWhenIncorrectRevisionIsPassedThenCorrectProductConfigIsReturned) {
|
DG2TEST_F(ProductConfigTests, givenDg2DeviceIdWhenIncorrectRevisionIsPassedThenDefaultConfigIsReturned) {
|
||||||
for (const auto *dg2 : {&dg2G10DeviceIds, &dg2G11DeviceIds}) {
|
for (const auto *dg2 : {&dg2G10DeviceIds, &dg2G11DeviceIds}) {
|
||||||
for (const auto &deviceId : *dg2) {
|
for (const auto &deviceId : *dg2) {
|
||||||
hwInfo.platform.usDeviceID = deviceId;
|
hwInfo.platform.usDeviceID = deviceId;
|
||||||
hwInfo.platform.usRevId = CommonConstants::invalidRevisionID;
|
hwInfo.platform.usRevId = CommonConstants::invalidRevisionID;
|
||||||
productConfig = compilerProductHelper->getHwIpVersion(hwInfo);
|
productConfig = compilerProductHelper->getHwIpVersion(hwInfo);
|
||||||
EXPECT_EQ(productConfig, AOT::UNKNOWN_ISA);
|
EXPECT_EQ(productConfig, AOT::DG2_G10_A0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -796,12 +817,12 @@ DG2TEST_F(ProductConfigTests, givenDg2G12DeviceIdWhenGetProductConfigThenCorrect
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DG2TEST_F(ProductConfigTests, givenNotSetDeviceAndRevisionIdWhenGetProductConfigThenUnknownIsaIsReturned) {
|
DG2TEST_F(ProductConfigTests, givenNotSetDeviceAndRevisionIdWhenGetProductConfigThenDefaultConfigIsReturned) {
|
||||||
hwInfo.platform.usRevId = 0x0;
|
hwInfo.platform.usRevId = 0x0;
|
||||||
hwInfo.platform.usDeviceID = 0x0;
|
hwInfo.platform.usDeviceID = 0x0;
|
||||||
|
|
||||||
productConfig = compilerProductHelper->getHwIpVersion(hwInfo);
|
productConfig = compilerProductHelper->getHwIpVersion(hwInfo);
|
||||||
EXPECT_EQ(productConfig, AOT::UNKNOWN_ISA);
|
EXPECT_EQ(productConfig, AOT::DG2_G10_A0);
|
||||||
}
|
}
|
||||||
|
|
||||||
DG2TEST_F(ProductHelperTestDg2, givenProductHelperWhenAskedIfStorageInfoAdjustmentIsRequiredThenTrueIsReturned) {
|
DG2TEST_F(ProductHelperTestDg2, givenProductHelperWhenAskedIfStorageInfoAdjustmentIsRequiredThenTrueIsReturned) {
|
||||||
|
|
|
@ -63,35 +63,38 @@ DG2TEST_F(CommandEncodeDG2Test, whenProgramComputeWalkerThenApplyL3WAForDg2G10A0
|
||||||
using COMPUTE_WALKER = typename FamilyType::COMPUTE_WALKER;
|
using COMPUTE_WALKER = typename FamilyType::COMPUTE_WALKER;
|
||||||
auto walkerCmd = FamilyType::cmdInitGpgpuWalker;
|
auto walkerCmd = FamilyType::cmdInitGpgpuWalker;
|
||||||
MockExecutionEnvironment executionEnvironment{};
|
MockExecutionEnvironment executionEnvironment{};
|
||||||
auto &productHelper = executionEnvironment.rootDeviceEnvironments[0]->getHelper<ProductHelper>();
|
|
||||||
auto &compilerProductHelper = executionEnvironment.rootDeviceEnvironments[0]->getHelper<CompilerProductHelper>();
|
auto &compilerProductHelper = executionEnvironment.rootDeviceEnvironments[0]->getHelper<CompilerProductHelper>();
|
||||||
auto &rootDeviceEnvironment = *executionEnvironment.rootDeviceEnvironments[0];
|
auto &rootDeviceEnvironment = *executionEnvironment.rootDeviceEnvironments[0];
|
||||||
auto &hwInfo = *rootDeviceEnvironment.getMutableHardwareInfo();
|
auto &hwInfo = *rootDeviceEnvironment.getMutableHardwareInfo();
|
||||||
|
|
||||||
|
std::vector<std::pair<unsigned short, uint16_t>> dg2Configs =
|
||||||
|
{{dg2G10DeviceIds[0], REV_ID_A0},
|
||||||
|
{dg2G10DeviceIds[0], REV_ID_A1},
|
||||||
|
{dg2G10DeviceIds[0], REV_ID_B0},
|
||||||
|
{dg2G10DeviceIds[0], REV_ID_C0},
|
||||||
|
{dg2G11DeviceIds[0], REV_ID_A0},
|
||||||
|
{dg2G11DeviceIds[0], REV_ID_B0},
|
||||||
|
{dg2G11DeviceIds[0], REV_ID_B1},
|
||||||
|
{dg2G12DeviceIds[0], REV_ID_A0}};
|
||||||
|
|
||||||
KernelDescriptor kernelDescriptor;
|
KernelDescriptor kernelDescriptor;
|
||||||
EncodeWalkerArgs walkerArgs{KernelExecutionType::Default, true, kernelDescriptor};
|
EncodeWalkerArgs walkerArgs{KernelExecutionType::Default, true, kernelDescriptor};
|
||||||
for (uint8_t revision : {REVISION_A0, REVISION_A1, REVISION_B, REVISION_C}) {
|
|
||||||
for (auto deviceId : {dg2G10DeviceIds[0], dg2G11DeviceIds[0], dg2G12DeviceIds[0]}) {
|
for (const auto &[deviceID, revisionID] : dg2Configs) {
|
||||||
hwInfo.platform.usRevId = productHelper.getHwRevIdFromStepping(revision, hwInfo);
|
hwInfo.platform.usRevId = revisionID;
|
||||||
hwInfo.platform.usDeviceID = deviceId;
|
hwInfo.platform.usDeviceID = deviceID;
|
||||||
hwInfo.ipVersion = compilerProductHelper.getHwIpVersion(hwInfo);
|
hwInfo.ipVersion = compilerProductHelper.getHwIpVersion(hwInfo);
|
||||||
|
|
||||||
if (hwInfo.ipVersion.value == AOT::UNKNOWN_ISA) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
rootDeviceEnvironment.releaseHelper = ReleaseHelper::create(hwInfo.ipVersion);
|
rootDeviceEnvironment.releaseHelper = ReleaseHelper::create(hwInfo.ipVersion);
|
||||||
|
|
||||||
EncodeDispatchKernel<FamilyType>::encodeAdditionalWalkerFields(rootDeviceEnvironment, walkerCmd, walkerArgs);
|
EncodeDispatchKernel<FamilyType>::encodeAdditionalWalkerFields(rootDeviceEnvironment, walkerCmd, walkerArgs);
|
||||||
|
|
||||||
if (DG2::isG10(hwInfo) && revision < REVISION_B) {
|
if (DG2::isG10(hwInfo) && revisionID < REV_ID_B0) {
|
||||||
EXPECT_TRUE(walkerCmd.getL3PrefetchDisable());
|
EXPECT_TRUE(walkerCmd.getL3PrefetchDisable());
|
||||||
} else {
|
} else {
|
||||||
EXPECT_FALSE(walkerCmd.getL3PrefetchDisable());
|
EXPECT_FALSE(walkerCmd.getL3PrefetchDisable());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
using Dg2SbaTest = SbaTest;
|
using Dg2SbaTest = SbaTest;
|
||||||
|
|
||||||
|
|
|
@ -186,6 +186,16 @@ MTLTEST_F(MtlProductHelper, givenHwIpVersionWhenIsPipeControlPriorToNonPipelined
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MTLTEST_F(MtlProductHelper, givenNoReleaseHelperWhenisPipeControlPriorToNonPipelinedStateCommandsWARequiredThenCorrectValuesAreReturned) {
|
||||||
|
auto &rootDeviceEnvironment = *this->executionEnvironment->rootDeviceEnvironments[0].get();
|
||||||
|
auto &hwInfo = *rootDeviceEnvironment.getMutableHardwareInfo();
|
||||||
|
ReleaseHelper *releaseHelper = nullptr;
|
||||||
|
const auto &[isBasicWARequired, isExtendedWARequired] = productHelper->isPipeControlPriorToNonPipelinedStateCommandsWARequired(hwInfo, false, releaseHelper);
|
||||||
|
|
||||||
|
EXPECT_FALSE(isExtendedWARequired);
|
||||||
|
EXPECT_TRUE(isBasicWARequired);
|
||||||
|
}
|
||||||
|
|
||||||
MTLTEST_F(MtlProductHelper, givenMtlNotLpgWhenIsBFloat16ConversionSupportedIsCalledThenTrueIsReturned) {
|
MTLTEST_F(MtlProductHelper, givenMtlNotLpgWhenIsBFloat16ConversionSupportedIsCalledThenTrueIsReturned) {
|
||||||
auto hwInfo = *defaultHwInfo.get();
|
auto hwInfo = *defaultHwInfo.get();
|
||||||
uint32_t notLpgArchitecture = 10;
|
uint32_t notLpgArchitecture = 10;
|
||||||
|
@ -299,6 +309,10 @@ MTLTEST_F(MtlProductHelper, givenVariousMtlReleasesWhenGetExtensionsIsCalledThen
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MTLTEST_F(MtlProductHelper, givenCompilerProductHelperWhenGetDefaultHwIpVersionThenCorrectValueIsSet) {
|
||||||
|
EXPECT_EQ(compilerProductHelper->getDefaultHwIpVersion(), AOT::MTL_M_A0);
|
||||||
|
}
|
||||||
|
|
||||||
using ProductHelperTestMtl = Test<DeviceFixture>;
|
using ProductHelperTestMtl = Test<DeviceFixture>;
|
||||||
|
|
||||||
MTLTEST_F(ProductHelperTestMtl, givenPatIndexAndAllocationTypeWhenCallOverridePatIndexThenForTimestampPacketTagBufferReturnTwo) {
|
MTLTEST_F(ProductHelperTestMtl, givenPatIndexAndAllocationTypeWhenCallOverridePatIndexThenForTimestampPacketTagBufferReturnTwo) {
|
||||||
|
|
Loading…
Reference in New Issue