Re: [gomp4.1 WIP] omp_target_* libgomp APIs

2015-07-14 Thread Jakub Jelinek
On Mon, Jul 13, 2015 at 05:26:43PM +0200, Jakub Jelinek wrote: > > > Perhaps > > > #define REFCOUNT_INFINITY (~(uintptr_t) 0) > > > ? > > > > Probably, I don't know. > > Ok, I'll change this later. Ok, here is what I've committed: 2015-07-14 Jakub Jelinek * libgomp.h (REFCOUNT_INFIN

Re: [gomp4.1 WIP] omp_target_* libgomp APIs

2015-07-13 Thread Jakub Jelinek
On Mon, Jul 13, 2015 at 10:06:24PM +0300, Ilya Verbin wrote: > libgomp/ > * libgomp.h (struct gomp_device_descr): Add dev2dev_func. > * target.c (omp_target_memcpy): Support device-to-device. > (omp_target_memcpy_rect_worker): Likewise. > (omp_target_memcpy_rect): Likewise.

Re: [gomp4.1 WIP] omp_target_* libgomp APIs

2015-07-13 Thread Ilya Verbin
On Mon, Jul 13, 2015 at 18:50:29 +0300, Ilya Verbin wrote: > 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 >

Re: [gomp4.1 WIP] omp_target_* libgomp APIs

2015-07-13 Thread Ilya Verbin
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 fin

Re: [gomp4.1 WIP] omp_target_* libgomp APIs

2015-07-13 Thread Jakub Jelinek
On Mon, Jul 13, 2015 at 06:15:45PM +0300, Ilya Verbin wrote: > On Mon, Jul 13, 2015 at 16:03:06 +0200, Jakub Jelinek wrote: > > 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: > > > > + k->refcount = INT_MAX; > > >

Re: [gomp4.1 WIP] omp_target_* libgomp APIs

2015-07-13 Thread Ilya Verbin
On Mon, Jul 13, 2015 at 16:03:06 +0200, Jakub Jelinek wrote: > 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: > > > + k->refcount = INT_MAX; > > > > Shouldn't it be UINTPTR_MAX? > > Dunno if we can count on it bei

Re: [gomp4.1 WIP] omp_target_* libgomp APIs

2015-07-13 Thread Jakub Jelinek
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! > > >

Re: [gomp4.1 WIP] omp_target_* libgomp APIs

2015-07-13 Thread Ilya Verbin
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? > + /* FIXME: S

Re: [gomp4.1 WIP] omp_target_* libgomp APIs

2015-07-13 Thread Jakub Jelinek
On Thu, Jul 09, 2015 at 04:06:57PM +0200, Jakub Jelinek wrote: > The latest spec adds a bunch of new functions, this patch attempts to > implement them, except I gave up partly in omp_target_associate_ptr > and completely in omp_target_disassociate_ptr for now. > > As for the plugins, I think we'l

[gomp4.1 WIP] omp_target_* libgomp APIs

2015-07-09 Thread Jakub Jelinek
Hi! The latest spec adds a bunch of new functions, this patch attempts to implement them, except I gave up partly in omp_target_associate_ptr and completely in omp_target_disassociate_ptr for now. As for the plugins, I think we'll want some plugin callback to support offloading device <-> offload