cuda: For the disabled reason in cuda_init_private check the snprintf return value with PAPI_HUGE_STR_LEN instead of PAPI_MAX_STR_LEN#490
Merged
Treece-Burgess merged 1 commit intoicl-utk-edu:masterfrom Oct 12, 2025
Conversation
Contributor
|
I am testing this pull request. |
dbarry9
approved these changes
Oct 8, 2025
Contributor
dbarry9
left a comment
There was a problem hiding this comment.
I tested these changes on an NVIDIA GeForce RTX 5080 device (Blackwell architecture) with CUDA 12.9. The component tests pass or are skipped (consistent with the master branch), and the PAPI utilities function properly.
… return value with PAPI_HUGE_STR_LEN instead of PAPI_MAX_STR_LEN
b07ec67 to
70f6255
Compare
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.
Pull Request Description
Issue/Background:
Currently in the master branch, writing the disabled reason in
cuda_init_privatecan result in the reason being truncated. This is due to the following block of code:snprintfcan write up to a maximum ofPAPI_HUGE_STR_LEN; however, the check just below it usesPAPI_MAX_STR_LEN.Resolution:
This PR resolves this issue by changing
PAPI_MAX_STR_LENtoPAPI_HUGE_STR_LEN.Testing
As we currently do not have any error message strings that are larger than 128 characters. I created a custom error message that exceeded 128 characters. On the master branch, this would result in the
SUBDBGmessage ofFailed to fully write the disabled reason.. However, for this PR that did not occur.Author Checklist
Why this PR exists. Reference all relevant information, including background, issues, test failures, etc
Commits are self contained and only do one thing
Commits have a header of the form:
module: short descriptionCommits have a body (whenever relevant) containing a detailed description of the addressed problem and its solution
The PR needs to pass all the tests