[gomp4.1] Initial support for some OpenMP 4.1 construct parsing

Ilya Verbin iverbin@gmail.com
Mon Jul 20 19:40:00 GMT 2015


On Fri, Jul 17, 2015 at 18:43:06 +0200, Jakub Jelinek wrote:
> On Fri, Jul 17, 2015 at 07:31:36PM +0300, Ilya Verbin wrote:
> > One big question is who will maintain the list of scheduled job, its
> > dependencies, etc. - libgomp or each target plugin?
> > 
> > 
> > OpenACC has async queues:
> > #pragma acc parallel async(2) wait(1)
> > 
> > But it's not possible to have 2 waits like:
> > #pragma acc parallel async(3) wait(1) wait(2)
> > 
> > (GOMP_OFFLOAD_openacc_async_wait_async has only one argument with the number of
> > queue to wait)
> > 
> > Thomas, please correct me if I'm wrong.
> > 
> > In this regard, OpenMP is more complicated, since it allows e.g.:
> > #pragma omp target nowait depend(in: a, b) depend(out: c, d)
> 
> If it is each plugin, then supposedly it should use (if possible) some
> common libgomp routine to maintain the queues, duplicating the dependency
> graph handling code in each plugins might be too ugly.
> 
> > Currently I'm trying to figure out what liboffloadmic can do.

Latest liboffloadmic (I'm preparing an update for trunk) can take some pointer
*ptr* as argument of __offload_offload, which is used for execution and data
transfer.  When given job is finished, it will call some callback in libgomp on
host, passing *ptr* back to it, thus libgomp can distinguish which job has
been finished.  BTW, which word to use here to avoid confusion? (task? job?)

I'm going to prototype something in libgomp using this interface.

  -- Ilya



More information about the Gcc-patches mailing list