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-spline-conv
Commits
20fe8b6e
Commit
20fe8b6e
authored
Feb 15, 2021
by
rusty1s
Browse files
install via wheel
parent
ac257581
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
32 deletions
+20
-32
.travis.yml
.travis.yml
+4
-4
csrc/basis.cpp
csrc/basis.cpp
+5
-1
csrc/version.cpp
csrc/version.cpp
+5
-1
csrc/weighting.cpp
csrc/weighting.cpp
+5
-1
script/rename_wheel.py
script/rename_wheel.py
+0
-24
torch_spline_conv/__init__.py
torch_spline_conv/__init__.py
+1
-1
No files found.
.travis.yml
View file @
20fe8b6e
...
@@ -111,12 +111,12 @@ install:
...
@@ -111,12 +111,12 @@ install:
-
conda install pytorch=${TORCH_VERSION} ${TOOLKIT} -c pytorch --yes
-
conda install pytorch=${TORCH_VERSION} ${TOOLKIT} -c pytorch --yes
-
source script/torch.sh
-
source script/torch.sh
-
pip install flake8 codecov
-
pip install flake8 codecov
-
python setup.py install
-
python setup.py bdist_wheel --dist-dir=dist
-
pip install dist/*.whl
script
:
script
:
-
flake8 .
-
flake8 .
-
py
thon setup.py
test
-
pytest
after_success
:
after_success
:
-
python setup.py bdist_wheel --dist-dir=dist/torch-${TORCH_VERSION}+${IDX}
-
codecov
-
codecov
deploy
:
deploy
:
provider
:
s3
provider
:
s3
...
@@ -125,7 +125,7 @@ deploy:
...
@@ -125,7 +125,7 @@ deploy:
access_key_id
:
${S3_ACCESS_KEY}
access_key_id
:
${S3_ACCESS_KEY}
secret_access_key
:
${S3_SECRET_ACCESS_KEY}
secret_access_key
:
${S3_SECRET_ACCESS_KEY}
bucket
:
pytorch-geometric.com
bucket
:
pytorch-geometric.com
local_dir
:
dist
/torch-${TORCH_VERSION}+${IDX}
local_dir
:
dist
upload_dir
:
whl/torch-${TORCH_VERSION}+${IDX}
upload_dir
:
whl/torch-${TORCH_VERSION}+${IDX}
acl
:
public_read
acl
:
public_read
on
:
on
:
...
...
csrc/basis.cpp
View file @
20fe8b6e
...
@@ -8,7 +8,11 @@
...
@@ -8,7 +8,11 @@
#endif
#endif
#ifdef _WIN32
#ifdef _WIN32
PyMODINIT_FUNC
PyInit__basis
(
void
)
{
return
NULL
;
}
#ifdef WITH_CUDA
PyMODINIT_FUNC
PyInit__basis_cuda
(
void
)
{
return
NULL
;
}
#else
PyMODINIT_FUNC
PyInit__basis_cpu
(
void
)
{
return
NULL
;
}
#endif
#endif
#endif
std
::
tuple
<
torch
::
Tensor
,
torch
::
Tensor
>
std
::
tuple
<
torch
::
Tensor
,
torch
::
Tensor
>
...
...
csrc/version.cpp
View file @
20fe8b6e
...
@@ -6,7 +6,11 @@
...
@@ -6,7 +6,11 @@
#endif
#endif
#ifdef _WIN32
#ifdef _WIN32
PyMODINIT_FUNC
PyInit__version
(
void
)
{
return
NULL
;
}
#ifdef WITH_CUDA
PyMODINIT_FUNC
PyInit__version_cuda
(
void
)
{
return
NULL
;
}
#else
PyMODINIT_FUNC
PyInit__version_cpu
(
void
)
{
return
NULL
;
}
#endif
#endif
#endif
int64_t
cuda_version
()
{
int64_t
cuda_version
()
{
...
...
csrc/weighting.cpp
View file @
20fe8b6e
...
@@ -8,7 +8,11 @@
...
@@ -8,7 +8,11 @@
#endif
#endif
#ifdef _WIN32
#ifdef _WIN32
PyMODINIT_FUNC
PyInit__weighting
(
void
)
{
return
NULL
;
}
#ifdef WITH_CUDA
PyMODINIT_FUNC
PyInit__weighting_cuda
(
void
)
{
return
NULL
;
}
#else
PyMODINIT_FUNC
PyInit__weighting_cpu
(
void
)
{
return
NULL
;
}
#endif
#endif
#endif
torch
::
Tensor
spline_weighting_fw
(
torch
::
Tensor
x
,
torch
::
Tensor
weight
,
torch
::
Tensor
spline_weighting_fw
(
torch
::
Tensor
x
,
torch
::
Tensor
weight
,
...
...
script/rename_wheel.py
deleted
100644 → 0
View file @
ac257581
import
sys
import
os
import
os.path
as
osp
import
glob
import
shutil
idx
=
sys
.
argv
[
1
]
assert
idx
in
[
'cpu'
,
'cu92'
,
'cu101'
,
'cu102'
,
'cu110'
]
dist_dir
=
osp
.
join
(
osp
.
dirname
(
osp
.
abspath
(
__file__
)),
'..'
,
'dist'
)
wheels
=
glob
.
glob
(
osp
.
join
(
'dist'
,
'**'
,
'*.whl'
),
recursive
=
True
)
for
wheel
in
wheels
:
if
idx
in
wheel
:
continue
paths
=
wheel
.
split
(
osp
.
sep
)
names
=
paths
[
-
1
].
split
(
'-'
)
name
=
'-'
.
join
(
names
[:
-
4
]
+
[
'latest+'
+
idx
]
+
names
[
-
3
:])
shutil
.
copyfile
(
wheel
,
osp
.
join
(
*
paths
[:
-
1
],
name
))
name
=
'-'
.
join
(
names
[:
-
4
]
+
[
names
[
-
4
]
+
'+'
+
idx
]
+
names
[
-
3
:])
os
.
rename
(
wheel
,
osp
.
join
(
*
paths
[:
-
1
],
name
))
torch_spline_conv/__init__.py
View file @
20fe8b6e
...
@@ -11,7 +11,7 @@ for library in ['_version', '_basis', '_weighting']:
...
@@ -11,7 +11,7 @@ for library in ['_version', '_basis', '_weighting']:
torch
.
ops
.
load_library
(
importlib
.
machinery
.
PathFinder
().
find_spec
(
torch
.
ops
.
load_library
(
importlib
.
machinery
.
PathFinder
().
find_spec
(
f
'
{
library
}
_
{
suffix
}
'
,
[
osp
.
dirname
(
__file__
)]).
origin
)
f
'
{
library
}
_
{
suffix
}
'
,
[
osp
.
dirname
(
__file__
)]).
origin
)
if
torch
.
cuda
.
is_available
()
and
torch
.
version
.
cuda
is
not
None
:
if
torch
.
cuda
.
is_available
()
:
# pragma: no cover
cuda_version
=
torch
.
ops
.
torch_spline_conv
.
cuda_version
()
cuda_version
=
torch
.
ops
.
torch_spline_conv
.
cuda_version
()
if
cuda_version
==
-
1
:
if
cuda_version
==
-
1
:
...
...
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