Do not set Max values from topology in Drm::setupHardwareInfo
- max values set in device->setupHardwareInfo and HwInfoConfig::configureHwInfo Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
parent
2f827dc817
commit
21d93a33d2
|
@ -645,7 +645,7 @@ TEST(DrmTest, givenProgramDebuggingAndContextDebugAvailableWhenCreatingContextFo
|
|||
EXPECT_EQ(static_cast<uint32_t>(-1), drmMock.passedContextDebugId);
|
||||
}
|
||||
|
||||
TEST(DrmQueryTest, GivenDrmWhenSetupHardwareInfoCalledThenCorrectMaxValuesInGtSystemInfoAreSet) {
|
||||
TEST(DrmQueryTest, GivenDrmWhenSetupHardwareInfoCalledThenCorrectMaxValuesInGtSystemInfoArePreserved) {
|
||||
auto executionEnvironment = std::make_unique<ExecutionEnvironment>();
|
||||
executionEnvironment->prepareRootDeviceEnvironments(1);
|
||||
|
||||
|
@ -664,7 +664,7 @@ TEST(DrmQueryTest, GivenDrmWhenSetupHardwareInfoCalledThenCorrectMaxValuesInGtSy
|
|||
|
||||
drm.setupHardwareInfo(&device, false);
|
||||
|
||||
EXPECT_EQ(hwInfo->gtSystemInfo.SliceCount, hwInfo->gtSystemInfo.MaxSlicesSupported);
|
||||
EXPECT_EQ(6u, hwInfo->gtSystemInfo.MaxSubSlicesSupported);
|
||||
EXPECT_EQ(8u, hwInfo->gtSystemInfo.MaxEuPerSubSlice);
|
||||
EXPECT_EQ(NEO::defaultHwInfo->gtSystemInfo.MaxSlicesSupported, hwInfo->gtSystemInfo.MaxSlicesSupported);
|
||||
EXPECT_EQ(NEO::defaultHwInfo->gtSystemInfo.MaxSubSlicesSupported, hwInfo->gtSystemInfo.MaxSubSlicesSupported);
|
||||
EXPECT_EQ(NEO::defaultHwInfo->gtSystemInfo.MaxEuPerSubSlice, hwInfo->gtSystemInfo.MaxEuPerSubSlice);
|
||||
}
|
||||
|
|
|
@ -318,8 +318,6 @@ int Drm::setupHardwareInfo(DeviceDescriptor *device, bool setupFeatureTableAndWo
|
|||
if (!status) {
|
||||
PRINT_DEBUG_STRING(DebugManager.flags.PrintDebugMessages.get(), stderr, "%s", "WARNING: Topology query failed!\n");
|
||||
|
||||
topologyData.sliceCount = hwInfo->gtSystemInfo.SliceCount;
|
||||
|
||||
ret = getEuTotal(topologyData.euCount);
|
||||
if (ret != 0) {
|
||||
PRINT_DEBUG_STRING(DebugManager.flags.PrintDebugMessages.get(), stderr, "%s", "FATAL: Cannot query EU total parameter!\n");
|
||||
|
@ -331,20 +329,12 @@ int Drm::setupHardwareInfo(DeviceDescriptor *device, bool setupFeatureTableAndWo
|
|||
PRINT_DEBUG_STRING(DebugManager.flags.PrintDebugMessages.get(), stderr, "%s", "FATAL: Cannot query subslice total parameter!\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
topologyData.maxEuCount = topologyData.euCount / topologyData.subSliceCount;
|
||||
topologyData.maxSliceCount = topologyData.sliceCount;
|
||||
topologyData.maxSubSliceCount = topologyData.subSliceCount / topologyData.sliceCount;
|
||||
}
|
||||
|
||||
hwInfo->gtSystemInfo.SliceCount = static_cast<uint32_t>(topologyData.sliceCount);
|
||||
hwInfo->gtSystemInfo.SubSliceCount = static_cast<uint32_t>(topologyData.subSliceCount);
|
||||
hwInfo->gtSystemInfo.EUCount = static_cast<uint32_t>(topologyData.euCount);
|
||||
|
||||
hwInfo->gtSystemInfo.MaxEuPerSubSlice = topologyData.maxEuCount;
|
||||
hwInfo->gtSystemInfo.MaxSubSlicesSupported = topologyData.maxSubSliceCount * topologyData.maxSliceCount;
|
||||
hwInfo->gtSystemInfo.MaxSlicesSupported = topologyData.maxSliceCount;
|
||||
|
||||
status = querySystemInfo();
|
||||
if (!status) {
|
||||
PRINT_DEBUG_STRING(DebugManager.flags.PrintDebugMessages.get(), stdout, "%s", "INFO: System Info query failed!\n");
|
||||
|
|
|
@ -113,9 +113,9 @@ int HwInfoConfig::configureHwInfo(const HardwareInfo *inHwInfo, HardwareInfo *ou
|
|||
return ret;
|
||||
}
|
||||
|
||||
topologyData.maxEuCount = topologyData.euCount / topologyData.subSliceCount;
|
||||
topologyData.maxEuCount = topologyData.subSliceCount > 0 ? topologyData.euCount / topologyData.subSliceCount : 0;
|
||||
topologyData.maxSliceCount = topologyData.sliceCount;
|
||||
topologyData.maxSubSliceCount = topologyData.subSliceCount / topologyData.sliceCount;
|
||||
topologyData.maxSubSliceCount = topologyData.sliceCount > 0 ? topologyData.subSliceCount / topologyData.sliceCount : 0;
|
||||
}
|
||||
|
||||
gtSystemInfo->SliceCount = static_cast<uint32_t>(topologyData.sliceCount);
|
||||
|
|
Loading…
Reference in New Issue