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-harmonics
Commits
76836abf
Unverified
Commit
76836abf
authored
Jun 17, 2025
by
Thorsten Kurth
Committed by
GitHub
Jun 17, 2025
Browse files
Merge pull request #81 from NVIDIA/tkurth/debug-mode
adding lineinfo to optional debug flags
parents
cfbf5f80
eea47739
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
setup.py
setup.py
+8
-2
No files found.
setup.py
View file @
76836abf
...
...
@@ -56,17 +56,23 @@ except (ImportError, TypeError, AssertionError, AttributeError) as e:
def
get_compile_args
(
module_name
):
"""If user runs build with TORCH_HARMONICS_DEBUG=1 set, it will use debugging flags to build"""
debug_mode
=
os
.
environ
.
get
(
'TORCH_HARMONICS_DEBUG'
,
'0'
)
==
'1'
profile_mode
=
os
.
environ
.
get
(
'TORCH_HARMONICS_PROFILE'
,
'0'
)
==
'1'
nvcc_extra_flags
=
[]
if
profile_mode
:
nvcc_extra_flags
.
append
(
"-lineinfo"
)
if
debug_mode
:
print
(
f
"WARNING: Compiling
{
module_name
}
with debugging flags"
)
return
{
'cxx'
:
[
'-g'
,
'-O0'
,
'-Wall'
],
'nvcc'
:
[
'-g'
,
'-G'
,
'-O0'
]
'nvcc'
:
[
'-g'
,
'-G'
,
'-O0'
]
+
nvcc_extra_flags
}
else
:
print
(
f
"NOTE: Compiling
{
module_name
}
with release flags"
)
return
{
'cxx'
:
[
'-O3'
,
"-DNDEBUG"
],
'nvcc'
:
[
'-O3'
,
"-DNDEBUG"
]
'nvcc'
:
[
'-O3'
,
"-DNDEBUG"
]
+
nvcc_extra_flags
}
def
get_ext_modules
():
...
...
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