[Openmp-commits] [openmp] [OpenMP][OMPT] Add OMPT callback for device data exchange 'Device-to-Device' (PR #81991)

Jan André Reuter via Openmp-commits openmp-commits at lists.llvm.org
Mon Feb 19 04:32:28 PST 2024


Thyre wrote:

> > x86_64 still reports two transfers even though `LIBOMPTARGET_DEBUG` shows `omptarget --> copy from device to device`.
> 
> Just reproduced this behavior within the testcase and I'll discuss this shortly but my guess is that the `x86_64` plugin is simply handling the 'data exhange' differently (chopping it into a pair of retrieve+submit via the initial device). My take is: changing that particular behavior is beyond the scope of this PR and should be discussed beforehand.
> 
> Observing `x86_64` callbacks seems like a very peculiar use-case to me TBH, especially since there is no accurate representation of the actually present / 'real' devices AFAIK. My _assumption_ is, that the latter is also the reason why we take the route 'retrieve+submit' via the 'real' (initial) device.

Just wanted to bring it up, so that it is known đŸ˜„ 
I also agree that changing the behavior is outside of the PR scope and probably also doesn't have a high priority. I mean, if the runtime is splitting the transfer into two transfers, than its correct that we see that with OMPT. 

I also agree that observing `x86_64` callbacks for target callbacks is only somewhat useful. We will see that there are events, but why there are four devices for example may confuse people. In addition, we will see the actual host computation via other callbacks anyway. 

https://github.com/llvm/llvm-project/pull/81991


More information about the Openmp-commits mailing list