Open philipturner opened 2 years ago
Fix submitted as https://github.com/apple/swift/pull/58437
This behavior is still present on top-of-tree Swift, and we need to investigate this further, so reopening to look into it.
Issue still exists in 05/24 toolchain.
Additional Detail from JIRA
| | | |------------------|-----------------| |Votes | 0 | |Component/s | | |Labels | Bug | |Assignee | None | |Priority | Medium | md5: 7bdb8a5d99f3bfcb51ba371fd5018a93Issue Description:
Automatic differentiation gives incorrect results when differentiating a mutating function. It swizzles the components of the gradient. This function returns the following for derivatives:
Number being modified (x = 10): 1
Any parameters (y = 2, z = 3, w = 4): themselves, in order