-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Guard against an overflow in sort tests #1980
Conversation
🟨 CI finished in 2h 24m: Pass: 98%/249 | Total: 1d 18h | Avg: 10m 12s | Max: 42m 26s | Hits: 90%/244804
|
Project | |
---|---|
CCCL Infrastructure | |
libcu++ | |
+/- | CUB |
+/- | Thrust |
CUDA Experimental |
Modifications in project or dependencies?
Project | |
---|---|
CCCL Infrastructure | |
libcu++ | |
+/- | CUB |
+/- | Thrust |
CUDA Experimental |
🏃 Runner counts (total jobs: 249)
# | Runner |
---|---|
178 | linux-amd64-cpu16 |
40 | linux-amd64-gpu-v100-latest-1 |
16 | linux-arm64-cpu16 |
15 | windows-amd64-cpu16 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's still overflow on index_to_key_value_op
end. Without corresponding change, the subsequent comparison will not yield right results.
Before you start fixing overflow in index_to_key_value_op
, I assume that there's a reason to have + 1
here. If omitting + 1
is possible, we should omit it for every type. If omitting + 1
is not possible, we should have it for every type.
Given that we never actually test with std::size_t
, I'd suggest to add a static assert and safe some time by tabling investigation till the moment when we actually need to test against std::size_t
.
The +1 is needed to give you the correct answer. A uint16 has max value (2^16-1) - lowest value (0) + 1 = 2^16 different values. That works because the calculations use a
Omitting the
That confused me initially, because I looked at the |
bec8374
to
031ee96
Compare
🟩 CI finished in 17h 43m: Pass: 100%/250 | Total: 1d 07h | Avg: 7m 31s | Max: 32m 10s | Hits: 99%/248216
|
Project | |
---|---|
CCCL Infrastructure | |
libcu++ | |
+/- | CUB |
+/- | Thrust |
CUDA Experimental | |
pycuda |
Modifications in project or dependencies?
Project | |
---|---|
CCCL Infrastructure | |
libcu++ | |
+/- | CUB |
+/- | Thrust |
CUDA Experimental | |
+/- | pycuda |
🏃 Runner counts (total jobs: 250)
# | Runner |
---|---|
178 | linux-amd64-cpu16 |
41 | linux-amd64-gpu-v100-latest-1 |
16 | linux-arm64-cpu16 |
15 | windows-amd64-cpu16 |
Fixes: #1979