Skip to content

tests: Avoid floating point precision false positives in SUM#17471

Merged
jeffbolznv merged 2 commits intoggml-org:masterfrom
jeffbolznv:sum_false_positives
Dec 20, 2025
Merged

tests: Avoid floating point precision false positives in SUM#17471
jeffbolznv merged 2 commits intoggml-org:masterfrom
jeffbolznv:sum_false_positives

Conversation

@jeffbolznv
Copy link
Copy Markdown
Contributor

See #17413 (comment)

This was easily reproducible with both Vulkan and CUDA backends by running the tests in a loop, and is a floating point precision issue. With catastrophic cancellation I could even see some very large errors like:

[SUM] NMSE = 0.000918274 > 0.000000100     0 -0.000063 -0.000061, diff = -0.000002

Changing the input distribution to not be centered around zero seems to workaround the issue.

@jeffbolznv jeffbolznv requested a review from slaren as a code owner November 24, 2025 14:40
@github-actions github-actions Bot added the testing Everything test related label Nov 24, 2025
@jeffbolznv
Copy link
Copy Markdown
Contributor Author

I saw a CI job where the same kind of failure manifested for MEAN, so I've applied the same change there.

@jeffbolznv jeffbolznv merged commit 52ab19d into ggml-org:master Dec 20, 2025
70 of 71 checks passed
Anico2 added a commit to Anico2/llama.cpp that referenced this pull request Jan 15, 2026
…g#17471)

* tests: Avoid floating point precision false positives in SUM

* also apply to test_mean
blime4 referenced this pull request in blime4/llama.cpp Feb 5, 2026
* tests: Avoid floating point precision false positives in SUM

* also apply to test_mean
Seunghhon pushed a commit to Seunghhon/llama.cpp that referenced this pull request Apr 26, 2026
…g#17471)

* tests: Avoid floating point precision false positives in SUM

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

Labels

testing Everything test related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants