Repository navigation
Conversation
zcbenz
marked this pull request as ready for review
October 29, 2026 04:54
zcbenz
reviewed
Oct 29, 2026
zcbenz
left a comment
Member
There was a problem hiding this comment.
Thanks for looking into this, but I think we should not turn this on by default for CUDA because of the performance hit, which would match the default behavior of PyTorch:
https://docs.pytorch.org/docs/2.15/notes/numerical_accuracy.html#reduced-precision-reduction-for-fp16-and-bf16-gemms
If there are actual requests for float32 precision for reduction, we can consider adding a new option for it.
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.
A regression test added for the Metal addmm fix (#4769) found an existing CUDA error.
Some cuBLAS split-K algorithms store intermediate results in FP16. This can cause rounding errors or overflow before the final result is calculated.
The error was found on x86_64 with a Tesla T4. The cause is CUDA algorithm selection, not the CPU architecture. Apple Silicon uses Metal and does not use this code. Other NVIDIA GPUs can select different algorithms.
This change:
Tested and validated on T4/CUDA 13.
Full CUDA 12 builds and tests are not complete. Other NVIDIA GPU architectures still need tests.
Focused benchmarks show roughly a 5–6% increase in execution time for one FP16 matrix shape.