Skip to content

Commit e812893

Browse files
Update gpu.jl
1 parent b34fd8f commit e812893

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

test/gpu.jl

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
1-
using RecursiveArrayTools, CuArrays
1+
using RecursiveArrayTools, Adapt, CuArrays, Test
22
a = ArrayPartition(([1.0f0] |> cu, [2.0f0] |> cu, [3.0f0] |> cu))
33
b = ArrayPartition(([0.0f0] |> cu, [0.0f0] |> cu, [0.0f0] |> cu))
44
@. a + b
5+
6+
a = VectorOfArray([ones(2) for i in 1:3])
7+
_a = Adapt.adapt(CuArray,a)
8+
@test _a isa VectorOfArray
9+
@test _a.u isa Vector{<:CuArray}
10+
11+
b = DiffEqArray([ones(2) for i in 1:3],ones(2))
12+
_b = Adapt.adapt(CuArray,b)
13+
@test _b isa DiffEqArray
14+
@test _b.u isa Vector{<:CuArray}
15+
@test _b.t isa CuArray

0 commit comments

Comments
 (0)