[Openmp-commits] [PATCH] D95397: [OpenMP][deviceRTLs] Remove omp_is_initial_device

Shilei Tian via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Jan 25 14:52:10 PST 2021


tianshilei1992 created this revision.
tianshilei1992 added reviewers: jdoerfert, JonChesterfield, Hahnfeld.
Herald added subscribers: guansong, yaxunl.
tianshilei1992 requested review of this revision.
Herald added subscribers: openmp-commits, sstefan1.
Herald added a project: OpenMP.

`omp_is_initial_device` in device code was implemented as a builtin
function in D38968 <https://reviews.llvm.org/D38968> for a better performance. Therefore there is no chance that
this function will be called to `deviceRTLs`. As we're moving to build `deviceRTLs`
with OpenMP compiler, this function can lead to a compilation error. This patch
just simply removes it.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D95397

Files:
  openmp/libomptarget/deviceRTLs/common/src/libcall.cu
  openmp/libomptarget/deviceRTLs/interface.h


Index: openmp/libomptarget/deviceRTLs/interface.h
===================================================================
--- openmp/libomptarget/deviceRTLs/interface.h
+++ openmp/libomptarget/deviceRTLs/interface.h
@@ -89,7 +89,6 @@
 EXTERN int omp_get_num_devices(void);
 EXTERN int omp_get_num_teams(void);
 EXTERN int omp_get_team_num(void);
-EXTERN int omp_is_initial_device(void);
 EXTERN int omp_get_initial_device(void);
 EXTERN int omp_get_max_task_priority(void);
 
Index: openmp/libomptarget/deviceRTLs/common/src/libcall.cu
===================================================================
--- openmp/libomptarget/deviceRTLs/common/src/libcall.cu
+++ openmp/libomptarget/deviceRTLs/common/src/libcall.cu
@@ -316,11 +316,6 @@
   return rc;
 }
 
-EXTERN int omp_is_initial_device(void) {
-  PRINT0(LD_IO, "call omp_is_initial_device() returns 0\n");
-  return 0; // 0 by def on device
-}
-
 // Unspecified on the device.
 EXTERN int omp_get_initial_device(void) {
   PRINT0(LD_IO, "call omp_get_initial_device() returns 0\n");


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95397.319133.patch
Type: text/x-patch
Size: 1035 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20210125/424153a5/attachment.bin>


More information about the Openmp-commits mailing list