Skip to content

Commit 786358a

Browse files
committed
[Offload] Fix incorrect size used in llvm-offload-device-info tool
Summary: This was not using the size previously queried and would fail when the implementation actually verified it.
1 parent 7e46782 commit 786358a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ ol_result_t printDeviceValue(std::ostream &S, ol_device_handle_t Dev,
137137
size_t Size;
138138
OFFLOAD_ERR(olGetDeviceInfoSize(Dev, Info, &Size));
139139
Val.resize(Size);
140-
OFFLOAD_ERR(olGetDeviceInfo(Dev, Info, sizeof(Val), Val.data()));
140+
OFFLOAD_ERR(olGetDeviceInfo(Dev, Info, Size, Val.data()));
141141
doWrite<T, PK>(S, reinterpret_cast<T>(Val.data()));
142142
} else {
143143
T Val;

0 commit comments

Comments
 (0)