Is there anyway to sort the keys/values of the static map on device. #614
-
I have n maps, each of them keeps some key-value pairs. I want to sort the values and the corresponding keys of them. This is an example: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
The sorting issue is more relevant to CCCL. One possible solution is to use This can be further optimized by noting that each |
Beta Was this translation helpful? Give feedback.
The sorting issue is more relevant to CCCL.
One possible solution is to use
retrieve_all
to obtain all key-value pairs and then write a custom kernel where each block sorts a submap using cub::DeviceRadixSort.This can be further optimized by noting that each
retrieve_all
call launches a separate CUDA kernel. Instead, you can write a custom kernel to fuse all the "retrieve" operations into a single kernel.