mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-12 17:33:00 +08:00
test: Correct logic of disabling slices in gtSystemInfo
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
0204761add
commit
0025cb25f4
@@ -1475,12 +1475,13 @@ HWTEST_F(GfxCoreHelperTest, WhenIsDynamicallyPopulatedIsTrueThenGetHighestEnable
|
||||
hwInfo.gtSystemInfo.MaxSlicesSupported = 1;
|
||||
hwInfo.gtSystemInfo.MaxDualSubSlicesSupported = 4;
|
||||
|
||||
for (int i = 0; i < GT_MAX_SLICE; i++) {
|
||||
hwInfo.gtSystemInfo.SliceInfo[i].Enabled = false;
|
||||
for (unsigned int dssID = 0; dssID < GT_MAX_DUALSUBSLICE_PER_SLICE; dssID++) {
|
||||
hwInfo.gtSystemInfo.SliceInfo[i].DSSInfo[dssID].Enabled = false;
|
||||
for (auto &sliceInfo : hwInfo.gtSystemInfo.SliceInfo) {
|
||||
sliceInfo.Enabled = false;
|
||||
for (auto &dssInfo : sliceInfo.DSSInfo) {
|
||||
dssInfo.Enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
hwInfo.gtSystemInfo.SliceInfo[3].Enabled = true;
|
||||
hwInfo.gtSystemInfo.SliceInfo[3].DSSInfo[0].Enabled = true;
|
||||
hwInfo.gtSystemInfo.SliceInfo[3].DSSInfo[1].Enabled = true;
|
||||
|
||||
@@ -155,9 +155,10 @@ TEST_F(WddmTests, GivengtSystemInfoSliceInfoHasEnabledSlicesAtHigherIndicesThenE
|
||||
defaultHwInfo.get()->gtSystemInfo.IsDynamicallyPopulated = true;
|
||||
defaultHwInfo.get()->gtSystemInfo.SliceCount = 1; // Only one slice enabled
|
||||
|
||||
defaultHwInfo.get()->gtSystemInfo.SliceInfo[0].Enabled = false;
|
||||
defaultHwInfo.get()->gtSystemInfo.SliceInfo[1].Enabled = false;
|
||||
defaultHwInfo.get()->gtSystemInfo.SliceInfo[2].Enabled = false;
|
||||
for (auto &sliceInfo : defaultHwInfo->gtSystemInfo.SliceInfo) {
|
||||
sliceInfo.Enabled = false;
|
||||
}
|
||||
|
||||
defaultHwInfo.get()->gtSystemInfo.SliceInfo[3].Enabled = true;
|
||||
defaultHwInfo.get()->gtSystemInfo.SliceInfo[3].DualSubSliceEnabledCount = 1;
|
||||
defaultHwInfo.get()->gtSystemInfo.SliceInfo[3].DSSInfo[0].Enabled = true;
|
||||
@@ -230,6 +231,10 @@ TEST_F(WddmTests, GivenProperTopologyDataWhenQueryingTopologyThenExpectTrue) {
|
||||
defaultHwInfo.get()->gtSystemInfo.IsDynamicallyPopulated = true;
|
||||
defaultHwInfo.get()->gtSystemInfo.SliceCount = 1; // Only one slice enabled
|
||||
|
||||
for (auto &sliceInfo : defaultHwInfo->gtSystemInfo.SliceInfo) {
|
||||
sliceInfo.Enabled = false;
|
||||
}
|
||||
|
||||
defaultHwInfo.get()->gtSystemInfo.SliceInfo[0].Enabled = true;
|
||||
defaultHwInfo.get()->gtSystemInfo.SliceInfo[0].DualSubSliceEnabledCount = 2;
|
||||
defaultHwInfo.get()->gtSystemInfo.SliceInfo[0].DSSInfo[0].Enabled = false; // DSS[0] disabled
|
||||
@@ -242,9 +247,6 @@ TEST_F(WddmTests, GivenProperTopologyDataWhenQueryingTopologyThenExpectTrue) {
|
||||
defaultHwInfo.get()->gtSystemInfo.SliceInfo[0].DSSInfo[3].SubSlice[0].Enabled = true;
|
||||
defaultHwInfo.get()->gtSystemInfo.SliceInfo[0].DSSInfo[3].SubSlice[1].Enabled = true;
|
||||
defaultHwInfo.get()->gtSystemInfo.SliceInfo[0].DSSInfo[3].SubSlice[1].EuEnabledCount = 4;
|
||||
for (uint32_t i = 1; i < defaultHwInfo.get()->gtSystemInfo.MaxSlicesSupported; i++) {
|
||||
defaultHwInfo.get()->gtSystemInfo.SliceInfo[i].Enabled = false;
|
||||
}
|
||||
|
||||
wddm->rootDeviceEnvironment.setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
EXPECT_TRUE(wddm->buildTopologyMapping());
|
||||
@@ -263,9 +265,12 @@ TEST_F(WddmTests, GivenMoreThanOneEnabledSliceWhenQueryingTopologyThenExpectTrue
|
||||
defaultHwInfo.get()->gtSystemInfo.MultiTileArchInfo.TileCount = 1;
|
||||
defaultHwInfo.get()->gtSystemInfo.MaxSlicesSupported = GT_MAX_SLICE;
|
||||
defaultHwInfo.get()->gtSystemInfo.SliceCount = 2;
|
||||
defaultHwInfo.get()->gtSystemInfo.SliceInfo[0].Enabled = false;
|
||||
defaultHwInfo.get()->gtSystemInfo.IsDynamicallyPopulated = true;
|
||||
|
||||
for (auto &sliceInfo : defaultHwInfo->gtSystemInfo.SliceInfo) {
|
||||
sliceInfo.Enabled = false;
|
||||
}
|
||||
|
||||
uint32_t index = 1;
|
||||
for (uint32_t enabledSliceCount = 0; enabledSliceCount < defaultHwInfo.get()->gtSystemInfo.SliceCount; enabledSliceCount++) {
|
||||
defaultHwInfo.get()->gtSystemInfo.SliceInfo[index].Enabled = true;
|
||||
@@ -277,9 +282,6 @@ TEST_F(WddmTests, GivenMoreThanOneEnabledSliceWhenQueryingTopologyThenExpectTrue
|
||||
defaultHwInfo.get()->gtSystemInfo.SliceInfo[index].DSSInfo[0].SubSlice[1].EuEnabledCount = 4;
|
||||
index++;
|
||||
}
|
||||
for (; index < defaultHwInfo.get()->gtSystemInfo.MaxSlicesSupported; index++) {
|
||||
defaultHwInfo.get()->gtSystemInfo.SliceInfo[index].Enabled = false;
|
||||
}
|
||||
|
||||
wddm->rootDeviceEnvironment.setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
EXPECT_TRUE(wddm->buildTopologyMapping());
|
||||
@@ -328,8 +330,8 @@ TEST_F(WddmTests, GivenNoEuThreadsEnabledWhenQueryingTopologyThenExpectFalse) {
|
||||
TEST_F(WddmTests, GivenNoSliceEnabledWhenQueryingTopologyThenExpectFalse) {
|
||||
VariableBackup<HardwareInfo> backupHwInfo(defaultHwInfo.get());
|
||||
defaultHwInfo.get()->gtSystemInfo.MultiTileArchInfo.TileCount = 1;
|
||||
for (uint32_t i = 0; i < GT_MAX_SLICE; i++) {
|
||||
defaultHwInfo.get()->gtSystemInfo.SliceInfo[i].Enabled = false;
|
||||
for (auto &sliceInfo : defaultHwInfo->gtSystemInfo.SliceInfo) {
|
||||
sliceInfo.Enabled = false;
|
||||
}
|
||||
wddm->rootDeviceEnvironment.setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
EXPECT_FALSE(wddm->buildTopologyMapping());
|
||||
|
||||
@@ -647,8 +647,8 @@ DG2TEST_F(ProductHelperTestDg2, givenEnabledSliceInNonStandardConfigWhenComputeU
|
||||
HardwareInfo &hwInfo = *executionEnvironment->rootDeviceEnvironments[0]->getMutableHardwareInfo();
|
||||
GT_SYSTEM_INFO &testSysInfo = hwInfo.gtSystemInfo;
|
||||
testSysInfo.IsDynamicallyPopulated = true;
|
||||
for (int i = 0; i < GT_MAX_SLICE; i++) {
|
||||
testSysInfo.SliceInfo[i].Enabled = false;
|
||||
for (auto &sliceInfo : testSysInfo.SliceInfo) {
|
||||
sliceInfo.Enabled = false;
|
||||
}
|
||||
testSysInfo.SliceInfo[2].Enabled = true;
|
||||
testSysInfo.SliceInfo[3].Enabled = true;
|
||||
@@ -667,8 +667,8 @@ DG2TEST_F(ProductHelperTestDg2, givenNotEnabledSliceWhenComputeUnitsUsedForScrat
|
||||
HardwareInfo &hwInfo = *executionEnvironment->rootDeviceEnvironments[0]->getMutableHardwareInfo();
|
||||
GT_SYSTEM_INFO &testSysInfo = hwInfo.gtSystemInfo;
|
||||
testSysInfo.IsDynamicallyPopulated = true;
|
||||
for (int i = 0; i < GT_MAX_SLICE; i++) {
|
||||
testSysInfo.SliceInfo[i].Enabled = false;
|
||||
for (auto &sliceInfo : testSysInfo.SliceInfo) {
|
||||
sliceInfo.Enabled = false;
|
||||
}
|
||||
|
||||
auto &gfxCoreHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper<GfxCoreHelper>();
|
||||
|
||||
Reference in New Issue
Block a user