Jack-H-Buckner / UniversalDiffEq.jl

Universal differential equations for ecologists
MIT License
3 stars 0 forks source link

Component Arrays Causing Scalar Indexing (GPU Backend) #39

Closed 19fitzna closed 3 weeks ago

19fitzna commented 3 weeks ago

The use of ComponentArrays for the parameters of UDEs causes scalar indexing when moved to the graphics card. This results in training which is slower on the GPU than the CPU.

jarroyoe commented 3 weeks ago

If you search on the DiffEqFlux issues, you'll see this seems to be the way it's set up to be done. I have had a similar experience in the past trying to run UDEs on GPUs, so I would raise an issue with them to see if there's any way this can be overcome.

19fitzna commented 3 weeks ago

So testing with some of the MWEs from the DIffEqFlux issues the component arrays don't throw the same errors, it seems to be an issue with what I am putting into mine

19fitzna commented 3 weeks ago

Issue was due to feeding cuArrays into component arrays. Should be fixed in next commit to GPU Support branch