Skip to content

Commit 6486b35

Browse files
Set MaxEusPerSubslice from topology if not already set
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
1 parent 575445d commit 6486b35

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

opencl/test/unit_test/os_interface/linux/hw_info_config_linux_tests.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -617,4 +617,10 @@ HWTEST2_F(HwConfigLinux, GivenDifferentValuesFromTopologyQueryWhenConfiguringHwI
617617
EXPECT_EQ(static_cast<uint32_t>(drm->storedSVal), outHwInfo.gtSystemInfo.MaxSlicesSupported);
618618

619619
EXPECT_EQ(hwInfo.gtSystemInfo.MaxDualSubSlicesSupported, outHwInfo.gtSystemInfo.MaxDualSubSlicesSupported);
620+
621+
hwInfo.gtSystemInfo.MaxEuPerSubSlice = 0;
622+
623+
ret = hwConfig->configureHwInfoDrm(&hwInfo, &outHwInfo, osInterface.get());
624+
EXPECT_EQ(0, ret);
625+
EXPECT_EQ(8u, outHwInfo.gtSystemInfo.MaxEuPerSubSlice);
620626
}

shared/source/os_interface/linux/hw_info_config_drm.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ int HwInfoConfig::configureHwInfoDrm(const HardwareInfo *inHwInfo, HardwareInfo
121121
gtSystemInfo->EUCount = static_cast<uint32_t>(topologyData.euCount);
122122
gtSystemInfo->ThreadCount = this->threadsPerEu * gtSystemInfo->EUCount;
123123

124+
gtSystemInfo->MaxEuPerSubSlice = gtSystemInfo->MaxEuPerSubSlice != 0 ? gtSystemInfo->MaxEuPerSubSlice : topologyData.maxEuCount;
124125
gtSystemInfo->MaxSubSlicesSupported = std::max(static_cast<uint32_t>(topologyData.maxSubSliceCount * topologyData.maxSliceCount), gtSystemInfo->MaxSubSlicesSupported);
125126
gtSystemInfo->MaxSlicesSupported = topologyData.maxSliceCount;
126127

0 commit comments

Comments
 (0)