Skip to content

Commit

Permalink
Try remove ambiguity on contract with TracedRArray
Browse files Browse the repository at this point in the history
  • Loading branch information
mofeing committed Oct 29, 2024
1 parent ba15e5e commit 5a430a6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ext/TenetReactantExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ end
end

function Tenet.contract(
a::Tensor{Ta,Na,Aa}, b::Tensor{Tb,Nb,Ab}; dims=((inds(a), inds(b))), out=nothing
) where {Ta,Na,Aa<:TracedRArray,Tb,Nb,Ab<:TracedRArray}
a::Tensor{Ta,Na,TracedRArray{Ta,Na}}, b::Tensor{Tb,Nb,TracedRArray{Tb,Nb}}; dims=((inds(a), inds(b))), out=nothing
) where {Ta,Na,Tb,Nb}
ia = collect(inds(a))
ib = collect(inds(b))
i = (dims, ia, ib)
Expand Down Expand Up @@ -159,7 +159,7 @@ function Tenet.contract(
return _res
end

function Tenet.contract(a::Tensor{T,N,A}; dims=nonunique(inds(a)), out=nothing) where {T,N,A<:TracedRArray}
function Tenet.contract(a::Tensor{T,N,TracedRArray{T,N}}; dims=nonunique(inds(a)), out=nothing) where {T,N}
ia = inds(a)
i = (dims, ia)

Expand Down

0 comments on commit 5a430a6

Please sign in to comment.