From 19a54fef805f3faf1ebd469850f019f65b3c0b1b Mon Sep 17 00:00:00 2001 From: Sharan Yalburgi Date: Mon, 6 Nov 2023 01:33:04 +0530 Subject: [PATCH] Remove unneeded deepcopy --- ext/LinearSolveEnzymeExt.jl | 1 - 1 file changed, 1 deletion(-) diff --git a/ext/LinearSolveEnzymeExt.jl b/ext/LinearSolveEnzymeExt.jl index 6194d6230..0196886de 100644 --- a/ext/LinearSolveEnzymeExt.jl +++ b/ext/LinearSolveEnzymeExt.jl @@ -28,7 +28,6 @@ end function EnzymeCore.EnzymeRules.forward(func::Const{typeof(LinearSolve.solve!)}, ::Type{RT}, linsolve::EnzymeCore.Annotation{LP}; kwargs...) where {RT, LP <: LinearSolve.LinearCache} @assert !(linsolve isa Const) - linsolve = deepcopy(linsolve) #mutates after function is applied res = func.val(linsolve.val; kwargs...) if RT <: Const