mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Set correct MaxSlicesSupported in gtSystemInfo
- calculate maxSubsliceCount in translateTopologyInfo based on enabled bits Related-To: LOCI-2080 Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
35acadaf78
commit
4407bf9c49
@ -668,3 +668,26 @@ TEST(DrmQueryTest, GivenDrmWhenSetupHardwareInfoCalledThenCorrectMaxValuesInGtSy
|
||||
EXPECT_EQ(NEO::defaultHwInfo->gtSystemInfo.MaxSubSlicesSupported, hwInfo->gtSystemInfo.MaxSubSlicesSupported);
|
||||
EXPECT_EQ(NEO::defaultHwInfo->gtSystemInfo.MaxEuPerSubSlice, hwInfo->gtSystemInfo.MaxEuPerSubSlice);
|
||||
}
|
||||
|
||||
TEST(DrmQueryTest, GivenLessAvailableSubSlicesThanMaxSubSlicesWhenQueryingTopologyInfoThenCorrectMaxSubSliceCountIsSet) {
|
||||
auto executionEnvironment = std::make_unique<ExecutionEnvironment>();
|
||||
executionEnvironment->prepareRootDeviceEnvironments(1);
|
||||
|
||||
*executionEnvironment->rootDeviceEnvironments[0]->getMutableHardwareInfo() = *NEO::defaultHwInfo.get();
|
||||
DrmMock drm{*executionEnvironment->rootDeviceEnvironments[0]};
|
||||
drm.disableSomeTopology = true;
|
||||
|
||||
Drm::QueryTopologyData topologyData = {};
|
||||
drm.StoredSVal = 2;
|
||||
drm.StoredSSVal = 6;
|
||||
drm.StoredEUVal = 16;
|
||||
|
||||
EXPECT_TRUE(drm.queryTopology(*executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo(), topologyData));
|
||||
|
||||
EXPECT_EQ(1, topologyData.sliceCount);
|
||||
EXPECT_EQ(1, topologyData.subSliceCount);
|
||||
EXPECT_EQ(1, topologyData.euCount);
|
||||
|
||||
EXPECT_EQ(drm.StoredSVal, topologyData.maxSliceCount);
|
||||
EXPECT_EQ(2, topologyData.maxSubSliceCount);
|
||||
}
|
||||
|
Reference in New Issue
Block a user