Set only base values in GT_SYSTEM_INFO for AOT

In most cases, there was code redundancy, which was minimized in this change.
The setupHardwareInfoBase extraction will also be used in ocloc.

Signed-off-by: Daria Hinz <daria.hinz@intel.com>
Related-To: NEO-6910
This commit is contained in:
Daria Hinz
2022-04-27 17:42:40 +00:00
committed by Compute-Runtime-Automation
parent 0469034acb
commit b1f622d700
43 changed files with 457 additions and 589 deletions

View File

@ -175,7 +175,7 @@ void MulticontextAubFixture::overridePlatformConfigForAllEnginesSupport(Hardware
#ifdef SUPPORT_XE_HP_SDV
if (localHwInfo.platform.eProductFamily == IGFX_XE_HP_SDV) {
setupCalled = true;
XE_HP_SDV_CONFIG::setupHardwareInfoMultiTile(&localHwInfo, true, true);
XE_HP_SDV_CONFIG::setupHardwareInfo(&localHwInfo, true);
// Mock values
localHwInfo.gtSystemInfo.SliceCount = 8;
@ -195,7 +195,7 @@ void MulticontextAubFixture::overridePlatformConfigForAllEnginesSupport(Hardware
ASSERT_TRUE(numberOfEnabledTiles == 1);
setupCalled = true;
DG2_CONFIG::setupHardwareInfoMultiTile(&localHwInfo, true, false);
DG2_CONFIG::setupHardwareInfo(&localHwInfo, true);
// Mock values
localHwInfo.gtSystemInfo.SliceCount = 8;
@ -214,7 +214,7 @@ void MulticontextAubFixture::overridePlatformConfigForAllEnginesSupport(Hardware
if (localHwInfo.platform.eProductFamily == IGFX_PVC) {
setupCalled = true;
PVC_CONFIG::setupHardwareInfoMultiTile(&localHwInfo, true, true);
PVC_CONFIG::setupHardwareInfo(&localHwInfo, true);
// Mock values
localHwInfo.gtSystemInfo.SliceCount = 8;

View File

@ -520,7 +520,7 @@ TEST(MultiCommandWhiteboxTest, GivenInvalidArgsWhenInitializingThenErrorIsReturn
EXPECT_NE(std::string::npos, errorPosition);
}
TEST(MockOfflineCompilerTests, givenProductConfigValueWhenInitHwInfoThenResetGtSystemInfo) {
TEST(MockOfflineCompilerTests, givenProductConfigValueWhenInitHwInfoThenBaseHardwareInfoValuesAreSet) {
MockOfflineCompiler mockOfflineCompiler;
auto allEnabledDeviceConfigs = mockOfflineCompiler.argHelper->getAllSupportedDeviceConfigs();
if (allEnabledDeviceConfigs.empty()) {
@ -538,11 +538,13 @@ TEST(MockOfflineCompilerTests, givenProductConfigValueWhenInitHwInfoThenResetGtS
EXPECT_FALSE(mockOfflineCompiler.deviceName.empty());
mockOfflineCompiler.initHardwareInfo(mockOfflineCompiler.deviceName);
GT_SYSTEM_INFO expectedGtSystemInfo = {0};
EXPECT_EQ(mockOfflineCompiler.hwInfo.platform.usRevId, expectedRevId);
EXPECT_EQ(mockOfflineCompiler.hwInfo.platform.eProductFamily, productFamily);
EXPECT_EQ(memcmp(&mockOfflineCompiler.hwInfo.gtSystemInfo, &expectedGtSystemInfo, sizeof(GT_SYSTEM_INFO)), 0);
EXPECT_NE(mockOfflineCompiler.hwInfo.gtSystemInfo.MaxDualSubSlicesSupported, 0u);
EXPECT_NE(mockOfflineCompiler.hwInfo.gtSystemInfo.MaxEuPerSubSlice, 0u);
EXPECT_NE(mockOfflineCompiler.hwInfo.gtSystemInfo.MaxSlicesSupported, 0u);
EXPECT_NE(mockOfflineCompiler.hwInfo.gtSystemInfo.MaxSubSlicesSupported, 0u);
}
TEST_F(OfflineCompilerTests, GivenHelpOptionOnQueryThenSuccessIsReturned) {
@ -2970,17 +2972,6 @@ TEST(OclocArgHelperTest, GivenDifferentRevisionIdsInDeviceMappingsWhenComparingT
EXPECT_FALSE(lhs == rhs);
}
TEST(OclocArgHelperTest, GivenDifferentSetupFeatureAndWorkaroundTableFunctionsInDeviceMappingsWhenComparingThemThenFalseIsReturned) {
DeviceMapping lhs{};
DeviceMapping rhs{};
ASSERT_TRUE(lhs == rhs);
// Different lambdas are obligated to have different addresses.
lhs.setupFeatureAndWorkaroundTable = [](NEO::HardwareInfo *hwInfo) {};
rhs.setupFeatureAndWorkaroundTable = [](NEO::HardwareInfo *hwInfo) {};
EXPECT_FALSE(lhs == rhs);
}
TEST(OclocArgHelperTest, GivenDifferentHwInfosInDeviceMappingsWhenComparingThemThenFalseIsReturned) {
DeviceMapping lhs{};
DeviceMapping rhs{};

View File

@ -63,9 +63,9 @@ OclocArgHelper::OclocArgHelper(const uint32_t numSources, const uint8_t **dataSo
#undef NAMEDDEVICE
{0u, std::string("")}}),
deviceMap({
#define DEVICE_CONFIG_IDS_AND_REVISION(product, productConfig, deviceIds, revision_id) {product, &NEO::productConfig::hwInfo, &NEO::deviceIds, NEO::productConfig::setupFeatureAndWorkaroundTable, revision_id},
#define DEVICE_CONFIG_IDS(product, productConfig, deviceIds) {product, &NEO::productConfig::hwInfo, &NEO::deviceIds, NEO::productConfig::setupFeatureAndWorkaroundTable, NEO::productConfig::hwInfo.platform.usRevId},
#define DEVICE_CONFIG(product, productConfig) {product, &NEO::productConfig::hwInfo, nullptr, NEO::productConfig::setupFeatureAndWorkaroundTable, NEO::productConfig::hwInfo.platform.usRevId},
#define DEVICE_CONFIG_IDS_AND_REVISION(product, productConfig, deviceIds, revision_id) {product, &NEO::productConfig::hwInfo, &NEO::deviceIds, revision_id},
#define DEVICE_CONFIG_IDS(product, productConfig, deviceIds) {product, &NEO::productConfig::hwInfo, &NEO::deviceIds, NEO::productConfig::hwInfo.platform.usRevId},
#define DEVICE_CONFIG(product, productConfig) {product, &NEO::productConfig::hwInfo, nullptr, NEO::productConfig::hwInfo.platform.usRevId},
#include "product_config.inl"
#undef DEVICE_CONFIG
#undef DEVICE_CONFIG_IDS
@ -171,14 +171,13 @@ std::unique_ptr<char[]> OclocArgHelper::loadDataFromFile(const std::string &file
void OclocArgHelper::setDeviceInfoForFatbinaryTarget(const DeviceMapping &device) {
deviceForFatbinary.hwInfo = device.hwInfo;
deviceForFatbinary.setupFeatureAndWorkaroundTable = device.setupFeatureAndWorkaroundTable;
deviceForFatbinary.revId = device.revId;
deviceForFatbinary.deviceIds = device.deviceIds;
}
void OclocArgHelper::setHwInfoForFatbinaryTarget(NEO::HardwareInfo &hwInfo) {
hwInfo = *deviceForFatbinary.hwInfo;
deviceForFatbinary.setupFeatureAndWorkaroundTable(&hwInfo);
NEO::hardwareInfoBaseSetup[hwInfo.platform.eProductFamily](&hwInfo, true);
hwInfo.platform.usRevId = deviceForFatbinary.revId;
if (deviceForFatbinary.deviceIds) {
hwInfo.platform.usDeviceID = deviceForFatbinary.deviceIds->front();
@ -193,7 +192,7 @@ bool OclocArgHelper::getHwInfoForProductConfig(uint32_t config, NEO::HardwareInf
for (auto &deviceConfig : deviceMap) {
if (deviceConfig.config == config) {
hwInfo = *deviceConfig.hwInfo;
deviceConfig.setupFeatureAndWorkaroundTable(&hwInfo);
NEO::hardwareInfoBaseSetup[hwInfo.platform.eProductFamily](&hwInfo, true);
hwInfo.platform.usRevId = deviceConfig.revId;
if (deviceConfig.deviceIds) {
hwInfo.platform.usDeviceID = deviceConfig.deviceIds->front();

View File

@ -51,11 +51,10 @@ struct DeviceMapping {
PRODUCT_CONFIG config;
const NEO::HardwareInfo *hwInfo;
const std::vector<unsigned short> *deviceIds;
void (*setupFeatureAndWorkaroundTable)(NEO::HardwareInfo *hwInfo);
unsigned int revId;
bool operator==(const DeviceMapping &rhs) {
return config == rhs.config && hwInfo == rhs.hwInfo && setupFeatureAndWorkaroundTable == rhs.setupFeatureAndWorkaroundTable && revId == rhs.revId;
return config == rhs.config && hwInfo == rhs.hwInfo && revId == rhs.revId;
}
};

View File

@ -389,7 +389,7 @@ int OfflineCompiler::initHardwareInfo(std::string deviceName) {
auto hwInfoConfig = defaultHardwareInfoConfigTable[hwInfo.platform.eProductFamily];
setHwInfoValuesFromConfig(hwInfoConfig, hwInfo);
hardwareInfoSetup[hwInfo.platform.eProductFamily](&hwInfo, true, hwInfoConfig);
hardwareInfoBaseSetup[hwInfo.platform.eProductFamily](&hwInfo, true);
setFamilyType();
retVal = SUCCESS;
break;

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2021 Intel Corporation
* Copyright (C) 2019-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -23,6 +23,7 @@ struct EHL : public ICLFamily {
static const RuntimeCapabilityTable capabilityTable;
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig);
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
};
class EHL_HW_CONFIG : public EHL {

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2021 Intel Corporation
* Copyright (C) 2019-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -23,6 +23,7 @@ struct ICLLP : public ICLFamily {
static const RuntimeCapabilityTable capabilityTable;
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig);
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
};
class ICLLP_1x8x8 : public ICLLP {

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2021 Intel Corporation
* Copyright (C) 2019-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -23,6 +23,7 @@ struct LKF : public ICLFamily {
static const RuntimeCapabilityTable capabilityTable;
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig);
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
};
class LKF_1x8x8 : public LKF {
public:

View File

@ -124,21 +124,9 @@ void EHL::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
workaroundTable->flags.waReportPerfCountUseGlobalContextID = true;
};
const HardwareInfo EHL_HW_CONFIG::hwInfo = {
&EHL::platform,
&EHL::featureTable,
&EHL::workaroundTable,
&EHL_HW_CONFIG::gtSystemInfo,
EHL::capabilityTable,
};
GT_SYSTEM_INFO EHL_HW_CONFIG::gtSystemInfo = {0};
void EHL_HW_CONFIG::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
void EHL::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * EHL::threadsPerEu;
gtSysInfo->SliceCount = 1;
gtSysInfo->L3CacheSizeInKb = 1280;
gtSysInfo->L3BankCount = 4;
gtSysInfo->MaxFillRate = 8;
gtSysInfo->TotalVsThreads = 0;
gtSysInfo->TotalHsThreads = 0;
gtSysInfo->TotalDsThreads = 0;
@ -150,9 +138,29 @@ void EHL_HW_CONFIG::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTab
gtSysInfo->MaxSubSlicesSupported = EHL::maxSubslicesSupported;
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
if (setupFeatureTableAndWorkaroundTable) {
setupFeatureAndWorkaroundTable(hwInfo);
}
}
const HardwareInfo EHL_HW_CONFIG::hwInfo = {
&EHL::platform,
&EHL::featureTable,
&EHL::workaroundTable,
&EHL_HW_CONFIG::gtSystemInfo,
EHL::capabilityTable,
};
GT_SYSTEM_INFO EHL_HW_CONFIG::gtSystemInfo = {0};
void EHL_HW_CONFIG::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
EHL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->SliceCount = 1;
gtSysInfo->L3CacheSizeInKb = 1280;
gtSysInfo->L3BankCount = 4;
gtSysInfo->MaxFillRate = 8;
};
const HardwareInfo EHL::hwInfo = EHL_HW_CONFIG::hwInfo;

View File

@ -125,6 +125,26 @@ void ICLLP::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
workaroundTable->flags.waReportPerfCountUseGlobalContextID = true;
};
void ICLLP::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * ICLLP::threadsPerEu;
gtSysInfo->TotalHsThreads = 224;
gtSysInfo->TotalGsThreads = 224;
gtSysInfo->TotalVsThreads = 336;
gtSysInfo->TotalDsThreads = 336;
gtSysInfo->TotalPsThreadsWindowerRange = 128;
gtSysInfo->CsrSizeInMb = 5;
gtSysInfo->MaxEuPerSubSlice = ICLLP::maxEuPerSubslice;
gtSysInfo->MaxSlicesSupported = ICLLP::maxSlicesSupported;
gtSysInfo->MaxSubSlicesSupported = ICLLP::maxSubslicesSupported;
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
if (setupFeatureTableAndWorkaroundTable) {
setupFeatureAndWorkaroundTable(hwInfo);
}
}
const HardwareInfo ICLLP_1x8x8::hwInfo = {
&ICLLP::platform,
&ICLLP::featureTable,
@ -135,26 +155,16 @@ const HardwareInfo ICLLP_1x8x8::hwInfo = {
GT_SYSTEM_INFO ICLLP_1x8x8::gtSystemInfo = {0};
void ICLLP_1x8x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
ICLLP::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * ICLLP::threadsPerEu;
gtSysInfo->SliceCount = 1;
gtSysInfo->L3CacheSizeInKb = 3072;
gtSysInfo->L3BankCount = 8;
gtSysInfo->MaxFillRate = 16;
gtSysInfo->TotalVsThreads = 336;
gtSysInfo->TotalHsThreads = 336;
gtSysInfo->TotalDsThreads = 336;
gtSysInfo->TotalGsThreads = 336;
gtSysInfo->TotalPsThreadsWindowerRange = 64;
gtSysInfo->CsrSizeInMb = 5;
gtSysInfo->MaxEuPerSubSlice = ICLLP::maxEuPerSubslice;
gtSysInfo->MaxSlicesSupported = ICLLP::maxSlicesSupported;
gtSysInfo->MaxSubSlicesSupported = ICLLP::maxSubslicesSupported;
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
if (setupFeatureTableAndWorkaroundTable) {
setupFeatureAndWorkaroundTable(hwInfo);
}
};
const HardwareInfo ICLLP_1x4x8::hwInfo = {
@ -167,27 +177,15 @@ const HardwareInfo ICLLP_1x4x8::hwInfo = {
GT_SYSTEM_INFO ICLLP_1x4x8::gtSystemInfo = {0};
void ICLLP_1x4x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
ICLLP::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * ICLLP::threadsPerEu;
gtSysInfo->SliceCount = 1;
gtSysInfo->L3CacheSizeInKb = 2304;
gtSysInfo->L3BankCount = 6;
gtSysInfo->MaxFillRate = 8;
gtSysInfo->TotalVsThreads = 364;
gtSysInfo->TotalHsThreads = 224;
gtSysInfo->TotalDsThreads = 364;
gtSysInfo->TotalGsThreads = 224;
gtSysInfo->TotalPsThreadsWindowerRange = 128;
gtSysInfo->CsrSizeInMb = 5;
gtSysInfo->MaxEuPerSubSlice = ICLLP::maxEuPerSubslice;
gtSysInfo->MaxSlicesSupported = ICLLP::maxSlicesSupported;
gtSysInfo->MaxSubSlicesSupported = ICLLP::maxSubslicesSupported;
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
if (setupFeatureTableAndWorkaroundTable) {
setupFeatureAndWorkaroundTable(hwInfo);
}
};
const HardwareInfo ICLLP_1x6x8::hwInfo = {
&ICLLP::platform,
&ICLLP::featureTable,
@ -198,26 +196,13 @@ const HardwareInfo ICLLP_1x6x8::hwInfo = {
GT_SYSTEM_INFO ICLLP_1x6x8::gtSystemInfo = {0};
void ICLLP_1x6x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
ICLLP::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * ICLLP::threadsPerEu;
gtSysInfo->SliceCount = 1;
gtSysInfo->L3CacheSizeInKb = 2304;
gtSysInfo->L3BankCount = 6;
gtSysInfo->MaxFillRate = 8;
gtSysInfo->TotalVsThreads = 364;
gtSysInfo->TotalHsThreads = 224;
gtSysInfo->TotalDsThreads = 364;
gtSysInfo->TotalGsThreads = 224;
gtSysInfo->TotalPsThreadsWindowerRange = 128;
gtSysInfo->CsrSizeInMb = 5;
gtSysInfo->MaxEuPerSubSlice = ICLLP::maxEuPerSubslice;
gtSysInfo->MaxSlicesSupported = ICLLP::maxSlicesSupported;
gtSysInfo->MaxSubSlicesSupported = ICLLP::maxSubslicesSupported;
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
if (setupFeatureTableAndWorkaroundTable) {
setupFeatureAndWorkaroundTable(hwInfo);
}
};
const HardwareInfo ICLLP::hwInfo = ICLLP_1x8x8::hwInfo;

View File

@ -124,21 +124,9 @@ void LKF::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
workaroundTable->flags.waReportPerfCountUseGlobalContextID = true;
};
const HardwareInfo LKF_1x8x8::hwInfo = {
&LKF::platform,
&LKF::featureTable,
&LKF::workaroundTable,
&LKF_1x8x8::gtSystemInfo,
LKF::capabilityTable,
};
GT_SYSTEM_INFO LKF_1x8x8::gtSystemInfo = {0};
void LKF_1x8x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
void LKF::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * LKF::threadsPerEu;
gtSysInfo->SliceCount = 1;
gtSysInfo->L3CacheSizeInKb = 2560;
gtSysInfo->L3BankCount = 8;
gtSysInfo->MaxFillRate = 16;
gtSysInfo->TotalVsThreads = 448;
gtSysInfo->TotalHsThreads = 448;
gtSysInfo->TotalDsThreads = 448;
@ -150,9 +138,29 @@ void LKF_1x8x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAn
gtSysInfo->MaxSubSlicesSupported = LKF::maxSubslicesSupported;
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
if (setupFeatureTableAndWorkaroundTable) {
setupFeatureAndWorkaroundTable(hwInfo);
}
}
const HardwareInfo LKF_1x8x8::hwInfo = {
&LKF::platform,
&LKF::featureTable,
&LKF::workaroundTable,
&LKF_1x8x8::gtSystemInfo,
LKF::capabilityTable,
};
GT_SYSTEM_INFO LKF_1x8x8::gtSystemInfo = {0};
void LKF_1x8x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
LKF::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * LKF::threadsPerEu;
gtSysInfo->SliceCount = 1;
gtSysInfo->L3CacheSizeInKb = 2560;
gtSysInfo->L3BankCount = 8;
gtSysInfo->MaxFillRate = 16;
};
const HardwareInfo LKF::hwInfo = LKF_1x8x8::hwInfo;

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2021 Intel Corporation
* Copyright (C) 2021-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -23,6 +23,7 @@ struct ADLP : public TGLLPFamily {
static const RuntimeCapabilityTable capabilityTable;
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig);
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
};
class ADLP_CONFIG : public ADLP {

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2020 Intel Corporation
* Copyright (C) 2020-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -23,6 +23,7 @@ struct ADLS : public TGLLPFamily {
static const RuntimeCapabilityTable capabilityTable;
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig);
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
};
class ADLS_HW_CONFIG : public ADLS {
public:

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2020 Intel Corporation
* Copyright (C) 2020-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -22,6 +22,7 @@ struct DG1 : public TGLLPFamily {
static const RuntimeCapabilityTable capabilityTable;
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig);
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
};
class DG1_CONFIG : public DG1 {
public:

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2020 Intel Corporation
* Copyright (C) 2020-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -20,6 +20,7 @@ struct RKL : public TGLLPFamily {
static const RuntimeCapabilityTable capabilityTable;
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig);
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
};
class RKL_HW_CONFIG : public RKL {
public:

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2020 Intel Corporation
* Copyright (C) 2019-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -23,6 +23,7 @@ struct TGLLP : public TGLLPFamily {
static const RuntimeCapabilityTable capabilityTable;
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig);
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
};
class TGLLP_1x6x16 : public TGLLP {

View File

@ -120,6 +120,24 @@ void ADLP::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
workaroundTable->flags.waEnablePreemptionGranularityControlByUMD = true;
workaroundTable->flags.waUntypedBufferCompression = true;
};
void ADLP::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * ADLP::threadsPerEu;
gtSysInfo->TotalPsThreadsWindowerRange = 64;
gtSysInfo->CsrSizeInMb = 8;
gtSysInfo->MaxEuPerSubSlice = ADLP::maxEuPerSubslice;
gtSysInfo->MaxSlicesSupported = ADLP::maxSlicesSupported;
gtSysInfo->MaxSubSlicesSupported = ADLP::maxSubslicesSupported;
gtSysInfo->MaxDualSubSlicesSupported = ADLP::maxDualSubslicesSupported;
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
if (setupFeatureTableAndWorkaroundTable) {
setupFeatureAndWorkaroundTable(hwInfo);
}
}
const HardwareInfo ADLP_CONFIG::hwInfo = {
&ADLP::platform,
&ADLP::featureTable,
@ -130,28 +148,18 @@ const HardwareInfo ADLP_CONFIG::hwInfo = {
GT_SYSTEM_INFO ADLP_CONFIG::gtSystemInfo = {0};
void ADLP_CONFIG::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->CsrSizeInMb = 8;
gtSysInfo->IsDynamicallyPopulated = false;
setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
// non-zero values for unit tests
if (gtSysInfo->SliceCount == 0) {
gtSysInfo->SliceCount = 2;
gtSysInfo->SubSliceCount = 8;
gtSysInfo->EUCount = 40;
gtSysInfo->MaxEuPerSubSlice = ADLP::maxEuPerSubslice;
gtSysInfo->MaxSlicesSupported = ADLP::maxSlicesSupported;
gtSysInfo->MaxSubSlicesSupported = ADLP::maxSubslicesSupported;
gtSysInfo->L3BankCount = 1;
gtSysInfo->CCSInfo.IsValid = true;
gtSysInfo->CCSInfo.NumberOfCCSEnabled = 1;
}
if (setupFeatureTableAndWorkaroundTable) {
setupFeatureAndWorkaroundTable(hwInfo);
}
};
#include "hw_info_setup_adlp.inl"
} // namespace NEO

View File

@ -121,6 +121,23 @@ void ADLS::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
workaroundTable->flags.waUntypedBufferCompression = true;
};
void ADLS::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * ADLS::threadsPerEu;
gtSysInfo->TotalPsThreadsWindowerRange = 64;
gtSysInfo->CsrSizeInMb = 8;
gtSysInfo->MaxEuPerSubSlice = ADLS::maxEuPerSubslice;
gtSysInfo->MaxSlicesSupported = ADLS::maxSlicesSupported;
gtSysInfo->MaxSubSlicesSupported = ADLS::maxSubslicesSupported;
gtSysInfo->MaxDualSubSlicesSupported = ADLS::maxDualSubslicesSupported;
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
if (setupFeatureTableAndWorkaroundTable) {
setupFeatureAndWorkaroundTable(hwInfo);
}
}
const HardwareInfo ADLS_HW_CONFIG::hwInfo = {
&ADLS::platform,
&ADLS::featureTable,
@ -131,8 +148,9 @@ const HardwareInfo ADLS_HW_CONFIG::hwInfo = {
GT_SYSTEM_INFO ADLS_HW_CONFIG::gtSystemInfo = {0};
void ADLS_HW_CONFIG::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * ADLS::threadsPerEu;
gtSysInfo->DualSubSliceCount = gtSysInfo->SubSliceCount;
gtSysInfo->L3CacheSizeInKb = 1920;
gtSysInfo->L3BankCount = 4;
@ -141,22 +159,12 @@ void ADLS_HW_CONFIG::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTa
gtSysInfo->TotalHsThreads = 0;
gtSysInfo->TotalDsThreads = 0;
gtSysInfo->TotalGsThreads = 0;
gtSysInfo->TotalPsThreadsWindowerRange = 64;
gtSysInfo->CsrSizeInMb = 8;
gtSysInfo->MaxEuPerSubSlice = ADLS::maxEuPerSubslice;
gtSysInfo->MaxSlicesSupported = ADLS::maxSlicesSupported;
gtSysInfo->MaxSubSlicesSupported = 1;
gtSysInfo->MaxDualSubSlicesSupported = 2;
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
gtSysInfo->CCSInfo.IsValid = true;
gtSysInfo->CCSInfo.NumberOfCCSEnabled = 1;
gtSysInfo->CCSInfo.Instances.CCSEnableMask = 0b1;
if (setupFeatureTableAndWorkaroundTable) {
setupFeatureAndWorkaroundTable(hwInfo);
}
};
const HardwareInfo ADLS::hwInfo = ADLS_HW_CONFIG::hwInfo;

View File

@ -130,22 +130,9 @@ void DG1::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
workaroundTable->flags.waEnablePreemptionGranularityControlByUMD = true;
};
const HardwareInfo DG1_CONFIG::hwInfo = {
&DG1::platform,
&DG1::featureTable,
&DG1::workaroundTable,
&DG1_CONFIG::gtSystemInfo,
DG1::capabilityTable,
};
GT_SYSTEM_INFO DG1_CONFIG::gtSystemInfo = {0};
void DG1_CONFIG::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
void DG1::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * DG1::threadsPerEu;
gtSysInfo->SliceCount = 1;
gtSysInfo->DualSubSliceCount = 6;
gtSysInfo->L3CacheSizeInKb = 16384;
gtSysInfo->L3BankCount = 8;
gtSysInfo->MaxFillRate = 16;
gtSysInfo->TotalVsThreads = 672;
gtSysInfo->TotalHsThreads = 672;
gtSysInfo->TotalDsThreads = 672;
@ -159,13 +146,33 @@ void DG1_CONFIG::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableA
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
if (setupFeatureTableAndWorkaroundTable) {
setupFeatureAndWorkaroundTable(hwInfo);
}
}
const HardwareInfo DG1_CONFIG::hwInfo = {
&DG1::platform,
&DG1::featureTable,
&DG1::workaroundTable,
&DG1_CONFIG::gtSystemInfo,
DG1::capabilityTable,
};
GT_SYSTEM_INFO DG1_CONFIG::gtSystemInfo = {0};
void DG1_CONFIG::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
DG1::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->SliceCount = 1;
gtSysInfo->DualSubSliceCount = 6;
gtSysInfo->L3CacheSizeInKb = 16384;
gtSysInfo->L3BankCount = 8;
gtSysInfo->MaxFillRate = 16;
gtSysInfo->CCSInfo.IsValid = true;
gtSysInfo->CCSInfo.NumberOfCCSEnabled = 1;
gtSysInfo->CCSInfo.Instances.CCSEnableMask = 0b1;
if (setupFeatureTableAndWorkaroundTable) {
DG1::setupFeatureAndWorkaroundTable(hwInfo);
}
};
const HardwareInfo DG1::hwInfo = DG1_CONFIG::hwInfo;

View File

@ -120,21 +120,9 @@ void RKL::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
workaroundTable->flags.waEnablePreemptionGranularityControlByUMD = true;
};
const HardwareInfo RKL_HW_CONFIG::hwInfo = {
&RKL::platform,
&RKL::featureTable,
&RKL::workaroundTable,
&RKL_HW_CONFIG::gtSystemInfo,
RKL::capabilityTable,
};
GT_SYSTEM_INFO RKL_HW_CONFIG::gtSystemInfo = {0};
void RKL_HW_CONFIG::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
void RKL::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * RKL::threadsPerEu;
gtSysInfo->DualSubSliceCount = gtSysInfo->SubSliceCount;
gtSysInfo->L3CacheSizeInKb = 1920;
gtSysInfo->L3BankCount = 4;
gtSysInfo->MaxFillRate = 8;
gtSysInfo->TotalVsThreads = 0;
gtSysInfo->TotalHsThreads = 0;
gtSysInfo->TotalDsThreads = 0;
@ -148,13 +136,32 @@ void RKL_HW_CONFIG::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTab
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
gtSysInfo->CCSInfo.IsValid = true;
gtSysInfo->CCSInfo.NumberOfCCSEnabled = 1;
gtSysInfo->CCSInfo.Instances.CCSEnableMask = 0b1;
if (setupFeatureTableAndWorkaroundTable) {
setupFeatureAndWorkaroundTable(hwInfo);
}
}
const HardwareInfo RKL_HW_CONFIG::hwInfo = {
&RKL::platform,
&RKL::featureTable,
&RKL::workaroundTable,
&RKL_HW_CONFIG::gtSystemInfo,
RKL::capabilityTable,
};
GT_SYSTEM_INFO RKL_HW_CONFIG::gtSystemInfo = {0};
void RKL_HW_CONFIG::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
RKL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->DualSubSliceCount = gtSysInfo->SubSliceCount;
gtSysInfo->L3CacheSizeInKb = 1920;
gtSysInfo->L3BankCount = 4;
gtSysInfo->MaxFillRate = 8;
gtSysInfo->CCSInfo.IsValid = true;
gtSysInfo->CCSInfo.NumberOfCCSEnabled = 1;
gtSysInfo->CCSInfo.Instances.CCSEnableMask = 0b1;
};
const HardwareInfo RKL::hwInfo = RKL_HW_CONFIG::hwInfo;

View File

@ -125,6 +125,23 @@ void TGLLP::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
workaroundTable->flags.waUntypedBufferCompression = true;
};
void TGLLP::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * TGLLP::threadsPerEu;
gtSysInfo->TotalPsThreadsWindowerRange = 64;
gtSysInfo->CsrSizeInMb = 8;
gtSysInfo->MaxEuPerSubSlice = TGLLP::maxEuPerSubslice;
gtSysInfo->MaxSlicesSupported = TGLLP::maxSlicesSupported;
gtSysInfo->MaxSubSlicesSupported = TGLLP::maxSubslicesSupported;
gtSysInfo->MaxDualSubSlicesSupported = TGLLP::maxDualSubslicesSupported;
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
if (setupFeatureTableAndWorkaroundTable) {
setupFeatureAndWorkaroundTable(hwInfo);
}
}
const HardwareInfo TGLLP_1x6x16::hwInfo = {
&TGLLP::platform,
&TGLLP::featureTable,
@ -135,8 +152,9 @@ const HardwareInfo TGLLP_1x6x16::hwInfo = {
GT_SYSTEM_INFO TGLLP_1x6x16::gtSystemInfo = {0};
void TGLLP_1x6x16::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
TGLLP::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * TGLLP::threadsPerEu;
gtSysInfo->SliceCount = 1;
gtSysInfo->DualSubSliceCount = 6;
gtSysInfo->L3CacheSizeInKb = 3840;
@ -146,22 +164,10 @@ void TGLLP_1x6x16::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTabl
gtSysInfo->TotalHsThreads = 336;
gtSysInfo->TotalDsThreads = 336;
gtSysInfo->TotalGsThreads = 336;
gtSysInfo->TotalPsThreadsWindowerRange = 64;
gtSysInfo->CsrSizeInMb = 8;
gtSysInfo->MaxEuPerSubSlice = TGLLP::maxEuPerSubslice;
gtSysInfo->MaxSlicesSupported = TGLLP::maxSlicesSupported;
gtSysInfo->MaxSubSlicesSupported = TGLLP::maxSubslicesSupported;
gtSysInfo->MaxDualSubSlicesSupported = TGLLP::maxDualSubslicesSupported;
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
gtSysInfo->CCSInfo.IsValid = true;
gtSysInfo->CCSInfo.NumberOfCCSEnabled = 1;
gtSysInfo->CCSInfo.Instances.CCSEnableMask = 0b1;
if (setupFeatureTableAndWorkaroundTable) {
setupFeatureAndWorkaroundTable(hwInfo);
}
};
const HardwareInfo TGLLP_1x2x16::hwInfo = {
@ -174,8 +180,9 @@ const HardwareInfo TGLLP_1x2x16::hwInfo = {
GT_SYSTEM_INFO TGLLP_1x2x16::gtSystemInfo = {0};
void TGLLP_1x2x16::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
TGLLP::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * TGLLP::threadsPerEu;
gtSysInfo->SliceCount = 1;
gtSysInfo->DualSubSliceCount = 2;
gtSysInfo->L3CacheSizeInKb = 1920;
@ -185,22 +192,10 @@ void TGLLP_1x2x16::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTabl
gtSysInfo->TotalHsThreads = 224;
gtSysInfo->TotalDsThreads = 224;
gtSysInfo->TotalGsThreads = 224;
gtSysInfo->TotalPsThreadsWindowerRange = 64;
gtSysInfo->CsrSizeInMb = 8;
gtSysInfo->MaxEuPerSubSlice = TGLLP::maxEuPerSubslice;
gtSysInfo->MaxSlicesSupported = TGLLP::maxSlicesSupported;
gtSysInfo->MaxSubSlicesSupported = TGLLP::maxSubslicesSupported;
gtSysInfo->MaxDualSubSlicesSupported = TGLLP::maxDualSubslicesSupported;
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
gtSysInfo->CCSInfo.IsValid = true;
gtSysInfo->CCSInfo.NumberOfCCSEnabled = 1;
gtSysInfo->CCSInfo.Instances.CCSEnableMask = 0b1;
if (setupFeatureTableAndWorkaroundTable) {
setupFeatureAndWorkaroundTable(hwInfo);
}
};
const HardwareInfo TGLLP::hwInfo = TGLLP_1x6x16::hwInfo;

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2020 Intel Corporation
* Copyright (C) 2018-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -25,6 +25,7 @@ struct BDW : public BDWFamily {
static const RuntimeCapabilityTable capabilityTable;
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig);
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
};
class BDW_1x2x6 : public BDW {
public:

View File

@ -115,22 +115,9 @@ void BDW::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
workaroundTable->flags.waSamplerCacheFlushBetweenRedescribedSurfaceReads = true;
}
const HardwareInfo BDW_1x2x6::hwInfo = {
&BDW::platform,
&BDW::featureTable,
&BDW::workaroundTable,
&BDW_1x2x6::gtSystemInfo,
BDW::capabilityTable,
};
GT_SYSTEM_INFO BDW_1x2x6::gtSystemInfo = {0};
void BDW_1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
void BDW::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * BDW::threadsPerEu;
gtSysInfo->SliceCount = 1;
gtSysInfo->L3CacheSizeInKb = 384;
gtSysInfo->L3BankCount = 2;
gtSysInfo->MaxFillRate = 8;
gtSysInfo->TotalVsThreads = 336;
gtSysInfo->TotalHsThreads = 336;
gtSysInfo->TotalDsThreads = 336;
@ -142,9 +129,29 @@ void BDW_1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAn
gtSysInfo->MaxSubSlicesSupported = BDW::maxSubslicesSupported;
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
if (setupFeatureTableAndWorkaroundTable) {
setupFeatureAndWorkaroundTable(hwInfo);
}
}
const HardwareInfo BDW_1x2x6::hwInfo = {
&BDW::platform,
&BDW::featureTable,
&BDW::workaroundTable,
&BDW_1x2x6::gtSystemInfo,
BDW::capabilityTable,
};
GT_SYSTEM_INFO BDW_1x2x6::gtSystemInfo = {0};
void BDW_1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
BDW::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->SliceCount = 1;
gtSysInfo->L3CacheSizeInKb = 384;
gtSysInfo->L3BankCount = 2;
gtSysInfo->MaxFillRate = 8;
};
const HardwareInfo BDW_1x3x6::hwInfo = {
@ -156,26 +163,13 @@ const HardwareInfo BDW_1x3x6::hwInfo = {
};
GT_SYSTEM_INFO BDW_1x3x6::gtSystemInfo = {0};
void BDW_1x3x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
BDW::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * BDW::threadsPerEu;
gtSysInfo->SliceCount = 1;
gtSysInfo->L3CacheSizeInKb = 768;
gtSysInfo->L3BankCount = 4;
gtSysInfo->MaxFillRate = 8;
gtSysInfo->TotalVsThreads = 336;
gtSysInfo->TotalHsThreads = 336;
gtSysInfo->TotalDsThreads = 336;
gtSysInfo->TotalGsThreads = 336;
gtSysInfo->TotalPsThreadsWindowerRange = 64;
gtSysInfo->CsrSizeInMb = 8;
gtSysInfo->MaxEuPerSubSlice = BDW::maxEuPerSubslice;
gtSysInfo->MaxSlicesSupported = BDW::maxSlicesSupported;
gtSysInfo->MaxSubSlicesSupported = BDW::maxSubslicesSupported;
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
if (setupFeatureTableAndWorkaroundTable) {
setupFeatureAndWorkaroundTable(hwInfo);
}
};
const HardwareInfo BDW_1x3x8::hwInfo = {
@ -187,26 +181,13 @@ const HardwareInfo BDW_1x3x8::hwInfo = {
};
GT_SYSTEM_INFO BDW_1x3x8::gtSystemInfo = {0};
void BDW_1x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
BDW::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * BDW::threadsPerEu;
gtSysInfo->SliceCount = 1;
gtSysInfo->L3CacheSizeInKb = 384;
gtSysInfo->L3BankCount = 2;
gtSysInfo->MaxFillRate = 8;
gtSysInfo->TotalVsThreads = 336;
gtSysInfo->TotalHsThreads = 336;
gtSysInfo->TotalDsThreads = 336;
gtSysInfo->TotalGsThreads = 336;
gtSysInfo->TotalPsThreadsWindowerRange = 64;
gtSysInfo->CsrSizeInMb = 8;
gtSysInfo->MaxEuPerSubSlice = BDW::maxEuPerSubslice;
gtSysInfo->MaxSlicesSupported = BDW::maxSlicesSupported;
gtSysInfo->MaxSubSlicesSupported = BDW::maxSubslicesSupported;
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
if (setupFeatureTableAndWorkaroundTable) {
setupFeatureAndWorkaroundTable(hwInfo);
}
};
const HardwareInfo BDW_2x3x8::hwInfo = {
@ -218,26 +199,13 @@ const HardwareInfo BDW_2x3x8::hwInfo = {
};
GT_SYSTEM_INFO BDW_2x3x8::gtSystemInfo = {0};
void BDW_2x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
BDW::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * BDW::threadsPerEu;
gtSysInfo->SliceCount = 2;
gtSysInfo->L3CacheSizeInKb = 1536;
gtSysInfo->L3BankCount = 8;
gtSysInfo->MaxFillRate = 16;
gtSysInfo->TotalVsThreads = 336;
gtSysInfo->TotalHsThreads = 336;
gtSysInfo->TotalDsThreads = 336;
gtSysInfo->TotalGsThreads = 336;
gtSysInfo->TotalPsThreadsWindowerRange = 64;
gtSysInfo->CsrSizeInMb = 8;
gtSysInfo->MaxEuPerSubSlice = BDW::maxEuPerSubslice;
gtSysInfo->MaxSlicesSupported = BDW::maxSlicesSupported;
gtSysInfo->MaxSubSlicesSupported = BDW::maxSubslicesSupported;
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
if (setupFeatureTableAndWorkaroundTable) {
setupFeatureAndWorkaroundTable(hwInfo);
}
};
const HardwareInfo BDW::hwInfo = BDW_1x3x8::hwInfo;

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2021 Intel Corporation
* Copyright (C) 2018-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -24,6 +24,7 @@ struct BXT : public SKLFamily {
static const RuntimeCapabilityTable capabilityTable;
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig);
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
};
class BXT_1x2x6 : public BXT {

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2020 Intel Corporation
* Copyright (C) 2018-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -24,6 +24,7 @@ struct CFL : public SKLFamily {
static const RuntimeCapabilityTable capabilityTable;
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig);
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
};
class CFL_1x2x6 : public CFL {

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2021 Intel Corporation
* Copyright (C) 2018-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -24,6 +24,7 @@ struct GLK : public SKLFamily {
static const RuntimeCapabilityTable capabilityTable;
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig);
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
};
class GLK_1x3x6 : public GLK {

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2021 Intel Corporation
* Copyright (C) 2018-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -24,6 +24,7 @@ struct KBL : public SKLFamily {
static const RuntimeCapabilityTable capabilityTable;
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig);
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
};
class KBL_1x2x6 : public KBL {

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2021 Intel Corporation
* Copyright (C) 2018-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -24,6 +24,7 @@ struct SKL : public SKLFamily {
static const RuntimeCapabilityTable capabilityTable;
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig);
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
};
class SKL_1x2x6 : public SKL {

View File

@ -132,21 +132,9 @@ void BXT::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
workaroundTable->flags.waSamplerCacheFlushBetweenRedescribedSurfaceReads = true;
}
const HardwareInfo BXT_1x2x6::hwInfo = {
&BXT::platform,
&BXT::featureTable,
&BXT::workaroundTable,
&BXT_1x2x6::gtSystemInfo,
BXT::capabilityTable,
};
GT_SYSTEM_INFO BXT_1x2x6::gtSystemInfo = {0};
void BXT_1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
void BXT::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * BXT::threadsPerEu;
gtSysInfo->SliceCount = 1;
gtSysInfo->L3CacheSizeInKb = 384;
gtSysInfo->L3BankCount = 1;
gtSysInfo->MaxFillRate = 8;
gtSysInfo->TotalVsThreads = 112;
gtSysInfo->TotalHsThreads = 112;
gtSysInfo->TotalDsThreads = 112;
@ -158,9 +146,28 @@ void BXT_1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAn
gtSysInfo->MaxSubSlicesSupported = BXT::maxSubslicesSupported;
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
if (setupFeatureTableAndWorkaroundTable) {
setupFeatureAndWorkaroundTable(hwInfo);
}
}
const HardwareInfo BXT_1x2x6::hwInfo = {
&BXT::platform,
&BXT::featureTable,
&BXT::workaroundTable,
&BXT_1x2x6::gtSystemInfo,
BXT::capabilityTable,
};
GT_SYSTEM_INFO BXT_1x2x6::gtSystemInfo = {0};
void BXT_1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
BXT::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->SliceCount = 1;
gtSysInfo->L3CacheSizeInKb = 384;
gtSysInfo->L3BankCount = 1;
gtSysInfo->MaxFillRate = 8;
};
const HardwareInfo BXT_1x3x6::hwInfo = {
@ -172,26 +179,13 @@ const HardwareInfo BXT_1x3x6::hwInfo = {
};
GT_SYSTEM_INFO BXT_1x3x6::gtSystemInfo = {0};
void BXT_1x3x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
BXT::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * BXT::threadsPerEu;
gtSysInfo->SliceCount = 1;
gtSysInfo->L3CacheSizeInKb = 384;
gtSysInfo->L3BankCount = 1;
gtSysInfo->MaxFillRate = 8;
gtSysInfo->TotalVsThreads = 112;
gtSysInfo->TotalHsThreads = 112;
gtSysInfo->TotalDsThreads = 112;
gtSysInfo->TotalGsThreads = 112;
gtSysInfo->TotalPsThreadsWindowerRange = 64;
gtSysInfo->CsrSizeInMb = 8;
gtSysInfo->MaxEuPerSubSlice = BXT::maxEuPerSubslice;
gtSysInfo->MaxSlicesSupported = BXT::maxSlicesSupported;
gtSysInfo->MaxSubSlicesSupported = BXT::maxSubslicesSupported;
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
if (setupFeatureTableAndWorkaroundTable) {
setupFeatureAndWorkaroundTable(hwInfo);
}
};
const HardwareInfo BXT::hwInfo = BXT_1x3x6::hwInfo;

