Skip to content

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

Merged
merged 1 commit into from
Feb 8, 2020

Conversation

compnerd
Copy link
Member

@compnerd compnerd commented Feb 7, 2020

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.

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves SR-NNNN.

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.
@compnerd
Copy link
Member Author

compnerd commented Feb 7, 2020

CC: @dan-zheng @marcrasi @rxwei

@compnerd
Copy link
Member Author

compnerd commented Feb 7, 2020

@swift-ci please smoke test

Copy link
Contributor

@rxwei rxwei left a 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* } {
Copy link
Contributor

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?

Copy link
Member Author

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).

Copy link
Contributor

@dan-zheng dan-zheng left a 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.

@compnerd compnerd merged commit 4eaa520 into swiftlang:master Feb 8, 2020
@compnerd compnerd deleted the tensorflow-testing branch February 8, 2020 01:39
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