-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consolidate SUM reductions #2381
Consolidate SUM reductions #2381
Conversation
… KahanBabushkaNeumaierSum to strided summation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Malte, this looks really good! I love how a new compensated reduction is reused among various stat functions! I just have a small request to improve documentation.
Thanks @tfeher for reviewing. I added a note to both the implementations in detail as well as the main entry in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mfoerste4 for the update, LGTM!
@tfeher , sorry for the late change, I missed this before. The sample-parameter for mean/stdev was not implemented for column based data previously. I enabled it and updated the failing tests (that were sampling with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving latest changes.
This raised a bug in the test code that existed for a long time. IIUC the covariance algorithm using the pre-computed mean should always use the standard mean, no matter whether we are computing the sampled covariance or not. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching these issues, LGTM.
/merge |
This PR consists of multiple parts:
stats
namespace tolinalg::reduce
This should address #2366 and #2205. With the kernel heuristics adjusted the maximum performance drop is 4%.
FYI, @tfeher