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
f90817ed
Commit
f90817ed
authored
Feb 12, 2021
by
rusty1s
Browse files
reduce shared library file size
parent
510e7184
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
setup.py
setup.py
+4
-2
No files found.
setup.py
View file @
f90817ed
...
...
@@ -19,14 +19,15 @@ BUILD_DOCS = os.getenv('BUILD_DOCS', '0') == '1'
def
get_extensions
():
Extension
=
CppExtension
define_macros
=
[]
extra_compile_args
=
{
'cxx'
:
[]}
extra_compile_args
=
{
'cxx'
:
[
'-O2'
]}
extra_link_args
=
[
'-s'
]
if
WITH_CUDA
:
Extension
=
CUDAExtension
define_macros
+=
[(
'WITH_CUDA'
,
None
)]
nvcc_flags
=
os
.
getenv
(
'NVCC_FLAGS'
,
''
)
nvcc_flags
=
[]
if
nvcc_flags
==
''
else
nvcc_flags
.
split
(
' '
)
nvcc_flags
+=
[
'-arch=sm_35'
,
'--expt-relaxed-constexpr'
]
nvcc_flags
+=
[
'-arch=sm_35'
,
'--expt-relaxed-constexpr'
,
'-O2'
]
extra_compile_args
[
'nvcc'
]
=
nvcc_flags
extensions_dir
=
osp
.
join
(
osp
.
dirname
(
osp
.
abspath
(
__file__
)),
'csrc'
)
...
...
@@ -51,6 +52,7 @@ def get_extensions():
include_dirs
=
[
extensions_dir
],
define_macros
=
define_macros
,
extra_compile_args
=
extra_compile_args
,
extra_link_args
=
extra_link_args
,
)
extensions
+=
[
extension
]
...
...
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