[OpenMP] Tracking issue for multidimensional leagues and teams
This issue is dedicated to tracking the implementation of multidimensional leagues and teams for OpenMP 6.1 in Clang and Flang. This feature allows num_teams, thread_limit and num_threads to specify multidimensional execution spaces via the dims complex modifier.
For more information, see "OpenMP Technical Report 15: Version 6.1 Public Comment Draft" (July 2026) in https://www.openmp.org/specifications/.
@llvm/issue-subscribers-openmp
Author: Kevin Sala Penades (kevinsala)
For more information, see "OpenMP Technical Report 15: Version 6.1 Public Comment Draft" (July 2026) in https://www.openmp.org/specifications/.
@llvm/issue-subscribers-offload
Author: Kevin Sala Penades (kevinsala)
For more information, see "OpenMP Technical Report 15: Version 6.1 Public Comment Draft" (July 2026) in https://www.openmp.org/specifications/.
- Clang:
- #205700
- #207305
- #206412
- #208353
- #218589
- #239860
- LLVM: WIP @kevinsala
- #211453
- Offload and plugins: WIP @kevinsala
- #199483
- #211400
- OpenMP device runtime: WIP @kevinsala
- MLIR:
- #179418
- #179420
- #179608
Hi @kevinsala
The MLIR lowering PRs (#179418, #179420, #179608) now collect every dimension of num_teams, thread_limit and num_threads into the vectorized TargetKernelDefaultAttrs and TargetKernelRuntimeAttrs from #211453.
On upstream llvm-project main, though, the OpenMPIRBuilder still reads only .front(), so dimensions 1 and 2 are dropped. That's the concern @skatrak raised on #179420 and #179608.
Compared to fork https://github.com/kevinsala/llvm-project-fork/tree/kernel-lang-develop I found below changes that could be added to upstream llvm main in OmpIRBuilder module:
writeThreadBoundsForKernel/writeTeamsForKerneltaking all dimensions.createTargetInithandling for multi-dim kernels.
Could you please port these changes aswell to upstream main.
CC: @skatrak