Skip to content

Commit d63caf7

Browse files
committed
Tensors tests passing
1 parent 08d000a commit d63caf7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ext/TensorKitCUDAExt/cutensormap.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ function TensorKit.tensormaptype(S::Type{<:IndexSpace}, N₁, N₂, TorA::Type{<
1111
end
1212
end
1313

14+
function TensorKit.TensorMap{T, S, N₁, N₂, <:CuVector{T}}(t::TensorMap{T, S, N₁, N₂, A}) where {T, S, N₁, N₂, A}
15+
return CuTensorMap{T, S, N₁, N₂}(CuArray(t.data), t.space)
16+
end
17+
1418
function CuTensorMap{T}(::UndefInitializer, V::TensorMapSpace{S, N₁, N₂}) where {T, S, N₁, N₂}
1519
return CuTensorMap{T, S, N₁, N₂}(undef, V)
1620
end

0 commit comments

Comments
 (0)