Issue |
130926
|
Summary |
[Clang][OpenMP] Implement Taskgraph support from the OpenMP 6.0 specification
|
Labels |
clang:openmp,
openmp:libomp
|
Assignees |
jpinot
|
Reporter |
jpinot
|
OpenMP 6.0 introduces the [taskgraph](https://www.openmp.org/wp-content/uploads/OpenMP-API-Specification-6-0.pdf#section.14.3) construct, allowing tasks to be recorded and replayed within a specified region. Currently, OpenMP already supports a [record/replay](https://github.com/llvm/llvm-project/commit/36d4e4c9b5f6cd0577b6029055b825caaec2dd11) mechanism through runtime methods.
For example:
```cpp
#pragma omp taskgraph graph_id(1) graph_reset(false)
{
for (int i = 0; i < NUM_TASKS; i++) {
#pragma omp task
fn();
}
}
```
To fully support the taskgraph construct in Clang, the OpenMP runtime library must be extended to handle the new clauses defined in the 6.0 specification—namely `graph_id`, `graph_reset`, `if`, and `nogroup`—and to adopt the [`saved`](https://www.openmp.org/wp-content/uploads/OpenMP-API-Specification-6-0.pdf#section.7.2) modifier for the [`firstprivate`](https://www.openmp.org/wp-content/uploads/OpenMP-API-Specification-6-0.pdf#subsection.7.5.4) clause. Additionally, [`replayable`](https://www.openmp.org/wp-content/uploads/OpenMP-API-Specification-6-0.pdf#section.14.6) clause should be added to enable complete Taskgraph functionality in accordance with OpenMP 6.0.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs