-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[AutoDiff] @_alwaysEmitIntoClient registration tests #29129
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] @_alwaysEmitIntoClient registration tests #29129
Conversation
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 tests!
@swift-ci please test tensorflow |
@swift-ci please test tensorflow |
4 similar comments
@swift-ci please test tensorflow |
@swift-ci please test tensorflow |
@swift-ci please test tensorflow |
@swift-ci please test tensorflow |
@@ -0,0 +1,21 @@ | |||
// TODO(TF-1103): Fix this test so that there is not a linker error. Then, move this test to | |||
// cross_module_derivative_attr_e2e.swift. |
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.
I believe that this would belong in the validation tests directory
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.
What tests should go there? We haven't put any autodiff tests there -- we've put them all under tests/
, even ones that build modules like this one.
@swift-ci please test tensorflow macos |
1 similar comment
@swift-ci please test tensorflow macos |
@swift-ci please test tensorflow clean linux |
@swift-ci please clean test tensorflow linux |
@swift-ci please test tensorflow |
@swift-ci please test tensorflow |
1 similar comment
@swift-ci please test tensorflow |
Here are some negative tests demonstrating the problem in TF-1103.
What's happening is:
gradient(at: 0, in: f)
, it finds the differentiability config arising from the@derivative(of: f)
, and creates a corresponding differentiability witness declaration.Some possible fixes are:
DerivativeFunctionConfigurationList
.My initial thought is that the second approach is better because we want the visibility/linkage/etc of the derivative functions to always be as close to the original functions as possible.