OSDN Git Service

[OpenMP][deviceRTLs] Remove omp_is_initial_device
authorShilei Tian <tianshilei1992@gmail.com>
Mon, 25 Jan 2021 23:34:14 +0000 (18:34 -0500)
committerShilei Tian <tianshilei1992@gmail.com>
Mon, 25 Jan 2021 23:34:23 +0000 (18:34 -0500)
`omp_is_initial_device` in device code was implemented as a builtin
function in 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.

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D95397

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

index f43d74a..c1cfe3e 100644 (file)
@@ -316,11 +316,6 @@ EXTERN int omp_get_team_num() {
   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");
index 5f539bc..e27e4fa 100644 (file)
@@ -89,7 +89,6 @@ EXTERN int omp_get_default_device(void);
 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);