Fix off-by-one num_segments in matrix::sort_cols_per_row#3010
Merged
rapids-bot[bot] merged 4 commits intoMay 18, 2026
Merged
Conversation
divyegala
approved these changes
May 4, 2026
cjnolet
approved these changes
May 8, 2026
tarang-jain
approved these changes
May 9, 2026
Member
|
/ok to test a422e94 |
Member
|
/merge |
2642b31 to
a422e94
Compare
|
This PR's base branch has been changed since the last |
cjnolet
approved these changes
May 18, 2026
|
This PR's base branch has been changed since the last |
Member
|
/merge |
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.
Closes #2049
raft::matrix::detail::sortColumnsPerRowpassedn_rows + 1to cub asnum_segments. Per the cub contract, an aliased CSR offsets array must have lengthnum_segments + 1, so cub read one int past the offsets allocation. This crashes withcudaErrorIllegalAddresswhenn_rows + 1is a power of two ≥ 64 andn_columns ≥ ~16384(silent otherwise).Surfaces in
cuvs::stats::trustworthiness_scorewhenevern % batch_size ∈ {63, 127, 255, …}(e.g.n=76927, batch_size=512).Fix : pass
n_rowsto cub; size the offsets array asn_rows + 1.