[Openmp-commits] [PATCH] D55578: Add omp_get_device_num() and update several other device API functions (FIXED)

Terry Wilmarth via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Dec 11 14:13:50 PST 2018


tlwilmar created this revision.
tlwilmar added reviewers: RaviNarayanaswamy, ABataev, gtbercea, AndreyChurbanov, hbae, jlpeyton.
tlwilmar added a project: OpenMP.

Add omp_get_device_num() function for 5.0 which returns the number of the device the current thread is running on.  Currently, we are leaving it to the compiler to handle this properly if it is called inside target.

Also, did some cleanup and updating of duplicate device API functions (in both libomp andlibomptarget) to make them into weak functions that check for the symbol from libomptarget, and will call the version in libomptarget if it is present.   If any additional device API functions are implemented also in libomptarget in the future, we should add the dlsym calls to the host functions.  Also, if the omp_target_* functions are to be implemented for the host (this has been requested), they should attempt to call the libomptarget versions as well.


Repository:
  rOMP OpenMP

https://reviews.llvm.org/D55578

Files:
  runtime/src/dllexports
  runtime/src/include/45/omp.h.var
  runtime/src/include/45/omp_lib.f.var
  runtime/src/include/45/omp_lib.h.var
  runtime/src/include/50/omp.h.var
  runtime/src/include/50/omp_lib.f.var
  runtime/src/include/50/omp_lib.f90.var
  runtime/src/include/50/omp_lib.h.var
  runtime/src/kmp.h
  runtime/src/kmp_ftn_entry.h
  runtime/src/kmp_ftn_os.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55578.177776.patch
Type: text/x-patch
Size: 20517 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20181211/7eace3c0/attachment-0001.bin>


More information about the Openmp-commits mailing list