jonniedie / ComponentArrays.jl

Arrays with arbitrarily nested named components.
MIT License
291 stars 35 forks source link

Add GPU testing #152

Closed YichengDWu closed 2 years ago

YichengDWu commented 2 years ago

The recent issue #150 illustrates the importance of adding GPU testing

jonniedie commented 2 years ago

I agree. I used to just explicitly not support GPU ComponentArrays because the way I had broadcasting work made it too difficult. A somewhat recent change simplified broadcasting quite a bit and allowed for it to work. There are still some pretty rough edges, though, as you’ve noticed. Unfortunately, I’m running on an M1 Mac now, so I can’t test CUDA stuff locally. Last I checked, I couldn’t find a free CI service that used GPUs, but admittedly I didn’t look very hard. If you know of anything that fits the bill, let me know.

YichengDWu commented 2 years ago

JLArrays provides fake gpu arrays for testing

jonniedie commented 2 years ago

Oh awesome, I’ll check that out, then.

YichengDWu commented 2 years ago

You can also take a look at how Lux does this: https://github.com/avik-pal/Lux.jl/blob/main/test/adapt.jl#L9-L21

YichengDWu commented 2 years ago

Closing this since probably no one would do it