From cf440e89ce0c6f19b1043a9e83f91d2ea3795b7d Mon Sep 17 00:00:00 2001 From: OlhaBabicheva Date: Tue, 31 Oct 2023 08:44:47 +0000 Subject: [PATCH] Added comments --- pyg_lib/csrc/sampler/cpu/neighbor_kernel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyg_lib/csrc/sampler/cpu/neighbor_kernel.cpp b/pyg_lib/csrc/sampler/cpu/neighbor_kernel.cpp index df51be63..202bf906 100644 --- a/pyg_lib/csrc/sampler/cpu/neighbor_kernel.cpp +++ b/pyg_lib/csrc/sampler/cpu/neighbor_kernel.cpp @@ -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