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
ac0825f5
Commit
ac0825f5
authored
Dec 21, 2017
by
rusty1s
Browse files
bugfix
parent
b1b7116a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
4 deletions
+5
-4
build.py
build.py
+4
-0
build.sh
build.sh
+0
-1
setup.py
setup.py
+1
-3
No files found.
build.py
View file @
ac0825f5
# import subprocess
import
torch
import
torch
from
torch.utils.ffi
import
create_extension
from
torch.utils.ffi
import
create_extension
...
@@ -9,6 +11,8 @@ extra_objects = []
...
@@ -9,6 +11,8 @@ extra_objects = []
with_cuda
=
False
with_cuda
=
False
if
torch
.
cuda
.
is_available
():
if
torch
.
cuda
.
is_available
():
# subprocess.call('./build.sh') # Compile kernel.
headers
+=
[
'torch_scatter/src/cuda.h'
]
headers
+=
[
'torch_scatter/src/cuda.h'
]
sources
+=
[
'torch_scatter/src/cuda.c'
]
sources
+=
[
'torch_scatter/src/cuda.c'
]
define_macros
+=
[(
'WITH_CUDA'
,
None
)]
define_macros
+=
[(
'WITH_CUDA'
,
None
)]
...
...
build.sh
View file @
ac0825f5
...
@@ -4,6 +4,5 @@ TORCH=$(python -c "import os; import torch; print(os.path.dirname(torch.__file__
...
@@ -4,6 +4,5 @@ TORCH=$(python -c "import os; import torch; print(os.path.dirname(torch.__file__
SRC_DIR
=
torch_scatter/kernel
SRC_DIR
=
torch_scatter/kernel
BUILD_DIR
=
torch_scatter/build
BUILD_DIR
=
torch_scatter/build
rm
-rf
$BUILD_DIR
mkdir
-p
$BUILD_DIR
mkdir
-p
$BUILD_DIR
nvcc
-c
-o
$BUILD_DIR
/kernel.so
$SRC_DIR
/kernel.cu
-Xcompiler
-fPIC
-shared
-I
$TORCH
/lib/include/TH
-I
$TORCH
/lib/include/THC
-I
$TORCH
/lib/include
-I
$SRC_DIR
nvcc
-c
-o
$BUILD_DIR
/kernel.so
$SRC_DIR
/kernel.cu
-Xcompiler
-fPIC
-shared
-I
$TORCH
/lib/include/TH
-I
$TORCH
/lib/include/THC
-I
$TORCH
/lib/include
-I
$SRC_DIR
setup.py
View file @
ac0825f5
...
@@ -18,8 +18,6 @@ setup(
...
@@ -18,8 +18,6 @@ setup(
install_requires
=
install_requires
,
install_requires
=
install_requires
,
setup_requires
=
setup_requires
,
setup_requires
=
setup_requires
,
tests_require
=
tests_require
,
tests_require
=
tests_require
,
docs_require
=
docs_require
,
packages
=
find_packages
(
exclude
=
[
'build'
]),
packages
=
find_packages
(
exclude
=
[
'build'
]),
ext_package
=
''
,
ext_package
=
''
,
cffi_modules
=
[
osp
.
join
(
osp
.
dirname
(
__file__
),
'build.py:ffi'
)],
cffi_modules
=
[
osp
.
join
(
osp
.
dirname
(
__file__
),
'build.py:ffi'
)],
)
)
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