mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
fix: read max SS & EU/SS from GuC system info blob
Related-To: NEO-9489 Signed-off-by: Wenbin Lu <wenbin.lu@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
be2cd522af
commit
e39d478acd
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2023 Intel Corporation
|
||||
* Copyright (C) 2021-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -37,6 +37,12 @@ static constexpr uint32_t dummyDeviceBlobData[] = {
|
||||
NEO::DeviceBlobConstants::l3BankSizeInKb,
|
||||
1,
|
||||
0x2D,
|
||||
NEO::DeviceBlobConstants::maxSubSlicesSupported,
|
||||
1,
|
||||
0x04,
|
||||
NEO::DeviceBlobConstants::maxEuPerSubSlice,
|
||||
1,
|
||||
0x03,
|
||||
};
|
||||
|
||||
const std::vector<uint32_t> inputBlobData(reinterpret_cast<const uint32_t *>(dummyDeviceBlobData),
|
||||
|
||||
@@ -163,6 +163,30 @@ TEST(DrmSystemInfoTest, givenSystemInfoCreatedFromDeviceBlobWhenQueryingSpecific
|
||||
EXPECT_EQ(0x2Du, systemInfo.getL3BankSizeInKb());
|
||||
}
|
||||
|
||||
TEST(DrmSystemInfoTest, givenSystemInfoCreatedFromDeviceBlobAndDifferentMaxSubSlicesAndMaxDSSThenQueryReturnsTheMaxValue) {
|
||||
uint32_t hwBlob0[] = {NEO::DeviceBlobConstants::maxDualSubSlicesSupported, 1, 4, NEO::DeviceBlobConstants::maxSubSlicesSupported, 1, 8};
|
||||
std::vector<uint32_t> inputBlobData0(reinterpret_cast<uint32_t *>(hwBlob0), reinterpret_cast<uint32_t *>(ptrOffset(hwBlob0, sizeof(hwBlob0))));
|
||||
SystemInfo systemInfo0(inputBlobData0);
|
||||
EXPECT_EQ(8u, systemInfo0.getMaxDualSubSlicesSupported());
|
||||
|
||||
uint32_t hwBlob1[] = {NEO::DeviceBlobConstants::maxDualSubSlicesSupported, 1, 16, NEO::DeviceBlobConstants::maxSubSlicesSupported, 1, 8};
|
||||
std::vector<uint32_t> inputBlobData1(reinterpret_cast<uint32_t *>(hwBlob1), reinterpret_cast<uint32_t *>(ptrOffset(hwBlob1, sizeof(hwBlob1))));
|
||||
SystemInfo systemInfo1(inputBlobData1);
|
||||
EXPECT_EQ(16u, systemInfo1.getMaxDualSubSlicesSupported());
|
||||
}
|
||||
|
||||
TEST(DrmSystemInfoTest, givenSystemInfoCreatedFromDeviceBlobAndDifferentMaxEuPerSubSliceAndMaxEuPerDSSThenQueryReturnsTheMaxValue) {
|
||||
uint32_t hwBlob0[] = {NEO::DeviceBlobConstants::maxEuPerDualSubSlice, 1, 7, NEO::DeviceBlobConstants::maxEuPerSubSlice, 1, 8};
|
||||
std::vector<uint32_t> inputBlobData0(reinterpret_cast<uint32_t *>(hwBlob0), reinterpret_cast<uint32_t *>(ptrOffset(hwBlob0, sizeof(hwBlob0))));
|
||||
SystemInfo systemInfo0(inputBlobData0);
|
||||
EXPECT_EQ(8u, systemInfo0.getMaxEuPerDualSubSlice());
|
||||
|
||||
uint32_t hwBlob1[] = {NEO::DeviceBlobConstants::maxEuPerDualSubSlice, 1, 8, NEO::DeviceBlobConstants::maxEuPerSubSlice, 1, 7};
|
||||
std::vector<uint32_t> inputBlobData1(reinterpret_cast<uint32_t *>(hwBlob1), reinterpret_cast<uint32_t *>(ptrOffset(hwBlob1, sizeof(hwBlob1))));
|
||||
SystemInfo systemInfo1(inputBlobData1);
|
||||
EXPECT_EQ(8u, systemInfo1.getMaxEuPerDualSubSlice());
|
||||
}
|
||||
|
||||
TEST(DrmSystemInfoTest, givenSetupHardwareInfoWhenQuerySystemInfoFailsThenSystemInfoIsNotCreatedAndDebugMessageIsPrinted) {
|
||||
auto executionEnvironment = std::make_unique<MockExecutionEnvironment>();
|
||||
executionEnvironment->rootDeviceEnvironments[0]->initGmm();
|
||||
|
||||
Reference in New Issue
Block a user