refactor: return thread per eu from compiler product helper

Related-To: NEO-7442
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2023-03-08 09:30:38 +00:00
committed by Compute-Runtime-Automation
parent 0c5264dfeb
commit 553dd7f21f
112 changed files with 555 additions and 479 deletions

View File

@@ -9,6 +9,7 @@
#include "shared/source/command_stream/aub_command_stream_receiver.h"
#include "shared/source/helpers/api_specific_config.h"
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/gfx_core_helper.h"
#include "shared/source/helpers/hw_info.h"
#include "shared/test/common/helpers/ult_hw_config.h"
@@ -173,11 +174,13 @@ void MulticontextAubFixture::overridePlatformConfigForAllEnginesSupport(Hardware
bool setupCalled = false;
auto compilerProductHelper = CompilerProductHelper::create(localHwInfo.platform.eProductFamily);
if (localHwInfo.platform.eRenderCoreFamily == IGFX_XE_HP_CORE) {
#ifdef SUPPORT_XE_HP_SDV
if (localHwInfo.platform.eProductFamily == IGFX_XE_HP_SDV) {
setupCalled = true;
XehpSdvHwConfig::setupHardwareInfo(&localHwInfo, true);
XehpSdvHwConfig::setupHardwareInfo(&localHwInfo, true, *compilerProductHelper);
// Mock values
localHwInfo.gtSystemInfo.SliceCount = 8;
@@ -197,7 +200,7 @@ void MulticontextAubFixture::overridePlatformConfigForAllEnginesSupport(Hardware
ASSERT_TRUE(numberOfEnabledTiles == 1);
setupCalled = true;
Dg2HwConfig::setupHardwareInfo(&localHwInfo, true);
Dg2HwConfig::setupHardwareInfo(&localHwInfo, true, *compilerProductHelper);
// Mock values
localHwInfo.gtSystemInfo.SliceCount = 8;
@@ -216,7 +219,7 @@ void MulticontextAubFixture::overridePlatformConfigForAllEnginesSupport(Hardware
if (localHwInfo.platform.eProductFamily == IGFX_PVC) {
setupCalled = true;
PvcHwConfig::setupHardwareInfo(&localHwInfo, true);
PvcHwConfig::setupHardwareInfo(&localHwInfo, true, *compilerProductHelper);
// Mock values
localHwInfo.gtSystemInfo.SliceCount = 8;

View File

@@ -5,6 +5,7 @@
*
*/
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/gfx_core_helper.h"
#include "shared/source/program/sync_buffer_handler.h"
#include "shared/test/common/mocks/ult_device_factory.h"
@@ -33,7 +34,8 @@ class SyncBufferEnqueueHandlerTest : public EnqueueHandlerTest {
void SetUp() override {
hardwareInfo = *defaultHwInfo;
hardwareInfo.capabilityTable.blitterOperationsSupported = true;
hardwareInfoSetup[productFamily](&hardwareInfo, true, 0);
auto compilerProductHelper = CompilerProductHelper::create(hardwareInfo.platform.eProductFamily);
hardwareInfoSetup[productFamily](&hardwareInfo, true, 0, *compilerProductHelper);
setUpImpl(&hardwareInfo);
}

View File

@@ -175,7 +175,7 @@ bool OclocArgHelper::getHwInfoForProductConfig(uint32_t productConfig, NEO::Hard
}
uint64_t config = hwInfoConfig ? hwInfoConfig : compilerProductHelper->getHwInfoConfig(hwInfo);
setHwInfoValuesFromConfig(config, hwInfo);
NEO::hardwareInfoBaseSetup[hwInfo.platform.eProductFamily](&hwInfo, true);
NEO::hardwareInfoBaseSetup[hwInfo.platform.eProductFamily](&hwInfo, true, *compilerProductHelper);
retVal = true;
return retVal;

View File

@@ -440,7 +440,7 @@ int OfflineCompiler::initHardwareInfoForDeprecatedAcronyms(std::string deviceNam
compilerProductHelper = NEO::CompilerProductHelper::create(hwInfo.platform.eProductFamily);
uint64_t config = hwInfoConfig ? hwInfoConfig : compilerProductHelper->getHwInfoConfig(hwInfo);
setHwInfoValuesFromConfig(config, hwInfo);
hardwareInfoBaseSetup[hwInfo.platform.eProductFamily](&hwInfo, true);
hardwareInfoBaseSetup[hwInfo.platform.eProductFamily](&hwInfo, true, *compilerProductHelper);
UNRECOVERABLE_IF(compilerProductHelper == nullptr);
productFamilyName = hardwarePrefix[hwInfo.platform.eProductFamily];
return SUCCESS;

View File

@@ -206,7 +206,7 @@ int OfflineLinker::initHardwareInfo() {
auto compilerProductHelper = NEO::CompilerProductHelper::create(hwInfo.platform.eProductFamily);
const auto hwInfoConfig = compilerProductHelper->getHwInfoConfig(hwInfo);
setHwInfoValuesFromConfig(hwInfoConfig, hwInfo);
hardwareInfoSetup[hwInfo.platform.eProductFamily](&hwInfo, true, hwInfoConfig);
hardwareInfoSetup[hwInfo.platform.eProductFamily](&hwInfo, true, hwInfoConfig, *compilerProductHelper);
return OclocErrorCode::SUCCESS;
}

View File

@@ -9,6 +9,7 @@
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/compiler_product_helper_base.inl"
#include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl"
#include "shared/source/helpers/compiler_product_helper_before_xe_hp.inl"
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
#include "hw_info_ehl.h"

View File

@@ -9,6 +9,7 @@
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/compiler_product_helper_base.inl"
#include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl"
#include "shared/source/helpers/compiler_product_helper_before_xe_hp.inl"
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
#include "hw_info_icllp.h"

View File

@@ -9,6 +9,7 @@
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/compiler_product_helper_base.inl"
#include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl"
#include "shared/source/helpers/compiler_product_helper_before_xe_hp.inl"
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
#include "hw_info_lkf.h"

View File

@@ -16,19 +16,18 @@ struct EHL : public Gen11Family {
static const HardwareInfo hwInfo;
static FeatureTable featureTable;
static WorkaroundTable workaroundTable;
static const uint32_t threadsPerEu = 7;
static const uint32_t maxEuPerSubslice = 8;
static const uint32_t maxSlicesSupported = 1;
static const uint32_t maxSubslicesSupported = 4;
static const RuntimeCapabilityTable capabilityTable;
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig);
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper);
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
};
class EhlHwConfig : public EHL {
public:
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
static const HardwareInfo hwInfo;
private:

View File

@@ -16,19 +16,18 @@ struct ICLLP : public Gen11Family {
static const HardwareInfo hwInfo;
static FeatureTable featureTable;
static WorkaroundTable workaroundTable;
static const uint32_t threadsPerEu = 7;
static const uint32_t maxEuPerSubslice = 8;
static const uint32_t maxSlicesSupported = 1;
static const uint32_t maxSubslicesSupported = 8;
static const RuntimeCapabilityTable capabilityTable;
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig);
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper);
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
};
class IcllpHw1x8x8 : public ICLLP {
public:
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
static const HardwareInfo hwInfo;
private:
@@ -37,7 +36,7 @@ class IcllpHw1x8x8 : public ICLLP {
class IcllpHw1x4x8 : public ICLLP {
public:
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
static const HardwareInfo hwInfo;
private:
@@ -45,7 +44,7 @@ class IcllpHw1x4x8 : public ICLLP {
};
class IcllpHw1x6x8 : public ICLLP {
public:
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
static const HardwareInfo hwInfo;
private:

View File

@@ -16,18 +16,17 @@ struct LKF : public Gen11Family {
static const HardwareInfo hwInfo;
static FeatureTable featureTable;
static WorkaroundTable workaroundTable;
static const uint32_t threadsPerEu = 7;
static const uint32_t maxEuPerSubslice = 8;
static const uint32_t maxSlicesSupported = 1;
static const uint32_t maxSubslicesSupported = 8;
static const RuntimeCapabilityTable capabilityTable;
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig);
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper);
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
};
class LkfHw1x8x8 : public LKF {
public:
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
static const HardwareInfo hwInfo;
private:

View File

@@ -8,6 +8,7 @@
#include "shared/source/aub_mem_dump/definitions/aub_services.h"
#include "shared/source/command_stream/preemption_mode.h"
#include "shared/source/gen11/hw_cmds_ehl.h"
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/constants.h"
#include "aubstream/engine_node.h"
@@ -112,9 +113,9 @@ void EHL::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
workaroundTable->flags.wa4kAlignUVOffsetNV12LinearSurface = true;
};
void EHL::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
void EHL::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * EHL::threadsPerEu;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * compilerProductHelper.getNumThreadsPerEu();
gtSysInfo->TotalVsThreads = 0;
gtSysInfo->TotalHsThreads = 0;
gtSysInfo->TotalDsThreads = 0;
@@ -141,8 +142,8 @@ const HardwareInfo EhlHwConfig::hwInfo = {
AOT::EHL};
GT_SYSTEM_INFO EhlHwConfig::gtSystemInfo = {0};
void EhlHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
EHL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
void EhlHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
EHL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->SliceCount = 1;
@@ -153,8 +154,8 @@ void EhlHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTable
const HardwareInfo EHL::hwInfo = EhlHwConfig::hwInfo;
void setupEHLHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig) {
EhlHwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
void setupEHLHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper) {
EhlHwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
}
void (*EHL::setupHardwareInfo)(HardwareInfo *, bool, uint64_t) = setupEHLHardwareInfoImpl;
void (*EHL::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const CompilerProductHelper &) = setupEHLHardwareInfoImpl;
} // namespace NEO

View File

@@ -8,6 +8,7 @@
#include "shared/source/aub_mem_dump/definitions/aub_services.h"
#include "shared/source/command_stream/preemption_mode.h"
#include "shared/source/gen11/hw_cmds_icllp.h"
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/constants.h"
#include "aubstream/engine_node.h"
@@ -112,9 +113,9 @@ void ICLLP::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
workaroundTable->flags.wa4kAlignUVOffsetNV12LinearSurface = true;
};
void ICLLP::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
void ICLLP::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * ICLLP::threadsPerEu;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * compilerProductHelper.getNumThreadsPerEu();
gtSysInfo->TotalHsThreads = 224;
gtSysInfo->TotalGsThreads = 224;
gtSysInfo->TotalVsThreads = 336;
@@ -141,8 +142,8 @@ const HardwareInfo IcllpHw1x8x8::hwInfo = {
AOT::ICL};
GT_SYSTEM_INFO IcllpHw1x8x8::gtSystemInfo = {0};
void IcllpHw1x8x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
ICLLP::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
void IcllpHw1x8x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
ICLLP::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->SliceCount = 1;
@@ -163,8 +164,8 @@ const HardwareInfo IcllpHw1x4x8::hwInfo = {
AOT::ICL};
GT_SYSTEM_INFO IcllpHw1x4x8::gtSystemInfo = {0};
void IcllpHw1x4x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
ICLLP::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
void IcllpHw1x4x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
ICLLP::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->SliceCount = 1;
@@ -182,8 +183,8 @@ const HardwareInfo IcllpHw1x6x8::hwInfo = {
AOT::ICL};
GT_SYSTEM_INFO IcllpHw1x6x8::gtSystemInfo = {0};
void IcllpHw1x6x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
ICLLP::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
void IcllpHw1x6x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
ICLLP::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->SliceCount = 1;
@@ -194,20 +195,20 @@ void IcllpHw1x6x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTabl
const HardwareInfo ICLLP::hwInfo = IcllpHw1x8x8::hwInfo;
void setupICLLPHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig) {
void setupICLLPHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper) {
if (hwInfoConfig == 0x100080008) {
IcllpHw1x8x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
IcllpHw1x8x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
} else if (hwInfoConfig == 0x100040008) {
IcllpHw1x4x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
IcllpHw1x4x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
} else if (hwInfoConfig == 0x100060008) {
IcllpHw1x6x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
IcllpHw1x6x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
} else if (hwInfoConfig == 0x0) {
// Default config
IcllpHw1x8x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
IcllpHw1x8x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
} else {
UNRECOVERABLE_IF(true);
}
}
void (*ICLLP::setupHardwareInfo)(HardwareInfo *, bool, uint64_t) = setupICLLPHardwareInfoImpl;
void (*ICLLP::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const CompilerProductHelper &) = setupICLLPHardwareInfoImpl;
} // namespace NEO

View File

@@ -8,6 +8,7 @@
#include "shared/source/aub_mem_dump/definitions/aub_services.h"
#include "shared/source/command_stream/preemption_mode.h"
#include "shared/source/gen11/hw_cmds_lkf.h"
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/constants.h"
#include "aubstream/engine_node.h"
@@ -112,9 +113,9 @@ void LKF::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
workaroundTable->flags.wa4kAlignUVOffsetNV12LinearSurface = true;
};
void LKF::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
void LKF::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * LKF::threadsPerEu;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * compilerProductHelper.getNumThreadsPerEu();
gtSysInfo->TotalVsThreads = 448;
gtSysInfo->TotalHsThreads = 448;
gtSysInfo->TotalDsThreads = 448;
@@ -140,11 +141,9 @@ const HardwareInfo LkfHw1x8x8::hwInfo = {
LKF::capabilityTable,
AOT::LKF};
GT_SYSTEM_INFO LkfHw1x8x8::gtSystemInfo = {0};
void LkfHw1x8x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
LKF::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
void LkfHw1x8x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
LKF::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * LKF::threadsPerEu;
gtSysInfo->SliceCount = 1;
gtSysInfo->L3CacheSizeInKb = 2560;
gtSysInfo->L3BankCount = 8;
@@ -153,16 +152,16 @@ void LkfHw1x8x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableA
const HardwareInfo LKF::hwInfo = LkfHw1x8x8::hwInfo;
void setupLKFHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig) {
void setupLKFHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper) {
if (hwInfoConfig == 0x100080008) {
LkfHw1x8x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
LkfHw1x8x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
} else if (hwInfoConfig == 0x0) {
// Default config
LkfHw1x8x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
LkfHw1x8x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
} else {
UNRECOVERABLE_IF(true);
}
}
void (*LKF::setupHardwareInfo)(HardwareInfo *, bool, uint64_t) = setupLKFHardwareInfoImpl;
void (*LKF::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const CompilerProductHelper &) = setupLKFHardwareInfoImpl;
} // namespace NEO

View File

@@ -7,8 +7,8 @@
const HardwareInfo ADLN::hwInfo = AdlnHwConfig::hwInfo;
void setupADLNHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig) {
AdlnHwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
void setupADLNHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper) {
AdlnHwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
}
void (*ADLN::setupHardwareInfo)(HardwareInfo *, bool, const uint64_t) = setupADLNHardwareInfoImpl;
void (*ADLN::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const CompilerProductHelper &) = setupADLNHardwareInfoImpl;

View File

@@ -7,8 +7,8 @@
const HardwareInfo ADLP::hwInfo = AdlpHwConfig::hwInfo;
void setupADLPHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig) {
AdlpHwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
void setupADLPHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper) {
AdlpHwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
}
void (*ADLP::setupHardwareInfo)(HardwareInfo *, bool, const uint64_t) = setupADLPHardwareInfoImpl;
void (*ADLP::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const CompilerProductHelper &) = setupADLPHardwareInfoImpl;

View File

@@ -9,6 +9,7 @@
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/compiler_product_helper_base.inl"
#include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl"
#include "shared/source/helpers/compiler_product_helper_before_xe_hp.inl"
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
#include "compiler_product_helper_adln.inl"

View File

@@ -9,6 +9,7 @@
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/compiler_product_helper_base.inl"
#include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl"
#include "shared/source/helpers/compiler_product_helper_before_xe_hp.inl"
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
#include "compiler_product_helper_adlp.inl"

View File

@@ -9,6 +9,7 @@
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/compiler_product_helper_base.inl"
#include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl"
#include "shared/source/helpers/compiler_product_helper_before_xe_hp.inl"
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
#include "hw_info_adls.h"

View File

@@ -9,6 +9,7 @@
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/compiler_product_helper_base.inl"
#include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl"
#include "shared/source/helpers/compiler_product_helper_before_xe_hp.inl"
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
#include "hw_info_dg1.h"

View File

@@ -9,6 +9,7 @@
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/compiler_product_helper_base.inl"
#include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl"
#include "shared/source/helpers/compiler_product_helper_before_xe_hp.inl"
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
#include "hw_info_rkl.h"

View File

@@ -9,6 +9,7 @@
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/compiler_product_helper_base.inl"
#include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl"
#include "shared/source/helpers/compiler_product_helper_before_xe_hp.inl"
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
#include "hw_info_tgllp.h"

View File

@@ -16,19 +16,18 @@ struct ADLN : public Gen12LpFamily {
static const HardwareInfo hwInfo;
static FeatureTable featureTable;
static WorkaroundTable workaroundTable;
static const uint32_t threadsPerEu = 7;
static const uint32_t maxEuPerSubslice = 16;
static const uint32_t maxSlicesSupported = 1;
static const uint32_t maxSubslicesSupported = 6;
static const uint32_t maxDualSubslicesSupported = 12;
static const RuntimeCapabilityTable capabilityTable;
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig);
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper);
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
};
class AdlnHwConfig : public ADLN {
public:
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
static const HardwareInfo hwInfo;
private:

View File

@@ -16,15 +16,14 @@ struct ADLP : public Gen12LpFamily {
static const HardwareInfo hwInfo;
static FeatureTable featureTable;
static WorkaroundTable workaroundTable;
static const uint32_t threadsPerEu = 7;
static const uint32_t maxEuPerSubslice = 16;
static const uint32_t maxSlicesSupported = 1;
static const uint32_t maxSubslicesSupported = 6;
static const uint32_t maxDualSubslicesSupported = 12;
static const RuntimeCapabilityTable capabilityTable;
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig);
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper);
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
struct PipelineSelectStateSupport {
static constexpr bool mediaSamplerDopClockGate = true;
@@ -34,7 +33,7 @@ struct ADLP : public Gen12LpFamily {
class AdlpHwConfig : public ADLP {
public:
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
static const HardwareInfo hwInfo;
private:

View File

@@ -16,19 +16,18 @@ struct ADLS : public Gen12LpFamily {
static const HardwareInfo hwInfo;
static FeatureTable featureTable;
static WorkaroundTable workaroundTable;
static const uint32_t threadsPerEu = 7;
static const uint32_t maxEuPerSubslice = 16;
static const uint32_t maxSlicesSupported = 1;
static const uint32_t maxSubslicesSupported = 6;
static const uint32_t maxDualSubslicesSupported = 12;
static const RuntimeCapabilityTable capabilityTable;
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig);
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper);
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
};
class AdlsHwConfig : public ADLS {
public:
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
static const HardwareInfo hwInfo;
private:

View File

@@ -15,19 +15,18 @@ struct DG1 : public Gen12LpFamily {
static const HardwareInfo hwInfo;
static FeatureTable featureTable;
static WorkaroundTable workaroundTable;
static const uint32_t threadsPerEu = 7;
static const uint32_t maxEuPerSubslice = 16;
static const uint32_t maxSlicesSupported = 1;
static const uint32_t maxSubslicesSupported = 6;
static const uint32_t maxDualSubslicesSupported = 6;
static const RuntimeCapabilityTable capabilityTable;
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig);
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper);
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
};
class Dg1HwConfig : public DG1 {
public:
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
static const HardwareInfo hwInfo;
private:

View File

@@ -15,17 +15,16 @@ struct RKL : public Gen12LpFamily {
static const HardwareInfo hwInfo;
static FeatureTable featureTable;
static WorkaroundTable workaroundTable;
static const uint32_t threadsPerEu = 7;
static const uint32_t maxEuPerSubslice = 16;
static const uint32_t maxSlicesSupported = 1;
static const RuntimeCapabilityTable capabilityTable;
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig);
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper);
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
};
class RklHwConfig : public RKL {
public:
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
static const HardwareInfo hwInfo;
private:

View File

@@ -16,20 +16,19 @@ struct TGLLP : public Gen12LpFamily {
static const HardwareInfo hwInfo;
static FeatureTable featureTable;
static WorkaroundTable workaroundTable;
static const uint32_t threadsPerEu = 7;
static const uint32_t maxEuPerSubslice = 16;
static const uint32_t maxSlicesSupported = 1;
static const uint32_t maxSubslicesSupported = 6;
static const uint32_t maxDualSubslicesSupported = 6;
static const RuntimeCapabilityTable capabilityTable;
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig);
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper);
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
};
class TgllpHw1x6x16 : public TGLLP {
public:
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
static const HardwareInfo hwInfo;
private:
@@ -38,7 +37,7 @@ class TgllpHw1x6x16 : public TGLLP {
class TgllpHw1x2x16 : public TGLLP {
public:
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
static const HardwareInfo hwInfo;
private:

View File

@@ -10,6 +10,7 @@
#include "shared/source/aub_mem_dump/definitions/aub_services.h"
#include "shared/source/command_stream/preemption_mode.h"
#include "shared/source/gen12lp/hw_cmds_adln.h"
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/constants.h"
#include "aubstream/engine_node.h"
@@ -114,9 +115,9 @@ void ADLN::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
workaroundTable->flags.waUntypedBufferCompression = true;
};
void ADLN::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
void ADLN::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * ADLN::threadsPerEu;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * compilerProductHelper.getNumThreadsPerEu();
gtSysInfo->TotalPsThreadsWindowerRange = 64;
gtSysInfo->CsrSizeInMb = 8;
gtSysInfo->MaxEuPerSubSlice = ADLN::maxEuPerSubslice;
@@ -140,8 +141,8 @@ const HardwareInfo AdlnHwConfig::hwInfo = {
AOT::ADL_N};
GT_SYSTEM_INFO AdlnHwConfig::gtSystemInfo = {0};
void AdlnHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
ADLN::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
void AdlnHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
ADLN::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->L3CacheSizeInKb = 1920;

View File

@@ -10,6 +10,7 @@
#include "shared/source/aub_mem_dump/definitions/aub_services.h"
#include "shared/source/command_stream/preemption_mode.h"
#include "shared/source/gen12lp/hw_cmds_adlp.h"
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/constants.h"
#include "aubstream/engine_node.h"
@@ -114,9 +115,9 @@ void ADLP::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
workaroundTable->flags.waUntypedBufferCompression = true;
};
void ADLP::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
void ADLP::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * ADLP::threadsPerEu;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * compilerProductHelper.getNumThreadsPerEu();
gtSysInfo->TotalPsThreadsWindowerRange = 64;
gtSysInfo->CsrSizeInMb = 8;
gtSysInfo->MaxEuPerSubSlice = ADLP::maxEuPerSubslice;
@@ -140,7 +141,7 @@ const HardwareInfo AdlpHwConfig::hwInfo = {
AOT::ADL_P};
GT_SYSTEM_INFO AdlpHwConfig::gtSystemInfo = {0};
void AdlpHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
void AdlpHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->CsrSizeInMb = 8;
gtSysInfo->IsDynamicallyPopulated = false;

View File

@@ -10,6 +10,7 @@
#include "shared/source/aub_mem_dump/definitions/aub_services.h"
#include "shared/source/command_stream/preemption_mode.h"
#include "shared/source/gen12lp/hw_cmds_adls.h"
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/constants.h"
#include "aubstream/engine_node.h"
@@ -114,9 +115,9 @@ void ADLS::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
workaroundTable->flags.waUntypedBufferCompression = true;
};
void ADLS::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
void ADLS::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * ADLS::threadsPerEu;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * compilerProductHelper.getNumThreadsPerEu();
gtSysInfo->TotalPsThreadsWindowerRange = 64;
gtSysInfo->CsrSizeInMb = 8;
gtSysInfo->MaxEuPerSubSlice = ADLS::maxEuPerSubslice;
@@ -140,8 +141,8 @@ const HardwareInfo AdlsHwConfig::hwInfo = {
AOT::ADL_S};
GT_SYSTEM_INFO AdlsHwConfig::gtSystemInfo = {0};
void AdlsHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
void AdlsHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->DualSubSliceCount = gtSysInfo->SubSliceCount;
@@ -162,9 +163,9 @@ void AdlsHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTabl
const HardwareInfo ADLS::hwInfo = AdlsHwConfig::hwInfo;
void setupADLSHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig) {
AdlsHwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
void setupADLSHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper) {
AdlsHwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
}
void (*ADLS::setupHardwareInfo)(HardwareInfo *, bool, const uint64_t) = setupADLSHardwareInfoImpl;
void (*ADLS::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const CompilerProductHelper &) = setupADLSHardwareInfoImpl;
} // namespace NEO

View File

@@ -10,6 +10,7 @@
#include "shared/source/aub_mem_dump/definitions/aub_services.h"
#include "shared/source/command_stream/preemption_mode.h"
#include "shared/source/gen12lp/hw_cmds_dg1.h"
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/constants.h"
#include "aubstream/engine_node.h"
@@ -115,9 +116,9 @@ void DG1::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
workaroundTable->flags.wa4kAlignUVOffsetNV12LinearSurface = true;
};
void DG1::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
void DG1::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * DG1::threadsPerEu;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * compilerProductHelper.getNumThreadsPerEu();
gtSysInfo->TotalVsThreads = 672;
gtSysInfo->TotalHsThreads = 672;
gtSysInfo->TotalDsThreads = 672;
@@ -145,8 +146,8 @@ const HardwareInfo Dg1HwConfig::hwInfo = {
AOT::DG1};
GT_SYSTEM_INFO Dg1HwConfig::gtSystemInfo = {0};
void Dg1HwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
DG1::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
void Dg1HwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
DG1::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->SliceCount = 1;
@@ -162,16 +163,16 @@ void Dg1HwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTable
const HardwareInfo DG1::hwInfo = Dg1HwConfig::hwInfo;
void setupDG1HardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig) {
void setupDG1HardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper) {
if (hwInfoConfig == 0x100060010) {
Dg1HwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
Dg1HwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
} else if (hwInfoConfig == 0x0) {
// Default config
Dg1HwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
Dg1HwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
} else {
UNRECOVERABLE_IF(true);
}
}
void (*DG1::setupHardwareInfo)(HardwareInfo *, bool, const uint64_t) = setupDG1HardwareInfoImpl;
void (*DG1::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const CompilerProductHelper &) = setupDG1HardwareInfoImpl;
} // namespace NEO

View File

@@ -10,6 +10,7 @@
#include "shared/source/aub_mem_dump/definitions/aub_services.h"
#include "shared/source/command_stream/preemption_mode.h"
#include "shared/source/gen12lp/hw_cmds_rkl.h"
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/constants.h"
#include "aubstream/engine_node.h"
@@ -113,9 +114,9 @@ void RKL::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
workaroundTable->flags.wa4kAlignUVOffsetNV12LinearSurface = true;
};
void RKL::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
void RKL::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * RKL::threadsPerEu;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * compilerProductHelper.getNumThreadsPerEu();
gtSysInfo->TotalVsThreads = 0;
gtSysInfo->TotalHsThreads = 0;
gtSysInfo->TotalDsThreads = 0;
@@ -143,8 +144,8 @@ const HardwareInfo RklHwConfig::hwInfo = {
AOT::RKL};
GT_SYSTEM_INFO RklHwConfig::gtSystemInfo = {0};
void RklHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
RKL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
void RklHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
RKL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->DualSubSliceCount = gtSysInfo->SubSliceCount;
@@ -159,9 +160,9 @@ void RklHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTable
const HardwareInfo RKL::hwInfo = RklHwConfig::hwInfo;
void setupRKLHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig) {
RklHwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
void setupRKLHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper) {
RklHwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
}
void (*RKL::setupHardwareInfo)(HardwareInfo *, bool, const uint64_t) = setupRKLHardwareInfoImpl;
void (*RKL::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const CompilerProductHelper &) = setupRKLHardwareInfoImpl;
} // namespace NEO

View File

@@ -10,6 +10,7 @@
#include "shared/source/aub_mem_dump/definitions/aub_services.h"
#include "shared/source/command_stream/preemption_mode.h"
#include "shared/source/gen12lp/hw_cmds_tgllp.h"
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/constants.h"
#include "aubstream/engine_node.h"
@@ -114,9 +115,9 @@ void TGLLP::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
workaroundTable->flags.waUntypedBufferCompression = true;
};
void TGLLP::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
void TGLLP::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * TGLLP::threadsPerEu;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * compilerProductHelper.getNumThreadsPerEu();
gtSysInfo->TotalPsThreadsWindowerRange = 64;
gtSysInfo->CsrSizeInMb = 8;
gtSysInfo->MaxEuPerSubSlice = TGLLP::maxEuPerSubslice;
@@ -140,8 +141,8 @@ const HardwareInfo TgllpHw1x6x16::hwInfo = {
AOT::TGL};
GT_SYSTEM_INFO TgllpHw1x6x16::gtSystemInfo = {0};
void TgllpHw1x6x16::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
TGLLP::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
void TgllpHw1x6x16::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
TGLLP::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->SliceCount = 1;
@@ -168,8 +169,8 @@ const HardwareInfo TgllpHw1x2x16::hwInfo = {
AOT::TGL};
GT_SYSTEM_INFO TgllpHw1x2x16::gtSystemInfo = {0};
void TgllpHw1x2x16::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
TGLLP::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
void TgllpHw1x2x16::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
TGLLP::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->SliceCount = 1;
@@ -189,18 +190,18 @@ void TgllpHw1x2x16::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTab
const HardwareInfo TGLLP::hwInfo = TgllpHw1x6x16::hwInfo;
void setupTGLLPHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig) {
void setupTGLLPHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper) {
if (hwInfoConfig == 0x100060010) {
TgllpHw1x6x16::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
TgllpHw1x6x16::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
} else if (hwInfoConfig == 0x100020010) {
TgllpHw1x2x16::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
TgllpHw1x2x16::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
} else if (hwInfoConfig == 0x0) {
// Default config
TgllpHw1x6x16::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
TgllpHw1x6x16::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
} else {
UNRECOVERABLE_IF(true);
}
}
void (*TGLLP::setupHardwareInfo)(HardwareInfo *, bool, uint64_t) = setupTGLLPHardwareInfoImpl;
void (*TGLLP::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const CompilerProductHelper &) = setupTGLLPHardwareInfoImpl;
} // namespace NEO

