-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
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
Respect pivot strategy (if given) in cholesky
#51245
base: master
Are you sure you want to change the base?
Conversation
@nanosoldier |
The package evaluation job you requested has completed - possible new issues were detected. |
This appears to create an issue with Zygote (with the same error type as in , which seems to be very hard to solve?). I have absolutely no idea what needs to be done here or there to fix this. Reaching out to @willtebbutt @oxinabox for some advice. @nanosoldier |
The package evaluation job you requested has completed - possible new issues were detected. |
@devmotion Do you have an idea how to solve the AD issues this causes? Or who to ask? |
ChainRules-based AD of If I'm not mistaken with this PR, however, it would not be sufficient anymore to catch the two-argument version but one would have to handle both the two- and one-argument version since |
So, for sparse arrays AD of |
Sparse arrays are generally only "sparsely" supported in AD, there are many more things to add than just |
When doing
cholesky(::[Wrapped]SparseMatrixCSC, NoPivot())
the pivoting strategy (the default) was not forwarded to the next call (which used to becholesky!
, but now on master has another layer to allow SparseArrays.jl to redirect to SuiteSparse'scholesky
). Even without the wrapper onA
, the generic method would take over and direct to the generic, highly unperformant in this case, implementation. With the new redirection layer, this does direct to SparseArrays/SuiteSparse, but because the pivot argument was swallowed in the call, the pivoting strategy is no longer respected: SuiteSparse only knows a fill reducing permutation/pivoting strategy.Long story short: for generic code that might handle (wrapped) sparse matrices, we do not want to allow calls like
cholesky(A, NoPivot())
, but onlycholesky(A)
.