fix(sysman): Add GDDR6 memory type into Memory Properties

Related-To: NEO-14810

Signed-off-by: Anvesh Bakwad <anvesh.bakwad@intel.com>
This commit is contained in:
Anvesh Bakwad
2025-05-05 16:45:40 +00:00
committed by Compute-Runtime-Automation
parent de72e91269
commit 35926a5a18
3 changed files with 27 additions and 6 deletions

View File

@@ -65,9 +65,12 @@ ze_result_t SysmanProductHelperHw<gfxProduct>::getMemoryProperties(zes_mem_prope
case NEO::DeviceBlobConstants::MemoryType::lpddr5:
pProperties->type = ZES_MEM_TYPE_LPDDR5;
break;
default:
pProperties->type = ZES_MEM_TYPE_DDR;
case NEO::DeviceBlobConstants::MemoryType::gddr6:
pProperties->type = ZES_MEM_TYPE_GDDR6;
break;
default:
DEBUG_BREAK_IF(true);
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
}
if (pProperties->type == ZES_MEM_TYPE_HBM) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2024 Intel Corporation
* Copyright (C) 2020-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -361,20 +361,37 @@ HWTEST2_F(SysmanDeviceMemoryFixtureI915, GivenValidMemoryHandleWhenCallingZesMem
}
}
HWTEST2_F(SysmanDeviceMemoryFixtureI915, GivenValidMemoryHandleWhenCallingZesMemoryGetPropertiesWithDDRLocalMemoryThenVerifySysmanMemoryGetPropertiesCallSucceeds, IsPVC) {
HWTEST2_F(SysmanDeviceMemoryFixtureI915, GivenValidMemoryHandleWhenCallingZesMemoryGetPropertiesWithGddr6LocalMemoryThenVerifySysmanMemoryGetPropertiesCallSucceeds, IsPVC) {
pDrm->setMemoryType(NEO::DeviceBlobConstants::MemoryType::gddr6);
auto handles = getMemoryHandles(memoryHandleComponentCount);
for (auto handle : handles) {
zes_mem_properties_t properties;
ze_result_t result = zesMemoryGetProperties(handle, &properties);
EXPECT_EQ(result, ZE_RESULT_SUCCESS);
EXPECT_EQ(properties.type, ZES_MEM_TYPE_GDDR6);
EXPECT_EQ(properties.location, ZES_MEM_LOC_DEVICE);
EXPECT_FALSE(properties.onSubdevice);
EXPECT_EQ(properties.subdeviceId, 0u);
EXPECT_EQ(properties.physicalSize, 0u);
EXPECT_EQ(properties.numChannels, numMemoryChannels);
EXPECT_EQ(properties.busWidth, memoryBusWidth);
}
}
TEST_F(SysmanDeviceMemoryFixtureI915, GivenValidMemoryHandleWhenCallingZesMemoryGetPropertiesWithInvalidMemoryTypeThenVerifyGetPropertiesCallReturnsMemoryTypeAsDdrAndNumberOfChannelsAsUnknown) {
pDrm->setMemoryType(INT_MAX);
auto handles = getMemoryHandles(memoryHandleComponentCount);
for (auto handle : handles) {
zes_mem_properties_t properties;
ze_result_t result = zesMemoryGetProperties(handle, &properties);
EXPECT_EQ(result, ZE_RESULT_SUCCESS);
EXPECT_EQ(properties.type, ZES_MEM_TYPE_DDR);
EXPECT_EQ(properties.location, ZES_MEM_LOC_DEVICE);
EXPECT_EQ(properties.numChannels, -1);
EXPECT_FALSE(properties.onSubdevice);
EXPECT_EQ(properties.subdeviceId, 0u);
EXPECT_EQ(properties.physicalSize, 0u);
EXPECT_EQ(properties.numChannels, numMemoryChannels);
EXPECT_EQ(properties.busWidth, memoryBusWidth);
EXPECT_EQ(properties.busWidth, -1);
}
}

View File

@@ -1052,6 +1052,7 @@ std::string getMemoryType(zes_mem_type_t memType) {
{ZES_MEM_TYPE_LPDDR3, "ZES_MEM_TYPE_LPDDR3"},
{ZES_MEM_TYPE_LPDDR4, "ZES_MEM_TYPE_LPDDR4"},
{ZES_MEM_TYPE_LPDDR5, "ZES_MEM_TYPE_LPDDR5"},
{ZES_MEM_TYPE_GDDR6, "ZES_MEM_TYPE_GDDR6"},
{ZES_MEM_TYPE_SRAM, "ZES_MEM_TYPE_SRAM"},
{ZES_MEM_TYPE_L1, "ZES_MEM_TYPE_L1"},
{ZES_MEM_TYPE_L3, "ZES_MEM_TYPE_L3"},