-
Notifications
You must be signed in to change notification settings - Fork 68
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
Error with Duplicated{<:Cholesky}
#1250
Comments
As an additional comment: The issues with Enzyme.jl/src/internal_rules.jl Line 805 in 14153e4
Enzyme.jl/src/internal_rules.jl Line 812 in 14153e4
Duplicated{<:Cholesky} . A Duplicated with a second argument that is not even a correct instance (it can only be constructed using special constructors in LinearAlgebra) seems off. Maybe it should just not be supported? In this case, however, I think it would be good to directly throw an error when trying to construct a Duplicated{<:Cholesky} .
|
A duplicated variable is reasonable, but doesn't necessarily correspond to a cholesky decomposition. For an arbitrary data structure (including cholesky), the shadow of an element (aka the corresponding element of the duplicated), represents the current partial derivative of the objective with respect to that element. If you view the data structure as just a list of numbers, it's just the partial wrt that number. |
The const issue should be a relatively simple fix. Basically if it is constant you should set dfacts to ntuple(width,nothing) and then in the update of dfact in the for loop, add an if statement checking if fact is not constant Would you like to try adding that fix? |
@devmotion I fixed the const issue here: #1251 . Possibly also fixed the non-square part? In any case can you investigate and mark resolved and/or split remaining issues into distinct GH issues. |
Const{<:Cholesky}
, Duplicated{<:Cholesky}
, and non-square matricesDuplicated{<:Cholesky}
The type issue should also be fixed by #1256 @devmotion for the future, can you separate all such things into separate issues? |
When running the tests in TuringLang/Turing.jl#1887 with Enzyme#main I noticed a few problems with the
Cholesky
support added in #1220:Error with
Duplicated{<:Cholesky}
It seems
Cholesky
is only supported inside of a differentiated function. Continuing with the example:Error with
Const{<:Cholesky}
Edit: Fixed by #1251
Error with non-square matrices
Edit: Fixed by #1251
Based on the only working example above (
g2
):The text was updated successfully, but these errors were encountered: