-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Sema] Differentiable
conformance derivation for class types.
#25914
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
[Sema] Differentiable
conformance derivation for class types.
#25914
Conversation
`Differentiable` derived conformances now supports class types. Synthesis works just like for struct types. Class differentiation support requires further differentiation transform changes. Resolves TF-630.
939b132
to
bf45e85
Compare
@@ -0,0 +1,570 @@ | |||
// SWIFT_ENABLE_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.
These tests are not the best, I directly copied test/Sema/struct_differentiable.swift
.
Todo: clean up and tighten tests. Fuzzing would be cool.
@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.
Could you add a test that guarantees that TangentVector
will never be derived to be Self
for classes, even if Self
conforms to AdditiveArithmetic
?
I actually didn't implement that logic, will do so now. |
Fix validation-test/ParseableInterface/verify_all_overlays.py. Address review comments.
@swift-ci Please test tensorflow |
Differentiable
derived conformances now supports class types.Synthesis works just like for struct types.
Class differentiation support requires further differentiation transform changes.
Resolves TF-630.
Next steps:
ref_element_addr
in differentiation transform).tensorflow-swift-apis
usingDifferentiable
-conforming class types.