[Offload][OMPT] Adapt device tracing for omp_initial_device on host#2458
[Offload][OMPT] Adapt device tracing for omp_initial_device on host#2458Thyre wants to merge 1 commit into
omp_initial_device on host#2458Conversation
In llvm-project#192924, all host side callbacks were changed to pass `omp_initial_device` instead of `omp_get_initial_device()` to an attached tool. This change allowed to set `initial_device_num` in `ompt_start_tool` to a fixed value, hence enabling tools to rely on a passed identifier to differentiate the host device from any other device. However, this change needs to be adapted in the device tracing records as well, as tools might rely on both host-side callbacks and device tracing records having consistent identifiers. A tool might e.g. discard invalid records due to not recognizing the passed `omp_get_initial_device()`. This is amplified by `ompt_get_num_devices()` not yielding the actual number of devices. Thus, update the device tracing interface to also consistently use `omp_initial_device` for the host device. Signed-off-by: Jan André Reuter <j.reuter@fz-juelich.de>
|
I unfortunately wasn't able to test if there are any test failures caused by this change. |
|
Changes seem reasonable to me. I kicked off testing. |
|
!PSDB |
|
Looks like the failed checks are: Linux::release / Test gfx94X-dcgpu / Test hipfft / Test hipfft (shard 1/1) (gfx94X-dcgpu) Linux::release / Test gfx94X-dcgpu / Test hipsolver / Test hipsolver (shard 1/1) (gfx94X-dcgpu) Linux::release / Test gfx94X-dcgpu / Test rocfft / Test rocfft (shard 1/1) (gfx94X-dcgpu) I'd be surprised if they are related to the changes in this PR, since the symbols seem to come from |
In llvm-project#192924, all host side callbacks were changed to pass
omp_initial_deviceinstead ofomp_get_initial_device()to an attached tool. This change allowed to setinitial_device_numinompt_start_toolto a fixed value, hence enabling tools to rely on a passed identifier to differentiate the host device from any other device.However, this change needs to be adapted in the device tracing records as well, as tools might rely on both host-side callbacks and device tracing records having consistent identifiers. A tool might e.g. discard invalid records due to not recognizing the passed
omp_get_initial_device(). This is amplified byompt_get_num_devices()not yielding the actual number of devices.Thus, update the device tracing interface to also consistently use
omp_initial_devicefor the host device.