View File

@ -120,6 +120,26 @@ void CFL::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
workaroundTable->flags.waSamplerCacheFlushBetweenRedescribedSurfaceReads = true;
}
void CFL::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * CFL::threadsPerEu;
gtSysInfo->TotalVsThreads = 336;
gtSysInfo->TotalHsThreads = 336;
gtSysInfo->TotalDsThreads = 336;
gtSysInfo->TotalGsThreads = 336;
gtSysInfo->TotalPsThreadsWindowerRange = 64;
gtSysInfo->CsrSizeInMb = 8;
gtSysInfo->MaxEuPerSubSlice = CFL::maxEuPerSubslice;
gtSysInfo->MaxSlicesSupported = CFL::maxSlicesSupported;
gtSysInfo->MaxSubSlicesSupported = CFL::maxSubslicesSupported;
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
if (setupFeatureTableAndWorkaroundTable) {
setupFeatureAndWorkaroundTable(hwInfo);
}
}
const HardwareInfo CFL_1x2x6::hwInfo = {
&CFL::platform,
&CFL::featureTable,
@ -129,26 +149,13 @@ const HardwareInfo CFL_1x2x6::hwInfo = {
};
GT_SYSTEM_INFO CFL_1x2x6::gtSystemInfo = {0};
void CFL_1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
CFL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * CFL::threadsPerEu;
gtSysInfo->SliceCount = 1;
gtSysInfo->L3CacheSizeInKb = 384;
gtSysInfo->L3BankCount = 2;
gtSysInfo->MaxFillRate = 8;
gtSysInfo->TotalVsThreads = 336;
gtSysInfo->TotalHsThreads = 336;
gtSysInfo->TotalDsThreads = 336;
gtSysInfo->TotalGsThreads = 336;
gtSysInfo->TotalPsThreadsWindowerRange = 64;
gtSysInfo->CsrSizeInMb = 8;
gtSysInfo->MaxEuPerSubSlice = CFL::maxEuPerSubslice;
gtSysInfo->MaxSlicesSupported = CFL::maxSlicesSupported;
gtSysInfo->MaxSubSlicesSupported = CFL::maxSubslicesSupported;
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
if (setupFeatureTableAndWorkaroundTable) {
setupFeatureAndWorkaroundTable(hwInfo);
}
};
const HardwareInfo CFL_1x3x6::hwInfo = {
@ -158,28 +165,16 @@ const HardwareInfo CFL_1x3x6::hwInfo = {
&CFL_1x3x6::gtSystemInfo,
CFL::capabilityTable,
};
GT_SYSTEM_INFO CFL_1x3x6::gtSystemInfo = {0};
void CFL_1x3x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
CFL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * CFL::threadsPerEu;
gtSysInfo->SliceCount = 1;
gtSysInfo->L3CacheSizeInKb = 768;
gtSysInfo->L3BankCount = 4;
gtSysInfo->MaxFillRate = 8;
gtSysInfo->TotalVsThreads = 336;
gtSysInfo->TotalHsThreads = 336;
gtSysInfo->TotalDsThreads = 336;
gtSysInfo->TotalGsThreads = 336;
gtSysInfo->TotalPsThreadsWindowerRange = 64;
gtSysInfo->CsrSizeInMb = 8;
gtSysInfo->MaxEuPerSubSlice = CFL::maxEuPerSubslice;
gtSysInfo->MaxSlicesSupported = CFL::maxSlicesSupported;
gtSysInfo->MaxSubSlicesSupported = CFL::maxSubslicesSupported;
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
if (setupFeatureTableAndWorkaroundTable) {
setupFeatureAndWorkaroundTable(hwInfo);
}
};
const HardwareInfo CFL_1x3x8::hwInfo = {
@ -189,28 +184,16 @@ const HardwareInfo CFL_1x3x8::hwInfo = {
&CFL_1x3x8::gtSystemInfo,
CFL::capabilityTable,
};
GT_SYSTEM_INFO CFL_1x3x8::gtSystemInfo = {0};
void CFL_1x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
CFL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * CFL::threadsPerEu;
gtSysInfo->SliceCount = 1;
gtSysInfo->L3CacheSizeInKb = 768;
gtSysInfo->L3BankCount = 4;
gtSysInfo->MaxFillRate = 8;
gtSysInfo->TotalVsThreads = 336;
gtSysInfo->TotalHsThreads = 336;
gtSysInfo->TotalDsThreads = 336;
gtSysInfo->TotalGsThreads = 336;
gtSysInfo->TotalPsThreadsWindowerRange = 64;
gtSysInfo->CsrSizeInMb = 8;
gtSysInfo->MaxEuPerSubSlice = CFL::maxEuPerSubslice;
gtSysInfo->MaxSlicesSupported = CFL::maxSlicesSupported;
gtSysInfo->MaxSubSlicesSupported = CFL::maxSubslicesSupported;
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
if (setupFeatureTableAndWorkaroundTable) {
setupFeatureAndWorkaroundTable(hwInfo);
}
};
const HardwareInfo CFL_2x3x8::hwInfo = {
@ -222,26 +205,13 @@ const HardwareInfo CFL_2x3x8::hwInfo = {
};
GT_SYSTEM_INFO CFL_2x3x8::gtSystemInfo = {0};
void CFL_2x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
CFL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * CFL::threadsPerEu;
gtSysInfo->SliceCount = 2;
gtSysInfo->L3CacheSizeInKb = 1536;
gtSysInfo->L3BankCount = 8;
gtSysInfo->MaxFillRate = 16;
gtSysInfo->TotalVsThreads = 336;
gtSysInfo->TotalHsThreads = 336;
gtSysInfo->TotalDsThreads = 336;
gtSysInfo->TotalGsThreads = 336;
gtSysInfo->TotalPsThreadsWindowerRange = 64;
gtSysInfo->CsrSizeInMb = 8;
gtSysInfo->MaxEuPerSubSlice = CFL::maxEuPerSubslice;
gtSysInfo->MaxSlicesSupported = CFL::maxSlicesSupported;
gtSysInfo->MaxSubSlicesSupported = CFL::maxSubslicesSupported;
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
if (setupFeatureTableAndWorkaroundTable) {
setupFeatureAndWorkaroundTable(hwInfo);
}
};
const HardwareInfo CFL_3x3x8::hwInfo = {
@ -253,26 +223,13 @@ const HardwareInfo CFL_3x3x8::hwInfo = {
};
GT_SYSTEM_INFO CFL_3x3x8::gtSystemInfo = {0};
void CFL_3x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
CFL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * CFL::threadsPerEu;
gtSysInfo->SliceCount = 3;
gtSysInfo->L3CacheSizeInKb = 2304;
gtSysInfo->L3BankCount = 12;
gtSysInfo->MaxFillRate = 24;
gtSysInfo->TotalVsThreads = 336;
gtSysInfo->TotalHsThreads = 336;
gtSysInfo->TotalDsThreads = 336;
gtSysInfo->TotalGsThreads = 336;
gtSysInfo->TotalPsThreadsWindowerRange = 64;
gtSysInfo->CsrSizeInMb = 8;
gtSysInfo->MaxEuPerSubSlice = CFL::maxEuPerSubslice;
gtSysInfo->MaxSlicesSupported = CFL::maxSlicesSupported;
gtSysInfo->MaxSubSlicesSupported = CFL::maxSubslicesSupported;
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
if (setupFeatureTableAndWorkaroundTable) {
setupFeatureAndWorkaroundTable(hwInfo);
}
};
const HardwareInfo CFL::hwInfo = CFL_1x3x6::hwInfo;

