Skip to content
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

[SR-9581] [AutoDiff] Re-enable differentiation for FloatingPoint.addingProduct(_:_:) #52028

Closed
dan-zheng opened this issue Dec 28, 2018 · 2 comments
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. swift for tensorflow

Comments

@dan-zheng
Copy link
Collaborator

Previous ID SR-9581
Radar None
Original Reporter @dan-zheng
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Swift for TensorFlow
Labels Bug
Assignee @dan-zheng
Priority Medium

md5: 96ff0041dd1ac7e33fec00595e52df72

Issue Description:

The @differentiable attribute has been temporarily removed from FloatingPoint.addingProduct(:🙂 in #21554

This is because the attribute requires differentiation with respect to self, but FloatingPoint does not yet conform to Differentiable:

public protocol FloatingPoint : ... {
  @differentiable(wrt: (self, .0, .1), adjoint: _adjointAddingProduct)
  public func addingProduct(_ lhs: Self, _ rhs: Self) -> Self {
    ...
  }
}

@marcrasi attempted to conform FloatingPoint to Differentiable but ran into stdlib compilation failures described here.

Differentiation should be re-enabled for FloatingPoint.addingProduct(:🙂 when possible (after we can conform FloatingPoint to Differentiable). Note that the @differentiable(wrt: ...) parameter indices syntax may change after SR-9488 is resolved.

@rxwei
Copy link
Member

rxwei commented Jan 28, 2019

This problem should be gone. @dan-zheng verify?

@dan-zheng
Copy link
Collaborator Author

Verified to be fixed in 134500f#diff-7f717cf2f9c6e538e3ef563625ea6dc4R1849.
The problem is defined away by where clause support in @differentiable attribute.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. swift for tensorflow
Projects
None yet
Development

No branches or pull requests

2 participants