Skip to content

Rewrite some of the AD tests with Tracked<Float> #27733

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 9 commits into from
Oct 17, 2019

Conversation

bgogul
Copy link
Contributor

@bgogul bgogul commented Oct 16, 2019

First of the several PRs that will enable leak checking for the AD tests.

https://bugs.swift.org/browse/TF-895

@bgogul
Copy link
Contributor Author

bgogul commented Oct 16, 2019

@swift-ci please test tensorflow

@bgogul bgogul requested a review from rxwei October 16, 2019 21:39
@bgogul bgogul assigned bgogul and unassigned bgogul Oct 16, 2019
@bgogul bgogul requested a review from dan-zheng October 16, 2019 21:40
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.

Great!

@@ -257,6 +257,34 @@ extension Tracked where T : Differentiable & FloatingPoint, T == T.TangentVector
}
}

extension Tracked : VectorProtocol where T : SignedNumeric, T == T.Magnitude {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What test is using this conformance? VectorProtocol is not directly related to AD and cannot be upstreamed to master.

Copy link
Contributor

@dan-zheng dan-zheng Oct 16, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some AutoDiff tests reference VectorProtocol but I think all such references can be removed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let’s do that then.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was needed for the protocol_requirement_autodiff.swift test. If we don't need VectorProtocol, I will go ahead and clean that up as well.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can try changing whatever requires VectorProtocol to require AdditiveArithmetic instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed VectorProtocol here: #27734

Once that gets submitted, I will pull in the relevant changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reverted the changes to DifferentiationUnittest.swift

@bgogul
Copy link
Contributor Author

bgogul commented Oct 16, 2019

@swift-ci please test tensorflow

1 similar comment
@rxwei
Copy link
Contributor

rxwei commented Oct 17, 2019

@swift-ci please test tensorflow

@rxwei rxwei merged commit b575448 into swiftlang:tensorflow Oct 17, 2019
@bgogul bgogul deleted the ad_tracked_tests branch October 17, 2019 06:08
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