-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[AutoDiff] [stdlib] Fix a bug in _jvpMultiply
in SIMDDifferentiation.swift.gyb
#32963
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
Conversation
cc @dan-zheng |
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.
Nice catch!
@swift-ci Please smoke test |
@@ -176,7 +176,7 @@ where | |||
) | |||
{ | |||
return (lhs * rhs, { ltan, rtan in | |||
return lhs * ltan + rtan * rhs | |||
return lhs * rtan + ltan * rhs |
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.
Do differentiation tests need to be updated too? If not, could you please add a test checking this change?
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.
This wasn’t caught by the tests (it seems tests only contain multiplication by a scalar, which was correct). Will add a new test
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.
Fixed the multiplication test (the old one did not catch the bug because it had lhs == rhs
and ltan == rtan
).
@swift-ci Please smoke test |
@swift-ci Please smoke test |
A recently merged PR (#32854) had a bug in it, fixing here.