[llvm-bugs] [Bug 48986] New: thread_limit clause on target directive not supported

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Feb 1 02:58:18 PST 2021


https://bugs.llvm.org/show_bug.cgi?id=48986

            Bug ID: 48986
           Summary: thread_limit clause on target directive not supported
           Product: OpenMP
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Clang Compiler Support
          Assignee: unassignedclangbugs at nondot.org
          Reporter: tom.deakin at bristol.ac.uk
                CC: llvm-bugs at lists.llvm.org

The `thread_limit` clause is not supported on the `target` directive.

This is a valid clause in OpenMP 5.1, but the top of LLVM 12 currently emits
this error:

Code:
#include <stdio.h>

int main(void) {

  int A[16];

  #pragma omp target thread_limit(16)
  #pragma omp teams distribute parallel for
  for (int i = 0; i < 16; ++i)
    A[i] = i;

  printf("A[15]=%d\n", A[15]);

  return 0;

}


Compile:
$ clang -O3 -fopenmp  -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target
-march=sm_75 omp_target_thread_limit.c

Output:
omp_target_thread_limit.c:7:22: error: unexpected OpenMP clause 'thread_limit'
in directive '#pragma omp target'
  #pragma omp target thread_limit(16)
                     ^
1 error generated.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210201/b97a0671/attachment.html>


More information about the llvm-bugs mailing list