Skip to content

Commit ae015fc

Browse files
committed
relax type test
1 parent 846c77d commit ae015fc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/gpu_all.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using LinearAlgebra, OrdinaryDiffEq, Test, PreallocationTools, CUDA, ForwardDiff
1+
using LinearAlgebra, OrdinaryDiffEq, Test, PreallocationTools, CUDA, ForwardDiff, ArrayInterface
22

33
#Dispatch tests
44
chunk_size = 5
@@ -10,7 +10,7 @@ tmp_du_CUA = get_tmp(cache_CU, u0_CU)
1010
tmp_dual_du_CUA = get_tmp(cache_CU, dual_CU)
1111
tmp_du_CUN = get_tmp(cache_CU, 0.0)
1212
tmp_dual_du_CUN = get_tmp(cache_CU, dual_N)
13-
@test typeof(cache_CU.dual_du) == typeof(u0_CU) #check that dual cache array is a GPU array for performance reasons.
13+
@test ArrayInterface.parameterless_type(typeof(cache_CU.dual_du)) == ArrayInterface.parameterless_type(typeof(u0_CU)) #check that dual cache array is a GPU array for performance reasons.
1414
@test size(tmp_du_CUA) == size(u0_CU)
1515
@test typeof(tmp_du_CUA) == typeof(u0_CU)
1616
@test eltype(tmp_du_CUA) == eltype(u0_CU)
@@ -35,7 +35,7 @@ end
3535
chunk_size = 10
3636
u0 = cu(rand(10,10)) #example kept small for test purposes.
3737
A = cu(-randn(10,10))
38-
cache = dualcache(A, chunk_size)
38+
cache = dualcache(cu(zeros(10,10)), chunk_size)
3939
prob = ODEProblem(foo, u0, (0.0f0,1.0f0), (A, cache))
4040
sol = solve(prob, TRBDF2(chunk_size = chunk_size))
4141
@test sol.retcode == :Success

0 commit comments

Comments
 (0)