Repository navigation
[CUB] Tests DeviceScan with primitive type for invalid values being passed to the scan operator - #5141
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
elstehle
left a comment
There was a problem hiding this comment.
I am thinking whether implementing this as typed test could potentially look cleaner. Having the TEST_PRIMITIVE macro throughout the source file somehow puts the reader in split-brain mode. If we use a typed test, once instantiated for a primitive and once for a non-primitive type, I think this could simplify things a bit. I am thinking of using uint64_t and segment<uint32_t>, then specializing the function objects for these two types where needed. I'd also be fine to hardcode the offset_t if that simplifies things further.
This comment was marked as resolved.
This comment was marked as resolved.
|
@elstehle I'm not quite sure how you envision doing it as a typed test. Especially since the primitive version needs both types. I was contemplating if I should get rid of a lot of the templatization to declutter the code visually. Although the current MSVC failures being caused by having a global |
This reverts commit 01f1ea7.
elstehle
left a comment
There was a problem hiding this comment.
@elstehle I'm not quite sure how you envision doing it as a typed test. Especially since the primitive version needs both types.
I left a couple of code change suggestions in places that I think would need to be touched accordingly. I would rename PrimitiveT to something like WrapperT or ElementT in most places. The idea is that WrapperT is the element type used to store the segment information. For the non-primitive test case, the WrapperT is just the segment type itself.
For the offset_t type alias: we could also think about placing the type alias inside the test case itself, and putting the relevant static_asserts in there too.
Let me know if this makes sense to you, otherwise we can also briefly hop on a call.
Co-authored-by: Elias Stehle <[email protected]>
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
🟩 CI finished in 6h 11m: Pass: 100%/153 | Total: 1d 03h | Avg: 10m 56s | Max: 44m 16s | Hits: 99%/173554
|
| 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 |
|
/ok to test 5c9ce8c |
🟩 CI finished in 1h 06m: Pass: 100%/153 | Total: 1d 04h | Avg: 11m 00s | Max: 44m 36s | Hits: 99%/173554
|
| 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 |
DeviceScan with primitive type for invalid values passed to the custom reduction operatorDeviceScan with primitive type for invalid values being passed to the scan operator
Description
Enhance test from #5085
closes #5018
After #5085 was merged I observed that the decoupled lookback implementation differs by the input type being primitive or not. Therefore I generalized the test to test both code paths. As a little extra I improved the output to include the number of items so one can easily cross-reference the error count with the number of items and compare it when trying to remove the root causes.
Checklist