Skip to content

Commit

Permalink
fix call to copy on tuple of inds
Browse files Browse the repository at this point in the history
  • Loading branch information
mofeing committed Dec 26, 2024
1 parent 01c6b52 commit cf1e00f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext/TenetReactantExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function Reactant.make_tracer(
seen, @nospecialize(prev::RT), path::Tuple, mode::Reactant.TraceMode; kwargs...
) where {RT<:Tensor}
tracedata = Reactant.make_tracer(seen, parent(prev), Reactant.append_path(path, :data), mode; kwargs...)
return Tensor(tracedata, copy(inds(prev)))
return Tensor(tracedata, inds(prev))
end

function Reactant.make_tracer(seen, prev::TensorNetwork, path::Tuple, mode::Reactant.TraceMode; kwargs...)
Expand Down Expand Up @@ -51,7 +51,7 @@ end

function Reactant.create_result(@nospecialize(tocopy::Tensor), @nospecialize(path), result_stores)
data = Reactant.create_result(parent(tocopy), Reactant.append_path(path, :data), result_stores)
return :($Tensor($data, $(copy(inds(tocopy)))))
return :($Tensor($data, $(inds(tocopy))))
end

function Reactant.create_result(tocopy::TensorNetwork, @nospecialize(path), result_stores)
Expand Down

0 comments on commit cf1e00f

Please sign in to comment.