Skip to content

Commit fdf6ab2

Browse files
authored
[Offload] Implement 'Vendor Name' device info for CUDA (llvm#147334)
After llvm#146345 the device info implementation requires a value for every query, rather than silently returning an empty string. This broke the test for `OL_DEVICE_INFO_VENDOR` on CUDA. Add a value to the CUDA plugin. We can quite safely hard code this one.
1 parent e7ceaec commit fdf6ab2

File tree

1 file changed

+2
-0
lines changed
  • offload/plugins-nextgen/cuda/src

1 file changed

+2
-0
lines changed

offload/plugins-nextgen/cuda/src/rtl.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -943,6 +943,8 @@ struct CUDADeviceTy : public GenericDeviceTy {
943943
if (Res == CUDA_SUCCESS)
944944
Info.add("Device Name", TmpChar);
945945

946+
Info.add("Vendor Name", "NVIDIA");
947+
946948
Res = cuDeviceTotalMem(&TmpSt, Device);
947949
if (Res == CUDA_SUCCESS)
948950
Info.add("Global Memory Size", TmpSt, "bytes");

0 commit comments

Comments
 (0)