Skip to content
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

Support 1-byte and 2-byte types with atomic_ref #1024

Closed
PointKernel opened this issue Jul 10, 2023 · 1 comment
Closed

Support 1-byte and 2-byte types with atomic_ref #1024

PointKernel opened this issue Jul 10, 2023 · 1 comment

Comments

@PointKernel
Copy link
Member

We are replacing custom atomic implementations in libcudf with cuda::atomic_ref (rapidsai/cudf#13575). The current atomic_ref would work fine with 4-byte or 8-byte integers and floating points but doesn't support time types like durations or timestamps from cuda/std/chrono. Also, it would be great to have atomic_ref support 1-byte and 2-byte types like bool, int8_t and int16_t. The functions we are mostly interested in are fetch_min, fetch_max and fetch_add.

For your reference, here is the list of time types used in libcudf:
https://github.com/rapidsai/cudf/blob/2ca46306aad848f5102314374cef1c026856569e/cpp/include/cudf/wrappers/durations.hpp
https://github.com/rapidsai/cudf/blob/2ca46306aad848f5102314374cef1c026856569e/cpp/include/cudf/wrappers/timestamps.hpp

@PointKernel
Copy link
Member Author

https://godbolt.org/z/a78x4qrha

It works! 🔥

@github-project-automation github-project-automation bot moved this from Todo to Done in CCCL Jul 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

1 participant