[llvm-branch-commits] [llvm] [openmp] [OpenMP] Implement omp_get_uid_from_device() / omp_get_device_from_uid() (PR #164392)

Robert Imschweiler via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Oct 21 12:33:51 PDT 2025


================
@@ -1543,14 +1543,26 @@ int FTN_STDCALL KMP_EXPAND_NAME(FTN_GET_MAX_TASK_PRIORITY)(void) {
 #endif
 }
 
-// This function will be defined in libomptarget. When libomptarget is not
-// loaded, we assume we are on the host and return KMP_HOST_DEVICE.
+// These functions will be defined in libomptarget. When libomptarget is not
+// loaded, we assume we are on the host.
 // Compiler/libomptarget will handle this if called inside target.
 int FTN_STDCALL FTN_GET_DEVICE_NUM(void) KMP_WEAK_ATTRIBUTE_EXTERNAL;
 int FTN_STDCALL FTN_GET_DEVICE_NUM(void) {
   return KMP_EXPAND_NAME(FTN_GET_INITIAL_DEVICE)();
 }
 
+const char *FTN_STDCALL FTN_GET_UID_FROM_DEVICE(int device_num)
----------------
ro-i wrote:

done

https://github.com/llvm/llvm-project/pull/164392


More information about the llvm-branch-commits mailing list