Skip to content

Commit 6a34ef8

Browse files
test: test that MTKParameters can be made isbits for GPU support
1 parent 5a9700d commit 6a34ef8

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/mtkparameters.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,3 +429,13 @@ end
429429
grad = ForwardDiff.gradient(Base.Fix2(loss, (setter, prob)), [3.0])
430430
@test grad [0.14882627068752538] atol=1e-10
431431
end
432+
433+
@testset "MTKParameters can be made `isbits`" begin
434+
@variables x(t)
435+
@parameters p
436+
@named sys = System(D(x) ~ x * p, t)
437+
sys = complete(sys)
438+
prob = ODEProblem(sys, SA[x => 1.0, p => 1.0], (0.0, 1.0))
439+
@test isbits(prob.p)
440+
@test isbits(prob.f.initialization_data.initializeprob.p)
441+
end

0 commit comments

Comments
 (0)