Skip to content

Commit 4726163

Browse files
committed
A little cleanup
1 parent 579403a commit 4726163

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

ext/MatrixAlgebraKitEnzymeExt/MatrixAlgebraKitEnzymeExt.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,10 @@ for f in (:svd_compact!, :svd_full!)
274274
alg::Const{<:MatrixAlgebraKit.AbstractAlgorithm},
275275
) where {RT, TA}
276276
$f(A.val, USVᴴ.val, alg.val)
277-
!isa(A, Const) && !isa(USVᴴ, Const) && svd_pushforward!(A.dval, A.val, USVᴴ.val, USVᴴ.dval)
278-
make_zero!(A.dval)
277+
if !isa(A, Const)
278+
!isa(USVᴴ, Const) && svd_pushforward!(A.dval, A.val, USVᴴ.val, USVᴴ.dval)
279+
make_zero!(A.dval)
280+
end
279281
if EnzymeRules.needs_primal(config) && EnzymeRules.needs_shadow(config)
280282
return USVᴴ
281283
elseif EnzymeRules.needs_primal(config)

0 commit comments

Comments
 (0)