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
e3b49faf
Commit
e3b49faf
authored
Oct 03, 2022
by
rusty1s
Browse files
enable O3 build
parent
9a651d91
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
setup.py
setup.py
+5
-5
No files found.
setup.py
View file @
e3b49faf
...
@@ -44,7 +44,7 @@ def get_extensions():
...
@@ -44,7 +44,7 @@ def get_extensions():
if
sys
.
platform
==
'win32'
:
if
sys
.
platform
==
'win32'
:
define_macros
+=
[(
'torchscatter_EXPORTS'
,
None
)]
define_macros
+=
[(
'torchscatter_EXPORTS'
,
None
)]
extra_compile_args
=
{
'cxx'
:
[
'-O
2
'
]}
extra_compile_args
=
{
'cxx'
:
[
'-O
3
'
]}
if
not
os
.
name
==
'nt'
:
# Not on Windows:
if
not
os
.
name
==
'nt'
:
# Not on Windows:
extra_compile_args
[
'cxx'
]
+=
[
'-Wno-sign-compare'
]
extra_compile_args
[
'cxx'
]
+=
[
'-Wno-sign-compare'
]
extra_link_args
=
[]
if
WITH_SYMBOLS
else
[
'-s'
]
extra_link_args
=
[]
if
WITH_SYMBOLS
else
[
'-s'
]
...
@@ -69,14 +69,14 @@ def get_extensions():
...
@@ -69,14 +69,14 @@ def get_extensions():
define_macros
+=
[(
'WITH_CUDA'
,
None
)]
define_macros
+=
[(
'WITH_CUDA'
,
None
)]
nvcc_flags
=
os
.
getenv
(
'NVCC_FLAGS'
,
''
)
nvcc_flags
=
os
.
getenv
(
'NVCC_FLAGS'
,
''
)
nvcc_flags
=
[]
if
nvcc_flags
==
''
else
nvcc_flags
.
split
(
' '
)
nvcc_flags
=
[]
if
nvcc_flags
==
''
else
nvcc_flags
.
split
(
' '
)
if
torch
.
version
.
hip
:
nvcc_flags
+=
[
'-O3'
]
nvcc_flags
+=
[
'-O3'
]
# USE_ROCM was added to later versons of rocm pytorch
if
torch
.
version
.
hip
:
# define here to support older pytorch versions
# USE_ROCM was added to later versions of PyTorch.
# Define here to support older PyTorch versions as well:
define_macros
+=
[(
'USE_ROCM'
,
None
)]
define_macros
+=
[(
'USE_ROCM'
,
None
)]
undef_macros
+=
[
'__HIP_NO_HALF_CONVERSIONS__'
]
undef_macros
+=
[
'__HIP_NO_HALF_CONVERSIONS__'
]
else
:
else
:
nvcc_flags
+=
[
'--expt-relaxed-constexpr'
,
'-O2'
]
nvcc_flags
+=
[
'--expt-relaxed-constexpr'
]
extra_compile_args
[
'nvcc'
]
=
nvcc_flags
extra_compile_args
[
'nvcc'
]
=
nvcc_flags
name
=
main
.
split
(
os
.
sep
)[
-
1
][:
-
4
]
name
=
main
.
split
(
os
.
sep
)[
-
1
][:
-
4
]
...
...
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