Skip to content

Commit 0ce5c6c

Browse files
Daniel EnriquezCompute-Runtime-Automation
authored andcommitted
Windows Sysman: Updating VRAM memory Type.
Adding support for the complete range of memory types. Signed-off-by: Daniel Enriquez <[email protected]>
1 parent 152ee4a commit 0ce5c6c

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

level_zero/tools/source/sysman/memory/windows/os_memory_imp.cpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,24 @@ ze_result_t WddmMemoryImp::getProperties(zes_mem_properties_t *pProperties) {
110110
case KmdSysman::MemoryType::LPDDR3: {
111111
pProperties->type = ZES_MEM_TYPE_LPDDR3;
112112
} break;
113+
case KmdSysman::MemoryType::GDDR4: {
114+
pProperties->type = ZES_MEM_TYPE_GDDR4;
115+
} break;
116+
case KmdSysman::MemoryType::GDDR5: {
117+
pProperties->type = ZES_MEM_TYPE_GDDR5;
118+
} break;
119+
case KmdSysman::MemoryType::GDDR5X: {
120+
pProperties->type = ZES_MEM_TYPE_GDDR5X;
121+
} break;
122+
case KmdSysman::MemoryType::GDDR6: {
123+
pProperties->type = ZES_MEM_TYPE_GDDR6;
124+
} break;
125+
case KmdSysman::MemoryType::GDDR6X: {
126+
pProperties->type = ZES_MEM_TYPE_GDDR6X;
127+
} break;
128+
case KmdSysman::MemoryType::GDDR7: {
129+
pProperties->type = ZES_MEM_TYPE_GDDR7;
130+
} break;
113131
default: {
114132
pProperties->type = ZES_MEM_TYPE_FORCE_UINT32;
115133
} break;

level_zero/tools/test/unit_tests/sources/sysman/memory/windows/mock_memory.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class MemoryKmdSysManager : public Mock<MockKmdSysManager> {};
2424
template <>
2525
struct Mock<MemoryKmdSysManager> : public MemoryKmdSysManager {
2626

27-
uint32_t mockMemoryType = KmdSysman::MemoryType::DDR5;
27+
uint32_t mockMemoryType = KmdSysman::MemoryType::GDDR6;
2828
uint32_t mockMemoryLocation = KmdSysman::MemoryLocationsType::DeviceMemory;
2929
uint64_t mockMemoryPhysicalSize = 4294967296;
3030
uint64_t mockMemoryStolen = 0;

level_zero/tools/test/unit_tests/sources/sysman/memory/windows/test_zes_memory.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ TEST_F(SysmanDeviceMemoryFixture, GivenValidMemoryHandleWhenCallingGettingProper
161161
ze_result_t result = zesMemoryGetProperties(handle, &properties);
162162

163163
EXPECT_EQ(result, ZE_RESULT_SUCCESS);
164-
EXPECT_EQ(properties.type, ZES_MEM_TYPE_DDR5);
164+
EXPECT_EQ(properties.type, ZES_MEM_TYPE_GDDR6);
165165
EXPECT_EQ(properties.location, ZES_MEM_LOC_DEVICE);
166166
EXPECT_FALSE(properties.onSubdevice);
167167
EXPECT_EQ(properties.subdeviceId, 0u);

0 commit comments

Comments
 (0)