Skip to content

Commit 6b8b7cb

Browse files
kshyattleburgel
andauthored
Update ext/TensorKitGPUArraysExt.jl
Co-authored-by: Lander Burgelman <39218680+leburgel@users.noreply.github.com>
1 parent 3e2e2bb commit 6b8b7cb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎ext/TensorKitGPUArraysExt.jl‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,7 @@ function TensorKit._nrm2!(out::AnyGPUVector, x::AnyGPUArray)
663663
out .= sqrt.(vec(sum(abs2, x; dims = ntuple(identity, ndims(x)))))
664664
return out
665665
end
666-
TensorKit._nrm2!(out::AnyGPUVector, x::LinearAlgebra.Diagonal) = TensorKit._nrm2!(out, x.diag)
666+
TensorKit._nrm2!(out::AnyGPUVector, x::LinearAlgebra.Diagonal{<:Any, <:AnyGPUVector}) = TensorKit._nrm2!(out, x.diag)
667667

668668
function _device_norm2(t::Union{GPUTensorMap, GPUDiagonalTensorMap})
669669
InnerProductStyle(t) === EuclideanInnerProduct() || TensorKit.throw_invalid_innerproduct(:norm)

0 commit comments

Comments
 (0)