We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This issue references the PR #237
We need to decide the size temporary array that is build for a CallExpr. For example, when the below function is differentiated:
CallExpr
void f(double *a, double *out) { g(a, out); }
The grad function is:
f_grad(double *a, double *_d_a, double *out) { double *_t0; double *_t1; _t0 = a; _t1 = out; g(_t0, _t1); { double _grad0[10] = {}; // This is the array in consideration g_grad(_t0, _grad0, _t1); double *_r0 = _grad0; _d_a = _r0; double *_r1; } }
The required size of _grad0 cannot be calculated before differentiating the g function so we need to decide between:
The text was updated successfully, but these errors were encountered:
This was fixed at some point. The gradient generated on the current master is:
void f_grad(double *a, double *out, clad::array_ref<double> _d_a, clad::array_ref<double> _d_out) { g(a, out); g_pullback(a, out, _d_a, _d_out); }
We don't create _grad/_r variables for pointer arguments anymore. If somebody believes this is not the case, please reopen the issue.
_grad
_r
Sorry, something went wrong.
PetroZarytskyi
No branches or pull requests
This issue references the PR #237
We need to decide the size temporary array that is build for a
CallExpr
. For example, when the below function is differentiated:The grad function is:
The required size of _grad0 cannot be calculated before differentiating the g function so we need to decide between:
The text was updated successfully, but these errors were encountered: