Skip to content

Commit

Permalink
Add unthunk in tsvd!_pullback
Browse files Browse the repository at this point in the history
  • Loading branch information
lkdvos committed Jan 17, 2025
1 parent 4ef17d5 commit 5a48e78
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ext/TensorKitChainRulesCoreExt/factorizations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ function ChainRulesCore.rrule(::typeof(TensorKit.tsvd!), t::AbstractTensorMap;
Ũ, Σ̃, Ṽ⁺ = U, Σ, V⁺
end

function tsvd!_pullback((ΔU, ΔΣ, ΔV⁺, Δϵ))
function tsvd!_pullback(ΔUSVϵ)
ΔU, ΔΣ, ΔV⁺, = unthunk.(ΔUSVϵ)
Δt = similar(t)
for (c, b) in blocks(Δt)
Uc, Σc, V⁺c = block(U, c), block(Σ, c), block(V⁺, c)
Expand Down

0 comments on commit 5a48e78

Please sign in to comment.