Skip to content

[AutoDiff] Improve getConstrainedDerivativeGenericSignature helper. #29620

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 1 commit into from
Feb 4, 2020

Conversation

dan-zheng
Copy link
Contributor

Move getConstrainedDerivativeGenericSignature under autodiff namespace.
Improve naming and documentation.

Move `getConstrainedDerivativeGenericSignature` under `autodiff` namespace.
Improve naming and documentation.
@dan-zheng
Copy link
Contributor Author

@swift-ci Please smoke test

/// - Differentiability parameter indices.
/// - A possibly "unconstrained" derivative generic signature.
GenericSignature
getConstrainedDerivativeGenericSignature(SILFunctionType *originalFnTy,
Copy link
Contributor

Choose a reason for hiding this comment

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

Why isn't there a version for ASTFunctionType?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good question - I guess an AnyFunctionType version hasn't been necessary for correctness.

I'm pretty sure the SILFunctionType version is necessary in the differentiation transform. So I don't believe an AnyFunctionType version can replace the SILFunctionType version.

@dan-zheng dan-zheng merged commit 0c0018f into swiftlang:master Feb 4, 2020
@dan-zheng dan-zheng deleted the autodiff-upstream branch February 4, 2020 01:40
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