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
vision
Commits
684c064c
Commit
684c064c
authored
May 21, 2019
by
Soumith Chintala
Browse files
optional nvcc flags
parent
5f417b5d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
setup.py
setup.py
+11
-0
No files found.
setup.py
View file @
684c064c
...
...
@@ -88,10 +88,20 @@ def get_extensions():
define_macros
=
[]
extra_compile_args
=
{}
if
torch
.
cuda
.
is_available
()
and
CUDA_HOME
is
not
None
:
extension
=
CUDAExtension
sources
+=
source_cuda
define_macros
+=
[(
'WITH_CUDA'
,
None
)]
nvcc_flags
=
os
.
getenv
(
'NVCC_FLAGS'
,
''
)
if
nvcc_flags
==
''
:
nvcc_flags
=
[]
else
:
nvcc_flags
=
nvcc_flags
.
split
(
' '
)
extra_compile_args
=
{
'cxx'
:
[
'-O0'
],
'nvcc'
:
nvcc_flags
,
}
sources
=
[
os
.
path
.
join
(
extensions_dir
,
s
)
for
s
in
sources
]
...
...
@@ -103,6 +113,7 @@ def get_extensions():
sources
,
include_dirs
=
include_dirs
,
define_macros
=
define_macros
,
extra_compile_args
=
extra_compile_args
,
)
]
...
...
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