Skip to content

Commit 9ffad93

Browse files
committed
version update
1 parent ac8c691 commit 9ffad93

File tree

4 files changed

+25
-9
lines changed

4 files changed

+25
-9
lines changed

README.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,27 @@ All included operations work on varying data types and are implemented both for
2323

2424
## Installation
2525

26-
Check that `nvcc` is accessible from terminal, e.g. `nvcc --version`.
27-
If not, add cuda (`/usr/local/cuda/bin`) to your `$PATH`.
26+
Ensure that at least PyTorch 0.4.1 is installed and verify that `cuda/bin` and `cuda/install` are in your `$PATH` and `$CPATH` respectively, *e.g.*:
27+
28+
```
29+
$ python -c "import torch; print(torch.__version__)"
30+
>>> 0.4.1
31+
32+
$ echo $PATH
33+
>>> /usr/local/cuda/bin:...
34+
35+
$ echo $CPATH
36+
>>> /usr/local/cuda/install:...
37+
```
38+
2839
Then run:
2940

3041
```
3142
pip install cffi torch-cluster
3243
```
3344

45+
If you are running into any installation problems, please create an [issue](https://github.com/rusty1s/pytorch_cluster/issues).
46+
3447
## Graclus
3548

3649
A greedy clustering algorithm of picking an unmarked vertex and matching it with one its unmarked neighbors (that maximizes its edge weight).

aten/TH/generic/THGrid.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,27 @@
22
#define TH_GENERIC_FILE "generic/THGrid.c"
33
#else
44

5-
void THTensor_(grid)(THLongTensor *self, THTensor *pos, THTensor *size, THLongTensor *count) {
5+
void THTensor_(grid)(THLongTensor *self, THTensor *pos, THTensor *size,
6+
THLongTensor *count) {
67
int64_t *selfData = THLongTensor_data(self);
78
real *posData = THTensor_(data)(pos);
89
real *sizeData = THTensor_(data)(size);
910
int64_t posStride0 = THTensor_(stride)(pos, 0);
1011
int64_t posStride1 = THTensor_(stride)(pos, 1);
1112
int64_t *countData = THLongTensor_data(count);
1213

13-
ptrdiff_t n, d; int64_t coef, value;
14+
ptrdiff_t n, d;
15+
int64_t coef, value;
1416
for (n = 0; n < THTensor_(size)(pos, 0); n++) {
15-
coef = 1; value = 0;
17+
coef = 1;
18+
value = 0;
1619
for (d = 0; d < THTensor_(size)(pos, 1); d++) {
17-
value += coef * (int64_t) (posData[d * posStride1] / sizeData[d]);
20+
value += coef * (int64_t)(posData[d * posStride1] / sizeData[d]);
1821
coef *= countData[d];
1922
}
2023
posData += posStride0;
2124
selfData[n] = value;
2225
}
2326
}
2427

25-
#endif // TH_GENERIC_FILE
28+
#endif // TH_GENERIC_FILE

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from setuptools import setup, find_packages
44

5-
__version__ = '1.1.2'
5+
__version__ = '1.1.3'
66
url = 'https://github.com/rusty1s/pytorch_cluster'
77

88
install_requires = ['cffi']

torch_cluster/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from .graclus import graclus_cluster
22
from .grid import grid_cluster
33

4-
__version__ = '1.1.2'
4+
__version__ = '1.1.3'
55

66
__all__ = ['graclus_cluster', 'grid_cluster', '__version__']

0 commit comments

Comments
 (0)