Skip to content

Commit

Permalink
version up
Browse files Browse the repository at this point in the history
  • Loading branch information
rusty1s committed Jul 27, 2019
1 parent 4fa1fb2 commit 0fb1f1d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions cpu/sampler.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#include <ATen/CPUGenerator.h>
#include <torch/extension.h>

at::Tensor neighbor_sampler(at::Tensor start, at::Tensor cumdeg, size_t size,
float factor) {
at::CPUGenerator *generator = at::detail::getDefaultCPUGenerator();

auto start_ptr = start.data<int64_t>();
auto cumdeg_ptr = cumdeg.data<int64_t>();
Expand All @@ -24,7 +22,7 @@ at::Tensor neighbor_sampler(at::Tensor start, at::Tensor cumdeg, size_t size,
std::unordered_set<int64_t> set;
if (size_i < 0.7 * float(num_neighbors)) {
while (set.size() < size_i) {
int64_t z = generator->random() % num_neighbors;
int64_t z = rand() % num_neighbors;
set.insert(z + low);
}
std::vector<int64_t> v(set.begin(), set.end());
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
['cuda/rw.cpp', 'cuda/rw_kernel.cu']),
]

__version__ = '1.4.3a1'
__version__ = '1.4.3'
url = 'https://github.com/rusty1s/pytorch_cluster'

install_requires = ['scipy']
Expand Down
2 changes: 1 addition & 1 deletion torch_cluster/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from .rw import random_walk
from .sampler import neighbor_sampler

__version__ = '1.4.3a1'
__version__ = '1.4.3'

__all__ = [
'graclus_cluster',
Expand Down

0 comments on commit 0fb1f1d

Please sign in to comment.