Repository navigation
Bounding memory usage in C2H mismatch diagnostics - #12259
Merged
bernhardmgruber merged 1 commit intoOct 27, 2026
Merged
bernhardmgruber merged 1 commit into
bernhardmgruber merged 1 commit into
Conversation
…mismatches When comparing two host ranges we used to retain all mismatches only to display first and last 5. We now only keep those mismatches we want to display. A test added.
Contributor
Author
|
See @bernhardmgruber question regarding this change: #11374 (comment) and my response: #11374 (comment) |
Contributor
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Collect and validate mismatch details c2h/include/c2h/catch2_test_helper.h, cub/test/catch2_test_c2h_buffers.cu |
compare_host_ranges counts mismatches during comparison, retains the first five and a rolling set of the last five, and orders the retained tail. The test checks mismatch counts from 0 to 16, retained details, and up to three matching values before the first mismatch. |
Possibly related PRs
- NVIDIA/cccl#11374: It changes
compare_host_rangesto retain and order the first and last mismatches, and also updates the same test file.
Priority:
Change: Refactor
Merge Risk: 
Minimal · up to 3a168
-
No actionable merge-blocking issue is identified; the change is mergeable after normal checks.
Comment @coderabbitai help to get the list of available commands.
This comment has been minimized.
This comment has been minimized.
Contributor
🥳 CI Workflow Results🟩 Finished in 7h 38m: Pass: 100%/187 | Total: 7d 22h | Max: 2h 50m | Hits: 39%/636732See results here. |
bernhardmgruber
approved these changes
Oct 27, 2026
2 tasks done
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.
Optimization to
c2h::detail::compare_host_rangesto reduce memory usage for large mismatchesWhen comparing two host ranges we used to retain all mismatches only to display first and last 5. We now only keep those mismatches we want to display.
A test added.
Description
This change is a focused change split off from #11374
Checklist