[all-commits] [llvm/llvm-project] 8f668c: [MLIR][OpenMP] Prevent teams reductions from deadl...
Sergio Afonso via All-commits
all-commits at lists.llvm.org
Mon Mar 9 08:27:12 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8f668cec471355b1d04692f2483679dc1cb35990
https://github.com/llvm/llvm-project/commit/8f668cec471355b1d04692f2483679dc1cb35990
Author: Sergio Afonso <safonsof at amd.com>
Date: 2026-03-09 (Mon, 09 Mar 2026)
Changed paths:
M mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
M mlir/test/Target/LLVMIR/omptarget-teams-distribute-reduction.mlir
M mlir/test/Target/LLVMIR/omptarget-teams-reduction.mlir
M mlir/test/Target/LLVMIR/openmp-teams-distribute-reduction.mlir
M mlir/test/Target/LLVMIR/openmp-teams-reduction.mlir
Log Message:
-----------
[MLIR][OpenMP] Prevent teams reductions from deadlocking (#184625)
Currently, simple Fortran reductions like the example below cause a
deadlock at runtime:
```f90
integer :: i, x
!$omp teams distribute reduction(+:x)
do i=1, 10
x = x + 1
end do
```
Preventing a redundant barrier from being added in that case addresses
this issue. Synchronization is already being handled by the
`__kmpc_reduce` and `__kmpc_end_reduce` runtime calls for the host, and
by the OMPIRBuilder-generated `_omp_reduction_inter_warp_copy_func`
function for GPUs.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list