Skip to content

Commit

Permalink
Added comments
Browse files Browse the repository at this point in the history
  • Loading branch information
OlhaBabicheva committed Oct 31, 2023
1 parent 2b7c2fb commit cf440e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyg_lib/csrc/sampler/cpu/neighbor_kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ class NeighborSampler {
// Case 2: Multinomial sampling:
else {
at::Tensor index;
if (replace) {
if (replace) { // at::multinomial has good perfomance only when replace=true, e.g. https://github.com/pytorch/pytorch/issues/11931#top
index = at::multinomial(weight, count, replace);
}
else { // An Efficient Algorithm for Biased Sampling: https://utopia.duth.gr/~pefraimi/research/data/2007EncOfAlg.pdf
Expand Down

0 comments on commit cf440e8

Please sign in to comment.