Skip to content

[AutoDiff upstream] define autodiff builtins #30624

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
Mar 25, 2020

Conversation

marcrasi
Copy link

Defines type signatures and SILGen for the following builtins:

/// Applies the {jvp|vjp} of `f` to `arg1`, ..., `argN`.
func applyDerivative_arityN_{jvp|vjp}(f, arg1, ..., argN) -> jvp/vjp return type

/// Applies the transpose of `f` to `arg`.
func applyTranspose_arityN(f, arg) -> transpose return type

/// Makes a differentiable function from the given `original`, `jvp`, and `vjp` functions.
func differentiableFunction_arityN(original, jvp, vjp)

/// Makes a linear function from the given `original` and `transpose` functions.
func linearFunction_arityN(original, transpose)

Includes a SILGen filecheck test for all of these.

@marcrasi
Copy link
Author

@swift-ci please smoke test

@dan-zheng
Copy link
Contributor

Merging to unblock progress.

@dan-zheng dan-zheng merged commit 025cb9a into master Mar 25, 2020
@dan-zheng dan-zheng deleted the marcrasi-autodiff-builtins branch March 25, 2020 09:36
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.

4 participants