Repository navigation
[CUB] Add cub::detail::ThreadReducePartial - #5324
Conversation
cub::detail::ThreadReducePartialcub::detail::ThreadReducePartial
this looks undefined behavior. Would make sense to add an assertion to check wrong usage in debug mode? |
This comment was marked as resolved.
This comment was marked as resolved.
|
@fbusato Do you mean That would not let us use it where we want it in |
|
I meant |
|
But I should have included it in OP, but yes we also decided to allow |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
5b6c3e6 to
570da2f
Compare
|
Rebased so reviewers don't have to look through the test helper file from #5300 again ( |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
🟩 CI finished in 1h 53m: Pass: 100%/162 | Total: 3d 20h | Avg: 34m 10s | Max: 1h 46m | Hits: 66%/152679
|
| 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 |
* Add ThreadReducePartial and tests
Description
Add
ThreadReducePartialwhich in contrast to the existingcub::ThreadReducetakes avalid_items(runtime-) parameter. This new function guarantees that the reduction operator is not called with invalid items. To be usable within*PartialTilemethods ofBlockScan, it also needs to guarantee to avoid commutation which should not be a problem for a single thread.closes #5192
@elstehle an me decided to not guarantee any specific output in the
valid_items == 0case as the neutral/identity value is not known. In practice this case will for now return the first element of the input array, which is invalid. This avoids adding complexity and hopefully avoids further performance pessimization.Checklist