From 2116808b8dbae5dc3bf84df22f6f3349bf8f2585 Mon Sep 17 00:00:00 2001 From: Compute-Runtime-Validation Date: Tue, 23 Jul 2024 16:01:56 +0200 Subject: [PATCH] Revert "fix: correct number of slices based on GuC info" This reverts commit b6a56bcdde376c0ae96f4e38a8326ab26561e589. Signed-off-by: Compute-Runtime-Validation --- shared/source/os_interface/linux/drm_neo.cpp | 9 ++---- .../os_interface/linux/drm_mock_device_blob.h | 2 +- .../linux/drm_system_info_tests.cpp | 29 +------------------ 3 files changed, 4 insertions(+), 36 deletions(-) diff --git a/shared/source/os_interface/linux/drm_neo.cpp b/shared/source/os_interface/linux/drm_neo.cpp index 04fc5043c1..adcb6bb6af 100644 --- a/shared/source/os_interface/linux/drm_neo.cpp +++ b/shared/source/os_interface/linux/drm_neo.cpp @@ -929,17 +929,12 @@ void Drm::setupSystemInfo(HardwareInfo *hwInfo, SystemInfo *sysInfo) { if (!gtSysInfo->EUCount || gtSysInfo->EUCount > gtSysInfo->SubSliceCount * gtSysInfo->MaxEuPerSubSlice) { gtSysInfo->EUCount = gtSysInfo->SubSliceCount * gtSysInfo->MaxEuPerSubSlice; } - gtSysInfo->ThreadCount = gtSysInfo->EUCount * sysInfo->getNumThreadsPerEu(); + gtSysInfo->ThreadCount = gtSysInfo->EUCount * sysInfo->getNumThreadsPerEu(); + gtSysInfo->MemoryType = sysInfo->getMemoryType(); gtSysInfo->MaxSlicesSupported = sysInfo->getMaxSlicesSupported(); gtSysInfo->MaxSubSlicesSupported = sysInfo->getMaxDualSubSlicesSupported(); gtSysInfo->MaxDualSubSlicesSupported = sysInfo->getMaxDualSubSlicesSupported(); - - UNRECOVERABLE_IF(gtSysInfo->MaxSlicesSupported == 0); - auto maxDssPerSlice = gtSysInfo->MaxDualSubSlicesSupported / gtSysInfo->MaxSlicesSupported; - gtSysInfo->SliceCount = static_cast(Math::divideAndRoundUp(gtSysInfo->DualSubSliceCount, maxDssPerSlice)); - - gtSysInfo->MemoryType = sysInfo->getMemoryType(); gtSysInfo->CsrSizeInMb = sysInfo->getCsrSizeInMb(); gtSysInfo->SLMSizeInKb = sysInfo->getSlmSizePerDss(); diff --git a/shared/test/common/os_interface/linux/drm_mock_device_blob.h b/shared/test/common/os_interface/linux/drm_mock_device_blob.h index e5bfa3166b..6c9721d850 100644 --- a/shared/test/common/os_interface/linux/drm_mock_device_blob.h +++ b/shared/test/common/os_interface/linux/drm_mock_device_blob.h @@ -12,7 +12,7 @@ static constexpr uint32_t dummyDeviceBlobData[] = { NEO::DeviceBlobConstants::maxSlicesSupported, 1, - 0x02, + 0x01, NEO::DeviceBlobConstants::maxDualSubSlicesSupported, 1, 0x04, diff --git a/shared/test/unit_test/os_interface/linux/drm_system_info_tests.cpp b/shared/test/unit_test/os_interface/linux/drm_system_info_tests.cpp index 78490d72a0..5e723585ce 100644 --- a/shared/test/unit_test/os_interface/linux/drm_system_info_tests.cpp +++ b/shared/test/unit_test/os_interface/linux/drm_system_info_tests.cpp @@ -160,7 +160,7 @@ TEST(DrmSystemInfoTest, givenSystemInfoCreatedFromDeviceBlobWhenQueryingSpecific EXPECT_EQ(0x0Au, systemInfo.getMaxMemoryChannels()); EXPECT_EQ(0x0Bu, systemInfo.getMemoryType()); EXPECT_EQ(0x03u, systemInfo.getMaxEuPerDualSubSlice()); - EXPECT_EQ(0x02u, systemInfo.getMaxSlicesSupported()); + EXPECT_EQ(0x01u, systemInfo.getMaxSlicesSupported()); EXPECT_EQ(0x04u, systemInfo.getMaxDualSubSlicesSupported()); EXPECT_EQ(0x17u, systemInfo.getMaxRCS()); EXPECT_EQ(0x18u, systemInfo.getMaxCCS()); @@ -495,30 +495,3 @@ TEST(DrmSystemInfoTest, givenTopologyWithMoreEuPerDssThanInDeviceBlobWhenSetupHa EXPECT_EQ(hwInfo.gtSystemInfo.SubSliceCount * drm.getSystemInfo()->getMaxEuPerDualSubSlice(), gtSystemInfo.EUCount); EXPECT_EQ(hwInfo.gtSystemInfo.EUCount * drm.getSystemInfo()->getNumThreadsPerEu(), gtSystemInfo.ThreadCount); } - -TEST(DrmSystemInfoTest, givenFlatSubsliceInfoRepresentationWhenSetupHardwareInfoThenCorrectTopologyBasedOnMaxSubslicePerSliceCount) { - auto executionEnvironment = std::make_unique(); - executionEnvironment->rootDeviceEnvironments[0]->initGmm(); - HardwareInfo &hwInfo = *executionEnvironment->rootDeviceEnvironments[0]->getMutableHardwareInfo(); - const auto >SystemInfo = hwInfo.gtSystemInfo; - - DrmMockEngine drm(*executionEnvironment->rootDeviceEnvironments[0]); - drm.querySystemInfo(); - - auto systemInfo = drm.getSystemInfo(); - EXPECT_NE(nullptr, systemInfo); - - drm.storedSSVal = systemInfo->getMaxDualSubSlicesSupported() - 1; - drm.storedEUVal = drm.storedSSVal * systemInfo->getMaxEuPerDualSubSlice(); - auto setupHardwareInfo = [](HardwareInfo *, bool, const ReleaseHelper *) {}; - DeviceDescriptor device = {0, &hwInfo, setupHardwareInfo}; - - int ret = drm.setupHardwareInfo(&device, false); - EXPECT_EQ(ret, 0); - systemInfo = drm.getSystemInfo(); - EXPECT_NE(nullptr, systemInfo); - - EXPECT_EQ(gtSystemInfo.SliceCount, systemInfo->getMaxSlicesSupported()); - EXPECT_EQ(gtSystemInfo.SubSliceCount, systemInfo->getMaxDualSubSlicesSupported() - 1); - EXPECT_EQ(gtSystemInfo.DualSubSliceCount, systemInfo->getMaxDualSubSlicesSupported() - 1); -}