Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
torch-scatter
Commits
fa27e1fd
Commit
fa27e1fd
authored
Feb 11, 2020
by
rusty1s
Browse files
windows fix
parent
abb2e1dc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
4 deletions
+17
-4
.travis.yml
.travis.yml
+3
-3
torch_scatter/__init__.py
torch_scatter/__init__.py
+14
-1
No files found.
.travis.yml
View file @
fa27e1fd
...
@@ -103,12 +103,12 @@ install:
...
@@ -103,12 +103,12 @@ install:
-
pip3 install numpy
-
pip3 install numpy
-
pip3 install torch==${TORCH} -f https://download.pytorch.org/whl/torch_stable.html
-
pip3 install torch==${TORCH} -f https://download.pytorch.org/whl/torch_stable.html
-
pip3 install flake8
-
pip3 install flake8
-
python3 setup.py install
-
python3 setup.py install
|| python setup.py install
script
:
script
:
-
flake8 .
-
flake8 .
-
python3 setup.py test
-
python3 setup.py test
|| python setup.py test
#
- python3 setup.py bdist_wheel
-
python3 setup.py bdist_wheel
|| python setup.py bdist_wheel
# - ls dist
# - ls dist
notifications
:
notifications
:
email
:
false
email
:
false
torch_scatter/__init__.py
View file @
fa27e1fd
...
@@ -16,7 +16,20 @@ from .composite import (scatter_std, scatter_logsumexp, scatter_softmax,
...
@@ -16,7 +16,20 @@ from .composite import (scatter_std, scatter_logsumexp, scatter_softmax,
torch
.
ops
.
load_library
(
torch
.
ops
.
load_library
(
osp
.
join
(
osp
.
dirname
(
osp
.
abspath
(
__file__
)),
'_version.so'
))
osp
.
join
(
osp
.
dirname
(
osp
.
abspath
(
__file__
)),
'_version.so'
))
cuda_version
=
torch
.
ops
.
torch_scatter
.
cuda_version
()
cuda_version
=
torch
.
ops
.
torch_scatter
.
cuda_version
()
print
(
cuda_version
)
if
cuda_version
!=
1
and
torch
.
version
.
cuda
is
not
None
:
if
cuda_version
<
10000
:
major
,
minor
=
int
(
str
(
cuda_version
)[
0
]),
int
(
str
(
cuda_version
)[
2
])
else
:
major
,
minor
=
int
(
str
(
cuda_version
)[
0
:
2
]),
int
(
str
(
cuda_version
)[
3
])
t_major
,
t_minor
=
[
int
(
x
)
for
x
in
torch
.
version
.
cuda
.
split
(
'.'
)]
if
t_major
!=
major
or
t_minor
!=
minor
:
raise
RuntimeError
(
'Detected that PyTorch and torch_scatter were compiled with '
'different CUDA versions. PyTorch has CUDA version={}.{} and '
'torch_scatter has CUDA version={}.{}. Please reinstall the '
'torch_scatter that matches your PyTorch install.'
.
format
(
t_major
,
t_minor
,
major
,
minor
))
__version__
=
'2.0.3'
__version__
=
'2.0.3'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment