-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
[AutoDiff upstream] @differentiable function type sema #30648
[AutoDiff upstream] @differentiable function type sema #30648
Conversation
c5ad526
to
e319d45
Compare
@swift-ci please 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.
Nice!
e319d45
to
b1b856b
Compare
@swift-ci please test |
Build failed |
@swift-ci please test |
Build failed |
@swift-ci please test osx |
Build failed |
@swift-ci Please smoke test macOS |
Merging to unblock progress. Smoke tests pass, full tests failed only due to CI outages earlier today. |
Type checking for the
@differentiable
function type:Differentiable
.Differentiable
when they are generic parameters.tensorflow
branch. (There are a few function conversion tests that I haven't imported because they depend on the function conversion pipeline.)Note: I needed to make a small logic change for this to work properly in
master
. In thetensorflow
branch, we assume that theDifferentiable
protocol is always available. In themaster
branch, it is only available if youimport _Differentiation
. So I changed all the places where we assert/segfault when theDifferentiable
protocol is missing to fail gracefully with a diagnostic. And I added a test for this.This resolves TF-823 and TF-1219.