-
Notifications
You must be signed in to change notification settings - Fork 85
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
[BUG]: <cuda/atomic>
header should be included only in device compilation mode.
#449
Comments
Hey @mfbalin this is a known issue and something high on my list of things I'd like to address in CCCL in the coming months. See NVIDIA/cccl#1083 for tracking this effort. |
Can I hack |
I want to compile the whole project with 35, 50, ..., 90 but only one file including cuco with 70, ..., 90. |
Are you using CMake? You should be able to specify per-target properties for a specific file like this:
|
Yes, I am using CMake. This looks promising, let me try it. Thank you! |
@mfbalin turns out you can't use |
That works too, so long as there is a way to get it working. |
@jrhemstad Do you know if these separate object libraries can circularly depend on each other? EDIT: I will figure out a way. Thank you for the pointers! |
Closing as resolved |
Is this a duplicate?
Type of Bug
Compile-time Error
Describe the bug
I want to use cuCollections when compiling for old and new CUDA architectures (sm_35 to sm_90). However, in this case, the minimum cuda architecture is sm_35 and importing
cuda/atomic
header gives an error.cuCollections/include/cuco/detail/open_addressing/kernels.cuh
Line 22 in 2101cb3
If there is a way, this include should be performed only in device mode and when compiling for suitable cuda architectures. Otherwise, one can't use cuco::static_map in the host code. I want to dispatch to different kernels depending on the compute capability of the device. Ideally, without limiting which architectures I am providing support for (>=35).
How to Reproduce
cuco/static_map.cuh
header.Expected behavior
The host code should be compilable for any CUDA architecture.
Reproduction link
No response
Operating System
No response
nvidia-smi output
No response
NVCC version
No response
The text was updated successfully, but these errors were encountered: