-
Notifications
You must be signed in to change notification settings - Fork 10.5k
test: loosen the differentiability witness test #29711
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
Conversation
There is currently a difference between the tensorflow branch and the master branch. On tensorflow, the differentiability support is merged into the standard library. This changes the decoration of the witness. Loosen the test to accept either. We should change the tensorflow branch to generate the `_Differentiation` module with the support and then auto-import the module in the longer term. This can be gated by the `-enable-experimental-autodifferentiation` flag to the driver to gain the same behaviour on both the branches.
@swift-ci please smoke 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.
Thanks Saleem!
@@ -161,7 +161,7 @@ sil_differentiability_witness hidden [parameters 0 1] [results 0] <τ_0_0 where | |||
// ROUNDTRIP: vjp: @AD__generic__vjp_src_0_wrt_0_1 : $@convention(thin) <τ_0_0 where τ_0_0 : Differentiable> (@in_guaranteed τ_0_0, Float) -> (@out τ_0_0, @owned @callee_guaranteed (@in_guaranteed τ_0_0.TangentVector) -> (@out τ_0_0.TangentVector, Float)) | |||
// ROUNDTRIP: } | |||
|
|||
// IRGEN-LABEL: @AD__generic_PSSRS16_Differentiation14DifferentiableRzl = hidden global { i8*, i8* } { | |||
// IRGEN: @AD__generic_PSSRS{{16_Differentiation|s}}14DifferentiableRzl = hidden global { i8*, i8* } { |
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.
Is there a reason why -LABEL
was removed?
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 was running into a matching issue (I expect the regular expression was throwing it off).
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.
Thanks! I agree that making the _Differentiation
module be consistent on master
and tensorflow
is a robust fix for the issue.
There is currently a difference between the tensorflow branch and the
master branch. On tensorflow, the differentiability support is merged
into the standard library. This changes the decoration of the witness.
Loosen the test to accept either.
We should change the tensorflow branch to generate the
_Differentiation
module with the support and then auto-import themodule in the longer term. This can be gated by the
-enable-experimental-autodifferentiation
flag to the driver to gainthe same behaviour on both the branches.
Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.
Resolves SR-NNNN.