PetroZarytskyi
PetroZarytskyi
The problem this PR attempts to fix is described in #659 (which in turn caused #681). Also, this PR introduces placeholders to ``DelayedGlobalStoreAndRef`` to rewrite expressions after they are added...
Currently, if a pointer argument is passed to a function and the pointee value is changed, Clad doesn't support restoring it in the reverse sweep. The first step to address...
This is the code I differentiated: ``` double g(double* i) { i[0]++; return 1; } double func(double* i, double j) { j = g(i); return 0; } ``` And this...
This issue is going to arise after landing #655. Reusing the same declarations for the reverse pass as the ones used in the forward pass does not cause any errors...
In ``ReverseModeVisitor::DifferentiateSingleStmt``, we end the reverse pass block and then reverse it: ``` CompoundStmt* RCS = endBlock(direction::reverse); std::reverse(RCS->body_begin(), RCS->body_end()); ``` The problem is that ``endBlock`` itself reverses the order of...
This PR removes adjoints for integral types in the reverse mode. This is done because integers are not differentiable in the traditional mathematical sense. Such behavior is consistent with other...
To know all possible L-values of the LHS of an assignment operation in the reverse mode, we call ``utils::GetInnermostReturnExpr``. We use it to know the variables that we should store...
Currently, the numerical diff generated inside gradients is unable to handle different type arguments. As an example, let's differentiate a call to "double ff(double, unsigned int);": ``` x = ff(a,...
When differentiating ``void fn(double* &x)`` we used to get a pullback ``void fn_pullback(double* &x, double** _d_x)``, which causes crashes because in all other places ``_d_x`` is expected to be of...
The purpose of this PR is to make ``GlobalStoreAndRef`` work more consistently inside and outside of loops. The issue is well described in #431. The solution proposed in this PR...