View File

@@ -9,6 +9,7 @@
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/compiler_product_helper_base.inl"
#include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl"
#include "shared/source/helpers/compiler_product_helper_before_xe_hp.inl"
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
#include "hw_info_bdw.h"

View File

@@ -18,18 +18,17 @@ struct BDW : public Gen8Family {
static const HardwareInfo hwInfo;
static FeatureTable featureTable;
static WorkaroundTable workaroundTable;
static const uint32_t threadsPerEu = 7;
static const uint32_t maxEuPerSubslice = 8;
static const uint32_t maxSlicesSupported = 2;
static const uint32_t maxSubslicesSupported = 6;
static const RuntimeCapabilityTable capabilityTable;
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig);
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper);
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
};
class BdwHw1x2x6 : public BDW {
public:
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
static const HardwareInfo hwInfo;
private:
@@ -37,7 +36,7 @@ class BdwHw1x2x6 : public BDW {
};
class BdwHw1x3x6 : public BDW {
public:
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
static const HardwareInfo hwInfo;
private:
@@ -45,7 +44,7 @@ class BdwHw1x3x6 : public BDW {
};
class BdwHw1x3x8 : public BDW {
public:
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
static const HardwareInfo hwInfo;
private:
@@ -53,7 +52,7 @@ class BdwHw1x3x8 : public BDW {
};
class BdwHw2x3x8 : public BDW {
public:
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
static const HardwareInfo hwInfo;
private:

View File

@@ -8,6 +8,7 @@
#include "shared/source/aub_mem_dump/definitions/aub_services.h"
#include "shared/source/command_stream/preemption_mode.h"
#include "shared/source/gen8/hw_cmds_bdw.h"
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/constants.h"
#include "aubstream/engine_node.h"
@@ -101,9 +102,9 @@ void BDW::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
workaroundTable->flags.waSamplerCacheFlushBetweenRedescribedSurfaceReads = true;
}
void BDW::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
void BDW::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * BDW::threadsPerEu;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * compilerProductHelper.getNumThreadsPerEu();
gtSysInfo->TotalVsThreads = 336;
gtSysInfo->TotalHsThreads = 336;
gtSysInfo->TotalDsThreads = 336;
@@ -130,8 +131,8 @@ const HardwareInfo BdwHw1x2x6::hwInfo = {
AOT::BDW};
GT_SYSTEM_INFO BdwHw1x2x6::gtSystemInfo = {0};
void BdwHw1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
BDW::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
void BdwHw1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
BDW::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->SliceCount = 1;
@@ -148,8 +149,8 @@ const HardwareInfo BdwHw1x3x6::hwInfo = {
BDW::capabilityTable,
AOT::BDW};
GT_SYSTEM_INFO BdwHw1x3x6::gtSystemInfo = {0};
void BdwHw1x3x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
BDW::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
void BdwHw1x3x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
BDW::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->SliceCount = 1;
@@ -166,8 +167,8 @@ const HardwareInfo BdwHw1x3x8::hwInfo = {
BDW::capabilityTable,
AOT::BDW};
GT_SYSTEM_INFO BdwHw1x3x8::gtSystemInfo = {0};
void BdwHw1x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
BDW::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
void BdwHw1x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
BDW::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->SliceCount = 1;
@@ -184,8 +185,8 @@ const HardwareInfo BdwHw2x3x8::hwInfo = {
BDW::capabilityTable,
AOT::BDW};
GT_SYSTEM_INFO BdwHw2x3x8::gtSystemInfo = {0};
void BdwHw2x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
BDW::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
void BdwHw2x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
BDW::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->SliceCount = 2;
@@ -196,22 +197,22 @@ void BdwHw2x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableA
const HardwareInfo BDW::hwInfo = BdwHw1x3x8::hwInfo;
void setupBDWHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig) {
void setupBDWHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper) {
if (hwInfoConfig == 0x200030008) {
BdwHw2x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
BdwHw2x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
} else if (hwInfoConfig == 0x100030008) {
BdwHw1x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
BdwHw1x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
} else if (hwInfoConfig == 0x100030006) {
BdwHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
BdwHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
} else if (hwInfoConfig == 0x100020006) {
BdwHw1x2x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
BdwHw1x2x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
} else if (hwInfoConfig == 0x0) {
// Default config
BdwHw1x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
BdwHw1x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
} else {
UNRECOVERABLE_IF(true);
}
}
void (*BDW::setupHardwareInfo)(HardwareInfo *, bool, uint64_t) = setupBDWHardwareInfoImpl;
void (*BDW::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const CompilerProductHelper &) = setupBDWHardwareInfoImpl;
} // namespace NEO

View File

@@ -20,6 +20,11 @@ uint64_t CompilerProductHelperHw<IGFX_BROXTON>::getHwInfoConfig(const HardwareIn
return 0x100030006;
}
template <>
uint32_t CompilerProductHelperHw<IGFX_BROXTON>::getNumThreadsPerEu() const {
return 6;
}
static EnableCompilerProductHelper<IGFX_BROXTON> enableCompilerProductHelperBXT;
} // namespace NEO

View File

@@ -9,6 +9,7 @@
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/compiler_product_helper_base.inl"
#include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl"
#include "shared/source/helpers/compiler_product_helper_before_xe_hp.inl"
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
#include "hw_info_cfl.h"

View File

@@ -19,6 +19,11 @@ uint64_t CompilerProductHelperHw<IGFX_GEMINILAKE>::getHwInfoConfig(const Hardwar
return 0x100030006;
}
template <>
uint32_t CompilerProductHelperHw<IGFX_GEMINILAKE>::getNumThreadsPerEu() const {
return 6;
}
static EnableCompilerProductHelper<IGFX_GEMINILAKE> enableCompilerProductHelperGLK;
} // namespace NEO

View File

@@ -9,6 +9,7 @@
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/compiler_product_helper_base.inl"
#include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl"
#include "shared/source/helpers/compiler_product_helper_before_xe_hp.inl"
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
#include "hw_info_kbl.h"

View File

@@ -9,6 +9,7 @@
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/compiler_product_helper_base.inl"
#include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl"
#include "shared/source/helpers/compiler_product_helper_before_xe_hp.inl"
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
#include "hw_info_skl.h"

View File

@@ -16,20 +16,19 @@ struct BXT : public Gen9Family {
static const HardwareInfo hwInfo;
static FeatureTable featureTable;
static WorkaroundTable workaroundTable;
static const uint32_t threadsPerEu = 6;
static const uint32_t maxEuPerSubslice = 6;
static const uint32_t maxSlicesSupported = 1;
static const uint32_t maxSubslicesSupported = 3;
static const RuntimeCapabilityTable capabilityTable;
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig);
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper);
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
};
class BxtHw1x2x6 : public BXT {
public:
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
static const HardwareInfo hwInfo;
private:
@@ -38,7 +37,7 @@ class BxtHw1x2x6 : public BXT {
class BxtHw1x3x6 : public BXT {
public:
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
static const HardwareInfo hwInfo;
private:

View File

@@ -16,20 +16,19 @@ struct CFL : public Gen9Family {
static const HardwareInfo hwInfo;
static FeatureTable featureTable;
static WorkaroundTable workaroundTable;
static const uint32_t threadsPerEu = 7;
static const uint32_t maxEuPerSubslice = 8;
static const uint32_t maxSlicesSupported = 3;
static const uint32_t maxSubslicesSupported = 9;
static const RuntimeCapabilityTable capabilityTable;
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig);
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper);
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
};
class CflHw1x2x6 : public CFL {
public:
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
static const HardwareInfo hwInfo;
private:
@@ -38,7 +37,7 @@ class CflHw1x2x6 : public CFL {
class CflHw1x3x6 : public CFL {
public:
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
static const HardwareInfo hwInfo;
private:
@@ -47,7 +46,7 @@ class CflHw1x3x6 : public CFL {
class CflHw1x3x8 : public CFL {
public:
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
static const HardwareInfo hwInfo;
private:
@@ -56,7 +55,7 @@ class CflHw1x3x8 : public CFL {
class CflHw2x3x8 : public CFL {
public:
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
static const HardwareInfo hwInfo;
private:
@@ -65,7 +64,7 @@ class CflHw2x3x8 : public CFL {
class CflHw3x3x8 : public CFL {
public:
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
static const HardwareInfo hwInfo;
private:

View File

@@ -16,20 +16,19 @@ struct GLK : public Gen9Family {
static const HardwareInfo hwInfo;
static FeatureTable featureTable;
static WorkaroundTable workaroundTable;
static const uint32_t threadsPerEu = 6;
static const uint32_t maxEuPerSubslice = 6;
static const uint32_t maxSlicesSupported = 1;
static const uint32_t maxSubslicesSupported = 3;
static const RuntimeCapabilityTable capabilityTable;
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig);
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper);
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
};
class GlkHw1x3x6 : public GLK {
public:
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
static const HardwareInfo hwInfo;
private:
@@ -38,7 +37,7 @@ class GlkHw1x3x6 : public GLK {
class GlkHw1x2x6 : public GLK {
public:
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
static const HardwareInfo hwInfo;
private:

View File

@@ -16,20 +16,19 @@ struct KBL : public Gen9Family {
static const HardwareInfo hwInfo;
static FeatureTable featureTable;
static WorkaroundTable workaroundTable;
static const uint32_t threadsPerEu = 7;
static const uint32_t maxEuPerSubslice = 8;
static const uint32_t maxSlicesSupported = 3;
static const uint32_t maxSubslicesSupported = 9;
static const RuntimeCapabilityTable capabilityTable;
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig);
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper);
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
};
class KblHw1x2x6 : public KBL {
public:
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
static const HardwareInfo hwInfo;
private:
@@ -38,7 +37,7 @@ class KblHw1x2x6 : public KBL {
class KblHw1x3x6 : public KBL {
public:
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
static const HardwareInfo hwInfo;
private:
@@ -47,7 +46,7 @@ class KblHw1x3x6 : public KBL {
class KblHw1x3x8 : public KBL {
public:
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
static const HardwareInfo hwInfo;
private:
@@ -56,7 +55,7 @@ class KblHw1x3x8 : public KBL {
class KblHw2x3x8 : public KBL {
public:
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
static const HardwareInfo hwInfo;
private:
@@ -65,7 +64,7 @@ class KblHw2x3x8 : public KBL {
class KblHw3x3x8 : public KBL {
public:
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
static const HardwareInfo hwInfo;
private:

View File

@@ -16,20 +16,19 @@ struct SKL : public Gen9Family {
static const HardwareInfo hwInfo;
static FeatureTable featureTable;
static WorkaroundTable workaroundTable;
static const uint32_t threadsPerEu = 7;
static const uint32_t maxEuPerSubslice = 8;
static const uint32_t maxSlicesSupported = 3;
static const uint32_t maxSubslicesSupported = 9;
static const RuntimeCapabilityTable capabilityTable;
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig);
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper);
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
};
class SklHw1x2x6 : public SKL {
public:
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
static const HardwareInfo hwInfo;
private:
@@ -38,7 +37,7 @@ class SklHw1x2x6 : public SKL {
class SklHw1x3x6 : public SKL {
public:
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
static const HardwareInfo hwInfo;
private:
@@ -47,7 +46,7 @@ class SklHw1x3x6 : public SKL {
class SklHw1x3x8 : public SKL {
public:
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
static const HardwareInfo hwInfo;
private:
@@ -56,7 +55,7 @@ class SklHw1x3x8 : public SKL {
class SklHw2x3x8 : public SKL {
public:
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
static const HardwareInfo hwInfo;
private:
@@ -65,7 +64,7 @@ class SklHw2x3x8 : public SKL {
class SklHw3x3x8 : public SKL {
public:
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
static const HardwareInfo hwInfo;
private:

View File

@@ -8,6 +8,7 @@
#include "shared/source/aub_mem_dump/definitions/aub_services.h"
#include "shared/source/command_stream/preemption_mode.h"
#include "shared/source/gen9/hw_cmds_bxt.h"
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/constants.h"
#include "aubstream/engine_node.h"
@@ -110,9 +111,9 @@ void BXT::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
workaroundTable->flags.waSamplerCacheFlushBetweenRedescribedSurfaceReads = true;
}
void BXT::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
void BXT::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * BXT::threadsPerEu;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * compilerProductHelper.getNumThreadsPerEu();
gtSysInfo->TotalVsThreads = 112;
gtSysInfo->TotalHsThreads = 112;
gtSysInfo->TotalDsThreads = 112;
@@ -138,8 +139,8 @@ const HardwareInfo BxtHw1x2x6::hwInfo = {
BXT::capabilityTable,
AOT::APL};
GT_SYSTEM_INFO BxtHw1x2x6::gtSystemInfo = {0};
void BxtHw1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
BXT::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
void BxtHw1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
BXT::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->SliceCount = 1;
@@ -156,8 +157,8 @@ const HardwareInfo BxtHw1x3x6::hwInfo = {
BXT::capabilityTable,
AOT::APL};
GT_SYSTEM_INFO BxtHw1x3x6::gtSystemInfo = {0};
void BxtHw1x3x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
BXT::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
void BxtHw1x3x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
BXT::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->SliceCount = 1;
@@ -168,18 +169,18 @@ void BxtHw1x3x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableA
const HardwareInfo BXT::hwInfo = BxtHw1x3x6::hwInfo;
void setupBXTHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig) {
void setupBXTHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper) {
if (hwInfoConfig == 0x100020006) {
BxtHw1x2x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
BxtHw1x2x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
} else if (hwInfoConfig == 0x100030006) {
BxtHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
BxtHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
} else if (hwInfoConfig == 0x0) {
// Default config
BxtHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
BxtHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
} else {
UNRECOVERABLE_IF(true);
}
}
void (*BXT::setupHardwareInfo)(HardwareInfo *, bool, uint64_t) = setupBXTHardwareInfoImpl;
void (*BXT::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const CompilerProductHelper &) = setupBXTHardwareInfoImpl;
} // namespace NEO

View File

@@ -8,6 +8,7 @@
#include "shared/source/aub_mem_dump/definitions/aub_services.h"
#include "shared/source/command_stream/preemption_mode.h"
#include "shared/source/gen9/hw_cmds_cfl.h"
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/constants.h"
#include "aubstream/engine_node.h"
@@ -109,9 +110,9 @@ void CFL::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
workaroundTable->flags.waSamplerCacheFlushBetweenRedescribedSurfaceReads = true;
}
void CFL::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
void CFL::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * CFL::threadsPerEu;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * compilerProductHelper.getNumThreadsPerEu();
gtSysInfo->TotalVsThreads = 336;
gtSysInfo->TotalHsThreads = 336;
gtSysInfo->TotalDsThreads = 336;
@@ -137,8 +138,8 @@ const HardwareInfo CflHw1x2x6::hwInfo = {
CFL::capabilityTable,
AOT::CFL};
GT_SYSTEM_INFO CflHw1x2x6::gtSystemInfo = {0};
void CflHw1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
CFL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
void CflHw1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
CFL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->SliceCount = 1;
@@ -156,8 +157,8 @@ const HardwareInfo CflHw1x3x6::hwInfo = {
AOT::CFL};
GT_SYSTEM_INFO CflHw1x3x6::gtSystemInfo = {0};
void CflHw1x3x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
CFL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
void CflHw1x3x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
CFL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->SliceCount = 1;
@@ -175,8 +176,8 @@ const HardwareInfo CflHw1x3x8::hwInfo = {
AOT::CFL};
GT_SYSTEM_INFO CflHw1x3x8::gtSystemInfo = {0};
void CflHw1x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
CFL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
void CflHw1x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
CFL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->SliceCount = 1;
@@ -193,8 +194,8 @@ const HardwareInfo CflHw2x3x8::hwInfo = {
CFL::capabilityTable,
AOT::CFL};
GT_SYSTEM_INFO CflHw2x3x8::gtSystemInfo = {0};
void CflHw2x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
CFL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
void CflHw2x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
CFL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->SliceCount = 2;
@@ -211,8 +212,8 @@ const HardwareInfo CflHw3x3x8::hwInfo = {
CFL::capabilityTable,
AOT::CFL};
GT_SYSTEM_INFO CflHw3x3x8::gtSystemInfo = {0};
void CflHw3x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
CFL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
void CflHw3x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
CFL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->SliceCount = 3;
@@ -223,24 +224,24 @@ void CflHw3x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableA
const HardwareInfo CFL::hwInfo = CflHw1x3x6::hwInfo;
void setupCFLHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig) {
void setupCFLHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper) {
if (hwInfoConfig == 0x100030008) {
CflHw1x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
CflHw1x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
} else if (hwInfoConfig == 0x200030008) {
CflHw2x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
CflHw2x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
} else if (hwInfoConfig == 0x300030008) {
CflHw3x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
CflHw3x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
} else if (hwInfoConfig == 0x100020006) {
CflHw1x2x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
CflHw1x2x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
} else if (hwInfoConfig == 0x100030006) {
CflHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
CflHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
} else if (hwInfoConfig == 0x0) {
// Default config
CflHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
CflHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
} else {
UNRECOVERABLE_IF(true);
}
}
void (*CFL::setupHardwareInfo)(HardwareInfo *, bool, uint64_t) = setupCFLHardwareInfoImpl;
void (*CFL::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const CompilerProductHelper &) = setupCFLHardwareInfoImpl;
} // namespace NEO

View File

@@ -8,6 +8,7 @@
#include "shared/source/aub_mem_dump/definitions/aub_services.h"
#include "shared/source/command_stream/preemption_mode.h"
#include "shared/source/gen9/hw_cmds_glk.h"
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/constants.h"
#include "aubstream/engine_node.h"
@@ -111,9 +112,9 @@ void GLK::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
workaroundTable->flags.waSamplerCacheFlushBetweenRedescribedSurfaceReads = true;
}
void GLK::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
void GLK::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * GLK::threadsPerEu;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * compilerProductHelper.getNumThreadsPerEu();
gtSysInfo->TotalVsThreads = 112;
gtSysInfo->TotalHsThreads = 112;
gtSysInfo->TotalDsThreads = 112;
@@ -140,8 +141,8 @@ const HardwareInfo GlkHw1x3x6::hwInfo = {
AOT::GLK};
GT_SYSTEM_INFO GlkHw1x3x6::gtSystemInfo = {0};
void GlkHw1x3x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
GLK::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
void GlkHw1x3x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
GLK::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->SliceCount = 1;
@@ -159,8 +160,8 @@ const HardwareInfo GlkHw1x2x6::hwInfo = {
AOT::GLK};
GT_SYSTEM_INFO GlkHw1x2x6::gtSystemInfo = {0};
void GlkHw1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
GLK::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
void GlkHw1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
GLK::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->SliceCount = 1;
@@ -171,18 +172,18 @@ void GlkHw1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableA
const HardwareInfo GLK::hwInfo = GlkHw1x3x6::hwInfo;
void setupGLKHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig) {
void setupGLKHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper) {
if (hwInfoConfig == 0x100020006) {
GlkHw1x2x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
GlkHw1x2x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
} else if (hwInfoConfig == 0x100030006) {
GlkHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
GlkHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
} else if (hwInfoConfig == 0x0) {
// Default config
GlkHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
GlkHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
} else {
UNRECOVERABLE_IF(true);
}
}
void (*GLK::setupHardwareInfo)(HardwareInfo *, bool, uint64_t) = setupGLKHardwareInfoImpl;
void (*GLK::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const CompilerProductHelper &) = setupGLKHardwareInfoImpl;
} // namespace NEO

View File

@@ -8,6 +8,7 @@
#include "shared/source/aub_mem_dump/definitions/aub_services.h"
#include "shared/source/command_stream/preemption_mode.h"
#include "shared/source/gen9/hw_cmds_kbl.h"
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/constants.h"
#include "aubstream/engine_node.h"
@@ -115,9 +116,9 @@ void KBL::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
}
}
void KBL::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
void KBL::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * KBL::threadsPerEu;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * compilerProductHelper.getNumThreadsPerEu();
gtSysInfo->TotalVsThreads = 336;
gtSysInfo->TotalHsThreads = 336;
gtSysInfo->TotalDsThreads = 336;
@@ -143,8 +144,8 @@ const HardwareInfo KblHw1x2x6::hwInfo = {
KBL::capabilityTable,
AOT::KBL};
GT_SYSTEM_INFO KblHw1x2x6::gtSystemInfo = {0};
void KblHw1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
KBL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
void KblHw1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
KBL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->SliceCount = 1;
@@ -162,8 +163,8 @@ const HardwareInfo KblHw1x3x6::hwInfo = {
AOT::KBL};
GT_SYSTEM_INFO KblHw1x3x6::gtSystemInfo = {0};
void KblHw1x3x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
KBL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
void KblHw1x3x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
KBL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->SliceCount = 1;
@@ -180,8 +181,8 @@ const HardwareInfo KblHw1x3x8::hwInfo = {
KBL::capabilityTable,
AOT::KBL};
GT_SYSTEM_INFO KblHw1x3x8::gtSystemInfo = {0};
void KblHw1x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
KBL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
void KblHw1x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
KBL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->SliceCount = 1;
@@ -198,8 +199,8 @@ const HardwareInfo KblHw2x3x8::hwInfo = {
KBL::capabilityTable,
AOT::KBL};
GT_SYSTEM_INFO KblHw2x3x8::gtSystemInfo = {0};
void KblHw2x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
KBL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
void KblHw2x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
KBL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->SliceCount = 2;
@@ -216,8 +217,8 @@ const HardwareInfo KblHw3x3x8::hwInfo = {
KBL::capabilityTable,
AOT::KBL};
GT_SYSTEM_INFO KblHw3x3x8::gtSystemInfo = {0};
void KblHw3x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
KBL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
void KblHw3x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
KBL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->SliceCount = 3;
@@ -228,24 +229,24 @@ void KblHw3x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableA
const HardwareInfo KBL::hwInfo = KblHw1x3x6::hwInfo;
void setupKBLHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig) {
void setupKBLHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper) {
if (hwInfoConfig == 0x100030008) {
KblHw1x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
KblHw1x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
} else if (hwInfoConfig == 0x200030008) {
KblHw2x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
KblHw2x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
} else if (hwInfoConfig == 0x300030008) {
KblHw3x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
KblHw3x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
} else if (hwInfoConfig == 0x100020006) {
KblHw1x2x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
KblHw1x2x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
} else if (hwInfoConfig == 0x100030006) {
KblHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
KblHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
} else if (hwInfoConfig == 0x0) {
// Default config
KblHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
KblHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
} else {
UNRECOVERABLE_IF(true);
}
}
void (*KBL::setupHardwareInfo)(HardwareInfo *, bool, uint64_t) = setupKBLHardwareInfoImpl;
void (*KBL::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const CompilerProductHelper &) = setupKBLHardwareInfoImpl;
} // namespace NEO

View File

@@ -8,6 +8,7 @@
#include "shared/source/aub_mem_dump/definitions/aub_services.h"
#include "shared/source/command_stream/preemption_mode.h"
#include "shared/source/gen9/hw_cmds_skl.h"
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/constants.h"
#include "aubstream/engine_node.h"
@@ -122,9 +123,9 @@ void SKL::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
}
}
void SKL::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
void SKL::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * SKL::threadsPerEu;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * compilerProductHelper.getNumThreadsPerEu();
gtSysInfo->TotalVsThreads = 336;
gtSysInfo->TotalHsThreads = 336;
gtSysInfo->TotalDsThreads = 336;
@@ -150,8 +151,8 @@ const HardwareInfo SklHw1x2x6::hwInfo = {
SKL::capabilityTable,
AOT::SKL};
GT_SYSTEM_INFO SklHw1x2x6::gtSystemInfo = {0};
void SklHw1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
void SklHw1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->SliceCount = 1;
@@ -168,8 +169,8 @@ const HardwareInfo SklHw1x3x6::hwInfo = {
SKL::capabilityTable,
AOT::SKL};
GT_SYSTEM_INFO SklHw1x3x6::gtSystemInfo = {0};
void SklHw1x3x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
void SklHw1x3x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->SliceCount = 1;
@@ -186,8 +187,8 @@ const HardwareInfo SklHw1x3x8::hwInfo = {
SKL::capabilityTable,
AOT::SKL};
GT_SYSTEM_INFO SklHw1x3x8::gtSystemInfo = {0};
void SklHw1x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
void SklHw1x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->SliceCount = 1;
@@ -204,8 +205,8 @@ const HardwareInfo SklHw2x3x8::hwInfo = {
SKL::capabilityTable,
AOT::SKL};
GT_SYSTEM_INFO SklHw2x3x8::gtSystemInfo = {0};
void SklHw2x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
void SklHw2x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->SliceCount = 2;
@@ -222,8 +223,8 @@ const HardwareInfo SklHw3x3x8::hwInfo = {
SKL::capabilityTable,
AOT::SKL};
GT_SYSTEM_INFO SklHw3x3x8::gtSystemInfo = {0};
void SklHw3x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
void SklHw3x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->SliceCount = 3;
@@ -234,24 +235,24 @@ void SklHw3x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableA
const HardwareInfo SKL::hwInfo = SklHw1x3x8::hwInfo;
void setupSKLHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig) {
void setupSKLHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper) {
if (hwInfoConfig == 0x100030008) {
SklHw1x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
SklHw1x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
} else if (hwInfoConfig == 0x200030008) {
SklHw2x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
SklHw2x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
} else if (hwInfoConfig == 0x300030008) {
SklHw3x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
SklHw3x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
} else if (hwInfoConfig == 0x100020006) {
SklHw1x2x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
SklHw1x2x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
} else if (hwInfoConfig == 0x100030006) {
SklHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
SklHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
} else if (hwInfoConfig == 0x0) {
// Default config
SklHw1x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
SklHw1x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
} else {
UNRECOVERABLE_IF(true);
}
}
void (*SKL::setupHardwareInfo)(HardwareInfo *, bool, uint64_t) = setupSKLHardwareInfoImpl;
void (*SKL::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const CompilerProductHelper &) = setupSKLHardwareInfoImpl;
} // namespace NEO

View File

@@ -43,7 +43,9 @@ set(NEO_CORE_HELPERS
${CMAKE_CURRENT_SOURCE_DIR}/compiler_product_helper_base.inl
${CMAKE_CURRENT_SOURCE_DIR}/compiler_aot_config_bdw_and_later.inl
${CMAKE_CURRENT_SOURCE_DIR}/compiler_product_helper_bdw_and_later.inl
${CMAKE_CURRENT_SOURCE_DIR}/compiler_product_helper_before_xe_hp.inl
${CMAKE_CURRENT_SOURCE_DIR}/compiler_product_helper_before_xe_hpc.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_options_parser.cpp
${CMAKE_CURRENT_SOURCE_DIR}/compiler_options_parser.h

View File

@@ -41,6 +41,7 @@ class CompilerProductHelper {
virtual void setProductConfigForHwInfo(HardwareInfo &hwInfo, HardwareIpVersion config) const = 0;
virtual const char *getCachingPolicyOptions(bool isDebuggerActive) const = 0;
virtual uint64_t getHwInfoConfig(const HardwareInfo &hwInfo) const = 0;
virtual uint32_t getNumThreadsPerEu() const = 0;
virtual ~CompilerProductHelper() = default;
@@ -64,6 +65,7 @@ class CompilerProductHelperHw : public CompilerProductHelper {
void setProductConfigForHwInfo(HardwareInfo &hwInfo, HardwareIpVersion config) const override;
const char *getCachingPolicyOptions(bool isDebuggerActive) const override;
uint64_t getHwInfoConfig(const HardwareInfo &hwInfo) const override;
uint32_t getNumThreadsPerEu() const override;
~CompilerProductHelperHw() override = default;

View File

@@ -0,0 +1,18 @@
/*
* Copyright (C) 2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/source/helpers/compiler_product_helper.h"
namespace NEO {
template <PRODUCT_FAMILY gfxProduct>
uint32_t CompilerProductHelperHw<gfxProduct>::getNumThreadsPerEu() const {
return 7u;
}
} // namespace NEO

View File

@@ -0,0 +1,18 @@
/*
* Copyright (C) 2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/source/helpers/compiler_product_helper.h"
namespace NEO {
template <PRODUCT_FAMILY gfxProduct>
uint32_t CompilerProductHelperHw<gfxProduct>::getNumThreadsPerEu() const {
return 8u;
}
} // namespace NEO

View File

@@ -30,11 +30,11 @@ bool familyEnabled[IGFX_MAX_CORE] = {
};
const HardwareInfo *hardwareInfoTable[IGFX_MAX_PRODUCT] = {};
void (*hardwareInfoSetup[IGFX_MAX_PRODUCT])(HardwareInfo *, bool, uint64_t) = {
void (*hardwareInfoSetup[IGFX_MAX_PRODUCT])(HardwareInfo *, bool, uint64_t, const CompilerProductHelper &) = {
0x0,
};
void (*hardwareInfoBaseSetup[IGFX_MAX_PRODUCT])(HardwareInfo *, bool) = {
void (*hardwareInfoBaseSetup[IGFX_MAX_PRODUCT])(HardwareInfo *, bool, const CompilerProductHelper &) = {
0x0,
};

View File

@@ -16,6 +16,7 @@
namespace NEO {
enum PreemptionMode : uint32_t;
class CompilerProductHelper;
struct RuntimeCapabilityTable {
DirectSubmissionProperyEngines directSubmissionEngines;
@@ -154,8 +155,8 @@ struct HardwareInfo {
extern bool familyEnabled[IGFX_MAX_CORE];
extern const char *hardwarePrefix[IGFX_MAX_PRODUCT];
extern const HardwareInfo *hardwareInfoTable[IGFX_MAX_PRODUCT];
extern void (*hardwareInfoSetup[IGFX_MAX_PRODUCT])(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig);
extern void (*hardwareInfoBaseSetup[IGFX_MAX_PRODUCT])(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
extern void (*hardwareInfoSetup[IGFX_MAX_PRODUCT])(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper);
extern void (*hardwareInfoBaseSetup[IGFX_MAX_PRODUCT])(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &);
template <GFXCORE_FAMILY gfxFamily>
struct EnableGfxFamilyHw {

View File

@@ -73,7 +73,7 @@ bool DeviceFactory::prepareDeviceEnvironmentsForProductFamilyOverride(ExecutionE
setHwInfoValuesFromConfig(hwInfoConfig, *hardwareInfo);
hardwareInfoSetup[hwInfoConst->platform.eProductFamily](hardwareInfo, true, hwInfoConfig);
hardwareInfoSetup[hwInfoConst->platform.eProductFamily](hardwareInfo, true, hwInfoConfig, compilerProductHelper);
auto &productHelper = rootDeviceEnvironment.getProductHelper();
productHelper.configureHardwareCustom(hardwareInfo, nullptr);

View File

@@ -209,8 +209,5 @@ class ProductHelper {
virtual LocalMemoryAccessMode getDefaultLocalMemoryAccessMode(const HardwareInfo &hwInfo) const = 0;
virtual void fillScmPropertiesSupportStructureBase(StateComputeModePropertiesSupport &propertiesSupport) const = 0;
public:
uint32_t threadsPerEu = 0u;
};
} // namespace NEO

View File

@@ -11,6 +11,7 @@
#include "shared/source/execution_environment/root_device_environment.h"
#include "shared/source/helpers/cache_policy.h"
#include "shared/source/helpers/constants.h"
#include "shared/source/helpers/hw_mapper.h"
#include "shared/source/helpers/local_memory_access_modes.h"
#include "shared/source/helpers/preamble.h"
#include "shared/source/memory_manager/graphics_allocation.h"

View File

@@ -468,7 +468,8 @@ int Drm::setupHardwareInfo(const DeviceDescriptor *device, bool setupFeatureTabl
}
status = querySystemInfo();
device->setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
auto &compilerProductHelper = rootDeviceEnvironment.getHelper<CompilerProductHelper>();
device->setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
if (status) {
systemInfo->checkSysInfoMismatch(hwInfo);

View File

@@ -41,6 +41,7 @@ enum class CacheRegion : uint16_t;
enum class SubmissionStatus : uint32_t;
class BufferObject;
class CompilerProductHelper;
class DeviceFactory;
class MemoryInfo;
class OsContext;
@@ -55,7 +56,7 @@ struct SystemInfo;
struct DeviceDescriptor {
unsigned short deviceId;
const HardwareInfo *pHwInfo;
void (*setupHardwareInfo)(HardwareInfo *, bool);
void (*setupHardwareInfo)(HardwareInfo *, bool, const CompilerProductHelper &);
const char *devName;
};

View File

@@ -101,11 +101,13 @@ int ProductHelper::configureHwInfoDrm(const HardwareInfo *inHwInfo, HardwareInfo
topologyData.maxSubSliceCount = topologyData.sliceCount > 0 ? topologyData.subSliceCount / topologyData.sliceCount : 0;
}
auto &compilerProductHelper = rootDeviceEnvironment.getHelper<CompilerProductHelper>();
gtSystemInfo->SliceCount = static_cast<uint32_t>(topologyData.sliceCount);
gtSystemInfo->SubSliceCount = static_cast<uint32_t>(topologyData.subSliceCount);
gtSystemInfo->DualSubSliceCount = static_cast<uint32_t>(topologyData.subSliceCount);
gtSystemInfo->EUCount = static_cast<uint32_t>(topologyData.euCount);
gtSystemInfo->ThreadCount = this->threadsPerEu * gtSystemInfo->EUCount;
gtSystemInfo->ThreadCount = compilerProductHelper.getNumThreadsPerEu() * gtSystemInfo->EUCount;
gtSystemInfo->MaxEuPerSubSlice = gtSystemInfo->MaxEuPerSubSlice != 0 ? gtSystemInfo->MaxEuPerSubSlice : topologyData.maxEuCount;
gtSystemInfo->MaxSubSlicesSupported = std::max(static_cast<uint32_t>(topologyData.maxSubSliceCount * topologyData.maxSliceCount), gtSystemInfo->MaxSubSlicesSupported);
@@ -151,7 +153,6 @@ int ProductHelper::configureHwInfoDrm(const HardwareInfo *inHwInfo, HardwareInfo
drm->checkNonPersistentContextsSupport();
drm->checkPreemptionSupport();
bool preemption = drm->isPreemptionSupported();
auto &compilerProductHelper = rootDeviceEnvironment.getHelper<CompilerProductHelper>();
PreemptionHelper::adjustDefaultPreemptionMode(outHwInfo->capabilityTable,
compilerProductHelper.isMidThreadPreemptionSupported(*outHwInfo) && preemption,
static_cast<bool>(outHwInfo->featureTable.flags.ftrGpGpuThreadGroupLevelPreempt) && preemption,

View File

@@ -6,7 +6,6 @@
*/
#pragma once
#include "shared/source/helpers/hw_mapper.h"
#include "shared/source/os_interface/hw_info_config.h"
namespace NEO {
@@ -17,9 +16,6 @@ class ProductHelperHw : public ProductHelper {
static std::unique_ptr<ProductHelper> create() {
auto productHelper = std::unique_ptr<ProductHelper>(new ProductHelperHw());
using GfxProduct = typename HwMapper<gfxProduct>::GfxProduct;
productHelper->threadsPerEu = GfxProduct::threadsPerEu;
return productHelper;
}
@@ -177,13 +173,10 @@ class ProductHelperHw : public ProductHelper {
template <PRODUCT_FAMILY gfxProduct>
struct EnableProductHelper {
using GfxProduct = typename HwMapper<gfxProduct>::GfxProduct;
EnableProductHelper() {
auto productHelperCreateFunction = ProductHelperHw<gfxProduct>::create;
productHelperFactory[gfxProduct] = productHelperCreateFunction;
}
};
} // namespace NEO
} // namespace NEO

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2022 Intel Corporation
* Copyright (C) 2021-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -8,9 +8,9 @@
const HardwareInfo XE_HP_SDV::hwInfo = XehpSdvHwConfig::hwInfo;
const uint64_t XE_HP_SDV::defaultHardwareInfoConfig = 0;
void setupXEHPHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig) {
XE_HP_SDV::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
XehpSdvHwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
void setupXEHPHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper) {
XE_HP_SDV::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
XehpSdvHwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
}
void (*XE_HP_SDV::setupHardwareInfo)(HardwareInfo *, bool, const uint64_t) = setupXEHPHardwareInfoImpl;
void (*XE_HP_SDV::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const CompilerProductHelper &) = setupXEHPHardwareInfoImpl;

View File

@@ -10,6 +10,7 @@
#include "shared/source/helpers/compiler_product_helper_base.inl"
#include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl"
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
#include "shared/source/helpers/compiler_product_helper_xe_hp_and_later.inl"
#include "hw_info_xehp.h"

View File

@@ -15,20 +15,19 @@ struct XE_HP_SDV : public XeHpFamily {
static const HardwareInfo hwInfo;
static FeatureTable featureTable;
static WorkaroundTable workaroundTable;
static const uint32_t threadsPerEu = 8;
static const uint32_t maxEuPerSubslice = 16;
static const uint32_t maxSlicesSupported = 8;
static const uint32_t maxSubslicesSupported = 32;
static const uint32_t maxDualSubslicesSupported = 32;
static const RuntimeCapabilityTable capabilityTable;
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig);
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper);
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
};
class XehpSdvHwConfig : public XE_HP_SDV {
public:
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
static const HardwareInfo hwInfo;
private:

View File

@@ -117,9 +117,9 @@ void XE_HP_SDV::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
workaroundTable->flags.wa4kAlignUVOffsetNV12LinearSurface = true;
};
void XE_HP_SDV::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
void XE_HP_SDV::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * XE_HP_SDV::threadsPerEu;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * compilerProductHelper.getNumThreadsPerEu();
gtSysInfo->TotalVsThreads = 336;
gtSysInfo->TotalHsThreads = 336;
gtSysInfo->TotalDsThreads = 336;
@@ -146,7 +146,7 @@ const HardwareInfo XehpSdvHwConfig::hwInfo = {
XE_HP_SDV::capabilityTable,
};
GT_SYSTEM_INFO XehpSdvHwConfig::gtSystemInfo = {0};
void XehpSdvHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
void XehpSdvHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->CsrSizeInMb = 8;
gtSysInfo->IsL3HashModeEnabled = false;

View File

@@ -7,9 +7,9 @@
const HardwareInfo PVC::hwInfo = PvcHwConfig::hwInfo;
void setupPVCHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig) {
PVC::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
PvcHwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
void setupPVCHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper) {
PVC::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
PvcHwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
}
void (*PVC::setupHardwareInfo)(HardwareInfo *, bool, const uint64_t) = setupPVCHardwareInfoImpl;
void (*PVC::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const CompilerProductHelper &) = setupPVCHardwareInfoImpl;

View File

@@ -9,6 +9,7 @@
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/compiler_product_helper_base.inl"
#include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl"
#include "shared/source/helpers/compiler_product_helper_xe_hp_and_later.inl"
#include "shared/source/helpers/compiler_product_helper_xe_hpc_and_later.inl"
#include "compiler_product_helper_pvc.inl"

View File

@@ -18,7 +18,6 @@ struct PVC : public XeHpcCoreFamily {
static FeatureTable featureTable;
static WorkaroundTable workaroundTable;
// Initial non-zero values for unit tests
static const uint32_t threadsPerEu = 8;
static const uint32_t maxEuPerSubslice = 8;
static const uint32_t maxSlicesSupported = 8;
static const uint32_t maxSubslicesSupported = 64;
@@ -44,9 +43,9 @@ struct PVC : public XeHpcCoreFamily {
static constexpr bool devicePreemptionMode = false;
};
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig);
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper);
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
static void setupHardwareInfoMultiTileBase(HardwareInfo *hwInfo, bool setupMultiTile);
static void adjustHardwareInfo(HardwareInfo *hwInfo);
@@ -71,7 +70,7 @@ struct PVC : public XeHpcCoreFamily {
class PvcHwConfig : public PVC {
public:
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
static const HardwareInfo hwInfo;
private:

View File

@@ -8,6 +8,7 @@
#include "shared/source/aub_mem_dump/definitions/aub_services.h"
#include "shared/source/command_stream/preemption_mode.h"
#include "shared/source/debug_settings/debug_settings_manager.h"
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/constants.h"
#include "shared/source/unified_memory/usm_memory_support.h"
#include "shared/source/xe_hpc_core/hw_cmds_pvc.h"
@@ -131,9 +132,9 @@ void PVC::adjustHardwareInfo(HardwareInfo *hwInfo) {
hwInfo->capabilityTable.sharedSystemMemCapabilities = (UNIFIED_SHARED_MEMORY_ACCESS | UNIFIED_SHARED_MEMORY_CONCURRENT_ACCESS | UNIFIED_SHARED_MEMORY_CONCURRENT_ATOMIC_ACCESS);
}
void PVC::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
void PVC::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * PVC::threadsPerEu;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * compilerProductHelper.getNumThreadsPerEu();
gtSysInfo->MaxFillRate = 128;
gtSysInfo->TotalVsThreads = 336;
gtSysInfo->TotalHsThreads = 336;
@@ -177,8 +178,8 @@ const HardwareInfo PvcHwConfig::hwInfo = {
AOT::PVC_XT_A0};
GT_SYSTEM_INFO PvcHwConfig::gtSystemInfo = {0};
void PvcHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
PVC::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
void PvcHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
PVC::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->CsrSizeInMb = 8;
gtSysInfo->IsL3HashModeEnabled = false;

View File

@@ -9,9 +9,9 @@ const HardwareInfo DG2::hwInfo = Dg2HwConfig::hwInfo;
void DG2::adjustHardwareInfo(HardwareInfo *hwInfo) {}
void setupDG2HardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig) {
DG2::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
Dg2HwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
void setupDG2HardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper) {
DG2::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
Dg2HwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
}
void (*DG2::setupHardwareInfo)(HardwareInfo *, bool, const uint64_t) = setupDG2HardwareInfoImpl;
void (*DG2::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const CompilerProductHelper &) = setupDG2HardwareInfoImpl;

View File

@@ -8,10 +8,10 @@
namespace NEO {
const HardwareInfo MTL::hwInfo = MtlHwConfig::hwInfo;
void setupMTLHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig) {
MTL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
MtlHwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
void setupMTLHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper) {
MTL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
MtlHwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
}
void (*MTL::setupHardwareInfo)(HardwareInfo *, bool, const uint64_t) = setupMTLHardwareInfoImpl;
void (*MTL::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const CompilerProductHelper &) = setupMTLHardwareInfoImpl;
} // namespace NEO

View File

@@ -10,6 +10,7 @@
#include "shared/source/helpers/compiler_product_helper_base.inl"
#include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl"
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
#include "shared/source/helpers/compiler_product_helper_xe_hp_and_later.inl"
#include "compiler_product_helper_dg2.inl"
#include "hw_info_dg2.h"

View File

@@ -10,6 +10,7 @@
#include "shared/source/helpers/compiler_product_helper_base.inl"
#include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl"
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
#include "shared/source/helpers/compiler_product_helper_xe_hp_and_later.inl"
#include "compiler_product_helper_mtl.inl"
#include "hw_info_mtl.h"

View File

@@ -26,16 +26,15 @@ struct DG2 : public XeHpgCoreFamily {
static FeatureTable featureTable;
static WorkaroundTable workaroundTable;
// Initial non-zero values for unit tests
static const uint32_t threadsPerEu = 8;
static const uint32_t maxEuPerSubslice = 16;
static const uint32_t maxSlicesSupported = 8;
static const uint32_t maxSubslicesSupported = 32;
static const uint32_t maxDualSubslicesSupported = 32;
static const RuntimeCapabilityTable capabilityTable;
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig);
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper);
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo);
static void adjustHardwareInfo(HardwareInfo *hwInfo);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
static bool isG10(const HardwareInfo &hwInfo) {
auto it = std::find(dg2G10DeviceIds.begin(), dg2G10DeviceIds.end(), hwInfo.platform.usDeviceID);
@@ -55,7 +54,7 @@ struct DG2 : public XeHpgCoreFamily {
class Dg2HwConfig : public DG2 {
public:
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
static const HardwareInfo hwInfo;
private:

View File

@@ -17,15 +17,14 @@ struct MTL : public XeHpgCoreFamily {
static FeatureTable featureTable;
static WorkaroundTable workaroundTable;
// Initial non-zero values for unit tests
static const uint32_t threadsPerEu = 8;
static const uint32_t maxEuPerSubslice = 16;
static const uint32_t maxSlicesSupported = 8;
static const uint32_t maxSubslicesSupported = 32;
static const uint32_t maxDualSubslicesSupported = 32;
static const RuntimeCapabilityTable capabilityTable;
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig);
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper);
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
static void setupHardwareInfoMultiTileBase(HardwareInfo *hwInfo);
static bool isLpg(const HardwareInfo &hwInfo) {
@@ -36,7 +35,7 @@ struct MTL : public XeHpgCoreFamily {
class MtlHwConfig : public MTL {
public:
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper);
static const HardwareInfo hwInfo;
private:

View File

@@ -7,6 +7,7 @@
#include "shared/source/aub_mem_dump/definitions/aub_services.h"
#include "shared/source/command_stream/preemption_mode.h"
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/constants.h"
#include "shared/source/helpers/hw_info.h"
#include "shared/source/xe_hpg_core/hw_cmds_dg2.h"
@@ -121,9 +122,9 @@ void DG2::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
workaroundTable->flags.wa4kAlignUVOffsetNV12LinearSurface = true;
};
void DG2::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
void DG2::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * DG2::threadsPerEu;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * compilerProductHelper.getNumThreadsPerEu();
gtSysInfo->TotalVsThreads = 336;
gtSysInfo->TotalHsThreads = 336;
gtSysInfo->TotalDsThreads = 336;
@@ -151,7 +152,7 @@ const HardwareInfo Dg2HwConfig::hwInfo = {
DG2::capabilityTable,
AOT::DG2_G10_A0};
GT_SYSTEM_INFO Dg2HwConfig::gtSystemInfo = {0};
void Dg2HwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
void Dg2HwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->CsrSizeInMb = 8;
gtSysInfo->IsL3HashModeEnabled = false;

View File

@@ -8,6 +8,7 @@
#include "shared/source/aub_mem_dump/definitions/aub_services.h"
#include "shared/source/command_stream/preemption_mode.h"
#include "shared/source/debug_settings/debug_settings_manager.h"
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/constants.h"
#include "shared/source/xe_hpg_core/hw_cmds_mtl.h"
@@ -114,9 +115,9 @@ void MTL::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
workaroundTable->flags.waUntypedBufferCompression = true;
};
void MTL::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
void MTL::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * MTL::threadsPerEu;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * compilerProductHelper.getNumThreadsPerEu();
gtSysInfo->TotalVsThreads = 336;
gtSysInfo->TotalHsThreads = 336;
gtSysInfo->TotalDsThreads = 336;
@@ -153,7 +154,7 @@ const HardwareInfo MtlHwConfig::hwInfo = {
AOT::XE_LPG_MD_A0};
GT_SYSTEM_INFO MtlHwConfig::gtSystemInfo = {0};
void MtlHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
void MtlHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->CsrSizeInMb = 8;
gtSysInfo->IsL3HashModeEnabled = false;

View File

@@ -9,6 +9,7 @@
#include "shared/source/helpers/cache_policy.h"
#include "shared/source/helpers/constants.h"
#include "shared/source/helpers/hw_info.h"
#include "shared/source/helpers/hw_mapper.h"
#include "shared/source/helpers/local_memory_access_modes.h"
#include "shared/source/os_interface/hw_info_config.h"
#include "shared/source/os_interface/product_helper_hw.h"

View File

@@ -9,7 +9,6 @@
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/hw_info.h"
#include "shared/source/os_interface/hw_info_config.h"
namespace NEO {
@@ -19,12 +18,11 @@ void adjustHwInfoForTests(HardwareInfo &hwInfoForTests, uint32_t euPerSubSlice,
auto hwInfoConfig = compilerProductHelper->getHwInfoConfig(hwInfoForTests);
setHwInfoValuesFromConfig(hwInfoConfig, hwInfoForTests);
auto productHelper = ProductHelper::create(hwInfoForTests.platform.eProductFamily);
uint32_t threadsPerEu = productHelper->threadsPerEu;
uint32_t threadsPerEu = compilerProductHelper->getNumThreadsPerEu();
// set Gt and FeatureTable to initial state
bool setupFeatureTableAndWorkaroundTable = testMode == TestMode::AubTests ? true : false;
hardwareInfoSetup[hwInfoForTests.platform.eProductFamily](&hwInfoForTests, setupFeatureTableAndWorkaroundTable, hwInfoConfig);
hardwareInfoSetup[hwInfoForTests.platform.eProductFamily](&hwInfoForTests, setupFeatureTableAndWorkaroundTable, hwInfoConfig, *compilerProductHelper);
GT_SYSTEM_INFO &gtSystemInfo = hwInfoForTests.gtSystemInfo;
// and adjust dynamic values if not specified

View File

@@ -7,6 +7,7 @@
#include "shared/source/aub_mem_dump/page_table_entry_bits.h"
#include "shared/source/command_stream/aub_command_stream_receiver_hw.h"
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/engine_node_helper.h"
#include "shared/source/memory_manager/memory_banks.h"
#include "shared/source/memory_manager/memory_pool.h"
@@ -34,7 +35,8 @@ struct XeHPAndLaterAubCommandStreamReceiverTests : DeviceFixture, ::testing::Tes
template <typename FamilyType>
void setUpImpl() {
hardwareInfo = *defaultHwInfo;
hardwareInfoSetup[hardwareInfo.platform.eProductFamily](&hardwareInfo, true, 0);
auto compilerProductHelper = CompilerProductHelper::create(hardwareInfo.platform.eProductFamily);
hardwareInfoSetup[hardwareInfo.platform.eProductFamily](&hardwareInfo, true, 0, *compilerProductHelper);
hardwareInfo.gtSystemInfo.MultiTileArchInfo.IsValid = true;
DeviceFixture::setUpImpl(&hardwareInfo);
}

View File

@@ -7,6 +7,7 @@
#include "shared/source/aub/aub_helper.h"
#include "shared/source/command_stream/command_stream_receiver_simulated_common_hw.h"
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/hardware_context_controller.h"
#include "shared/test/common/fixtures/device_fixture.h"
#include "shared/test/common/helpers/debug_manager_state_restore.h"
@@ -194,7 +195,8 @@ class XeHPAndLaterTileRangeRegisterTest : public DeviceFixture, public ::testing
template <typename FamilyType>
void setUpImpl() {
hardwareInfo = *defaultHwInfo;
hardwareInfoSetup[hardwareInfo.platform.eProductFamily](&hardwareInfo, true, 0);
auto compilerProductHelper = CompilerProductHelper::create(hardwareInfo.platform.eProductFamily);
hardwareInfoSetup[hardwareInfo.platform.eProductFamily](&hardwareInfo, true, 0, *compilerProductHelper);
hardwareInfo.gtSystemInfo.MultiTileArchInfo.IsValid = true;
DeviceFixture::setUpImpl(&hardwareInfo);
}

View File

@@ -175,6 +175,7 @@ HWTEST_F(PrepareDeviceEnvironmentsTest, givenPrepareDeviceEnvironmentsForDepreca
for (auto i = 0u; i < expectedDevices; i++) {
hwInfo = exeEnv.rootDeviceEnvironments[i]->getHardwareInfo();
auto &productHelper = exeEnv.rootDeviceEnvironments[i]->getProductHelper();
auto &compilerProductHelper = exeEnv.rootDeviceEnvironments[i]->getHelper<CompilerProductHelper>();
switch (csrType) {
case CSR_HW:
case CSR_HW_WITH_AUB:
@@ -202,7 +203,7 @@ HWTEST_F(PrepareDeviceEnvironmentsTest, givenPrepareDeviceEnvironmentsForDepreca
hwInfoFromTable.featureTable = {};
hwInfoFromTable.workaroundTable = {};
hwInfoFromTable.gtSystemInfo = {};
hardwareInfoSetup[hwInfoFromTable.platform.eProductFamily](&hwInfoFromTable, true, 0x0);
hardwareInfoSetup[hwInfoFromTable.platform.eProductFamily](&hwInfoFromTable, true, 0x0, compilerProductHelper);
productHelper.configureHardwareCustom(&hwInfoFromTable, nullptr);
EXPECT_EQ(0, memcmp(&hwInfoFromTable.platform, &hwInfo->platform, sizeof(PLATFORM)));
@@ -250,6 +251,7 @@ HWTEST_F(PrepareDeviceEnvironmentsTest, givenPrepareDeviceEnvironmentsWhenCsrIsS
for (auto i = 0u; i < expectedDevices; i++) {
hwInfo = exeEnv.rootDeviceEnvironments[i]->getHardwareInfo();
auto &productHelper = exeEnv.rootDeviceEnvironments[i]->getProductHelper();
auto &compilerProductHelper = exeEnv.rootDeviceEnvironments[i]->getHelper<CompilerProductHelper>();
switch (csrType) {
case CSR_HW:
@@ -267,10 +269,9 @@ HWTEST_F(PrepareDeviceEnvironmentsTest, givenPrepareDeviceEnvironmentsWhenCsrIsS
expectedHwInfo.featureTable = {};
expectedHwInfo.workaroundTable = {};
expectedHwInfo.gtSystemInfo = {};
hardwareInfoSetup[expectedHwInfo.platform.eProductFamily](&expectedHwInfo, true, 0x0);
hardwareInfoSetup[expectedHwInfo.platform.eProductFamily](&expectedHwInfo, true, 0x0, compilerProductHelper);
productHelper.configureHardwareCustom(&expectedHwInfo, nullptr);
const auto &compilerProductHelper = exeEnv.rootDeviceEnvironments[i]->getHelper<CompilerProductHelper>();
compilerProductHelper.setProductConfigForHwInfo(expectedHwInfo, deviceAot.aotConfig);
expectedHwInfo.platform.usDeviceID = deviceAot.deviceIds->front();
@@ -338,6 +339,7 @@ HWTEST_F(PrepareDeviceEnvironmentsTest, givenPrepareDeviceEnvironmentsAndUnknown
for (auto i = 0u; i < expectedDevices; i++) {
hwInfo = exeEnv.rootDeviceEnvironments[i]->getHardwareInfo();
auto &productHelper = exeEnv.rootDeviceEnvironments[i]->getProductHelper();
auto &compilerProductHelper = exeEnv.rootDeviceEnvironments[i]->getHelper<CompilerProductHelper>();
switch (csrType) {
case CSR_HW:
@@ -362,7 +364,7 @@ HWTEST_F(PrepareDeviceEnvironmentsTest, givenPrepareDeviceEnvironmentsAndUnknown
baseHwInfo.featureTable = {};
baseHwInfo.workaroundTable = {};
baseHwInfo.gtSystemInfo = {};
hardwareInfoSetup[baseHwInfo.platform.eProductFamily](&baseHwInfo, true, 0x0);
hardwareInfoSetup[baseHwInfo.platform.eProductFamily](&baseHwInfo, true, 0x0, compilerProductHelper);
productHelper.configureHardwareCustom(&baseHwInfo, nullptr);
EXPECT_EQ(0, memcmp(&baseHwInfo.platform, &hwInfo->platform, sizeof(PLATFORM)));

View File

@@ -6,6 +6,7 @@
*/
#include "shared/source/command_stream/tbx_command_stream_receiver_hw.h"
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/memory_manager/memory_banks.h"
#include "shared/source/memory_manager/memory_pool.h"
#include "shared/source/memory_manager/physical_address_allocator.h"
@@ -22,7 +23,8 @@ struct XeHPAndLaterTbxCommandStreamReceiverTests : DeviceFixture, ::testing::Tes
template <typename FamilyType>
void setUpImpl() {
hardwareInfo = *defaultHwInfo;
hardwareInfoSetup[hardwareInfo.platform.eProductFamily](&hardwareInfo, true, 0);
auto compilerProductHelper = CompilerProductHelper::create(hardwareInfo.platform.eProductFamily);
hardwareInfoSetup[hardwareInfo.platform.eProductFamily](&hardwareInfo, true, 0, *compilerProductHelper);
hardwareInfo.gtSystemInfo.MultiTileArchInfo.IsValid = true;
DeviceFixture::setUpImpl(&hardwareInfo);
}

View File

@@ -7,6 +7,7 @@
#include "shared/source/device/device.h"
#include "shared/source/gmm_helper/gmm.h"
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/driver_model_type.h"
#include "shared/source/os_interface/device_factory.h"
#include "shared/source/os_interface/driver_info.h"
@@ -748,7 +749,8 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, DeviceTests, givenDebuggableOsContextWhenDeviceCrea
ultHwConfig.useFirstSubmissionInitDevice = true;
auto hwInfo = *defaultHwInfo;
hardwareInfoSetup[hwInfo.platform.eProductFamily](&hwInfo, true, 0);
auto compilerProductHelper = CompilerProductHelper::create(hwInfo.platform.eProductFamily);
hardwareInfoSetup[hwInfo.platform.eProductFamily](&hwInfo, true, 0, *compilerProductHelper);
MockExecutionEnvironment executionEnvironment(&hwInfo);
executionEnvironment.memoryManager.reset(new MockMemoryManagerWithDebuggableOsContext(executionEnvironment));
@@ -766,7 +768,8 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, DeviceTests, whenDeviceCreatesEnginesThenDeviceIsIn
ultHwConfig.useFirstSubmissionInitDevice = true;
auto hwInfo = *defaultHwInfo;
hardwareInfoSetup[hwInfo.platform.eProductFamily](&hwInfo, true, 0);
auto compilerProductHelper = CompilerProductHelper::create(hwInfo.platform.eProductFamily);
hardwareInfoSetup[hwInfo.platform.eProductFamily](&hwInfo, true, 0, *compilerProductHelper);
MockExecutionEnvironment executionEnvironment(&hwInfo);
executionEnvironment.incRefInternal();

View File

@@ -5,6 +5,8 @@
*
*/
#include "shared/source/execution_environment/execution_environment.h"
#include "shared/source/execution_environment/root_device_environment.h"
#include "shared/source/gen11/hw_cmds_ehl.h"
#include "shared/source/os_interface/hw_info_config.h"
#include "shared/test/common/helpers/default_hw_info.h"
@@ -19,8 +21,8 @@ using namespace NEO;
using EhlProductHelper = ProductHelperTest;
EHLTEST_F(EhlProductHelper, givenProductHelperStringThenAfterSetupResultingVmeIsDisabled) {
hardwareInfoSetup[productFamily](&pInHwInfo, false, 0x100040008);
auto &compilerProductHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper<CompilerProductHelper>();
hardwareInfoSetup[productFamily](&pInHwInfo, false, 0x100040008, compilerProductHelper);
EXPECT_FALSE(pInHwInfo.capabilityTable.ftrSupportsVmeAvcTextureSampler);
EXPECT_FALSE(pInHwInfo.capabilityTable.ftrSupportsVmeAvcPreemption);
EXPECT_FALSE(pInHwInfo.capabilityTable.supportsVme);
@@ -30,6 +32,7 @@ EHLTEST_F(EhlProductHelper, givenBoolWhenCallEhlHardwareInfoSetupThenFeatureTabl
bool boolValue[]{
true, false};
auto &compilerProductHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper<CompilerProductHelper>();
GT_SYSTEM_INFO &gtSystemInfo = pInHwInfo.gtSystemInfo;
FeatureTable &featureTable = pInHwInfo.featureTable;
WorkaroundTable &workaroundTable = pInHwInfo.workaroundTable;
@@ -39,7 +42,7 @@ EHLTEST_F(EhlProductHelper, givenBoolWhenCallEhlHardwareInfoSetupThenFeatureTabl
gtSystemInfo = {0};
featureTable = {};
workaroundTable = {};
hardwareInfoSetup[productFamily](&pInHwInfo, setParamBool, 0x100040008);
hardwareInfoSetup[productFamily](&pInHwInfo, setParamBool, 0x100040008, compilerProductHelper);
EXPECT_EQ(setParamBool, featureTable.flags.ftrL3IACoherency);
EXPECT_EQ(setParamBool, featureTable.flags.ftrPPGTT);

View File

@@ -5,6 +5,8 @@
*
*/
#include "shared/source/execution_environment/execution_environment.h"
#include "shared/source/execution_environment/root_device_environment.h"
#include "shared/source/gen11/hw_cmds_icllp.h"
#include "shared/source/os_interface/hw_info_config.h"
#include "shared/test/common/helpers/default_hw_info.h"
@@ -21,11 +23,12 @@ using IcllpProductHelper = ProductHelperTest;
ICLLPTEST_F(IcllpProductHelper, givenInvalidSystemInfoWhenSettingHardwareInfoThenExpectThrow) {
auto &compilerProductHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper<CompilerProductHelper>();
GT_SYSTEM_INFO &gtSystemInfo = pInHwInfo.gtSystemInfo;
uint64_t config = 0xdeadbeef;
gtSystemInfo = {0};
EXPECT_ANY_THROW(hardwareInfoSetup[productFamily](&pInHwInfo, false, config));
EXPECT_ANY_THROW(hardwareInfoSetup[productFamily](&pInHwInfo, false, config, compilerProductHelper));
EXPECT_EQ(0u, gtSystemInfo.SliceCount);
EXPECT_EQ(0u, gtSystemInfo.SubSliceCount);
EXPECT_EQ(0u, gtSystemInfo.DualSubSliceCount);
@@ -59,6 +62,7 @@ ICLLPTEST_F(IcllpProductHelper, givenBoolWhenCallIcllpHardwareInfoSetupThenFeatu
bool boolValue[]{
true, false};
auto &compilerProductHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper<CompilerProductHelper>();
GT_SYSTEM_INFO &gtSystemInfo = pInHwInfo.gtSystemInfo;
FeatureTable &featureTable = pInHwInfo.featureTable;
WorkaroundTable &workaroundTable = pInHwInfo.workaroundTable;
@@ -69,7 +73,7 @@ ICLLPTEST_F(IcllpProductHelper, givenBoolWhenCallIcllpHardwareInfoSetupThenFeatu
gtSystemInfo = {0};
featureTable = {};
workaroundTable = {};
hardwareInfoSetup[productFamily](&pInHwInfo, setParamBool, config);
hardwareInfoSetup[productFamily](&pInHwInfo, setParamBool, config, compilerProductHelper);
EXPECT_EQ(setParamBool, featureTable.flags.ftrL3IACoherency);
EXPECT_EQ(setParamBool, featureTable.flags.ftrPPGTT);

View File

@@ -5,6 +5,8 @@
*
*/
#include "shared/source/execution_environment/execution_environment.h"
#include "shared/source/execution_environment/root_device_environment.h"
#include "shared/source/gen11/hw_cmds_lkf.h"
#include "shared/source/os_interface/hw_info_config.h"
#include "shared/test/common/helpers/default_hw_info.h"
@@ -20,11 +22,12 @@ using LkfProductHelper = ProductHelperTest;
LKFTEST_F(LkfProductHelper, givenInvalidSystemInfoWhenSettingHardwareInfoThenExpectThrow) {
auto &compilerProductHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper<CompilerProductHelper>();
GT_SYSTEM_INFO &gtSystemInfo = pInHwInfo.gtSystemInfo;
uint64_t config = 0xdeadbeef;
gtSystemInfo = {0};
EXPECT_ANY_THROW(hardwareInfoSetup[productFamily](&pInHwInfo, false, config));
EXPECT_ANY_THROW(hardwareInfoSetup[productFamily](&pInHwInfo, false, config, compilerProductHelper));
EXPECT_EQ(0u, gtSystemInfo.SliceCount);
EXPECT_EQ(0u, gtSystemInfo.SubSliceCount);
EXPECT_EQ(0u, gtSystemInfo.DualSubSliceCount);
@@ -33,8 +36,9 @@ LKFTEST_F(LkfProductHelper, givenInvalidSystemInfoWhenSettingHardwareInfoThenExp
LKFTEST_F(LkfProductHelper, givenProductHelperStringThenAfterSetupResultingVmeIsDisabled) {
auto &compilerProductHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper<CompilerProductHelper>();
uint64_t config = 0x100080008;
hardwareInfoSetup[productFamily](&pInHwInfo, false, config);
hardwareInfoSetup[productFamily](&pInHwInfo, false, config, compilerProductHelper);
EXPECT_FALSE(pInHwInfo.capabilityTable.ftrSupportsVmeAvcTextureSampler);
EXPECT_FALSE(pInHwInfo.capabilityTable.ftrSupportsVmeAvcPreemption);
EXPECT_FALSE(pInHwInfo.capabilityTable.supportsVme);
@@ -44,6 +48,7 @@ LKFTEST_F(LkfProductHelper, givenBoolWhenCallLkfHardwareInfoSetupThenFeatureTabl
bool boolValue[]{
true, false};
auto &compilerProductHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper<CompilerProductHelper>();
GT_SYSTEM_INFO &gtSystemInfo = pInHwInfo.gtSystemInfo;
FeatureTable &featureTable = pInHwInfo.featureTable;
WorkaroundTable &workaroundTable = pInHwInfo.workaroundTable;
@@ -55,7 +60,7 @@ LKFTEST_F(LkfProductHelper, givenBoolWhenCallLkfHardwareInfoSetupThenFeatureTabl
gtSystemInfo = {0};
featureTable = {};
workaroundTable = {};
hardwareInfoSetup[productFamily](&pInHwInfo, setParamBool, config);
hardwareInfoSetup[productFamily](&pInHwInfo, setParamBool, config, compilerProductHelper);
EXPECT_EQ(setParamBool, featureTable.flags.ftrL3IACoherency);
EXPECT_EQ(setParamBool, featureTable.flags.ftrPPGTT);

View File

@@ -7,6 +7,7 @@
#include "shared/source/gen12lp/hw_cmds_adln.h"
#include "shared/source/gen12lp/hw_info_gen12lp.h"
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/gfx_core_helper.h"
#include "shared/source/os_interface/hw_info_config.h"
#include "shared/test/common/helpers/default_hw_info.h"
@@ -25,6 +26,7 @@ ADLNTEST_F(AdlnHwInfo, givenBoolWhenCallAdlnHardwareInfoSetupThenFeatureTableAnd
static bool boolValue[]{
true, false};
HardwareInfo hwInfo = *defaultHwInfo;
auto compilerProductHelper = CompilerProductHelper::create(hwInfo.platform.eProductFamily);
GT_SYSTEM_INFO &gtSystemInfo = hwInfo.gtSystemInfo;
FeatureTable &featureTable = hwInfo.featureTable;
WorkaroundTable &workaroundTable = hwInfo.workaroundTable;
@@ -35,7 +37,7 @@ ADLNTEST_F(AdlnHwInfo, givenBoolWhenCallAdlnHardwareInfoSetupThenFeatureTableAnd
gtSystemInfo = {0};
featureTable = {};
workaroundTable = {};
hardwareInfoSetup[productFamily](&hwInfo, setParamBool, config);
hardwareInfoSetup[productFamily](&hwInfo, setParamBool, config, *compilerProductHelper);
EXPECT_EQ(setParamBool, featureTable.flags.ftrL3IACoherency);
EXPECT_EQ(setParamBool, featureTable.flags.ftrPPGTT);
@@ -114,4 +116,4 @@ ADLNTEST_F(AdlnProductHelper, givenAdlnPlatformWhenAskingIfWAIsRequiredThenRetur
auto hwInfo = *defaultHwInfo;
EXPECT_TRUE(productHelper->pipeControlWARequired(hwInfo));
}
}

View File

@@ -7,6 +7,7 @@
#include "shared/source/gen12lp/hw_cmds_adlp.h"
#include "shared/source/gen12lp/hw_info_gen12lp.h"
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/os_interface/os_interface.h"
#include "shared/test/common/helpers/default_hw_info.h"
#include "shared/test/common/helpers/gtest_helpers.h"
@@ -53,8 +54,9 @@ ADLPTEST_F(AdlpProductHelperLinux, GivenInvalidDeviceIdWhenConfiguringHwInfoThen
ADLPTEST_F(AdlpProductHelperLinux, givenAdlpConfigWhenSetupHardwareInfoBaseThenGtSystemInfoIsCorrect) {
HardwareInfo hwInfo = *defaultHwInfo;
auto compilerProductHelper = CompilerProductHelper::create(hwInfo.platform.eProductFamily);
GT_SYSTEM_INFO &gtSystemInfo = hwInfo.gtSystemInfo;
ADLP::setupHardwareInfoBase(&hwInfo, false);
ADLP::setupHardwareInfoBase(&hwInfo, false, *compilerProductHelper);
EXPECT_EQ(64u, gtSystemInfo.TotalPsThreadsWindowerRange);
EXPECT_EQ(8u, gtSystemInfo.CsrSizeInMb);
@@ -66,82 +68,13 @@ template <typename T>
using AdlpHwInfoLinux = ::testing::Test;
using adlpConfigTestTypes = ::testing::Types<AdlpHwConfig>;
TYPED_TEST_CASE(AdlpHwInfoLinux, adlpConfigTestTypes);
TYPED_TEST(AdlpHwInfoLinux, givenAdlpConfigWhenSetupHardwareInfoThenGtSystemInfoAndWaAndFtrTablesAreSetCorrect) {
auto executionEnvironment = std::make_unique<ExecutionEnvironment>();
executionEnvironment->prepareRootDeviceEnvironments(1);
executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get());
executionEnvironment->rootDeviceEnvironments[0]->initGmm();
DrmMock drm(*executionEnvironment->rootDeviceEnvironments[0]);
DeviceDescriptor device = {0, &TypeParam::hwInfo, &TypeParam::setupHardwareInfo};
int ret = drm.setupHardwareInfo(&device, false);
{
const auto &gtSystemInfo = executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->gtSystemInfo;
const auto &featureTable = executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->featureTable;
const auto &workaroundTable = executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->workaroundTable;
EXPECT_EQ(ret, 0);
EXPECT_EQ(8u, gtSystemInfo.CsrSizeInMb);
EXPECT_FALSE(gtSystemInfo.IsL3HashModeEnabled);
EXPECT_FALSE(gtSystemInfo.IsDynamicallyPopulated);
EXPECT_FALSE(featureTable.flags.ftrL3IACoherency);
EXPECT_FALSE(featureTable.flags.ftrPPGTT);
EXPECT_FALSE(featureTable.flags.ftrSVM);
EXPECT_FALSE(featureTable.flags.ftrIA32eGfxPTEs);
EXPECT_FALSE(featureTable.flags.ftrStandardMipTailFormat);
EXPECT_FALSE(featureTable.flags.ftrTranslationTable);
EXPECT_FALSE(featureTable.flags.ftrUserModeTranslationTable);
EXPECT_FALSE(featureTable.flags.ftrTileMappedResource);
EXPECT_FALSE(featureTable.flags.ftrFbc);
EXPECT_FALSE(featureTable.flags.ftrTileY);
EXPECT_FALSE(featureTable.flags.ftrAstcHdr2D);
EXPECT_FALSE(featureTable.flags.ftrAstcLdr2D);
EXPECT_FALSE(featureTable.flags.ftrGpGpuMidBatchPreempt);
EXPECT_FALSE(featureTable.flags.ftrGpGpuThreadGroupLevelPreempt);
EXPECT_FALSE(workaroundTable.flags.wa4kAlignUVOffsetNV12LinearSurface);
EXPECT_FALSE(workaroundTable.flags.waUntypedBufferCompression);
}
ret = drm.setupHardwareInfo(&device, true);
{
const auto &gtSystemInfo = executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->gtSystemInfo;
const auto &featureTable = executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->featureTable;
const auto &workaroundTable = executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->workaroundTable;
EXPECT_EQ(ret, 0);
EXPECT_EQ(8u, gtSystemInfo.CsrSizeInMb);
EXPECT_FALSE(gtSystemInfo.IsL3HashModeEnabled);
EXPECT_FALSE(gtSystemInfo.IsDynamicallyPopulated);
EXPECT_TRUE(featureTable.flags.ftrL3IACoherency);
EXPECT_TRUE(featureTable.flags.ftrPPGTT);
EXPECT_TRUE(featureTable.flags.ftrSVM);
EXPECT_TRUE(featureTable.flags.ftrIA32eGfxPTEs);
EXPECT_TRUE(featureTable.flags.ftrStandardMipTailFormat);
EXPECT_TRUE(featureTable.flags.ftrTranslationTable);
EXPECT_TRUE(featureTable.flags.ftrUserModeTranslationTable);
EXPECT_TRUE(featureTable.flags.ftrTileMappedResource);
EXPECT_TRUE(featureTable.flags.ftrFbc);
EXPECT_FALSE(featureTable.flags.ftrTileY);
EXPECT_TRUE(featureTable.flags.ftrAstcHdr2D);
EXPECT_TRUE(featureTable.flags.ftrAstcLdr2D);
EXPECT_TRUE(featureTable.flags.ftrGpGpuMidBatchPreempt);
EXPECT_TRUE(featureTable.flags.ftrGpGpuThreadGroupLevelPreempt);
EXPECT_TRUE(workaroundTable.flags.wa4kAlignUVOffsetNV12LinearSurface);
EXPECT_TRUE(workaroundTable.flags.waUntypedBufferCompression);
}
}
TYPED_TEST(AdlpHwInfoLinux, givenSliceCountZeroWhenSetupHardwareInfoThenNotZeroValuesSetInGtSystemInfo) {
HardwareInfo hwInfo = {};
HardwareInfo hwInfo = *defaultHwInfo;
auto compilerProductHelper = CompilerProductHelper::create(hwInfo.platform.eProductFamily);
hwInfo.gtSystemInfo = {0};
TypeParam::setupHardwareInfo(&hwInfo, false);
TypeParam::setupHardwareInfo(&hwInfo, false, *compilerProductHelper);
EXPECT_NE(0u, hwInfo.gtSystemInfo.SliceCount);
EXPECT_NE(0u, hwInfo.gtSystemInfo.SubSliceCount);

View File

@@ -7,6 +7,7 @@
#include "shared/source/gen12lp/hw_cmds_adlp.h"
#include "shared/source/gen12lp/hw_info_gen12lp.h"
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/gfx_core_helper.h"
#include "shared/source/os_interface/hw_info_config.h"
#include "shared/test/common/helpers/default_hw_info.h"
@@ -25,6 +26,7 @@ ADLPTEST_F(AdlpHwInfo, givenBoolWhenCallAdlpHardwareInfoSetupThenFeatureTableAnd
static bool boolValue[]{
true, false};
HardwareInfo hwInfo = *defaultHwInfo;
auto compilerProductHelper = CompilerProductHelper::create(hwInfo.platform.eProductFamily);
GT_SYSTEM_INFO &gtSystemInfo = hwInfo.gtSystemInfo;
FeatureTable &featureTable = hwInfo.featureTable;
WorkaroundTable &workaroundTable = hwInfo.workaroundTable;
@@ -35,7 +37,7 @@ ADLPTEST_F(AdlpHwInfo, givenBoolWhenCallAdlpHardwareInfoSetupThenFeatureTableAnd
gtSystemInfo = {0};
featureTable = {};
workaroundTable = {};
hardwareInfoSetup[productFamily](&hwInfo, setParamBool, config);
hardwareInfoSetup[productFamily](&hwInfo, setParamBool, config, *compilerProductHelper);
EXPECT_EQ(setParamBool, featureTable.flags.ftrL3IACoherency);
EXPECT_EQ(setParamBool, featureTable.flags.ftrPPGTT);
@@ -129,4 +131,4 @@ ADLPTEST_F(AdlpProductHelper, givenA0SteppingAndAdlpPlatformWhenAskingIfWAIsRequ
EXPECT_EQ(paramBool, productHelper->pipeControlWARequired(hwInfo));
}
}
}

View File

@@ -7,6 +7,7 @@
#include "shared/source/gen12lp/hw_cmds_adls.h"
#include "shared/source/gen12lp/hw_info_gen12lp.h"
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/gfx_core_helper.h"
#include "shared/source/os_interface/hw_info_config.h"
#include "shared/test/common/helpers/default_hw_info.h"
@@ -28,6 +29,7 @@ ADLSTEST_F(AdlsHwInfo, givenBoolWhenCallAdlsHardwareInfoSetupThenFeatureTableAnd
GT_SYSTEM_INFO &gtSystemInfo = hwInfo.gtSystemInfo;
FeatureTable &featureTable = hwInfo.featureTable;
WorkaroundTable &workaroundTable = hwInfo.workaroundTable;
auto compilerProductHelper = CompilerProductHelper::create(hwInfo.platform.eProductFamily);
uint64_t config = 0x100020016;
for (auto setParamBool : boolValue) {
@@ -35,7 +37,7 @@ ADLSTEST_F(AdlsHwInfo, givenBoolWhenCallAdlsHardwareInfoSetupThenFeatureTableAnd
gtSystemInfo = {0};
featureTable = {};
workaroundTable = {};
hardwareInfoSetup[productFamily](&hwInfo, setParamBool, config);
hardwareInfoSetup[productFamily](&hwInfo, setParamBool, config, *compilerProductHelper);
EXPECT_EQ(setParamBool, featureTable.flags.ftrL3IACoherency);
EXPECT_EQ(setParamBool, featureTable.flags.ftrPPGTT);
@@ -124,4 +126,4 @@ ADLSTEST_F(AdlsProductHelper, givenA0SteppingAndAdlsPlatformWhenAskingIfWAIsRequ
EXPECT_EQ(paramBool, productHelper->pipeControlWARequired(hwInfo));
}
}
}

View File

@@ -1,10 +1,11 @@
/*
* Copyright (C) 2020-2022 Intel Corporation
* Copyright (C) 2020-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/hw_info.h"
#include "shared/test/common/helpers/debug_manager_state_restore.h"
#include "shared/test/common/helpers/default_hw_info.h"
@@ -20,11 +21,12 @@ TYPED_TEST_CASE(Dg1HwInfoTests, dg1TestTypes);
TYPED_TEST(Dg1HwInfoTests, WhenSetupHardwareInfoWithSetupFeatureTableFlagTrueOrFalseIsCalledThenFeatureTableHasCorrectValueOfLocalMemoryFeature) {
HardwareInfo hwInfo = *defaultHwInfo;
auto compilerProductHelper = CompilerProductHelper::create(hwInfo.platform.eProductFamily);
FeatureTable &featureTable = hwInfo.featureTable;
EXPECT_FALSE(featureTable.flags.ftrLocalMemory);
TypeParam::setupHardwareInfo(&hwInfo, false);
TypeParam::setupHardwareInfo(&hwInfo, false, *compilerProductHelper);
EXPECT_FALSE(featureTable.flags.ftrLocalMemory);
TypeParam::setupHardwareInfo(&hwInfo, true);
TypeParam::setupHardwareInfo(&hwInfo, true, *compilerProductHelper);
EXPECT_TRUE(featureTable.flags.ftrLocalMemory);
}
}

View File

@@ -6,6 +6,7 @@
*/
#include "shared/source/gen12lp/hw_cmds_dg1.h"
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/gfx_core_helper.h"
#include "shared/source/os_interface/hw_info_config.h"
#include "shared/test/common/helpers/default_hw_info.h"
@@ -23,11 +24,12 @@ using Dg1HwInfo = ::testing::Test;
DG1TEST_F(Dg1HwInfo, givenInvalidSystemInfoWhenSettingHardwareInfoThenExpectThrow) {
HardwareInfo hwInfo = *defaultHwInfo;
auto compilerProductHelper = CompilerProductHelper::create(hwInfo.platform.eProductFamily);
GT_SYSTEM_INFO &gtSystemInfo = hwInfo.gtSystemInfo;
uint64_t config = 0xdeadbeef;
gtSystemInfo = {0};
EXPECT_ANY_THROW(hardwareInfoSetup[productFamily](&hwInfo, false, config));
EXPECT_ANY_THROW(hardwareInfoSetup[productFamily](&hwInfo, false, config, *compilerProductHelper));
EXPECT_EQ(0u, gtSystemInfo.SliceCount);
EXPECT_EQ(0u, gtSystemInfo.SubSliceCount);
EXPECT_EQ(0u, gtSystemInfo.DualSubSliceCount);
@@ -38,6 +40,7 @@ DG1TEST_F(Dg1HwInfo, givenBoolWhenCallDg1HardwareInfoSetupThenFeatureTableAndWor
bool boolValue[]{
true, false};
HardwareInfo hwInfo = *defaultHwInfo;
auto compilerProductHelper = CompilerProductHelper::create(hwInfo.platform.eProductFamily);
GT_SYSTEM_INFO &gtSystemInfo = hwInfo.gtSystemInfo;
FeatureTable &featureTable = hwInfo.featureTable;
WorkaroundTable &workaroundTable = hwInfo.workaroundTable;
@@ -48,7 +51,7 @@ DG1TEST_F(Dg1HwInfo, givenBoolWhenCallDg1HardwareInfoSetupThenFeatureTableAndWor
gtSystemInfo = {0};
featureTable = {};
workaroundTable = {};
hardwareInfoSetup[productFamily](&hwInfo, setParamBool, config);
hardwareInfoSetup[productFamily](&hwInfo, setParamBool, config, *compilerProductHelper);
EXPECT_EQ(setParamBool, featureTable.flags.ftrL3IACoherency);
EXPECT_EQ(setParamBool, featureTable.flags.ftrPPGTT);

View File

@@ -28,6 +28,7 @@ RKLTEST_F(RklHwInfo, givenBoolWhenCallRklHardwareInfoSetupThenFeatureTableAndWor
bool boolValue[]{
true, false};
HardwareInfo hwInfo = *defaultHwInfo;
auto compilerProductHelper = CompilerProductHelper::create(hwInfo.platform.eProductFamily);
GT_SYSTEM_INFO &gtSystemInfo = hwInfo.gtSystemInfo;
FeatureTable &featureTable = hwInfo.featureTable;
WorkaroundTable &workaroundTable = hwInfo.workaroundTable;
@@ -38,7 +39,7 @@ RKLTEST_F(RklHwInfo, givenBoolWhenCallRklHardwareInfoSetupThenFeatureTableAndWor
gtSystemInfo = {0};
featureTable = {};
workaroundTable = {};
hardwareInfoSetup[productFamily](&hwInfo, setParamBool, config);
hardwareInfoSetup[productFamily](&hwInfo, setParamBool, config, *compilerProductHelper);
EXPECT_EQ(setParamBool, featureTable.flags.ftrL3IACoherency);
EXPECT_EQ(setParamBool, featureTable.flags.ftrPPGTT);

View File

@@ -7,6 +7,7 @@
#include "shared/source/gen12lp/hw_cmds_tgllp.h"
#include "shared/source/gen12lp/hw_info_gen12lp.h"
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/os_interface/device_factory.h"
#include "shared/source/os_interface/hw_info_config.h"
#include "shared/test/common/helpers/debug_manager_state_restore.h"
@@ -27,11 +28,12 @@ using TgllpHwInfo = ::testing::Test;
TGLLPTEST_F(TgllpHwInfo, givenHwInfoErrorneousConfigStringThenThrow) {
HardwareInfo hwInfo = *defaultHwInfo;
auto compilerProductHelper = CompilerProductHelper::create(hwInfo.platform.eProductFamily);
GT_SYSTEM_INFO &gtSystemInfo = hwInfo.gtSystemInfo;
uint64_t config = 0xdeadbeef;
gtSystemInfo = {0};
EXPECT_ANY_THROW(hardwareInfoSetup[productFamily](&hwInfo, false, config));
EXPECT_ANY_THROW(hardwareInfoSetup[productFamily](&hwInfo, false, config, *compilerProductHelper));
EXPECT_EQ(0u, gtSystemInfo.SliceCount);
EXPECT_EQ(0u, gtSystemInfo.SubSliceCount);
EXPECT_EQ(0u, gtSystemInfo.DualSubSliceCount);
@@ -40,19 +42,20 @@ TGLLPTEST_F(TgllpHwInfo, givenHwInfoErrorneousConfigStringThenThrow) {
TGLLPTEST_F(TgllpHwInfo, whenUsingCorrectConfigValueThenCorrectHwInfoIsReturned) {
HardwareInfo hwInfo = *defaultHwInfo;
auto compilerProductHelper = CompilerProductHelper::create(hwInfo.platform.eProductFamily);
GT_SYSTEM_INFO &gtSystemInfo = hwInfo.gtSystemInfo;
uint64_t config = 0x100060010;
gtSystemInfo = {0};
hardwareInfoSetup[productFamily](&hwInfo, false, config);
hardwareInfoSetup[productFamily](&hwInfo, false, config, *compilerProductHelper);
EXPECT_EQ(1u, gtSystemInfo.SliceCount);
EXPECT_EQ(6u, gtSystemInfo.DualSubSliceCount);
config = 0x100020010;
gtSystemInfo = {0};
hardwareInfoSetup[productFamily](&hwInfo, false, config);
hardwareInfoSetup[productFamily](&hwInfo, false, config, *compilerProductHelper);
EXPECT_EQ(1u, gtSystemInfo.SliceCount);
EXPECT_EQ(2u, gtSystemInfo.DualSubSliceCount);
}
@@ -61,6 +64,7 @@ TGLLPTEST_F(TgllpHwInfo, givenBoolWhenCallTgllpHardwareInfoSetupThenFeatureTable
static bool boolValue[]{
true, false};
HardwareInfo hwInfo = *defaultHwInfo;
auto compilerProductHelper = CompilerProductHelper::create(hwInfo.platform.eProductFamily);
GT_SYSTEM_INFO &gtSystemInfo = hwInfo.gtSystemInfo;
FeatureTable &featureTable = hwInfo.featureTable;
WorkaroundTable &workaroundTable = hwInfo.workaroundTable;
@@ -75,7 +79,7 @@ TGLLPTEST_F(TgllpHwInfo, givenBoolWhenCallTgllpHardwareInfoSetupThenFeatureTable
gtSystemInfo = {0};
featureTable = {};
workaroundTable = {};
hardwareInfoSetup[productFamily](&hwInfo, setParamBool, config);
hardwareInfoSetup[productFamily](&hwInfo, setParamBool, config, *compilerProductHelper);
EXPECT_EQ(setParamBool, featureTable.flags.ftrL3IACoherency);
EXPECT_EQ(setParamBool, featureTable.flags.ftrPPGTT);
@@ -116,9 +120,10 @@ TGLLPTEST_F(TgllpHwInfo, givenSetCommandStreamReceiverInAubModeForTgllpProductFa
TGLLPTEST_F(TgllpHwInfo, givenProductHelperStringThenAfterSetupResultingVmeIsDisabled) {
HardwareInfo hwInfo = *defaultHwInfo;
auto compilerProductHelper = CompilerProductHelper::create(hwInfo.platform.eProductFamily);
uint64_t config = 0x100060010;
hardwareInfoSetup[productFamily](&hwInfo, false, config);
hardwareInfoSetup[productFamily](&hwInfo, false, config, *compilerProductHelper);
EXPECT_FALSE(hwInfo.capabilityTable.ftrSupportsVmeAvcTextureSampler);
EXPECT_FALSE(hwInfo.capabilityTable.ftrSupportsVmeAvcPreemption);
EXPECT_FALSE(hwInfo.capabilityTable.supportsVme);

View File

@@ -5,6 +5,8 @@
*
*/
#include "shared/source/execution_environment/execution_environment.h"
#include "shared/source/execution_environment/root_device_environment.h"
#include "shared/source/gen8/hw_cmds_bdw.h"
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/os_interface/hw_info_config.h"
@@ -21,12 +23,12 @@ using namespace NEO;
using BdwProductHelper = ProductHelperTest;
BDWTEST_F(BdwProductHelper, givenInvalidSystemInfoWhenSettingHardwareInfoThenExpectThrow) {
auto &compilerProductHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper<CompilerProductHelper>();
GT_SYSTEM_INFO &gtSystemInfo = pInHwInfo.gtSystemInfo;
uint64_t config = 0xdeadbeef;
gtSystemInfo = {0};
EXPECT_ANY_THROW(hardwareInfoSetup[productFamily](&pInHwInfo, false, config));
EXPECT_ANY_THROW(hardwareInfoSetup[productFamily](&pInHwInfo, false, config, compilerProductHelper));
EXPECT_EQ(0u, gtSystemInfo.SliceCount);
EXPECT_EQ(0u, gtSystemInfo.SubSliceCount);
EXPECT_EQ(0u, gtSystemInfo.DualSubSliceCount);
@@ -42,6 +44,7 @@ BDWTEST_F(BdwProductHelper, givenBoolWhenCallBdwHardwareInfoSetupThenFeatureTabl
bool boolValue[]{
true, false};
auto &compilerProductHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper<CompilerProductHelper>();
GT_SYSTEM_INFO &gtSystemInfo = pInHwInfo.gtSystemInfo;
FeatureTable &featureTable = pInHwInfo.featureTable;
WorkaroundTable &workaroundTable = pInHwInfo.workaroundTable;
@@ -52,7 +55,7 @@ BDWTEST_F(BdwProductHelper, givenBoolWhenCallBdwHardwareInfoSetupThenFeatureTabl
gtSystemInfo = {0};
featureTable = {};
workaroundTable = {};
hardwareInfoSetup[productFamily](&pInHwInfo, setParamBool, config);
hardwareInfoSetup[productFamily](&pInHwInfo, setParamBool, config, compilerProductHelper);
EXPECT_EQ(setParamBool, featureTable.flags.ftrL3IACoherency);
EXPECT_EQ(setParamBool, featureTable.flags.ftrPPGTT);
@@ -71,8 +74,9 @@ BDWTEST_F(BdwProductHelper, givenBoolWhenCallBdwHardwareInfoSetupThenFeatureTabl
BDWTEST_F(BdwProductHelper, givenProductHelperStringThenAfterSetupResultingVmeIsDisabled) {
auto &compilerProductHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper<CompilerProductHelper>();
uint64_t config = 0x0;
hardwareInfoSetup[productFamily](&pInHwInfo, false, config);
hardwareInfoSetup[productFamily](&pInHwInfo, false, config, compilerProductHelper);
EXPECT_FALSE(pInHwInfo.capabilityTable.ftrSupportsVmeAvcTextureSampler);
EXPECT_FALSE(pInHwInfo.capabilityTable.ftrSupportsVmeAvcPreemption);
EXPECT_FALSE(pInHwInfo.capabilityTable.supportsVme);

Some files were not shown because too many files have changed in this diff Show More