-
Notifications
You must be signed in to change notification settings - Fork 13.3k
[Flang][OpenMP] Add OpenMP standards support doc #132707
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
kiranchandramohan
merged 9 commits into
llvm:main
from
kiranchandramohan:openmp_standards_support
Apr 22, 2025
Merged
Changes from 5 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
c48a921
[Flang][OpenMP] Add OpenMP standards support doc
kiranchandramohan 06f3a9f
Address review comment
kiranchandramohan d8b57ea
Address review comments
kiranchandramohan d1e80fb
Address review comments
kiranchandramohan 97343cd
Rename file in index.md
kiranchandramohan 5e07af4
Address comments from Pranav
kiranchandramohan 3230516
Fix link - attempt 1
kiranchandramohan fc1595e
Remove redundant sentence
kiranchandramohan ea10fef
Update target directives using info provided by Kryztof
kiranchandramohan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<!--===- docs/FortranStandardsSupport.md | ||
|
||
Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
See https://llvm.org/LICENSE.txt for license information. | ||
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
--> | ||
|
||
# Flang OpenMP Support | ||
|
||
```{contents} | ||
--- | ||
local: | ||
--- | ||
``` | ||
|
||
This document outlines the OpenMP API features supported by Flang. It is intended as a general reference. | ||
For the most accurate information on unimplemented features, rely on the compiler’s TODO or “Not Yet Implemented” | ||
messages, which are considered authoritative. Flang provides full support for OpenMP 3.1 and partial support for | ||
OpenMP 4.0. The table below details the current support for OpenMP 4.0 features. Work is ongoing to add support | ||
for OpenMP 4.5 and newer versions; an official support statement for these will be shared in the future. | ||
|
||
The feature support information is provided as a table with three columns that are self explanatory. The Status column uses | ||
the letters **P**, **Y**, **N** for the implementation status: | ||
- **P** : Partial. When the implementation is incomplete for a few cases | ||
- **Y** : Yes. When the implementation is complete | ||
- **N** : No. When the implementation is absent | ||
|
||
Note : No distinction is made between the support in Parser/Semantics, MLIR, Lowering or the OpenMPIRBuilder. | ||
|
||
## OpenMP 4.0 | ||
|
||
| Feature | Status | Comments | | ||
|------------------------------------------------------------|--------|---------------------------------------------------------| | ||
| proc_bind clause | Y | | | ||
| simd construct | P | Some clauses are not supported | | ||
| declare simd construct | N | | | ||
| do simd construct | Y | | | ||
| target data construct | P | | | ||
| target construct | P | | | ||
| target update construct | P | | | ||
| declare target directive | P | | | ||
| teams construct | P | | | ||
| distribute construct | P | | | ||
| distribute simd construct | P | | | ||
| distribute parallel loop construct | P | | | ||
| distribute parallel loop simd construct | P | | | ||
| depend clause | P | Depend clause with array sections are not supported | | ||
| declare reduction construct | N | | | ||
| atomic construct extensions | Y | | | ||
| cancel construct | N | | | ||
| cancellation point construct | N | | | ||
| parallel do simd construct | Y | | | ||
| target teams construct | P | | | ||
| teams distribute construct | P | | | ||
| teams distribute simd construct | P | | | ||
| target teams distribute construct | P | | | ||
| teams distribute parallel loop construct | P | | | ||
| target teams distribute parallel loop construct | P | | | ||
| teams distribute parallel loop simd construct | P | | | ||
| target teams distribute parallel loop simd construct | P | | | ||
|
||
## OpenMP 3.1, OpenMP 2.5, OpenMP 1.1 | ||
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Like you mention in the section on previous standards (<=3.1) there are some, albeit very few, corner cases that are not supported. I think this line here is then misleading; it'll make a reader believe 3.1 is fully supported and chances are he won't bother to scroll down to the section below to find info about the corner cases. Perhaps consider something like, but not necessary exactly, the following
(Note: I may have got the link syntax wrong especially around the use of commas).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Thanks.