Skip to content

Commit 7085c29

Browse files
committed
Add product name
1 parent c5220a4 commit 7085c29

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

offload/tools/liboffload-deviceinfo/llvm-liboffload-device-info.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,10 @@ ol_result_t printDevice(std::ostream &S, ol_device_handle_t D) {
155155

156156
std::vector<char> Name;
157157
size_t NameSize;
158-
OFFLOAD_ERR(olGetDeviceInfoSize(D, OL_DEVICE_INFO_NAME, &NameSize))
158+
OFFLOAD_ERR(olGetDeviceInfoSize(D, OL_DEVICE_INFO_PRODUCT_NAME, &NameSize))
159159
Name.resize(NameSize);
160-
OFFLOAD_ERR(olGetDeviceInfo(D, OL_DEVICE_INFO_NAME, NameSize, Name.data()));
160+
OFFLOAD_ERR(
161+
olGetDeviceInfo(D, OL_DEVICE_INFO_PRODUCT_NAME, NameSize, Name.data()));
161162
S << "[" << Name.data() << "]\n";
162163

163164
OFFLOAD_ERR(printPlatformValue<const char *>(
@@ -169,6 +170,8 @@ ol_result_t printDevice(std::ostream &S, ol_device_handle_t D) {
169170
OFFLOAD_ERR(printPlatformValue<ol_platform_backend_t>(
170171
S, Platform, OL_PLATFORM_INFO_BACKEND, "Platform Backend"));
171172

173+
OFFLOAD_ERR(
174+
printDeviceValue<const char *>(S, D, OL_DEVICE_INFO_NAME, "Name"));
172175
OFFLOAD_ERR(
173176
printDeviceValue<ol_device_type_t>(S, D, OL_DEVICE_INFO_TYPE, "Type"));
174177
OFFLOAD_ERR(printDeviceValue<const char *>(

0 commit comments

Comments
 (0)