This patch implements omp_get_device_num() in the host and the device.
It uses the already existing getDeviceNum in the device config for the device.
And in the host it uses the omp_get_num_devices().
Two simple tests added
Paths
| Differential D128347
[OpenMP] Implementing omp_get_device_num() ClosedPublic Authored by josemonsalve2 on Jun 22 2022, 8:11 AM.
Details Summary This patch implements omp_get_device_num() in the host and the device. It uses the already existing getDeviceNum in the device config for the device. Two simple tests added
Diff Detail
Event Timeline
Comment Actions LGTM with one code style issue.
This revision is now accepted and ready to land.Jun 22 2022, 9:29 AM Comment Actions I'm not sure what to do about the buildbot errors I am getting. I'm accessing them but there's no info that tells me what's going on. This revision was landed with ongoing or failed builds.Jun 29 2022, 12:19 AM Closed by commit rG616dd9ae1431: [OpenMP] Implementing omp_get_device_num() (authored by Jose M Monsalve Diaz <jmonsalvediaz@anl.gov>). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 440878 openmp/libomptarget/DeviceRTL/include/Configuration.h
openmp/libomptarget/DeviceRTL/include/Interface.h
openmp/libomptarget/DeviceRTL/src/State.cpp
openmp/libomptarget/include/omptarget.h
openmp/libomptarget/src/api.cpp
openmp/libomptarget/src/exports
openmp/libomptarget/test/api/omp_get_device_num.c
openmp/runtime/test/api/omp_get_device_num.c
|
The spec says:
Therefore I suggest we call omp_get_initial_device here.