Some basic svd forward rules and tests#247
Conversation
|
Took another look at this. The Enzyme tests seem to be failing because of finite differences, for |
|
Your PR no longer requires formatting changes. Thank you for your contribution! |
Co-authored-by: Jutho <Jutho@users.noreply.github.com>
|
In the gauge fixing parts, we could use more views for the slicing |
|
Anyway, I will leave this aside now for a while and look at some other PRs. In principle, tests can now be expanded to cover the complex case and |
lkdvos
left a comment
There was a problem hiding this comment.
Left some final small comments, otherwise good to go?
| hUᴴΔAV₁ = inv_safe.(transpose(S₁) .- S₁) .* project_hermitian(UᴴΔAV₁) | ||
| aUᴴΔAV₁ = inv_safe.(transpose(S₁) .+ S₁) .* project_antihermitian(UᴴΔAV₁) |
There was a problem hiding this comment.
I think below only the sum and difference are actually used, we could use a kernel like
MatrixAlgebraKit.jl/src/implementations/polar.jl
Lines 209 to 220 in e271b4a
| end | ||
|
|
||
| function svd_trunc_pushforward!(ΔA, A, USVᴴ, ΔUSVᴴ, ind; rank_atol = default_pullback_rank_atol(A), kwargs...) | ||
| # TODO |
There was a problem hiding this comment.
Probably best to either not define this or explicitly error()?
|
The GPU tests will probably fail until a new version is tagged at GPUArrays (JuliaGPU/GPUArrays.jl#738) |
Definitely not optimized...