[flang-commits] [flang] [flang][docs] Refresh stale status in do concurrent mapping doc (PR #224838)
Tarun Prabhu via flang-commits
flang-commits at lists.llvm.org
Wed Oct 14 07:55:58 PDT 2026
================
@@ -42,63 +40,85 @@ See `-fopenmp-targets` and `--offload-arch` for more info.
## Current status
-As of LLVM 22, flang adds more extensive support for parallelizing `do concurrent` loops
-on the CPU and the GPU. In particular, the local specifier, partial support for reduce,
-and automatic mapping of user-defined types are now supported.
+Since LLVM 22, flang has more extensive support for parallelizing `do concurrent`
+loops on the CPU and the GPU. In particular, the `local` specifier, partial
+support for `reduce`, and automatic mapping of user-defined types are supported.
On the CPU, we validated the feature using [FIATS](https://github.com/BerkeleyLab/fiats)
-inference and training codes where `do concurrent` and OpenMP had very similar
+inference and training codes where `do concurrent` and OpenMP had very similar
acceleration results (for more information, see: [1]).
-On the GPU, we have basic support that is still in progress. We have offload tests for
-1D and 2D saxpy. We also validated using codes that do not make extensive use of user-defined
-types and allocatables.
+On the GPU, we have basic support that is still in progress. We validated using
+codes that do not make extensive use of user-defined types and allocatables.
[1] Automatically Parallelizing Batch Inference on Deep Neural Networks Using Fiats
and Fortran 2023 “Do Concurrent” (https://link.springer.com/chapter/10.1007/978-3-032-07612-0_11)
-### Loop nest detection
-
-On the `FIR` dialect level, the following loop:
+### Support summary
+
+| Feature | Host | Device |
+|---------------------------------------------|---------------------|---------------------|
+| Single-range loops | Supported | Supported |
+| Multi-range loops (mapped as collapsed) | Supported | Supported |
+| `LOCAL` locality specifier | Supported | Supported |
+| `LOCAL_INIT` locality specifier | Not supported | Not supported |
+| `REDUCE` locality specifier (Fortran 2023) | Partial | Partial |
+| Nested `do concurrent` constructs | Outermost loop only | Outermost loop only |
+| Derived types with allocatable components | n/a | Supported |
+| Non-rectangular loop nests | Not supported | Not supported |
+
+Notes on the above:
+* `LOCAL_INIT` is rejected with a "not yet implemented" error when the pass
+ encounters it.
+* All standard reduction operations are mapped: `+`, `*`, `.and.`, `.or.`,
+ `.eqv.`, `.neqv.`, `max`, `min`, `iand`, `ior`, and `ieor`. Support has so
+ far been exercised mostly with scalar reduction variables, hence "partial".
----------------
tarunprabhu wrote:
Perhaps "tested" is a better choice here?
```suggestion
far been tested mostly with scalar reduction variables, hence "partial".
```
https://github.com/llvm/llvm-project/pull/224838
More information about the flang-commits
mailing list