-
Notifications
You must be signed in to change notification settings - Fork 10.5k
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
Conversation
@swift-ci please test tensorflow |
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.
Great!
@@ -257,6 +257,34 @@ extension Tracked where T : Differentiable & FloatingPoint, T == T.TangentVector | |||
} | |||
} | |||
|
|||
extension Tracked : VectorProtocol where T : SignedNumeric, T == T.Magnitude { |
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 test is using this conformance? VectorProtocol is not directly related to AD and cannot be upstreamed to master.
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.
Some AutoDiff
tests reference VectorProtocol
but I think all such references can be 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.
Let’s do that then.
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.
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.
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.
You can try changing whatever requires VectorProtocol to require AdditiveArithmetic instead.
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.
Removed VectorProtocol here: #27734
Once that gets submitted, I will pull in the relevant changes.
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 reverted the changes to DifferentiationUnittest.swift
@swift-ci please test tensorflow |
1 similar comment
@swift-ci please test tensorflow |
First of the several PRs that will enable leak checking for the AD tests.
https://bugs.swift.org/browse/TF-895