Skip to content
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

Merged
merged 3 commits into from
Mar 3, 2025

Conversation

stephentoub
Copy link
Member

Fixes #112989
Introduced in #102181

Copy link
Contributor

@Copilot Copilot AI left a 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

@stephentoub stephentoub merged commit 12e0ad6 into dotnet:main Mar 3, 2025
78 of 83 checks passed
@stephentoub stephentoub deleted the fixmae branch March 3, 2025 21:00
@stephentoub
Copy link
Member Author

/backport to release/9.0-staging

@dotnet dotnet deleted a comment from github-actions bot Mar 3, 2025
Copy link
Contributor

github-actions bot commented Mar 3, 2025

Started backporting to release/9.0-staging: https://github.com/dotnet/runtime/actions/runs/13640313235

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

Successfully merging this pull request may close these issues.

TensorPrimitives asymmetry between MultiplyAdd and MultiplyAddEstimate with trivial inputs
2 participants