[patch,gomp4] error on invalid acc loop clauses

Cesar Philippidis cesar@codesourcery.com
Fri May 15 18:14:00 GMT 2015


This patch teaches the c and c++ front ends to error on invalid and
conflicting acc loop clauses. E.g., an acc loop cannot have 'gang seq'
and the worker and vector clauses inside parallel regions cannot have
optional kernel-specific arguments.

The c and c++ front end also error when it detects a parallel or kernels
region nested inside a parallel or kernels region. E.g.

  #pragma acc parallel
  {
    #pragma acc parallel
     ...
  }

This is technically supported by OpenACC 2.0a, but there are a couple of
unresolved technical issues preventing its inclusion for gcc 6.0. For
starters, we don't have the runtime rigged up to handle CUDA's dynamic
parallelism, and it's unclear if the spec itself requires the runtime to
do so. Then there's the issue of mapping gangs within gangs, which
presumably gets handled by dynamic parallelism.

I included two new test cases in this patch. They are mostly identical
but, unfortunately, the c and c++ front ends emit slightly different
error messages.

The front ends still need to be cleaned before this functionality should
be considered for mainline. So for the time being I've applied this
patch to gomp-4_0-branch.

Cesar
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gwv-loops.diff
Type: text/x-patch
Size: 51230 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20150515/fd3fbade/attachment.bin>


More information about the Gcc-patches mailing list