[clang] [llvm] [offload][OpenMP] Improve cross-team reduction grid selection (PR #208253)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 8 09:23:52 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-offload
Author: Robert Imschweiler (ro-i)
<details>
<summary>Changes</summary>
The default cross-team reduction algorithm benefits from larger and fewer teams. Implement that by using 2 x the default number of threads and 1/2 x the default number of teams for reduction kernels. This doesn't change the default total number of threads, it just redistributes them.
This is a first, rather simple heuristic, derived from (a subset of) what AOMP does.
The performance benefits I observed for the reduction tests in https://github.com/ro-i/xteam-test on a gfx942
(c71339705091500f731e2a39f247d2660bacbdce) are up to a few percent, with no regressions.
Claude assisted with this patch.
---
Full diff: https://github.com/llvm/llvm-project/pull/208253.diff
3 Files Affected:
- (modified) clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp (+22)
- (modified) offload/plugins-nextgen/common/include/PluginInterface.h (+5)
- (modified) offload/plugins-nextgen/common/src/PluginInterface.cpp (+22-4)
``````````diff
The server is unavailable at this time. Please wait a few minutes before you try again.
``````````
</details>
https://github.com/llvm/llvm-project/pull/208253
More information about the llvm-commits
mailing list