[FEA] Consolidate SUM reductions across raft

Open
#2,366 0 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@mfoerste4 is already working on this.

Since Jul 8, 2024.

Assessment

This issue has not been assessed yet.

Description

feature request

Is your feature request related to a problem? Please describe.
Brought up by https://github.com/rapidsai/raft/issues/2205 the sum kernel has been adapted to account for underflow issues when adding large amounts of values. However, there are several other locations within the code where summations are done naively like stdev/var, and the more general reduction abstraction.

Describe the solution you'd like
I would prefer a more robust implementation (e.g. KahanBabushkaNeumaierSum as in the sum kernel ) to be placed as a special implementation for the add-operator within the general reduction implementation (coalesced/strided). We already have a specialization for add reduction operator in the strided reduction. APIs like sum and stdev should delegate to these abstractions.

Additional context
See https://github.com/rapidsai/raft/issues/2205 for the initial bug report.

Dominant language
Cuda
Stars
1.1k
Forks
260
Avg merge
1d 18h
Merged PRs (30d)
21

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from NVIDIA/raft

All issues in NVIDIA/raft

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.