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
124063e4
Commit
124063e4
authored
Mar 02, 2018
by
rusty1s
Browse files
clean up
parent
103ef0f2
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
71 additions
and
8 deletions
+71
-8
.gitignore
.gitignore
+1
-2
LICENSE
LICENSE
+19
-0
MANIFEST.in
MANIFEST.in
+8
-0
README.md
README.md
+1
-1
build.py
build.py
+13
-0
build.sh
build.sh
+10
-0
setup.cfg
setup.cfg
+3
-0
setup.py
setup.py
+13
-5
test/test_conv.py
test/test_conv.py
+0
-0
torch_spline_conv/__init__.py
torch_spline_conv/__init__.py
+3
-0
No files found.
.gitignore
View file @
124063e4
...
...
@@ -4,6 +4,5 @@ build/
dist/
.cache/
.eggs/
.coverage
*.egg-info/
*.so
.coverage
LICENSE
0 → 100644
View file @
124063e4
Copyright (c) 2018 Matthias Fey <matthias.fey@tu-dortmund.de>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
MANIFEST.in
0 → 100644
View file @
124063e4
include LICENSE
include build.py
include build.sh
recursive-include torch_spline_conv/src *
recursive-include torch_spline_conv/kernel *
recursive-exclude torch_spline_conv/_ext *
README.md
View file @
124063e4
# PyTorch Spline Convolution
# PyTorch Spline
-Based
Convolution
Operator of SplineCNN
build.py
View file @
124063e4
import
subprocess
import
torch
from
torch.utils.ffi
import
create_extension
headers
=
[
'torch_spline_conv/src/cpu.h'
]
...
...
@@ -7,6 +10,16 @@ define_macros = []
extra_objects
=
[]
with_cuda
=
False
if
torch
.
cuda
.
is_available
():
subprocess
.
call
(
'./build.sh'
)
headers
+=
[
'torch_spline_conv/src/cuda.h'
]
sources
+=
[
'torch_spline_conv/src/cuda.c'
]
include_dirs
+=
[
'torch_spline_conv/kernel'
]
define_macros
+=
[(
'WITH_CUDA'
,
None
)]
extra_objects
+=
[
'torch_spline_conv/build/kernel.so'
]
with_cuda
=
True
ffi
=
create_extension
(
name
=
'torch_spline_conv._ext.ffi'
,
package
=
True
,
...
...
build.sh
0 → 100755
View file @
124063e4
#!/bin/sh
echo
"Compiling kernel..."
TORCH
=
$(
python
-c
"import os; import torch; print(os.path.dirname(torch.__file__))"
)
SRC_DIR
=
torch_spline_conv/kernel
BUILD_DIR
=
torch_spline_conv/build
mkdir
-p
$BUILD_DIR
$(
which nvcc
)
-c
-o
$BUILD_DIR
/kernel.so
$SRC_DIR
/kernel.cu
-arch
=
sm_35
-Xcompiler
-fPIC
-shared
-I
$TORCH
/lib/include/TH
-I
$TORCH
/lib/include/THC
-I
$SRC_DIR
setup.cfg
View file @
124063e4
[metadata]
description-file = README.md
[aliases]
test=pytest
...
...
setup.py
View file @
124063e4
from
os
import
path
as
osp
from
setuptools
import
setup
,
find_packages
import
build
# noqa
__version__
=
'0.1.0'
url
=
'https://github.com/rusty1s/pytorch_spline_conv'
install_requires
=
[
'cffi'
]
install_requires
=
[
'cffi'
,
'torch-unique'
]
setup_requires
=
[
'pytest-runner'
,
'cffi'
]
tests_require
=
[
'pytest'
,
'pytest-cov'
]
setup
(
name
=
'torch_spline_conv'
,
version
=
'0.1.0'
,
description
=
'PyTorch
extension for s
pline-
b
ased
c
onvolution
s'
,
url
=
'https://github.com/rusty1s/pytorch_spline_conv
'
,
version
=
__version__
,
description
=
'PyTorch
Implementation of the S
pline-
B
ased
C
onvolution
'
'Operator of SplineCNN
'
,
author
=
'Matthias Fey'
,
author_email
=
'matthias.fey@tu-dortmund.de'
,
url
=
url
,
download_url
=
'{}/archive/{}.tar.gz'
.
format
(
url
,
__version__
),
keywords
=
[
'pytorch'
,
'cnn'
,
'spline_cnn'
,
'geometric-deep-learning'
,
'graph'
,
'mesh'
],
install_requires
=
install_requires
,
setup_requires
=
setup_requires
,
tests_require
=
tests_require
,
...
...
test
s
/test_conv.py
→
test/test_conv.py
View file @
124063e4
File moved
torch_spline_conv/__init__.py
View file @
124063e4
__version__
=
'0.1.0'
__all__
=
[
'__version__'
]
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