What is the purpose of creating OrderedHashTable?

I found that, for each iteration of the training step, the hash-related CUDA functions are called. They are:

  1. generate_hashmap_duplicates
  2. count_hashmap
  3. compact_hashmap

What is the purpose of these functions during the training step?

Are there any specific examples (usecase) of these functions?


What’s the code you are running? I guess this part is relabeling the sampled graph from 0.

I’m running the one similar to stochastic training.

Could you explain more about how relabeling works for the sampled graph from the perspective of hashmap (If the relabeling is related to hashmap)?


You can refer to the CPU implementation at dgl/array_utils.h at 195f99362d883f8b6d131b70a7868a537e55b786 · dmlc/dgl · GitHub . On GPU it’s doing similar things