-
Notifications
You must be signed in to change notification settings - Fork 625
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use multi-warp reduction in the staged reduction strategy (#11706)
This revision adds support for warp reduction at the whole block level. The multi-warp reduction allows a simpler strategy that does not need special handling for the second stage. It also exhibits more parallelism and removes the need for a sequential loop to reduce `k * warps` to a `single warp`. Previously, we would reduce `N -> k-warps -> 1-warp (using 1-warp and k iterations of a for loop) -> 1 value`. Now we reduce `N -> k-warps -> k (using k-warps) -> 1 value`. Additional empirical performance improvements are added on top: * Use multi-warp reduction in the staged reduction strategy * Add support to capture all sizes * Add Split support to the elementwise part * Tighten the dimensioning of strategies * Update tests
- Loading branch information
1 parent
56d65bf
commit 52643c3
Showing
6 changed files
with
266 additions
and
342 deletions.
There are no files selected for viewing
311 changes: 167 additions & 144 deletions
311
compiler/src/iree/compiler/Codegen/Common/TransformDialectStrategiesGPU.cpp
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.