View File

@ -120,6 +120,26 @@ void GLK::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
workaroundTable->flags.waSamplerCacheFlushBetweenRedescribedSurfaceReads = true;
}
void GLK::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * GLK::threadsPerEu;
gtSysInfo->TotalVsThreads = 112;
gtSysInfo->TotalHsThreads = 112;
gtSysInfo->TotalDsThreads = 112;
gtSysInfo->TotalGsThreads = 112;
gtSysInfo->TotalPsThreadsWindowerRange = 64;
gtSysInfo->CsrSizeInMb = 8;
gtSysInfo->MaxEuPerSubSlice = GLK::maxEuPerSubslice;
gtSysInfo->MaxSlicesSupported = GLK::maxSlicesSupported;
gtSysInfo->MaxSubSlicesSupported = GLK::maxSubslicesSupported;
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
if (setupFeatureTableAndWorkaroundTable) {
setupFeatureAndWorkaroundTable(hwInfo);
}
}
const HardwareInfo GLK_1x3x6::hwInfo = {
&GLK::platform,
&GLK::featureTable,
@ -130,26 +150,13 @@ const HardwareInfo GLK_1x3x6::hwInfo = {
GT_SYSTEM_INFO GLK_1x3x6::gtSystemInfo = {0};
void GLK_1x3x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
GLK::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * GLK::threadsPerEu;
gtSysInfo->SliceCount = 1;
gtSysInfo->L3CacheSizeInKb = 384;
gtSysInfo->L3BankCount = 2;
gtSysInfo->MaxFillRate = 8;
gtSysInfo->TotalVsThreads = 112;
gtSysInfo->TotalHsThreads = 112;
gtSysInfo->TotalDsThreads = 112;
gtSysInfo->TotalGsThreads = 112;
gtSysInfo->TotalPsThreadsWindowerRange = 64;
gtSysInfo->CsrSizeInMb = 8;
gtSysInfo->MaxEuPerSubSlice = GLK::maxEuPerSubslice;
gtSysInfo->MaxSlicesSupported = GLK::maxSlicesSupported;
gtSysInfo->MaxSubSlicesSupported = GLK::maxSubslicesSupported;
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
if (setupFeatureTableAndWorkaroundTable) {
setupFeatureAndWorkaroundTable(hwInfo);
}
};
const HardwareInfo GLK_1x2x6::hwInfo = {
@ -159,28 +166,16 @@ const HardwareInfo GLK_1x2x6::hwInfo = {
&GLK_1x2x6::gtSystemInfo,
GLK::capabilityTable,
};
GT_SYSTEM_INFO GLK_1x2x6::gtSystemInfo = {0};
void GLK_1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
GLK::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * GLK::threadsPerEu;
gtSysInfo->SliceCount = 1;
gtSysInfo->L3CacheSizeInKb = 384;
gtSysInfo->L3BankCount = 2;
gtSysInfo->MaxFillRate = 8;
gtSysInfo->TotalVsThreads = 112;
gtSysInfo->TotalHsThreads = 112;
gtSysInfo->TotalDsThreads = 112;
gtSysInfo->TotalGsThreads = 112;
gtSysInfo->TotalPsThreadsWindowerRange = 64;
gtSysInfo->CsrSizeInMb = 8;
gtSysInfo->MaxEuPerSubSlice = GLK::maxEuPerSubslice;
gtSysInfo->MaxSlicesSupported = GLK::maxSlicesSupported;
gtSysInfo->MaxSubSlicesSupported = GLK::maxSubslicesSupported;
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
if (setupFeatureTableAndWorkaroundTable) {
setupFeatureAndWorkaroundTable(hwInfo);
}
};
const HardwareInfo GLK::hwInfo = GLK_1x3x6::hwInfo;

View File

@ -129,21 +129,9 @@ void KBL::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
}
}
const HardwareInfo KBL_1x2x6::hwInfo = {
&KBL::platform,
&KBL::featureTable,
&KBL::workaroundTable,
&KBL_1x2x6::gtSystemInfo,
KBL::capabilityTable,
};
GT_SYSTEM_INFO KBL_1x2x6::gtSystemInfo = {0};
void KBL_1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
void KBL::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * KBL::threadsPerEu;
gtSysInfo->SliceCount = 1;
gtSysInfo->L3CacheSizeInKb = 384;
gtSysInfo->L3BankCount = 2;
gtSysInfo->MaxFillRate = 8;
gtSysInfo->TotalVsThreads = 336;
gtSysInfo->TotalHsThreads = 336;
gtSysInfo->TotalDsThreads = 336;
@ -155,9 +143,28 @@ void KBL_1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAn
gtSysInfo->MaxSubSlicesSupported = KBL::maxSubslicesSupported;
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
if (setupFeatureTableAndWorkaroundTable) {
setupFeatureAndWorkaroundTable(hwInfo);
}
}
const HardwareInfo KBL_1x2x6::hwInfo = {
&KBL::platform,
&KBL::featureTable,
&KBL::workaroundTable,
&KBL_1x2x6::gtSystemInfo,
KBL::capabilityTable,
};
GT_SYSTEM_INFO KBL_1x2x6::gtSystemInfo = {0};
void KBL_1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
KBL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->SliceCount = 1;
gtSysInfo->L3CacheSizeInKb = 384;
gtSysInfo->L3BankCount = 2;
gtSysInfo->MaxFillRate = 8;
};
const HardwareInfo KBL_1x3x6::hwInfo = {
@ -170,26 +177,13 @@ const HardwareInfo KBL_1x3x6::hwInfo = {
GT_SYSTEM_INFO KBL_1x3x6::gtSystemInfo = {0};
void KBL_1x3x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
KBL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * KBL::threadsPerEu;
gtSysInfo->SliceCount = 1;
gtSysInfo->L3CacheSizeInKb = 768;
gtSysInfo->L3BankCount = 4;
gtSysInfo->MaxFillRate = 8;
gtSysInfo->TotalVsThreads = 336;
gtSysInfo->TotalHsThreads = 336;
gtSysInfo->TotalDsThreads = 336;
gtSysInfo->TotalGsThreads = 336;
gtSysInfo->TotalPsThreadsWindowerRange = 64;
gtSysInfo->CsrSizeInMb = 8;
gtSysInfo->MaxEuPerSubSlice = KBL::maxEuPerSubslice;
gtSysInfo->MaxSlicesSupported = KBL::maxSlicesSupported;
gtSysInfo->MaxSubSlicesSupported = KBL::maxSubslicesSupported;
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
if (setupFeatureTableAndWorkaroundTable) {
setupFeatureAndWorkaroundTable(hwInfo);
}
};
const HardwareInfo KBL_1x3x8::hwInfo = {
@ -201,26 +195,13 @@ const HardwareInfo KBL_1x3x8::hwInfo = {
};
GT_SYSTEM_INFO KBL_1x3x8::gtSystemInfo = {0};
void KBL_1x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
KBL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * KBL::threadsPerEu;
gtSysInfo->SliceCount = 1;
gtSysInfo->L3CacheSizeInKb = 768;
gtSysInfo->L3BankCount = 4;
gtSysInfo->MaxFillRate = 8;
gtSysInfo->TotalVsThreads = 336;
gtSysInfo->TotalHsThreads = 336;
gtSysInfo->TotalDsThreads = 336;
gtSysInfo->TotalGsThreads = 336;
gtSysInfo->TotalPsThreadsWindowerRange = 64;
gtSysInfo->CsrSizeInMb = 8;
gtSysInfo->MaxEuPerSubSlice = KBL::maxEuPerSubslice;
gtSysInfo->MaxSlicesSupported = KBL::maxSlicesSupported;
gtSysInfo->MaxSubSlicesSupported = KBL::maxSubslicesSupported;
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
if (setupFeatureTableAndWorkaroundTable) {
setupFeatureAndWorkaroundTable(hwInfo);
}
};
const HardwareInfo KBL_2x3x8::hwInfo = {
@ -232,26 +213,13 @@ const HardwareInfo KBL_2x3x8::hwInfo = {
};
GT_SYSTEM_INFO KBL_2x3x8::gtSystemInfo = {0};
void KBL_2x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
KBL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * KBL::threadsPerEu;
gtSysInfo->SliceCount = 2;
gtSysInfo->L3CacheSizeInKb = 1536;
gtSysInfo->L3BankCount = 8;
gtSysInfo->MaxFillRate = 16;
gtSysInfo->TotalVsThreads = 336;
gtSysInfo->TotalHsThreads = 336;
gtSysInfo->TotalDsThreads = 336;
gtSysInfo->TotalGsThreads = 336;
gtSysInfo->TotalPsThreadsWindowerRange = 64;
gtSysInfo->CsrSizeInMb = 8;
gtSysInfo->MaxEuPerSubSlice = KBL::maxEuPerSubslice;
gtSysInfo->MaxSlicesSupported = KBL::maxSlicesSupported;
gtSysInfo->MaxSubSlicesSupported = KBL::maxSubslicesSupported;
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
if (setupFeatureTableAndWorkaroundTable) {
setupFeatureAndWorkaroundTable(hwInfo);
}
};
const HardwareInfo KBL_3x3x8::hwInfo = {
@ -263,26 +231,13 @@ const HardwareInfo KBL_3x3x8::hwInfo = {
};
GT_SYSTEM_INFO KBL_3x3x8::gtSystemInfo = {0};
void KBL_3x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
KBL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * KBL::threadsPerEu;
gtSysInfo->SliceCount = 3;
gtSysInfo->L3CacheSizeInKb = 2304;
gtSysInfo->L3BankCount = 12;
gtSysInfo->MaxFillRate = 23;
gtSysInfo->TotalVsThreads = 336;
gtSysInfo->TotalHsThreads = 336;
gtSysInfo->TotalDsThreads = 336;
gtSysInfo->TotalGsThreads = 336;
gtSysInfo->TotalPsThreadsWindowerRange = 64;
gtSysInfo->CsrSizeInMb = 8;
gtSysInfo->MaxEuPerSubSlice = KBL::maxEuPerSubslice;
gtSysInfo->MaxSlicesSupported = KBL::maxSlicesSupported;
gtSysInfo->MaxSubSlicesSupported = KBL::maxSubslicesSupported;
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
if (setupFeatureTableAndWorkaroundTable) {
setupFeatureAndWorkaroundTable(hwInfo);
}
};
const HardwareInfo KBL::hwInfo = KBL_1x3x6::hwInfo;

View File

@ -141,21 +141,10 @@ void SKL::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
workaroundTable->flags.waCSRUncachable = true;
}
}
const HardwareInfo SKL_1x2x6::hwInfo = {
&SKL::platform,
&SKL::featureTable,
&SKL::workaroundTable,
&SKL_1x2x6::gtSystemInfo,
SKL::capabilityTable,
};
GT_SYSTEM_INFO SKL_1x2x6::gtSystemInfo = {0};
void SKL_1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
void SKL::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * SKL::threadsPerEu;
gtSysInfo->SliceCount = 1;
gtSysInfo->L3CacheSizeInKb = 384;
gtSysInfo->L3BankCount = 2;
gtSysInfo->MaxFillRate = 8;
gtSysInfo->TotalVsThreads = 336;
gtSysInfo->TotalHsThreads = 336;
gtSysInfo->TotalDsThreads = 336;
@ -167,9 +156,28 @@ void SKL_1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAn
gtSysInfo->MaxSubSlicesSupported = SKL::maxSubslicesSupported;
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
if (setupFeatureTableAndWorkaroundTable) {
setupFeatureAndWorkaroundTable(hwInfo);
}
}
const HardwareInfo SKL_1x2x6::hwInfo = {
&SKL::platform,
&SKL::featureTable,
&SKL::workaroundTable,
&SKL_1x2x6::gtSystemInfo,
SKL::capabilityTable,
};
GT_SYSTEM_INFO SKL_1x2x6::gtSystemInfo = {0};
void SKL_1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->SliceCount = 1;
gtSysInfo->L3CacheSizeInKb = 384;
gtSysInfo->L3BankCount = 2;
gtSysInfo->MaxFillRate = 8;
};
const HardwareInfo SKL_1x3x6::hwInfo = {
@ -181,26 +189,13 @@ const HardwareInfo SKL_1x3x6::hwInfo = {
};
GT_SYSTEM_INFO SKL_1x3x6::gtSystemInfo = {0};
void SKL_1x3x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * SKL::threadsPerEu;
gtSysInfo->SliceCount = 1;
gtSysInfo->L3CacheSizeInKb = 768;
gtSysInfo->L3BankCount = 4;
gtSysInfo->MaxFillRate = 8;
gtSysInfo->TotalVsThreads = 336;
gtSysInfo->TotalHsThreads = 336;
gtSysInfo->TotalDsThreads = 336;
gtSysInfo->TotalGsThreads = 336;
gtSysInfo->TotalPsThreadsWindowerRange = 64;
gtSysInfo->CsrSizeInMb = 8;
gtSysInfo->MaxEuPerSubSlice = SKL::maxEuPerSubslice;
gtSysInfo->MaxSlicesSupported = SKL::maxSlicesSupported;
gtSysInfo->MaxSubSlicesSupported = SKL::maxSubslicesSupported;
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
if (setupFeatureTableAndWorkaroundTable) {
setupFeatureAndWorkaroundTable(hwInfo);
}
};
const HardwareInfo SKL_1x3x8::hwInfo = {
@ -212,26 +207,13 @@ const HardwareInfo SKL_1x3x8::hwInfo = {
};
GT_SYSTEM_INFO SKL_1x3x8::gtSystemInfo = {0};
void SKL_1x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * SKL::threadsPerEu;
gtSysInfo->SliceCount = 1;
gtSysInfo->L3CacheSizeInKb = 768;
gtSysInfo->L3BankCount = 4;
gtSysInfo->MaxFillRate = 8;
gtSysInfo->TotalVsThreads = 336;
gtSysInfo->TotalHsThreads = 336;
gtSysInfo->TotalDsThreads = 336;
gtSysInfo->TotalGsThreads = 336;
gtSysInfo->TotalPsThreadsWindowerRange = 64;
gtSysInfo->CsrSizeInMb = 8;
gtSysInfo->MaxEuPerSubSlice = SKL::maxEuPerSubslice;
gtSysInfo->MaxSlicesSupported = SKL::maxSlicesSupported;
gtSysInfo->MaxSubSlicesSupported = SKL::maxSubslicesSupported;
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
if (setupFeatureTableAndWorkaroundTable) {
setupFeatureAndWorkaroundTable(hwInfo);
}
};
const HardwareInfo SKL_2x3x8::hwInfo = {
@ -243,26 +225,13 @@ const HardwareInfo SKL_2x3x8::hwInfo = {
};
GT_SYSTEM_INFO SKL_2x3x8::gtSystemInfo = {0};
void SKL_2x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * SKL::threadsPerEu;
gtSysInfo->SliceCount = 2;
gtSysInfo->L3CacheSizeInKb = 1536;
gtSysInfo->L3BankCount = 8;
gtSysInfo->MaxFillRate = 16;
gtSysInfo->TotalVsThreads = 336;
gtSysInfo->TotalHsThreads = 336;
gtSysInfo->TotalDsThreads = 336;
gtSysInfo->TotalGsThreads = 336;
gtSysInfo->TotalPsThreadsWindowerRange = 64;
gtSysInfo->CsrSizeInMb = 8;
gtSysInfo->MaxEuPerSubSlice = SKL::maxEuPerSubslice;
gtSysInfo->MaxSlicesSupported = SKL::maxSlicesSupported;
gtSysInfo->MaxSubSlicesSupported = SKL::maxSubslicesSupported;
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
if (setupFeatureTableAndWorkaroundTable) {
setupFeatureAndWorkaroundTable(hwInfo);
}
};
const HardwareInfo SKL_3x3x8::hwInfo = {
@ -274,26 +243,13 @@ const HardwareInfo SKL_3x3x8::hwInfo = {
};
GT_SYSTEM_INFO SKL_3x3x8::gtSystemInfo = {0};
void SKL_3x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * SKL::threadsPerEu;
gtSysInfo->SliceCount = 3;
gtSysInfo->L3CacheSizeInKb = 2304;
gtSysInfo->L3BankCount = 12;
gtSysInfo->MaxFillRate = 24;
gtSysInfo->TotalVsThreads = 336;
gtSysInfo->TotalHsThreads = 336;
gtSysInfo->TotalDsThreads = 336;
gtSysInfo->TotalGsThreads = 336;
gtSysInfo->TotalPsThreadsWindowerRange = 64;
gtSysInfo->CsrSizeInMb = 8;
gtSysInfo->MaxEuPerSubSlice = SKL::maxEuPerSubslice;
gtSysInfo->MaxSlicesSupported = SKL::maxSlicesSupported;
gtSysInfo->MaxSubSlicesSupported = SKL::maxSubslicesSupported;
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
if (setupFeatureTableAndWorkaroundTable) {
setupFeatureAndWorkaroundTable(hwInfo);
}
};
const HardwareInfo SKL::hwInfo = SKL_1x3x8::hwInfo;

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2021 Intel Corporation
* Copyright (C) 2018-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -20,6 +20,7 @@ struct EnableGfxProductHw {
defaultHardwareInfoConfigTable[gfxProduct] = GfxProduct::defaultHardwareInfoConfig;
hardwareInfoTable[gfxProduct] = &GfxProduct::hwInfo;
hardwareInfoSetup[gfxProduct] = GfxProduct::setupHardwareInfo;
hardwareInfoBaseSetup[gfxProduct] = GfxProduct::setupHardwareInfoBase;
}
};
} // namespace NEO

