1Call may contain unknown parallel regions. Use `[[omp::assume("omp_no_parallelism")]]` to override. [OMP133] 2==================================================================================================================== 3 4.. _omp133: 5 6This analysis remark identifies calls that prevented :ref:`OMP131 <omp131>` from 7providing the generic-mode kernel with a fully specialized state machine. This 8remark will identify each call that may contain unknown parallel regions that 9caused the kernel to require a fallback. 10 11Examples 12-------- 13 14This will occur for any generic-mode kernel that may contain unknown parallel 15regions. This is typically coupled with the :ref:`OMP132 <omp132>` remark. 16 17.. code-block:: c++ 18 19 extern void setup(); 20 21 void foo() { 22 #pragma omp target 23 { 24 setup(); 25 #pragma omp parallel 26 { 27 work(); 28 } 29 } 30 } 31 32.. code-block:: console 33 34 $ clang++ -fopenmp -fopenmp-targets=nvptx64 -O2 -Rpass-analysis=openmp-opt omp133.cpp 35 omp133.cpp:6:5: remark: Call may contain unknown parallel regions. Use 36 `[[omp::assume("omp_no_parallelism")]]` to override. [OMP133] 37 setup(); 38 ^ 39 40The remark suggests marking the function with the assumption that it contains no 41parallel regions. If this is done then the kernel will be rewritten with a fully 42specialized state machine. 43 44.. code-block:: c++ 45 46 [[omp::assume("omp_no_parallelism")]] extern void setup(); 47 48 49 void foo() { 50 #pragma omp target 51 { 52 setup(); 53 #pragma omp parallel 54 { 55 work(); 56 } 57 } 58 } 59 60.. code-block:: console 61 62 $ clang++ -fopenmp -fopenmp-targets=nvptx64 -O2 -Rpass=openmp-opt omp133.cpp 63 omp133.cpp:4:1: remark: Rewriting generic-mode kernel with a customized state machine. [OMP131] 64 #pragma omp target 65 ^ 66 67Diagnostic Scope 68---------------- 69 70OpenMP target offloading analysis remark. 71