Repository navigation
Optimize Warp Reduce - #4312
Closed
fbusato wants to merge 189 commits into
Closed
Optimize Warp Reduce#4312fbusato wants to merge 189 commits into
fbusato wants to merge 189 commits into
Conversation
Co-authored-by: Bernhard Manfred Gruber <bernhardmgruber@gmail.com>
Co-authored-by: Bernhard Manfred Gruber <bernhardmgruber@gmail.com>
Co-authored-by: Bernhard Manfred Gruber <bernhardmgruber@gmail.com>
Co-authored-by: Bernhard Manfred Gruber <bernhardmgruber@gmail.com>
Co-authored-by: Bernhard Manfred Gruber <bernhardmgruber@gmail.com>
Co-authored-by: Bernhard Manfred Gruber <bernhardmgruber@gmail.com>
Contributor
🟥 CI finished in 30m 16s: Pass: 0%/153 | Total: 10h 23m | Avg: 4m 04s | Max: 28m 11s
|
| Project | |
|---|---|
| CCCL Infrastructure | |
| CCCL Packaging | |
| libcu++ | |
| +/- | CUB |
| Thrust | |
| CUDA Experimental | |
| stdpar | |
| python | |
| CCCL C Parallel Library | |
| +/- | Catch2Helper |
Modifications in project or dependencies?
| Project | |
|---|---|
| CCCL Infrastructure | |
| +/- | CCCL Packaging |
| libcu++ | |
| +/- | CUB |
| +/- | Thrust |
| +/- | CUDA Experimental |
| +/- | stdpar |
| +/- | python |
| +/- | CCCL C Parallel Library |
| +/- | Catch2Helper |
🏃 Runner counts (total jobs: 153)
| # | Runner |
|---|---|
| 93 | linux-amd64-cpu16 |
| 17 | windows-amd64-cpu16 |
| 12 | linux-amd64-gpu-rtxa6000-latest-1 |
| 11 | linux-amd64-gpu-h100-latest-1 |
| 10 | linux-arm64-cpu16 |
| 7 | linux-amd64-gpu-rtx2080-latest-1 |
| 3 | linux-amd64-gpu-rtx4090-latest-1 |
Contributor
🟨 CI finished in 2h 03m: Pass: 76%/153 | Total: 3d 12h | Avg: 32m 57s | Max: 1h 39m | Hits: 68%/150069
|
| Project | |
|---|---|
| CCCL Infrastructure | |
| CCCL Packaging | |
| libcu++ | |
| +/- | CUB |
| Thrust | |
| CUDA Experimental | |
| stdpar | |
| python | |
| CCCL C Parallel Library | |
| +/- | Catch2Helper |
Modifications in project or dependencies?
| Project | |
|---|---|
| CCCL Infrastructure | |
| +/- | CCCL Packaging |
| libcu++ | |
| +/- | CUB |
| +/- | Thrust |
| +/- | CUDA Experimental |
| +/- | stdpar |
| +/- | python |
| +/- | CCCL C Parallel Library |
| +/- | Catch2Helper |
🏃 Runner counts (total jobs: 153)
| # | Runner |
|---|---|
| 93 | linux-amd64-cpu16 |
| 17 | windows-amd64-cpu16 |
| 12 | linux-amd64-gpu-rtxa6000-latest-1 |
| 11 | linux-amd64-gpu-h100-latest-1 |
| 10 | linux-arm64-cpu16 |
| 7 | linux-amd64-gpu-rtx2080-latest-1 |
| 3 | linux-amd64-gpu-rtx4090-latest-1 |
Contributor
🟨 CI finished in 2h 42m: Pass: 96%/157 | Total: 4d 00h | Avg: 36m 57s | Max: 1h 53m | Hits: 65%/168352
|
| Project | |
|---|---|
| CCCL Infrastructure | |
| CCCL Packaging | |
| libcu++ | |
| +/- | CUB |
| Thrust | |
| CUDA Experimental | |
| stdpar | |
| python | |
| CCCL C Parallel Library | |
| +/- | Catch2Helper |
Modifications in project or dependencies?
| Project | |
|---|---|
| CCCL Infrastructure | |
| +/- | CCCL Packaging |
| libcu++ | |
| +/- | CUB |
| +/- | Thrust |
| +/- | CUDA Experimental |
| +/- | stdpar |
| +/- | python |
| +/- | CCCL C Parallel Library |
| +/- | Catch2Helper |
🏃 Runner counts (total jobs: 157)
| # | Runner |
|---|---|
| 93 | linux-amd64-cpu16 |
| 17 | windows-amd64-cpu16 |
| 14 | linux-amd64-gpu-rtxa6000-latest-1 |
| 13 | linux-amd64-gpu-h100-latest-1 |
| 10 | linux-arm64-cpu16 |
| 7 | linux-amd64-gpu-rtx2080-latest-1 |
| 3 | linux-amd64-gpu-rtx4090-latest-1 |
3 tasks done
Contributor
🟥 CI finished in 42m 05s: Pass: 0%/162 | Total: 12h 07m | Avg: 4m 29s | Max: 40m 41s
|
| Project | |
|---|---|
| CCCL Infrastructure | |
| CCCL Packaging | |
| libcu++ | |
| +/- | CUB |
| Thrust | |
| CUDA Experimental | |
| stdpar | |
| python | |
| CCCL C Parallel Library | |
| Catch2Helper |
Modifications in project or dependencies?
| Project | |
|---|---|
| CCCL Infrastructure | |
| +/- | CCCL Packaging |
| libcu++ | |
| +/- | CUB |
| +/- | Thrust |
| +/- | CUDA Experimental |
| +/- | stdpar |
| +/- | python |
| +/- | CCCL C Parallel Library |
| +/- | Catch2Helper |
🏃 Runner counts (total jobs: 162)
| # | Runner |
|---|---|
| 93 | linux-amd64-cpu16 |
| 17 | linux-amd64-gpu-l4-latest-1 |
| 17 | windows-amd64-cpu16 |
| 10 | linux-arm64-cpu16 |
| 9 | linux-amd64-gpu-h100-latest-1 |
| 7 | linux-amd64-gpu-rtx2080-latest-1 |
| 6 | linux-amd64-gpu-rtxa6000-latest-1 |
| 3 | linux-amd64-gpu-rtx4090-latest-1 |
Contributor
🟩 CI finished in 2h 02m: Pass: 100%/162 | Total: 3d 21h | Avg: 34m 27s | Max: 2h 01m | Hits: 69%/153189
|
| Project | |
|---|---|
| CCCL Infrastructure | |
| CCCL Packaging | |
| libcu++ | |
| +/- | CUB |
| Thrust | |
| CUDA Experimental | |
| stdpar | |
| python | |
| CCCL C Parallel Library | |
| Catch2Helper |
Modifications in project or dependencies?
| Project | |
|---|---|
| CCCL Infrastructure | |
| +/- | CCCL Packaging |
| libcu++ | |
| +/- | CUB |
| +/- | Thrust |
| +/- | CUDA Experimental |
| +/- | stdpar |
| +/- | python |
| +/- | CCCL C Parallel Library |
| +/- | Catch2Helper |
🏃 Runner counts (total jobs: 162)
| # | Runner |
|---|---|
| 93 | linux-amd64-cpu16 |
| 17 | linux-amd64-gpu-l4-latest-1 |
| 17 | windows-amd64-cpu16 |
| 10 | linux-arm64-cpu16 |
| 9 | linux-amd64-gpu-h100-latest-1 |
| 7 | linux-amd64-gpu-rtx2080-latest-1 |
| 6 | linux-amd64-gpu-rtxa6000-latest-1 |
| 3 | linux-amd64-gpu-rtx4090-latest-1 |
This was referenced Dec 1, 2025
19 of 27 tasks
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The PR introduces the following optimizations and enhancements for
cub::WarpReduce:Generic optimizations:
__reduce_op_syncfor multiple logical warps__reduce_op_syncfor Segmented Reduction (new)Operator specific optimizations:
float:__half,__nv_bfloat16,__half2,__nv_bfloat162double,__float128:__reduce_op_sync, PTX shuffle otherwise__int128:ushort2,short2:__uint128:__reduce_op_sync, PTX shuffle otherwisestd::complex:__half2,__nv_bfloat162,float2and call reduction recursively__half,__half2:__nv_bfloat16,__nv_bfloat162:float2ushort2,short2:__reduce_op_sync, PTX shuffle otherwise__int128:This PR also add overloadings for specifying
Using
if constexprsignificantly decreases the compile timeTODO:
PERFORMANCE
NOTE: Performance can be even better after tuning reduce/segmented reduce policies
NVIDIA RTX A6000
Warp Reduce : Sum
Warp Reduce : Min
Warp Segmented Reduce : Sum
medium
large
Warp Segmented Reduce : Min
medium
large
NVIDIA H100
Warp Reduce : Sum
Warp Reduce : Min
Warp Segmented Reduce : Sum
medium
large
Warp Segmented Reduce : Min
medium
large
NVIDIA B200
Warp Reduce : Sum
Warp Reduce : Min
Warp Segmented Reduce : Sum
small
medium
large
Warp Segmented Reduce : Min
small
medium
large