Add small key type tests for static_set and static_map::find#812
Conversation
|
/ok to test 7b0beb1 |
|
/ok to test 323adf8 |
323adf8 to
e77f232
Compare
|
/ok to test 281721b |
|
/ok to test 281721b |
281721b to
390844b
Compare
|
/ok to test 61993aa |
61993aa to
22ad7ae
Compare
|
/ok to test 22ad7ae |
|
/ok to test 6dc9527 |
|
CI passes. Nice work! I'll give it a review on Monday or Tuesday depending on my workload. In the meantime, we can prepare follow up PRs: (1) replicate the same test extensions to all data structures, also sparsely testing combinations of differenty sized key/value types (e.g. 1B keys and 4B payloads), (2) go over the docs, readme, and asserts to make sure they reflect the new type constraints. |
|
Thanks @sleeepyjack. Is there an easier way to reproduce CI locally in the future? |
@ksapru All the CI environment is shared via devcontainers. You could use them to repro the issue. |
@ksapru , yes, @PointKernel 's suggestion is the right way to go. Note that if CI fails, the associated test/build log will tell you at the end how to spin up the corresponding devcontainer environment to reproduce the bug. If you don't have access to a GPU system, you can still use the base images of the devcontainers (e.g., this image) directly to at least compile the code locally by running the |
6516831 to
93800bf
Compare
063896c to
e4e74cc
Compare
|
/ok to test 9e5899f |
|
@ksapru do you want to extend the tests for the other open addressing based data structures in this PR or in a follow up PR? |
4ebd63f to
35a9c54
Compare
|
/ok to test ce7e89f |
|
/ok to test 81c502e |
|
/ok to test f24907a |
PointKernel
left a comment
There was a problem hiding this comment.
I’ve cleaned up the code to avoid unnecessary CI iterations. In the process, I realized my previous statement was incorrect: the packed<1> code path is actually the desired behavior, as set will use that specific path as well. Sorry for the confusion, and thanks again for the contribution @ksapru.
Co-authored-by: Daniel Jünger <djuenger@nvidia.com>
|
/ok to test 0d61796 |
sleeepyjack
left a comment
There was a problem hiding this comment.
Thanks for your contribution @ksapru
Extends the
static_setunit-test type matrices to cover sub-4-byte key types (uint8_tanduint16_t), as requested in the good first issue.Changes:
uint8_tanduint16_tto theTEMPLATE_TEST_CASE_SIGtype axes in all 8 templatedstatic_settest filesnum_keysguard (sizeof(Key) == 1 ? 100 : 400) to keep key sequences within each type's representable range, leaving room for the0xFF/0xFFFFempty sentinelgold_capacityvalues inunique_sequence_testandretrieve_all_testto be conditional onnum_keysfor_each_testto match the reduced key count foruint8_tThe underlying implementation (
packed_casviacuda::atomic_ref) already supports 1B and 2B atomic operations — these tests verify that correctness holds end-to-end for small key types.Part of #805