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-cluster
Commits
377ad11e
Unverified
Commit
377ad11e
authored
Nov 23, 2018
by
Matthias Fey
Committed by
GitHub
Nov 23, 2018
Browse files
Merge pull request #9 from AntoinePrv/cuda_no_cuda
Weaker test for cuda extensions.
parents
c987d065
aa177fb8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
setup.py
setup.py
+2
-2
No files found.
setup.py
View file @
377ad11e
from
setuptools
import
setup
,
find_packages
from
setuptools
import
setup
,
find_packages
import
torch
import
torch
from
torch.utils.cpp_extension
import
CppExtension
,
CUDAExtension
from
torch.utils.cpp_extension
import
CppExtension
,
CUDAExtension
,
CUDA_HOME
ext_modules
=
[
ext_modules
=
[
CppExtension
(
'graclus_cpu'
,
[
'cpu/graclus.cpp'
]),
CppExtension
(
'graclus_cpu'
,
[
'cpu/graclus.cpp'
]),
...
@@ -8,7 +8,7 @@ ext_modules = [
...
@@ -8,7 +8,7 @@ ext_modules = [
]
]
cmdclass
=
{
'build_ext'
:
torch
.
utils
.
cpp_extension
.
BuildExtension
}
cmdclass
=
{
'build_ext'
:
torch
.
utils
.
cpp_extension
.
BuildExtension
}
if
torch
.
cuda
.
is_available
()
:
if
CUDA_HOME
is
not
None
:
ext_modules
+=
[
ext_modules
+=
[
CUDAExtension
(
'graclus_cuda'
,
CUDAExtension
(
'graclus_cuda'
,
[
'cuda/graclus.cpp'
,
'cuda/graclus_kernel.cu'
]),
[
'cuda/graclus.cpp'
,
'cuda/graclus_kernel.cu'
]),
...
...
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