mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
fix: correct number of slices based on GuC info
KMD exposes flat subslice info without indicating slice index This commit calculates slice count based on total subslice count and max subslice per slice count that we have from device blob Related-To: NEO-12073 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
b8eabdd4ce
commit
b6a56bcdde
@@ -12,7 +12,7 @@
|
||||
static constexpr uint32_t dummyDeviceBlobData[] = {
|
||||
NEO::DeviceBlobConstants::maxSlicesSupported,
|
||||
1,
|
||||
0x01,
|
||||
0x02,
|
||||
NEO::DeviceBlobConstants::maxDualSubSlicesSupported,
|
||||
1,
|
||||
0x04,
|
||||
|
||||
@@ -160,7 +160,7 @@ TEST(DrmSystemInfoTest, givenSystemInfoCreatedFromDeviceBlobWhenQueryingSpecific
|
||||
EXPECT_EQ(0x0Au, systemInfo.getMaxMemoryChannels());
|
||||
EXPECT_EQ(0x0Bu, systemInfo.getMemoryType());
|
||||
EXPECT_EQ(0x03u, systemInfo.getMaxEuPerDualSubSlice());
|
||||
EXPECT_EQ(0x01u, systemInfo.getMaxSlicesSupported());
|
||||
EXPECT_EQ(0x02u, systemInfo.getMaxSlicesSupported());
|
||||
EXPECT_EQ(0x04u, systemInfo.getMaxDualSubSlicesSupported());
|
||||
EXPECT_EQ(0x17u, systemInfo.getMaxRCS());
|
||||
EXPECT_EQ(0x18u, systemInfo.getMaxCCS());
|
||||
@@ -495,3 +495,30 @@ 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<MockExecutionEnvironment>();
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user