[gomp4.1 WIP] omp_target_* libgomp APIs
Jakub Jelinek
jakub@redhat.com
Mon Jul 13 14:03:00 GMT 2015
On Mon, Jul 13, 2015 at 04:38:33PM +0300, Ilya Verbin wrote:
> On Mon, Jul 13, 2015 at 15:17:29 +0200, Jakub Jelinek wrote:
> > Here is a new version that I've committed. I've finished up
> > associate/disassociate, wrote a test and tested also with intelmicemul
> > offloading.
>
> Great!
>
> > + k->refcount = INT_MAX;
>
> Shouldn't it be UINTPTR_MAX?
Dunno if we can count on it being in stdint.h on all targets.
Perhaps
#define REFCOUNT_INFINITY (~(uintptr_t) 0)
?
> > + /* 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.
Also, could you see if the 2 and 3 dimension memcpy_rect couldn't be handled
more efficiently by liboffloadmic too?
>From what I can see, on the cuda side there is some cudaMemcpy2D and
cudaMemcpy3D, though I admit I haven't studied in detail what exactly they
do.
Jakub
More information about the Gcc-patches
mailing list