-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Fix TensorPrimitives.MultiplyAddEstimate for integers #113047
Conversation
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.
PR Overview
This PR fixes the MultiplyAddEstimate implementation for integer types by updating both the test cases and the low‐level implementation details.
- Updated tests to use T.MultiplyAddEstimate instead of T.FusedMultiplyAdd.
- Added a new suite of tests for Span, Span, Span destination scenarios.
- Adjusted type checks in the MultiplyAddEstimate implementation to better differentiate float handling.
Reviewed Changes
File | Description |
---|---|
src/libraries/System.Numerics.Tensors/tests/TensorPrimitives.Generic.cs | Updates tests to correctly use MultiplyAddEstimate and adds additional span destination tests |
src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorPrimitives.MultiplyAddEstimate.cs | Refines type-check conditions for vectorized operations |
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
Tip: If you use Visual Studio Code, you can request a review from Copilot before you push from the "Source Control" tab. Learn more
src/libraries/System.Numerics.Tensors/tests/TensorPrimitives.Generic.cs
Outdated
Show resolved
Hide resolved
...Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorPrimitives.MultiplyAddEstimate.cs
Outdated
Show resolved
Hide resolved
...Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorPrimitives.MultiplyAddEstimate.cs
Outdated
Show resolved
Hide resolved
...Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorPrimitives.MultiplyAddEstimate.cs
Outdated
Show resolved
Hide resolved
...Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorPrimitives.MultiplyAddEstimate.cs
Outdated
Show resolved
Hide resolved
/backport to release/9.0-staging |
Started backporting to release/9.0-staging: https://github.com/dotnet/runtime/actions/runs/13640313235 |
Fixes #112989
Introduced in #102181