Skip to content

Add suppport for different datatype in stats::mean#3056

Open
lowener wants to merge 2 commits into
NVIDIA:mainfrom
lowener:fea-mean-dtype
Open

Add suppport for different datatype in stats::mean#3056
lowener wants to merge 2 commits into
NVIDIA:mainfrom
lowener:fea-mean-dtype

Conversation

@lowener

@lowener lowener commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

This PR enables the support of two different data types for stats::mean. It will be used in NVIDIA/cuvs#2250
Add support for half in strided dataset. Enabled thanks to this PR: #1585

Closes #2625

Signed-off-by: Mickael Ide <mide@nvidia.com>
@lowener lowener requested a review from a team as a code owner June 23, 2026 20:25
@lowener lowener added enhancement New feature or request 3 - Ready for Review non-breaking Non-breaking change cpp labels Jun 23, 2026
@lowener lowener added the improvement Improvement / enhancement to an existing function label Jun 23, 2026
@aamijar aamijar requested a review from a team as a code owner June 27, 2026 04:10

@aamijar aamijar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @lowener, it looks good to me. From my understanding the main change is in the reduction function where we do the cast when reading the data, then do the add and divide ops.

So is the main purpose to calculate the mean in higher precision to avoid floating point errors?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3 - Ready for Review cpp enhancement New feature or request improvement Improvement / enhancement to an existing function non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEA] Support fp16 input type in stats::mean()

2 participants