View File

@ -45,6 +45,10 @@ void (*hardwareInfoSetup[IGFX_MAX_PRODUCT])(HardwareInfo *, bool, uint64_t) = {
0x0,
};
void (*hardwareInfoBaseSetup[IGFX_MAX_PRODUCT])(HardwareInfo *, bool) = {
0x0,
};
bool getHwInfoForPlatformString(std::string &platform, const HardwareInfo *&hwInfoIn) {
std::transform(platform.begin(), platform.end(), platform.begin(), ::tolower);

View File

@ -165,6 +165,7 @@ extern const char *hardwarePrefix[IGFX_MAX_PRODUCT];
extern uint64_t defaultHardwareInfoConfigTable[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);
template <GFXCORE_FAMILY gfxFamily>
struct EnableGfxFamilyHw {

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2021 Intel Corporation
* Copyright (C) 2021-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -22,12 +22,12 @@ struct XE_HP_SDV : public XeHpFamily {
static const RuntimeCapabilityTable capabilityTable;
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig);
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
};
class XE_HP_SDV_CONFIG : public XE_HP_SDV {
public:
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfoMultiTile(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, bool setupMultiTile);
static const HardwareInfo hwInfo;
private:

View File

@ -129,6 +129,27 @@ void XE_HP_SDV::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
workaroundTable->flags.waEnablePreemptionGranularityControlByUMD = true;
};
void XE_HP_SDV::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * XE_HP_SDV::threadsPerEu;
gtSysInfo->TotalVsThreads = 336;
gtSysInfo->TotalHsThreads = 336;
gtSysInfo->TotalDsThreads = 336;
gtSysInfo->TotalGsThreads = 336;
gtSysInfo->TotalPsThreadsWindowerRange = 64;
gtSysInfo->CsrSizeInMb = 8;
gtSysInfo->MaxEuPerSubSlice = XE_HP_SDV::maxEuPerSubslice;
gtSysInfo->MaxSlicesSupported = XE_HP_SDV::maxSlicesSupported;
gtSysInfo->MaxSubSlicesSupported = XE_HP_SDV::maxSubslicesSupported;
gtSysInfo->MaxDualSubSlicesSupported = XE_HP_SDV::maxDualSubslicesSupported;
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
if (setupFeatureTableAndWorkaroundTable) {
setupFeatureAndWorkaroundTable(hwInfo);
}
}
const HardwareInfo XE_HP_SDV_CONFIG::hwInfo = {
&XE_HP_SDV::platform,
&XE_HP_SDV::featureTable,
@ -138,35 +159,19 @@ const HardwareInfo XE_HP_SDV_CONFIG::hwInfo = {
};
GT_SYSTEM_INFO XE_HP_SDV_CONFIG::gtSystemInfo = {0};
void XE_HP_SDV_CONFIG::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
XE_HP_SDV_CONFIG::setupHardwareInfoMultiTile(hwInfo, setupFeatureTableAndWorkaroundTable, false);
}
setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
void XE_HP_SDV_CONFIG::setupHardwareInfoMultiTile(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, bool setupMultiTile) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->CsrSizeInMb = 8;
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
// non-zero values for unit tests
if (gtSysInfo->SliceCount == 0) {
gtSysInfo->SliceCount = 2;
gtSysInfo->SubSliceCount = 8;
gtSysInfo->EUCount = 40;
gtSysInfo->MaxEuPerSubSlice = gtSysInfo->EUCount / gtSysInfo->SubSliceCount;
gtSysInfo->MaxSlicesSupported = gtSysInfo->SliceCount;
gtSysInfo->MaxSubSlicesSupported = gtSysInfo->SubSliceCount;
gtSysInfo->L3BankCount = 1;
gtSysInfo->CCSInfo.IsValid = true;
gtSysInfo->CCSInfo.NumberOfCCSEnabled = 1;
hwInfo->featureTable.ftrBcsInfo = 1;
}
}
if (setupFeatureTableAndWorkaroundTable) {
XE_HP_SDV::setupFeatureAndWorkaroundTable(hwInfo);
}
};
#include "hw_info_setup_xehp.inl"
} // namespace NEO

