Skip to content

[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

Merged
merged 5 commits into from
Jul 23, 2020

Conversation

efremale
Copy link
Contributor

A recently merged PR (#32854) had a bug in it, fixing here.

@efremale
Copy link
Contributor Author

cc @dan-zheng

Copy link
Contributor

@dan-zheng dan-zheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

@dan-zheng
Copy link
Contributor

@swift-ci Please smoke test

@dan-zheng dan-zheng requested a review from rxwei July 17, 2020 23:37
@@ -176,7 +176,7 @@ where
)
{
return (lhs * rhs, { ltan, rtan in
return lhs * ltan + rtan * rhs
return lhs * rtan + ltan * rhs
Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Contributor Author

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).

@dan-zheng
Copy link
Contributor

@swift-ci Please smoke test

@dan-zheng
Copy link
Contributor

@swift-ci Please smoke test

@dan-zheng dan-zheng merged commit 17eafaf into swiftlang:master Jul 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants