[flang-commits] [clang] [flang] [llvm] [mlir] [OpenMP][flang] Add initial support for by-ref reductions on the GPU (PR #165714)
Kareem Ergawy via flang-commits
flang-commits at lists.llvm.org
Wed Nov 5 00:13:54 PST 2025
ergawy wrote:
Thanks for the review Michael.
> Is this implementing the following from the sepcification?
Yes, exactly. The main problem for reduction by reference is that, prior to this PR, we were shuffling (from remote lanes within the same warp or across different warps within the block) **pointers/references** to the private reduction values rather than the private reduction values themselves.
The same problem is also present for inter-team reduction-value combination for which I have a fix and will open a follow-up PR. This PR only focuses on single-team (i.e. intra- and inter-warp reductions).
> Where is isByRef set to true (instead of forwarding the value)?
This is determined by the [ReductionProcessor](https://github.com/llvm/llvm-project/blob/main/flang/lib/Lower/Support/ReductionProcessor.cpp#L595) (@tblah please correct me if I am wrong here).
https://github.com/llvm/llvm-project/pull/165714
More information about the flang-commits
mailing list