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: [email protected]
          Reporter: [email protected]
                CC: [email protected]

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.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to