Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pyg_lib/csrc/ops/cpu/softmax_kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ at::Tensor softmax_csr_forward_kernel_impl(const at::Tensor& src,
range *= src.size(i);
return range;
}();
// inner_range says how many contigous elements we can visit
// inner_range says how many contiguous elements we can visit
const auto inner_range = local_dim_size * dim_stride;
const auto inout_offset = dim_beg * dim_stride;
const auto aux_offset = group_id * n_heads;
Expand Down Expand Up @@ -189,7 +189,7 @@ at::Tensor softmax_csr_backward_kernel_impl(const at::Tensor& out,
range *= out.size(i);
return range;
}();
// inner_range says how many contigous elements we can visit
// inner_range says how many contiguous elements we can visit
const auto inner_range = local_dim_size * dim_stride;
const auto inout_offset = dim_beg * dim_stride;
const auto sum_offset = group_id * n_heads;
Expand Down
8 changes: 4 additions & 4 deletions pyg_lib/csrc/random/cpu/biased_sampling.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace random {
*
* @param bias the pointer to the start of the bias array
*
* @param len the length of the index/bias arraay
* @param len the length of the index/bias array
*
* @returns the chosen index
*
Expand Down Expand Up @@ -141,7 +141,7 @@ index_t biased_random_alias(const index_t* idx,
*
* @returns (optional) the cdf array which is grouped by the neighbors of each
* node. For each group of neighbors, the weight is exclusively summed to form a
* cdf array. The sum of each group will be guranteed be equal to 1.
* cdf array. The sum of each group will be guaranteed be equal to 1.
*
* Example:
*
Expand All @@ -153,7 +153,7 @@ c10::optional<at::Tensor> biased_to_cdf(const at::Tensor& rowptr,
at::Tensor& bias,
bool inplace);

// The implementation of coverting to CDF representation for biased sampling.
// The implementation of converting to CDF representation for biased sampling.
template <typename scalar_t>
void biased_to_cdf_helper(int64_t* rowptr_data,
size_t rowptr_size,
Expand Down Expand Up @@ -190,7 +190,7 @@ void biased_to_cdf_helper(int64_t* rowptr_data,
std::pair<at::Tensor, at::Tensor> biased_to_alias(at::Tensor rowptr,
at::Tensor bias);

// The implementation of coverting to alias table for biased sampling.
// The implementation of converting to alias table for biased sampling.
template <typename scalar_t>
void biased_to_alias_helper(int64_t* rowptr_data,
size_t rowptr_size,
Expand Down
2 changes: 1 addition & 1 deletion pyg_lib/csrc/random/cpu/rand_engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class PrefetchedRandint {
T next(T range) {
unsigned needed = 64;

// Mutiple levels of range to save prefetched bits.
// Multiple levels of range to save prefetched bits.
if (range < (1 << 16)) {
needed = 16;
} else if (range < (1UL << 32)) {
Expand Down
2 changes: 1 addition & 1 deletion pyg_lib/csrc/sampler/cpu/dist_merge_outputs_kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ merge_outputs(
}
});

// Remove auxilary -1 numbers:
// Remove auxiliary -1 numbers:
auto neg =
std::remove(sampled_node_ids.begin(), sampled_node_ids.end(), -1);
sampled_node_ids.erase(neg, sampled_node_ids.end());
Expand Down
4 changes: 2 additions & 2 deletions pyg_lib/csrc/sampler/cpu/neighbor_kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ class NeighborSampler {
else {
at::Tensor index;
if (replace) {
// at::multinomial only has good perfomance for `replace=true`, see:
// at::multinomial only has good performance for `replace=true`, see:
// https://github.com/pytorch/pytorch/issues/11931
index = at::multinomial(weight, count, replace);
} else {
Expand Down Expand Up @@ -707,7 +707,7 @@ sample(const std::vector<node_type>& node_types,
phmap::flat_hash_map<node_type, std::vector<node_t>>
dst_sampled_nodes_dict;
if (parallel) {
for (const auto& k : threads_edge_types) { // Intialize empty vectors.
for (const auto& k : threads_edge_types) { // Initialize empty vectors.
dst_sampled_nodes_dict[!csc ? std::get<2>(k[0]) : std::get<0>(k[0])];
}
}
Expand Down
4 changes: 2 additions & 2 deletions pyg_lib/csrc/sampler/dist_merge_outputs.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ namespace sampler {
// For distributed training purposes. Merges sampler outputs from different
// partitions, so that they are sorted according to the sampling order.
// Removes seed nodes from sampled nodes and calculates how many neighbors
// were sampled by each source node based on the cummulative sum of sampled
// were sampled by each source node based on the cumulative sum of sampled
// neighbors for each input node.
// Returns the unified node, edge and batch indices as well as the merged
// cummulative sum of sampled neighbors.
// cumulative sum of sampled neighbors.
PYG_API
std::tuple<at::Tensor,
at::Tensor,
Expand Down
Loading