On Mon, Jul 13, 2015 at 17:26:43 +0200, Jakub Jelinek wrote:
> > > > > +  /* FIXME: Support device-to-device somehow?  */
> > > > 
> > > > Should libgomp copy data device-host-device if device-device is not 
> > > > supported by
> > > > target?  Current liboffloadmic doesn't support this.  I'll find out if 
> > > > there are
> > > > any plans.
> > > 
> > > There is also the option to spawn an offloaded function that will just 
> > > call
> > > memcpy, or have such a function next to the main () of the program that 
> > > we link
> > > in.
> > 
> > Do you mean the case when src_devicep == dst_devicep ?  It's easy to support
> > this by adding new func into plugin, whithout any changes in liboffloadmic.
> > I thought about memcpy between different devices...
> 
> Well, even src_devicep == dst_devicep does not guarantee it is the same
> device, that is the case only if also src_devicep->target_id ==
> dst_devicep->target_id, right?

Why?  Devices of one type with different target_id's have different entries in
devices[].

> I wouldn't worry about that and just return EINVAL when copying in between
> different devices.

I'll prepare a patch, which will add an interface for copying within one device,
covered by GOMP_OFFLOAD_CAP_OPENMP_400.

  -- Ilya

Reply via email to