Skip to content

Commit f46750a

Browse files
xtalaxChrisRackauckas
authored andcommitted
test
1 parent 31002ff commit f46750a

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

test/gpu/Project.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
[deps]
2+
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
23
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
4+
ComponentArrays = "b0b7db55-cfe3-40fc-9ded-d10e2dbeff66"
5+
FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898"
6+
FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"
37
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
8+
RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd"
49

510
[compat]
611
CUDA = "5"

test/gpu/hermite_test.jl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
using ComponentArrays, CUDA, Adapt, RecursiveArrayTools, FastBroadcast, FillArrays, OrdinaryDiffEq, Test
2+
3+
a = ComponentArray((a=rand(Float32, 5,5), b=rand(Float32, 5, 5)))
4+
a = adapt(CuArray, a)
5+
pa = ArrayPartition(a)
6+
pb = deepcopy(pa)
7+
pc = deepcopy(pa)
8+
pd = deepcopy(pa)
9+
pe = deepcopy(pa)
10+
k = [pd, pe]
11+
t = FillArrays.Trues(length(pa))
12+
13+
OrdinaryDiffEq.hermite_interpolant!(pa, 0.1, 0.2, pb, pc, k, nothing, Val{0}, t) # if this doesnt error we're good
14+
15+
@test pa.a != pb.a

test/runtests.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,5 +192,6 @@ end
192192
@time @safetestset "Autoswitch GPU" include("gpu/autoswitch.jl")
193193
@time @safetestset "Linear LSRK GPU" include("gpu/linear_lsrk.jl")
194194
@time @safetestset "Reaction-Diffusion Stiff Solver GPU" include("gpu/reaction_diffusion_stiff.jl")
195+
@time @safetestset "Scalar indexing bug bypass" include("gpu/hermite_test.jl")
195196
end
196197
end # @time

0 commit comments

Comments
 (0)