Skip to content

Commit a7e79d5

Browse files
Non-zero dg2 config values for unit tests
Signed-off-by: Bartosz Dunajski <[email protected]>
1 parent b362810 commit a7e79d5

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

shared/source/xe_hpg_core/hw_info_dg2.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,23 @@ void DG2_CONFIG::setupHardwareInfoMultiTile(HardwareInfo *hwInfo, bool setupFeat
145145
gtSysInfo->IsL3HashModeEnabled = false;
146146
gtSysInfo->IsDynamicallyPopulated = false;
147147

148+
// non-zero values for unit tests
149+
if (gtSysInfo->SliceCount == 0) {
150+
gtSysInfo->SliceCount = 2;
151+
gtSysInfo->SubSliceCount = 8;
152+
gtSysInfo->EUCount = 40;
153+
gtSysInfo->MaxEuPerSubSlice = gtSysInfo->EUCount / gtSysInfo->SubSliceCount;
154+
gtSysInfo->MaxSlicesSupported = gtSysInfo->SliceCount;
155+
gtSysInfo->MaxSubSlicesSupported = gtSysInfo->SubSliceCount;
156+
157+
gtSysInfo->L3BankCount = 1;
158+
159+
gtSysInfo->CCSInfo.IsValid = true;
160+
gtSysInfo->CCSInfo.NumberOfCCSEnabled = 1;
161+
162+
hwInfo->featureTable.ftrBcsInfo = 1;
163+
}
164+
148165
if (setupFeatureTableAndWorkaroundTable) {
149166
DG2::setupFeatureAndWorkaroundTable(hwInfo);
150167
}

0 commit comments

Comments
 (0)