-
Notifications
You must be signed in to change notification settings - Fork 185
[BUG] atomic is not trivially copyable when used inside template class #218
Comments
The difference for here is probably which of the compiler frontends (i.e. nvcc or the host compiler) is instantiating the static assertion. For the record, atomics are not copyable, and the bug is in the assertion in main, not the one that's failing; I hope that this is just one of the compilers falsely claiming it is copyable from the intrinsics rather than actually making the type copyable... |
Oh. Just noticed you said it compiles on Linux, I wonder why that is. |
We seem to have lost the deleted copy ctor declaration. That's the real bug here. |
deleted copy ctor declaration of cuda atomic? |
Right now, |
Added a test to enforce this and fix in #219... |
cc @cwharris |
I don't really have an upshot for you @karthikeyann. A possible solution is to replace:
with:
However, it looks this value you're storing is a If you resize this to
This is a bit surgical I'm afraid. :( |
changing scan_tile_status to 33 bit shouldn't be a major issue, but last I checked (which was a while ago) atomic_ref was WIP. Is that still the case? I'll take a look at other workarounds. I recall discussing this with Jake during review, but I'll go back and check the comments there before tagging him in the thread. |
With libcudacxx 1.6.0,
nvcc -std=c++17 atomic_test.cu -arch=sm_70
, following code causesstatic_assert in line 22 passed. But static_assert in line 7 failed!
Both are same types, only difference is the template type.
Same code compiles in Linux.
Details
Windows 10used libcudacxx 1.6.0
nvcc -std=c++17 atomic_test.cu -arch=sm_70 -I C:\Users\user\Documents\cudf\libcudacxx-1.6.0\include
nvcc --version
Built on Sun_Feb_14_22:08:44_Pacific_Standard_Time_2021
Cuda compilation tools, release 11.2, V11.2.152
Build cuda_11.2.r11.2/compiler.29618528_0
The text was updated successfully, but these errors were encountered: