Backport "Fix stain covariance centering with CuPy CUB" (#1142) - #1154
Merged
Conversation
resolves rapidsai#1137 by making stain normalization robust to a small change in numerical accuracy of some axis-specific `cupy.mean` operations when CUB is enabled in CuPy 14.2. The root cause and two possible fixes are explained in this comment in that issue: rapidsai#1137 (comment) The second option of shifting each row to make the computation numerically robust while preserving the performance of float32 reduction was kept. Authors: - Gregory Lee (https://github.com/grlee77) Approvers: - https://github.com/jakirkham URL: rapidsai#1142
grlee77
approved these changes
Sep 9, 2026
grlee77
left a comment
Contributor
There was a problem hiding this comment.
thanks for adding the backport @jakirkham
Contributor
|
/merge |
jakirkham
deleted the
backport-26.10/grlee77/fix/cupy-14-2-stain-normalizer-covariance
branch
September 9, 2026 18:30
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.
This was originally submitted as a bug fix for a test fix in cuCIM 26.10 with PR #1142 . However it wound up being merged after
mainwas updated to 26.12. To ensure this fix is properly included in 26.10 as intended, this backports the fix to therelease/26.10branch. Have done this by cherry-picking the merged change f849ce3 frommain.Original PR body text: