Make CUDA lineinfo optional.#11606
Merged
Merged
Conversation
Member
Author
|
cc @hcho3 |
hcho3
reviewed
Aug 4, 2025
Comment on lines
-115
to
-117
| else() | ||
| target_compile_options(${target} PRIVATE | ||
| $<$<COMPILE_LANGUAGE:CUDA>:-lineinfo>) |
Collaborator
There was a problem hiding this comment.
Can we create a new CMake option to enable the lineinfo? Or is it redundant given the USE_DEVICE_DEBUG option?
Member
Author
There was a problem hiding this comment.
It's redundant when debug mode is enabled.
After this PR , it will be enabled when nvtx is enabled since the lineinfo is most relevant for profiling.
Please note that, it's not necessary to enable nvtx for profiling. I'm just grouping them under one flag.
We can remove this nvcc flag entirely and rely on the user to supply a cmake compiler flag. I don't have a strong opinion on this choice, remove the flag, split up the flag, or group the flag under nvtx.
hcho3
approved these changes
Aug 5, 2025
Collaborator
trivialfis
added a commit
to trivialfis/xgboost
that referenced
this pull request
Aug 11, 2025
trivialfis
added a commit
to trivialfis/xgboost
that referenced
this pull request
Aug 11, 2025
trivialfis
added a commit
that referenced
this pull request
Aug 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ref #11604 .
Before:
After: