Skip to content

[AutoDiff] Clean up derivative type calculation. #31755

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

Conversation

dan-zheng
Copy link
Contributor

Remove all assertions from AnyFunctionType::getAutoDiffDerivativeFunctionLinearMapType.
All error cases are represented by DerivativeFunctionTypeError now.

Fix DerivativeFunctionTypeError error payloads and improve error case naming.

Unify @differentiable attribute type-checking using AnyFunctionType::getAutoDiffDerivativeFunctionLinearMapType.

Delete checkDifferentiabilityParameters helper, which is subsumed.
Update tests with minor diagnostic changes.


This PR is a net code deletion!

dan-zheng added 2 commits May 12, 2020 13:39
Remove all assertions from `AnyFunctionType::getAutoDiffDerivativeFunctionLinearMapType`.
All error cases are represented by `DerivativeFunctionTypeError` now.

Fix `DerivativeFunctionTypeError` error payloads and improve error case naming.
Unify type-checking using `AnyFunctionType::getAutoDiffDerivativeFunctionLinearMapType`.
Delete `checkDifferentiabilityParameters` helper, which is subsumed.
Update tests with minor diagnostic changes.
@dan-zheng dan-zheng requested review from rxwei and marcrasi May 13, 2020 06:57
@dan-zheng
Copy link
Contributor Author

@swift-ci Please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - c9bbc14

@dan-zheng
Copy link
Contributor Author

macOS CI failed regarding <objc/runtime.h>:

/Users/buildnode/jenkins/workspace/swift-PR-osx/branch-master/swift/include/swift/ABI/Metadata.h:44:10: fatal error: cannot open file '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.4.sdk/usr/include/objc/runtime.h': Operation not permitted
00:10:39 #include <objc/runtime.h>
00:10:39          ^
00:10:39 1 error generated.

@swift-ci Please clean test macOS

@dan-zheng dan-zheng merged commit 2e3994e into swiftlang:master May 13, 2020
@dan-zheng dan-zheng deleted the revamp-derivative-type-calculation branch May 13, 2020 14:50
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