mirror-llvm-project/offload/test/ompt
Jan André Reuter c9ae1305b0
[OpenMP][OMPT] Map ompt_get_num_devices to runtime function (#200790)
Since 82e94a5934, `ompt_get_num_devices`
was hard coded to always provide a return value of `1`, regardless of
the actual number of devices. Tools relying on this return value were
henced forced to use other approaches to estimate the number of
available devices.

To improve the situtation, map the returned value to the one provided by
`omp_get_num_devices()`. This does not resolve the issue completely
though. When OMPT is initialized through `libomptarget.so`, the
PluginManager, providing the number of devices, is not initialized until
after OMPT has been fully set up. This means that tools, trying to
retrieve the number of devices during the _initialize_ callback, will
still receive the incorrect number of devices.

Still, this is a significant improvement compared to the prior state
which provided an incorrect result for most of the program runtime.

Closes #196829

---------

Signed-off-by: Jan André Reuter <j.reuter@fz-juelich.de>
2026-07-01 16:20:49 +02:00
..
callbacks.h [NFC][OMPT] Use unique_id entry point for tests (#202228) 2026-06-08 11:26:40 +02:00
get_num_devices.c [OpenMP][OMPT] Map ompt_get_num_devices to runtime function (#200790) 2026-07-01 16:20:49 +02:00
omp_api.c
register_both.h [NFC][OMPT] Use unique_id entry point for tests (#202228) 2026-06-08 11:26:40 +02:00
register_emi.h [NFC][OMPT] Use unique_id entry point for tests (#202228) 2026-06-08 11:26:40 +02:00
register_emi_map.h [NFC][OMPT] Use unique_id entry point for tests (#202228) 2026-06-08 11:26:40 +02:00
register_no_device_init.h [NFC][OMPT] Use unique_id entry point for tests (#202228) 2026-06-08 11:26:40 +02:00
register_non_emi.h [NFC][OMPT] Use unique_id entry point for tests (#202228) 2026-06-08 11:26:40 +02:00
register_non_emi_map.h [NFC][OMPT] Use unique_id entry point for tests (#202228) 2026-06-08 11:26:40 +02:00
register_wrong_return.h [NFC][OMPT] Use unique_id entry point for tests (#202228) 2026-06-08 11:26:40 +02:00
target_memcpy.c [OMPT][OpenMP] Use omp_initial_device for host in callbacks (#192924) 2026-04-29 12:06:41 +02:00
target_memcpy_emi.c [OMPT][OpenMP] Use omp_initial_device for host in callbacks (#192924) 2026-04-29 12:06:41 +02:00
target_memset.c [OMPT] Add callback for omp_target_memset calls (#194168) 2026-05-28 17:52:04 +02:00
target_memset_async.c [OMPT] Add callback for omp_target_memset calls (#194168) 2026-05-28 17:52:04 +02:00
target_memset_emi.c [OMPT] Add callback for omp_target_memset calls (#194168) 2026-05-28 17:52:04 +02:00
veccopy.c [offload][lit] Enable/disable tests on Level Zero when using DeviceRTL (#182128) 2026-02-18 21:53:19 +00:00
veccopy_data.c [offload][lit] Enable/disable tests on Level Zero when using DeviceRTL (#182128) 2026-02-18 21:53:19 +00:00
veccopy_disallow_both.c [offload][lit] Enable/disable tests on Level Zero when using DeviceRTL (#182128) 2026-02-18 21:53:19 +00:00
veccopy_emi.c [offload][lit] Enable/disable tests on Level Zero when using DeviceRTL (#182128) 2026-02-18 21:53:19 +00:00
veccopy_emi_map.c [offload][lit] Enable/disable tests on Level Zero when using DeviceRTL (#182128) 2026-02-18 21:53:19 +00:00
veccopy_map.c [offload][lit] Enable/disable tests on Level Zero when using DeviceRTL (#182128) 2026-02-18 21:53:19 +00:00
veccopy_no_device_init.c [offload][lit] Enable/disable tests on Level Zero when using DeviceRTL (#182128) 2026-02-18 21:53:19 +00:00
veccopy_wrong_return.c [offload][lit] Enable/disable tests on Level Zero when using DeviceRTL (#182128) 2026-02-18 21:53:19 +00:00