Skip to content

Commit 98d5ab7

Browse files
authored
[OpenMP][Docs][NFC] Update documentation
Removed lots of outdated statements that were misleading.
1 parent a35a3b7 commit 98d5ab7

File tree

1 file changed

+13
-44
lines changed

1 file changed

+13
-44
lines changed

clang/docs/OpenMPSupport.rst

Lines changed: 13 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,12 @@
1616
OpenMP Support
1717
==============
1818

19-
Clang fully supports OpenMP 4.5. Clang supports offloading to X86_64, AArch64,
20-
PPC64[LE] and has `basic support for Cuda devices`_.
21-
22-
* #pragma omp declare simd: :part:`Partial`. We support parsing/semantic
23-
analysis + generation of special attributes for X86 target, but still
24-
missing the LLVM pass for vectorization.
19+
Clang fully supports OpenMP 4.5, almost all of 5.0 and most of 5.1/2.
20+
Clang supports offloading to X86_64, AArch64, PPC64[LE], NVIDIA GPUs (all models) and AMD GPUs (all models).
2521

2622
In addition, the LLVM OpenMP runtime `libomp` supports the OpenMP Tools
2723
Interface (OMPT) on x86, x86_64, AArch64, and PPC64 on Linux, Windows, and macOS.
24+
OMPT is also supported for NVIDIA and AMD GPUs.
2825

2926
For the list of supported features from OpenMP 5.0 and 5.1
3027
see `OpenMP implementation details`_ and `OpenMP 51 implementation details`_.
@@ -36,43 +33,17 @@ General improvements
3633
collapse clause by replacing the expensive remainder operation with
3734
multiplications and additions.
3835

39-
- The default schedules for the `distribute` and `for` constructs in a
40-
parallel region and in SPMD mode have changed to ensure coalesced
41-
accesses. For the `distribute` construct, a static schedule is used
42-
with a chunk size equal to the number of threads per team (default
43-
value of threads or as specified by the `thread_limit` clause if
44-
present). For the `for` construct, the schedule is static with chunk
45-
size of one.
46-
47-
- Simplified SPMD code generation for `distribute parallel for` when
48-
the new default schedules are applicable.
49-
5036
- When using the collapse clause on a loop nest the default behavior
5137
is to automatically extend the representation of the loop counter to
5238
64 bits for the cases where the sizes of the collapsed loops are not
5339
known at compile time. To prevent this conservative choice and use
5440
at most 32 bits, compile your program with the
5541
`-fopenmp-optimistic-collapse`.
5642

57-
.. _basic support for Cuda devices:
5843

59-
Cuda devices support
44+
GPU devices support
6045
====================
6146

62-
Directives execution modes
63-
--------------------------
64-
65-
Clang code generation for target regions supports two modes: the SPMD and
66-
non-SPMD modes. Clang chooses one of these two modes automatically based on the
67-
way directives and clauses on those directives are used. The SPMD mode uses a
68-
simplified set of runtime functions thus increasing performance at the cost of
69-
supporting some OpenMP features. The non-SPMD mode is the most generic mode and
70-
supports all currently available OpenMP features. The compiler will always
71-
attempt to use the SPMD mode wherever possible. SPMD mode will not be used if:
72-
73-
- The target region contains user code (other than OpenMP-specific
74-
directives) in between the `target` and the `parallel` directives.
75-
7647
Data-sharing modes
7748
------------------
7849

@@ -82,8 +53,9 @@ performance and can be activated using the `-fopenmp-cuda-mode` flag. In
8253
`Generic` mode all local variables that can be shared in the parallel regions
8354
are stored in the global memory. In `Cuda` mode local variables are not shared
8455
between the threads and it is user responsibility to share the required data
85-
between the threads in the parallel regions.
86-
56+
between the threads in the parallel regions. Often, the optimizer is able to
57+
reduce the cost of `Generic` mode to the level of `Cuda` mode, but the flag,
58+
as well as other assumption flags, can be used for tuning.
8759

8860
Features not supported or with limited support for Cuda devices
8961
---------------------------------------------------------------
@@ -96,9 +68,6 @@ Features not supported or with limited support for Cuda devices
9668

9769
- Nested parallelism: inner parallel regions are executed sequentially.
9870

99-
- Automatic translation of math functions in target regions to device-specific
100-
math functions is not implemented yet.
101-
10271
- Debug information for OpenMP target regions is supported, but sometimes it may
10372
be required to manually specify the address class of the inspected variables.
10473
In some cases the local variables are actually allocated in the global memory,
@@ -139,7 +108,7 @@ implementation.
139108
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
140109
| memory management | allocate directive and allocate clause | :good:`done` | r355614,r335952 |
141110
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
142-
| OMPD | OMPD interfaces | :part:`done` | https://reviews.llvm.org/D99914 (Supports only HOST(CPU) and Linux |
111+
| OMPD | OMPD interfaces | :good:`done` | https://reviews.llvm.org/D99914 (Supports only HOST(CPU) and Linux |
143112
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
144113
| OMPT | OMPT interfaces (callback support) | :good:`done` | |
145114
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
@@ -171,7 +140,7 @@ implementation.
171140
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
172141
| device | infer target functions from initializers | :part:`worked on` | |
173142
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
174-
| device | infer target variables from initializers | :part:`done` | D146418 |
143+
| device | infer target variables from initializers | :good:`done` | D146418 |
175144
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
176145
| device | OMP_TARGET_OFFLOAD environment variable | :good:`done` | D50522 |
177146
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
@@ -217,7 +186,7 @@ implementation.
217186
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
218187
| device | support close modifier on map clause | :good:`done` | D55719,D55892 |
219188
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
220-
| device | teams construct on the host device | :part:`done` | r371553 |
189+
| device | teams construct on the host device | :good:`done` | r371553 |
221190
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
222191
| device | support non-contiguous array sections for target update | :good:`done` | |
223192
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
@@ -235,15 +204,15 @@ implementation.
235204
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
236205
| misc | library shutdown (omp_pause_resource[_all]) | :good:`done` | D55078 |
237206
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
238-
| misc | metadirectives | :part:`worked on` | D91944 |
207+
| misc | metadirectives | :part:`mostly done` | D91944 |
239208
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
240209
| misc | conditional modifier for lastprivate clause | :good:`done` | |
241210
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
242211
| misc | iterator and multidependences | :good:`done` | |
243212
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
244213
| misc | depobj directive and depobj dependency kind | :good:`done` | |
245214
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
246-
| misc | user-defined function variants | :part:`worked on` | D67294, D64095, D71847, D71830, D109635 |
215+
| misc | user-defined function variants | :good:`done`. | D67294, D64095, D71847, D71830, D109635 |
247216
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
248217
| misc | pointer/reference to pointer based array reductions | :good:`done` | |
249218
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
@@ -298,7 +267,7 @@ implementation.
298267
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
299268
| device | indirect clause on declare target directive | :none:`unclaimed` | |
300269
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
301-
| device | allow virtual functions calls for mapped object on device | :none:`unclaimed` | |
270+
| device | allow virtual functions calls for mapped object on device | :part:`partial` | |
302271
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
303272
| device | interop construct | :part:`partial` | parsing/sema done: D98558, D98834, D98815 |
304273
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+

0 commit comments

Comments
 (0)