Use max enabled slice in debugger thread mapping

Signed-off-by: Yates, Brandon <brandon.yates@intel.com>
This commit is contained in:
Yates, Brandon
2022-09-23 00:29:32 +00:00
committed by Compute-Runtime-Automation
parent 81845d3781
commit 71bef6094d
17 changed files with 102 additions and 19 deletions

View File

@ -1516,3 +1516,27 @@ HWTEST2_F(HwHelperTest, givenAtLeastXeHpPlatformWhenGettingMinimalScratchSpaceSi
const auto &hwHelper = HwHelper::get(renderCoreFamily);
EXPECT_EQ(64U, hwHelper.getMinimalScratchSpaceSize());
}
TEST(HwHelperTests, whenIsDynamicallyPopulatedisFalseThengetHighestEnabledSliceReturnsMaxSlicesSupported) {
auto hwInfo = *defaultHwInfo;
hwInfo.gtSystemInfo.IsDynamicallyPopulated = false;
hwInfo.gtSystemInfo.MaxSlicesSupported = 4;
const auto &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily);
auto maxSlice = hwHelper.getHighestEnabledSlice(hwInfo);
EXPECT_EQ(maxSlice, hwInfo.gtSystemInfo.MaxSlicesSupported);
}
TEST(HwHelperTests, whenIsDynamicallyPopulatedisTrueThengetHighestEnabledSliceReturnsHighestEnabledSliceInfo) {
auto hwInfo = *defaultHwInfo;
hwInfo.gtSystemInfo.IsDynamicallyPopulated = true;
hwInfo.gtSystemInfo.MaxSlicesSupported = 4;
for (int i = 0; i < GT_MAX_SLICE; i++) {
hwInfo.gtSystemInfo.SliceInfo[i].Enabled = false;
}
hwInfo.gtSystemInfo.SliceInfo[6].Enabled = true;
const auto &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily);
auto maxSlice = hwHelper.getHighestEnabledSlice(hwInfo);
EXPECT_EQ(maxSlice, 7u);
}