View File

@ -27,7 +27,8 @@ struct PVC : public XE_HPC_COREFamily {
static const RuntimeCapabilityTable capabilityTable;
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig);
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, bool setupMultiTile);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfoMultiTileBase(HardwareInfo *hwInfo, bool setupMultiTile);
static void adjustHardwareInfo(HardwareInfo *hwInfo);
static bool isXlA0(const HardwareInfo &hwInfo);
static bool isAtMostXtA0(const HardwareInfo &hwInfo);
@ -48,7 +49,6 @@ struct PVC : public XE_HPC_COREFamily {
class PVC_CONFIG : public PVC {
public:
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfoMultiTile(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, bool setupMultiTile);
static const HardwareInfo hwInfo;
private:

View File

@ -141,7 +141,7 @@ 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, bool setupMultiTile) {
void PVC::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * PVC::threadsPerEu;
gtSysInfo->MaxFillRate = 128;
@ -158,14 +158,21 @@ void PVC::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndW
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
PVC::adjustHardwareInfo(hwInfo);
if (setupFeatureTableAndWorkaroundTable) {
setupFeatureAndWorkaroundTable(hwInfo);
}
}
void PVC::setupHardwareInfoMultiTileBase(HardwareInfo *hwInfo, bool setupMultiTile) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->MultiTileArchInfo.IsValid = setupMultiTile;
gtSysInfo->MultiTileArchInfo.TileCount = 1;
if (DebugManager.flags.CreateMultipleSubDevices.get() > 0) {
gtSysInfo->MultiTileArchInfo.TileCount = DebugManager.flags.CreateMultipleSubDevices.get();
}
gtSysInfo->MultiTileArchInfo.TileMask = static_cast<uint8_t>(maxNBitValue(gtSysInfo->MultiTileArchInfo.TileCount));
PVC::adjustHardwareInfo(hwInfo);
}
FeatureTable PVC::featureTable;
@ -181,41 +188,26 @@ const HardwareInfo PVC_CONFIG::hwInfo = {
GT_SYSTEM_INFO PVC_CONFIG::gtSystemInfo = {0};
void PVC_CONFIG::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
PVC_CONFIG::setupHardwareInfoMultiTile(hwInfo, setupFeatureTableAndWorkaroundTable, false);
}
void PVC_CONFIG::setupHardwareInfoMultiTile(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, bool setupMultiTile) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->CsrSizeInMb = 8;
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
PVC::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
// non-zero values for unit tests
if (gtSysInfo->SliceCount == 0) {
gtSysInfo->SliceCount = 2;
gtSysInfo->SubSliceCount = 8;
gtSysInfo->DualSubSliceCount = gtSysInfo->SubSliceCount;
gtSysInfo->EUCount = 40;
gtSysInfo->MaxEuPerSubSlice = gtSysInfo->EUCount / gtSysInfo->SubSliceCount;
gtSysInfo->MaxSlicesSupported = gtSysInfo->SliceCount;
gtSysInfo->MaxSubSlicesSupported = gtSysInfo->SubSliceCount;
gtSysInfo->L3BankCount = 1;
gtSysInfo->CCSInfo.IsValid = true;
gtSysInfo->CCSInfo.NumberOfCCSEnabled = 2;
gtSysInfo->CCSInfo.Instances.CCSEnableMask = 0b11;
hwInfo->featureTable.ftrBcsInfo = 1;
for (uint32_t slice = 0; slice < gtSysInfo->SliceCount; slice++) {
gtSysInfo->SliceInfo[slice].Enabled = true;
}
}
if (setupFeatureTableAndWorkaroundTable) {
PVC::setupFeatureAndWorkaroundTable(hwInfo);
}
};
}
#include "hw_info_setup_pvc.inl"
} // namespace NEO

View File

@ -27,6 +27,7 @@ struct DG2 : public XE_HPG_COREFamily {
static const RuntimeCapabilityTable capabilityTable;
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig);
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo);
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static bool isG10(const HardwareInfo &hwInfo) {
auto it = std::find(DG2_G10_IDS.begin(), DG2_G10_IDS.end(), hwInfo.platform.usDeviceID);
@ -42,7 +43,6 @@ struct DG2 : public XE_HPG_COREFamily {
class DG2_CONFIG : public DG2 {
public:
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static void setupHardwareInfoMultiTile(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, bool setupMultiTile);
static const HardwareInfo hwInfo;
private:

View File

@ -130,6 +130,27 @@ void DG2::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
workaroundTable->flags.waEnablePreemptionGranularityControlByUMD = true;
};
void DG2::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->ThreadCount = gtSysInfo->EUCount * DG2::threadsPerEu;
gtSysInfo->TotalVsThreads = 336;
gtSysInfo->TotalHsThreads = 336;
gtSysInfo->TotalDsThreads = 336;
gtSysInfo->TotalGsThreads = 336;
gtSysInfo->TotalPsThreadsWindowerRange = 64;
gtSysInfo->CsrSizeInMb = 8;
gtSysInfo->MaxEuPerSubSlice = DG2::maxEuPerSubslice;
gtSysInfo->MaxSlicesSupported = DG2::maxSlicesSupported;
gtSysInfo->MaxSubSlicesSupported = DG2::maxSubslicesSupported;
gtSysInfo->MaxDualSubSlicesSupported = DG2::maxDualSubslicesSupported;
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
if (setupFeatureTableAndWorkaroundTable) {
setupFeatureAndWorkaroundTable(hwInfo);
}
}
const HardwareInfo DG2_CONFIG::hwInfo = {
&DG2::platform,
&DG2::featureTable,
@ -139,15 +160,9 @@ const HardwareInfo DG2_CONFIG::hwInfo = {
};
GT_SYSTEM_INFO DG2_CONFIG::gtSystemInfo = {0};
void DG2_CONFIG::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
DG2_CONFIG::setupHardwareInfoMultiTile(hwInfo, setupFeatureTableAndWorkaroundTable, false);
}
DG2::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
void DG2_CONFIG::setupHardwareInfoMultiTile(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, bool setupMultiTile) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->CsrSizeInMb = 8;
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
// non-zero values for unit tests
if (gtSysInfo->SliceCount == 0) {
gtSysInfo->SliceCount = 2;
@ -169,11 +184,7 @@ void DG2_CONFIG::setupHardwareInfoMultiTile(HardwareInfo *hwInfo, bool setupFeat
gtSysInfo->SliceInfo[slice].Enabled = true;
}
}
if (setupFeatureTableAndWorkaroundTable) {
DG2::setupFeatureAndWorkaroundTable(hwInfo);
}
};
}
#include "hw_info_setup_dg2.inl"
} // namespace NEO

View File

@ -26,11 +26,11 @@ DG2TEST_F(HwInfoConfigTestDg2, whenConvertingTimestampsToCsDomainThenGpuTicksAre
EXPECT_EQ(expectedGpuTicks, gpuTicks);
}
DG2TEST_F(HwInfoConfigTestDg2, givenDg2ConfigWhenSetupHardwareInfoMultiTileThenGtSystemInfoIsSetCorrect) {
DG2TEST_F(HwInfoConfigTestDg2, givenDg2ConfigWhenSetupHardwareInfoThenGtSystemInfoIsCorrect) {
HardwareInfo hwInfo = *defaultHwInfo;
GT_SYSTEM_INFO &gtSystemInfo = hwInfo.gtSystemInfo;
DG2_CONFIG::setupHardwareInfoMultiTile(&hwInfo, false, false);
DG2_CONFIG::setupHardwareInfo(&hwInfo, false);
EXPECT_EQ(8u, gtSystemInfo.CsrSizeInMb);
EXPECT_FALSE(gtSystemInfo.IsL3HashModeEnabled);
EXPECT_FALSE(gtSystemInfo.IsDynamicallyPopulated);