Skip to content

Commit e8b3e76

Browse files
committed
Even more fixes
1 parent 8624dd5 commit e8b3e76

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

ext/TensorKitCUDAExt/TensorKitCUDAExt.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
module TensorKitCUDAExt
22

3+
using LinearAlgebra
4+
35
using CUDA
46
using CUDA: @allowscalar
57
using CUDA.CUBLAS # for LinearAlgebra tie-ins
@@ -13,7 +15,6 @@ using TensorKit: SectorDict, tensormaptype, scalar, similarstoragetype
1315
using TensorKit.MatrixAlgebraKit
1416

1517
using Random
16-
using LinearAlgebra
1718

1819
include("cutensormap.jl")
1920

ext/TensorKitCUDAExt/cutensormap.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const CuTensor{T, S, N, A<:CuVector{T}} = CuTensorMap{T, S, N, 0, A}
33

44
function TensorKit.tensormaptype(S::Type{<:IndexSpace}, N₁, N₂, TorA::Type{<:StridedCuArray})
55
if TorA <: CuArray
6-
return TensorMap{eltype(TorA),S,N₁,N₂,TorA}
6+
return TensorMap{eltype(TorA),S,N₁,N₂,CuVector{eltype(TorA)}}
77
else
88
throw(ArgumentError("argument $TorA should specify a scalar type (`<:Number`) or a storage type `<:CuVector{<:Number}`"))
99
end

src/tensors/linalg.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ function _norm(blockiter, p::Real, init::Real)
277277
end
278278
elseif p > 0
279279
nᵖ = mapreduce(+, blockiter; init=init) do (c, b)
280-
return isempty(b) ? init : oftype(init, dim(c) * LinearAlgebra.normp(b, p)^p)
280+
return isempty(b) ? init : oftype(init, dim(c) * norm(b, p)^p)
281281
end
282282
return (nᵖ)^inv(oftype(nᵖ, p))
283283
else

0 commit comments

Comments
 (0)