[llvm] [OpenMP] Adds omp_target_is_accessible routine (PR #138294)
Michael Klemm via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 24 06:42:35 PDT 2025
================
@@ -195,6 +195,49 @@ EXTERN int omp_target_is_present(const void *Ptr, int DeviceNum) {
return Rc;
}
+/// Check whether a pointer is accessible from a device.
+/// the functionality is available in OpenMP 5.1 and later
+/// OpenMP 5.1
----------------
mjklemm wrote:
I do not know of any way that the library could tell what OpenMP version has been requested in the compiler. We would have to implement an infrastructure for this first and then check in the routines. Alternatively, we could version the symbol and if the symbol is from a newer OpenMP version that what the compiler requested, fail in the linker.
https://github.com/llvm/llvm-project/pull/138294
More information about the llvm-commits
mailing list