Skip to content

Commit 1695362

Browse files
add memory reporting to show devices
Signed-off-by: Michal Mrozek <[email protected]>
1 parent dc1d0d8 commit 1695362

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

source/tools/show_devices_l0/main.cpp

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2022-2024 Intel Corporation
2+
* Copyright (C) 2022-2025 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -95,6 +95,17 @@ int printDeviceProperties(ze_device_handle_t device, uint32_t numberOfTabs) {
9595
std::cout << static_cast<uint32_t>(deviceProperties.uuid.id[i]) << " ";
9696
}
9797
std::cout << "\n";
98+
99+
ze_device_memory_properties_t memoryProperties = {};
100+
uint32_t count = 0u;
101+
res = zeDeviceGetMemoryProperties(device, &count, nullptr);
102+
if (res == ZE_RESULT_SUCCESS && count == 1) {
103+
zeDeviceGetMemoryProperties(device, &count, &memoryProperties);
104+
std::cout << tabDelimiter << "Memory properties: \n";
105+
std::cout << tabDelimiter << "\ttotal size: " << std::dec << memoryProperties.totalSize << "\n";
106+
std::cout << tabDelimiter << "\tmax clock rate: " << memoryProperties.maxClockRate << "\n";
107+
}
108+
98109
ze_device_memory_access_properties_t memoryAccessCapabilities = {};
99110

100111
res = zeDeviceGetMemoryAccessProperties(device, &memoryAccessCapabilities);

0 commit comments

Comments
 (0)