Skip to content

Commit 95ab6fe

Browse files
committed
[OpenMP] Reverts omp_get_initial_device changes
1 parent 03d45cc commit 95ab6fe

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

offload/libomptarget/OpenMP/API.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,7 @@ EXTERN int omp_get_device_num(void) {
9393
EXTERN int omp_get_initial_device(void) {
9494
TIMESCOPE();
9595
OMPT_IF_BUILT(ReturnAddressSetterRAII RA(__builtin_return_address(0)));
96-
int NumDevices = omp_get_num_devices();
97-
int HostDevice = NumDevices == 0 ? -1 : NumDevices;
96+
int HostDevice = omp_get_num_devices();
9897
DP("Call to omp_get_initial_device returning %d\n", HostDevice);
9998
return HostDevice;
10099
}

0 commit comments

Comments
 (0)