How to create a list of static_maps that support lookups on GPU. #605
|
Is it possible to create100000+ static_maps with different settings (e.g. different sizes) that support lookups on GPU? |
Replies: 3 comments 11 replies
|
Hi, I just find an related answer here, which just solves my problem. |
|
Unfortunately, after I test the code in my own machine. My compiler reports a cuda error (cudaErrorInvalidValue) at line 36 (the std::move method). |
|
@sleeepyjack @PointKernel Hi, sorry to interrupt you again. Any idea about how to slove the memory deallocation problem in the example when execute the code. It seems a small problem but real confuses me. Thank you in advance. |
https://godbolt.org/z/8M35av8Wh
There's an issue with the move constructor, which should have been disabled. Using unique pointers for hash tables could resolve this.
Once fixed, you might notice that the code is time-consuming due to expensive hash table construction, which involves device memory allocation. Instead of creating separate hash tables, probably worth considering using bulk storage as shown in this example. This can significantly optimize your performance.