You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CuArray(sol) scalar-indexes GPU arrays for SecondOrderODEProblem (ArrayPartition) solutions #662
CuArray(sol) for the solution of a SecondOrderODEProblem on CUDA arrays scalar-indexes the GPU arrays and errors under the default allowscalar(false). The solution's states are ArrayPartitions of CuArrays. The plain ODEProblem case (Array(sol) with CuArray states) works.
using CUDA, LinearAlgebra, OrdinaryDiffEq, Test
u0 =cu(rand(100)); du0 =cu(rand(100)); A =cu(randn(100, 100))
f(ddu, du, u, p, t) =mul!(ddu, A, u)
sol =solve(SecondOrderODEProblem(f, du0, u0, (0.0f0, 1.0f0)), Tsit5())
@test SciMLBase.successful_retcode(sol) # passesCuArray(sol) # errors
Expression: size(CuArray(sol), 1) == 200
Scalar indexing is disallowed.
Invocation of getindex resulted in scalar indexing of a GPU array.
The failing versions are those resolved by that CI job: CUDA 6.4, OrdinaryDiffEq 7.8.1, RecursiveArrayTools master (4.5.2). Julia 1 is on the self-hosted GPU runner. I have not reproduced it locally because this machine has no GPU. A CPU substitute with JLArrays and allowscalar(false) did not reproduce it for JLArray(sol), so the scalar path may be specific to the CuArray constructor on AbstractVectorOfArray{<:Any,<:Any,<:ArrayPartition}.
#659 stays open as the regression test for this. Its test must not be weakened to make it pass.
🤖 Filed by Claude Code 2.1.280 (model claude-opus-5-5[1m]) from the qa-hygiene goal cycle.
Activity