[Openmp-commits] [openmp] [amdgpu] Implement D2D memcpy as HSA call (PR #69955)

Joseph Huber via Openmp-commits openmp-commits at lists.llvm.org
Mon Oct 23 12:36:38 PDT 2023


jhuber6 wrote:

> > I'm guessing it's impossible to make a test for this? Could we do a D2D memcpy on the same device and make sure that they are the same via a `memcmp`?
> 
> It's already implemented (and possibly tested) on cuda but there's no functional change from what we have at the moment that bounces through host memory. It mostly doesn't have a test because I don't think and of the CI have multiple GPUs and I haven't spent the time working out how to write an openmp test which behaves sanely with one or two gpus in this context.

So we already have test coverage, but it's just falling back to a D2H + H2D copy instead, okay. I don't think the test suite is really set up in a way to use multiple devices, even if you're on a machine that supports it you'd need to use the `device` clause to check all of them. However a lot of testing could probably be simplified if we did `--offload-arch=native` and then just ran the test on each device, unrelated aside.

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


More information about the Openmp-commits mailing list