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
110d1d0b
Commit
110d1d0b
authored
Feb 11, 2020
by
rusty1s
Browse files
include
parent
559e6e4f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
.travis.yml
.travis.yml
+1
-0
setup.py
setup.py
+7
-3
No files found.
.travis.yml
View file @
110d1d0b
...
...
@@ -62,6 +62,7 @@ jobs:
env
:
-
TORCH=${TORCH_VERSION}+cpu
-
PATH=/c/Python37:/c/Python37/Scripts:$PATH
-
EXTRA_COMPILE_ARGS=-IC:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\include
before_install
:
-
choco install python --version 3.7.6
...
...
setup.py
View file @
110d1d0b
...
...
@@ -11,7 +11,7 @@ from torch.utils.cpp_extension import CppExtension, CUDAExtension, CUDA_HOME
WITH_CUDA
=
torch
.
cuda
.
is_available
()
and
CUDA_HOME
is
not
None
if
os
.
getenv
(
'FORCE_CUDA'
,
'0'
)
==
'1'
:
WITH_CUDA
=
True
if
os
.
getenv
(
'FORCE_NO
N
_CUDA'
,
'0'
)
==
'1'
:
if
os
.
getenv
(
'FORCE_NO_CUDA'
,
'0'
)
==
'1'
:
WITH_CUDA
=
False
BUILD_DOCS
=
os
.
getenv
(
'BUILD_DOCS'
,
'0'
)
==
'1'
...
...
@@ -22,17 +22,21 @@ def get_extensions():
define_macros
=
[]
extra_compile_args
=
{
'cxx'
:
[],
'nvcc'
:
[]}
# Windows users: Edit both of these to contain your VS include path, i.e.:
flags
=
os
.
getenv
(
'EXTRA_COMPILE_ARGS'
,
''
)
extra_compile_args
[
'cxx'
]
+=
[]
if
flags
==
''
else
flags
.
split
(
' '
)
extra_compile_args
[
'nvcc'
]
+=
[]
if
flags
==
''
else
flags
.
split
(
' '
)
# Windows users: Make sure that your VS path is included, i.e.:
# extra_compile_args['cxx'] += ['-I{VISUAL_STUDIO_DIR}\\include']
# extra_compile_args['nvcc'] += ['-I{VISUAL_STUDIO_DIR}\\include']
if
WITH_CUDA
:
Extension
=
CUDAExtension
define_macros
+=
[(
'WITH_CUDA'
,
None
)]
extra_compile_args
[
'cxx'
]
+=
[
'-O0'
]
nvcc_flags
=
os
.
getenv
(
'NVCC_FLAGS'
,
''
)
nvcc_flags
=
[]
if
nvcc_flags
==
''
else
nvcc_flags
.
split
(
' '
)
nvcc_flags
+=
[
'-arch=sm_35'
,
'--expt-relaxed-constexpr'
]
extra_compile_args
[
'cxx'
]
+=
[
'-O0'
]
extra_compile_args
[
'nvcc'
]
+=
nvcc_flags
if
sys
.
platform
==
'win32'
:
...
...
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