[SR-15793] [AutoDiff] Incorrect behavior with derivatives #58070
Labels
AutoDiff
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler itself
declarations
Feature: declarations
func
Feature → declarations: Functions
methods
Feature → functions: methods (member functions)
mutating
Feature → declarations → functions: Mutating functions
swift 5.9
unexpected behavior
Bug: Unexpected behavior or incorrect output
Additional Detail from JIRA
md5: 7bdb8a5d99f3bfcb51ba371fd5018a93
Issue 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
The text was updated successfully, but these errors were encountered: