|
| 1 | +<!--===- docs/OpenMPSupport.md |
| 2 | +
|
| 3 | + Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | + See https://llvm.org/LICENSE.txt for license information. |
| 5 | + SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 | +
|
| 7 | +--> |
| 8 | + |
| 9 | +# Flang OpenMP Support |
| 10 | + |
| 11 | +```{contents} |
| 12 | +--- |
| 13 | +local: |
| 14 | +--- |
| 15 | +``` |
| 16 | + |
| 17 | +This document outlines the OpenMP API features supported by Flang. It is intended as a general reference. |
| 18 | +For the most accurate information on unimplemented features, rely on the compiler’s TODO or “Not Yet Implemented” |
| 19 | +messages, which are considered authoritative. With the exception of a few corner cases, Flang |
| 20 | +offers full support for OpenMP 3.1 ([See details here](#openmp-31-openmp-25-openmp-11)). |
| 21 | +Partial support for OpenMP 4.0 is also available and currently under active development. |
| 22 | +The table below outlines the current status of OpenMP 4.0 feature support. |
| 23 | +Work is ongoing to add support for OpenMP 4.5 and newer versions; a support statement for these will be shared in the future. |
| 24 | +The table entries are derived from the information provided in the Version Differences subsection of the Features History section in the OpenMP standard. |
| 25 | + |
| 26 | +The feature support information is provided as a table with three columns that are self explanatory. The Status column uses |
| 27 | +the letters **P**, **Y**, **N** for the implementation status: |
| 28 | +- **P** : Partial. When the implementation is incomplete for a few cases |
| 29 | +- **Y** : Yes. When the implementation is complete |
| 30 | +- **N** : No. When the implementation is absent |
| 31 | + |
| 32 | +Note : No distinction is made between the support in Parser/Semantics, MLIR, Lowering or the OpenMPIRBuilder. |
| 33 | + |
| 34 | +## OpenMP 4.0 |
| 35 | + |
| 36 | +| Feature | Status | Comments | |
| 37 | +|------------------------------------------------------------|--------|---------------------------------------------------------| |
| 38 | +| proc_bind clause | Y | | |
| 39 | +| simd construct | P | linear clause is not supported | |
| 40 | +| declare simd construct | N | | |
| 41 | +| do simd construct | P | linear clause is not supported | |
| 42 | +| target data construct | P | device clause not supported | |
| 43 | +| target construct | P | device clause not supported | |
| 44 | +| target update construct | P | device clause not supported | |
| 45 | +| declare target directive | P | | |
| 46 | +| teams construct | P | reduction clause not supported | |
| 47 | +| distribute construct | P | dist_schedule clause not supported | |
| 48 | +| distribute simd construct | P | dist_schedule and linear clauses are not supported | |
| 49 | +| distribute parallel loop construct | P | dist_schedule clause not supported | |
| 50 | +| distribute parallel loop simd construct | P | dist_schedule and linear clauses are not supported | |
| 51 | +| depend clause | P | depend clause with array sections are not supported | |
| 52 | +| declare reduction construct | N | | |
| 53 | +| atomic construct extensions | Y | | |
| 54 | +| cancel construct | N | | |
| 55 | +| cancellation point construct | N | | |
| 56 | +| parallel do simd construct | P | linear clause is not supported | |
| 57 | +| target teams construct | P | device and reduction clauses are not supported | |
| 58 | +| teams distribute construct | P | reduction and dist_schedule clauses not supported | |
| 59 | +| teams distribute simd construct | P | reduction, dist_schedule and linear clauses are not supported | |
| 60 | +| target teams distribute construct | P | device, reduction and dist_schedule clauses are not supported | |
| 61 | +| teams distribute parallel loop construct | P | reduction and dist_schedule clauses are not supported | |
| 62 | +| target teams distribute parallel loop construct | P | device, reduction and dist_schedule clauses are not supported | |
| 63 | +| teams distribute parallel loop simd construct | P | reduction, dist_schedule, and linear clauses are not supported | |
| 64 | +| target teams distribute parallel loop simd construct | P | device, reduction, dist_schedule and linear clauses are not supported | |
| 65 | + |
| 66 | +## OpenMP 3.1, OpenMP 2.5, OpenMP 1.1 |
| 67 | +All features except a few corner cases in atomic (complex type, different but compatible types in lhs and rhs), threadprivate (character type) constructs/clauses are supported. |
0 commit comments