-
Notifications
You must be signed in to change notification settings - Fork 80
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
Question aboout host copy #432
Comments
I suspect that both code snippets you posted will likely result in the same amount of copying work. The Nonetheless, this looks like a regression and I agree that the former code snippet should at least compile and run fine. Could you share the concrete full compiler error that you observed here? Which CUDA/thrust version did you use? |
Hi, thanks for your quick reply. I just made a small example, you can find it here: https://github.com/siposcsaba89/stdgpu_debug In the main.cu file, there is a flag here, you can toggle between the old working code and the new one: https://github.com/siposcsaba89/stdgpu_debug/blob/6e44a52b261305f61ee880fb15e587f7116fd772/main.cu#L46 I tried both on windows 11 with CUDA 12.6 and visual studio 17.11.2, and on Ubuntu 22.04 with cuda 11.8 as well, the same compilation error occures. This is on ubuntu:
Anyway, it would be great if there would be examples, how to copy data from gpu to host and back, maybe there are, but I wasn't able to find it. Thanks for your help. |
Thanks for the reproducer. I tested different implementations of
The issue seems to be related to how the namespace of Regarding an example for data copying: There is currently none for this case, but the existing one for |
Hi,
I would like to read back the data from an unordered map to a host vector. Before having custom
pair
implementation, the following code worked:But now it fails to compile, that there is no assignement function which takes a
thrust::reference<...>
object.The best I came up with:
But in this way, I have to duplicate memory allocation on the gpu (device_vector), which can be an issue if the map takes lots of memory.
Do you have any solution to how to copy an unordered map back to host memory? Maybe there is a very simple solution, I cannot see.
Thanks for your help.
Best, Csaba
The text was updated successfully, but these errors were encountered: