1 Rewriting generic-mode kernel with a customized state machine. [OMP131]
2 =======================================================================
6 This optimization remark indicates that a generic-mode kernel on the device was
7 specialized for the given target region. When offloading in generic-mode, a
8 state machine is required to schedule the work between the parallel worker
9 threads. This optimization specializes the state machine in cases where there is
10 a known number of parallel regions inside the kernel. A much simpler state
11 machine can be used if it is known that there is no nested parallelism and the
12 number of regions to schedule is a static amount.
17 This optimization should occur on any generic-mode kernel that has visibility on
18 all parallel regions, but cannot be moved to SPMD-mode and has no nested
23 #pragma omp declare target
25 #pragma omp end declare target
30 TID = omp_get_thread_num();
38 .. code-block:: console
40 $ clang++ -fopenmp -fopenmp-targets=nvptx64 -O2 -Rpass=openmp-opt omp131.cpp
41 omp131.cpp:8:1: remark: Rewriting generic-mode kernel with a customized state machine. [OMP131]
48 OpenMP target offloading optimization remark.