Skip to content

Commit 712bdd1

Browse files
committed
[OpenMP] Reverts omp_get_initial_device changes
1 parent 2792290 commit 712bdd1

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
@@ -94,8 +94,7 @@ EXTERN int omp_get_device_num(void) {
9494
EXTERN int omp_get_initial_device(void) {
9595
TIMESCOPE();
9696
OMPT_IF_BUILT(ReturnAddressSetterRAII RA(__builtin_return_address(0)));
97-
int NumDevices = omp_get_num_devices();
98-
int HostDevice = NumDevices == 0 ? -1 : NumDevices;
97+
int HostDevice = omp_get_num_devices();
9998
DP("Call to omp_get_initial_device returning %d\n", HostDevice);
10099
return HostDevice;
101100
}

0 commit comments

Comments
 (0)