-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Open
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.
Description
Previous ID | SR-13464 |
Radar | None |
Original Reporter | aefr (JIRA User) |
Type | Bug |
Additional Detail from JIRA
Votes | 0 |
Component/s | |
Labels | Bug |
Assignee | None |
Priority | Medium |
md5: 949a4cdb1f01d953b1483cc144f97c69
Issue Description:
Classes currently don't work with forward-mode AD, since some class-related SIL instructions (e.g. `ref_element_addr`) are not handled in `JVPCloner`. This causes crashes in some cases, e.g.
import _Differentiation
final class Class: Differentiable {
var x: Float = 0
struct TangentVector: Differentiable, AdditiveArithmetic {
var x: Float
}
func move(along direction: TangentVector) {}
}
@differentiable
func testClass(_ c: Class) -> Float {
var tmp = c
return tmp.x // tmp.x is not visited
}
Metadata
Metadata
Assignees
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.