Skip to content

Conversation

@callumfare
Copy link
Contributor

After #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.

@llvmbot
Copy link
Member

llvmbot commented Jul 7, 2025

@llvm/pr-subscribers-offload

Author: Callum Fare (callumfare)

Changes

After #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.


Full diff: https://github.com/llvm/llvm-project/pull/147334.diff

1 Files Affected:

  • (modified) offload/plugins-nextgen/cuda/src/rtl.cpp (+2)
diff --git a/offload/plugins-nextgen/cuda/src/rtl.cpp b/offload/plugins-nextgen/cuda/src/rtl.cpp
index f1164074f9ea9..536a294f07ce3 100644
--- a/offload/plugins-nextgen/cuda/src/rtl.cpp
+++ b/offload/plugins-nextgen/cuda/src/rtl.cpp
@@ -940,6 +940,8 @@ struct CUDADeviceTy : public GenericDeviceTy {
     if (Res == CUDA_SUCCESS)
       Info.add("Device Name", TmpChar);
 
+    Info.add("Vendor Name", "NVIDIA");
+
     Res = cuDeviceTotalMem(&TmpSt, Device);
     if (Res == CUDA_SUCCESS)
       Info.add("Global Memory Size", TmpSt, "bytes");

@callumfare callumfare merged commit fdf6ab2 into llvm:main Jul 8, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants