Add error checking for our C example code#1171
Merged
rapids-bot[bot] merged 5 commits intorapidsai:branch-25.08from Jul 24, 2025
Merged
Add error checking for our C example code#1171rapids-bot[bot] merged 5 commits intorapidsai:branch-25.08from
rapids-bot[bot] merged 5 commits intorapidsai:branch-25.08from
Conversation
We weren't consistently checking the return value of cuda and cuvs functions in our C examples. This caused problems when we tried to adapt the SQ code to an example, and it was returning invalid results. The root cause was because a function was failing, but we didn't notice because the pattern has been to ignore the error codes. Enforce best practices and check the result of every cuvs and cuda function call in our c examples. Also enable -Wall and -Werror for extra compile time checks
the pre-commit config wasn't automaticaly applying clang-format to files in the example directory. This seems to be because we were missing the .clang-format file, which was only in the /cpp/ directory. symlink these files over, and reformat with the settings there
cjnolet
approved these changes
Jul 24, 2025
gforsyth
approved these changes
Jul 24, 2025
Contributor
Author
|
/merge |
lowener
pushed a commit
to lowener/cuvs
that referenced
this pull request
Aug 11, 2025
We weren't consistently checking the return value of cuda and cuvs functions in our C examples. This caused problems when we tried to adapt the SQ code to an example, and it was returning invalid results. The root cause was because a function was failing, but we didn't notice because the pattern has been to ignore the error codes. Enforce best practices and check the result of every cuvs and cuda function call in our c examples. Also: * enable -Wall and -Werror to the c examples for extra compile time checks * add examples to CODEOWNERS * ensure that clang-format runs on the example files Authors: - Ben Frederickson (https://github.com/benfred) Approvers: - Corey J. Nolet (https://github.com/cjnolet) - Gil Forsyth (https://github.com/gforsyth) URL: rapidsai#1171
enp1s0
pushed a commit
to enp1s0/cuvs
that referenced
this pull request
Aug 22, 2025
We weren't consistently checking the return value of cuda and cuvs functions in our C examples. This caused problems when we tried to adapt the SQ code to an example, and it was returning invalid results. The root cause was because a function was failing, but we didn't notice because the pattern has been to ignore the error codes. Enforce best practices and check the result of every cuvs and cuda function call in our c examples. Also: * enable -Wall and -Werror to the c examples for extra compile time checks * add examples to CODEOWNERS * ensure that clang-format runs on the example files Authors: - Ben Frederickson (https://github.com/benfred) Approvers: - Corey J. Nolet (https://github.com/cjnolet) - Gil Forsyth (https://github.com/gforsyth) URL: rapidsai#1171
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.
We weren't consistently checking the return value of cuda and cuvs functions in our C examples.
This caused problems when we tried to adapt the SQ code to an example, and it was returning invalid results. The root cause was because a function was failing, but we didn't notice because the pattern has been to ignore the error codes.
Enforce best practices and check the result of every cuvs and cuda function call in our c examples.
Also: