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

@@ -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;