Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions flang/docs/OpenMPStandardsSupport.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<!--===- 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 Standards Support

```{contents}
---
local:
---
```

This document summarizes OpenMP standards support in Flang. The information is only provided as a guideline. The
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This document summarizes OpenMP standards support in Flang. The information is only provided as a guideline. The
This document summarizes the supported features of the OpenMP API in Flang. The information is only provided as a guideline. The

(OpenMP is not a standard in the true sense, like with the ISO standards.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be OK to go with OpenMP specification?
This document summarizes the supported features of the OpenMP specification in Flang

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

TODOs/Not Yet Implemented messages emitted by the compiler for unimplemented features should be treated as authoritative.
Standards support is provided upto OpenMP 4.0 for now. It will be extended later for OpenMP 4.5, OpenMP 5.* and OpenMP 6.0.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be worth putting in a date here, so there is some indication of how valid this sentence is?

Suggested change
Standards support is provided upto OpenMP 4.0 for now. It will be extended later for OpenMP 4.5, OpenMP 5.* and OpenMP 6.0.
As of March 2025, standards support is provided upto OpenMP 4.0. It will be extended later for OpenMP 4.5, OpenMP 5.* and OpenMP 6.0.

Are we working on support for OpenMP > 4.0? If so, perhaps the second sentence could be rephrased to better reflect this. Perhaps

We are actively working towards supporting OpenMP 4.5, OpenMP 5.* and OpenMP 6.0. 

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we working on support for OpenMP > 4.0?

Yes. Some might be working already. Just that I have not spent time characterising the support.

Your suggestions look good. Have made the change.


The standards 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** : When the implementation is incomplete for a few cases
- **Y** : When the implementation is complete
- **N** : When the implementation is absent
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might want to explain that this is Yes/No/Partial (presumably)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


Note : No distinction is made between the support in the Parser/Semantics, MLIR or Lowering support, and OpenMPIRBuilder support.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another optional rephrase (if I understand your intent correctly)

Suggested change
Note : No distinction is made between the support in the Parser/Semantics, MLIR or Lowering support, and OpenMPIRBuilder support.
Note : No distinction is made between the support in Parser/Semantics, MLIR, Lowering or the OpenMPIRBuilder.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


## 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 | |

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am conservatively marking all target-related constructs (including combined ones) as Partial support. I can correct the entries if they are fully supported.

## OpenMP 3.1, OpenMP 2.5, OpenMP 1.1
All features except a few corner cases in atomic, copyin constructs/clauses are supported
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should these corner cases be made explicit?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

1 change: 1 addition & 0 deletions flang/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ on how to get in touch with us and to learn more about the current status.
GettingInvolved
GettingStarted
ImplementingASemanticCheck
OpenMPStandardsSupport
PullRequestChecklist
```

Expand Down