You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reverse AD implementation of mac(A,b,c) requires the transpose of A. (Surprisingly), computing the transpose of A can require a significant number of operations and there is no need to perform these when A is constant since the transpose can be performed off-line. I will propose an implementation that performs these computations off-line.
Note that the overhead for computing the transpose of A (in my not so rigorous benchmark) is in the same order of mtimes() while the transpose of A should be O(nnz) ~= O(n^2) and mtimes ~ O(n^3). Chances are that the memory allocation required by the transpose is much more expensive.
The text was updated successfully, but these errors were encountered:
Mathadon
added a commit
to Mathadon/casadi
that referenced
this issue
Aug 6, 2020
The reverse AD implementation of
mac(A,b,c)
requires the transpose of A. (Surprisingly), computing the transpose of A can require a significant number of operations and there is no need to perform these when A is constant since the transpose can be performed off-line. I will propose an implementation that performs these computations off-line.Note that the overhead for computing the transpose of A (in my not so rigorous benchmark) is in the same order of mtimes() while the transpose of A should be O(nnz) ~= O(n^2) and
mtimes
~ O(n^3). Chances are that the memory allocation required by the transpose is much more expensive.The text was updated successfully, but these errors were encountered: