This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libgomp/82428] New: Builtins for openacc gang/worker/vector id/size


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82428

            Bug ID: 82428
           Summary: Builtins for openacc gang/worker/vector id/size
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: libgomp
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vries at gcc dot gnu.org
                CC: jakub at gcc dot gnu.org
  Target Milestone: ---

We have openacc test-cases using the following nvptx idiom:
...
      __asm__ volatile ("mov.u32 %0,%%ctaid.x;" : "=r" (g));
      __asm__ volatile ("mov.u32 %0,%%tid.y;" : "=r" (w));
      __asm__ volatile ("mov.u32 %0,%%tid.x;" : "=r" (v));
...

Typically this is done guarded with acc_on_device (acc_device_nvidia), and
skipping -O0:
...
/* This code uses nvptx inline assembly guarded with acc_on_device, which is    
   not optimized away at -O0, and then confuses the target assembler.           
   { dg-skip-if "" { *-*-* } { "-O0" } { "" } } */
...

It would be better to have generic openacc builtins
__builtin__goacc_{gang,worker,vector}_{id,size}, and use those in the testcase
instead. These could be used at -O0, and without the need to guarded them with
acc_on_device.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]