JetReconstruction.jl icon indicating copy to clipboard operation
JetReconstruction.jl copied to clipboard

GPU plan?

Open Moelf opened this issue 1 year ago • 4 comments

Is there way to somehow make the algorithms GPU-able?

Moelf avatar Jun 06 '24 19:06 Moelf

I'd say it is pretty hard - the algorithms are very sequential by nature, which is not enjoyed by GPUs. The most promising approach might be to parallelise across events, rather than try to parallelise within an event.

Alternatively, one could investigate more parallelisable clustering approaches, like cellular automata or maybe even an ML inference algorithm for clustering.

Stretch goal, but interesting...

graeme-a-stewart avatar Jun 07 '24 14:06 graeme-a-stewart

I was thinking parallel over events! Which should boils down to writing some loops with KernalAbstrations.jl maybe?

Moelf avatar Jun 07 '24 15:06 Moelf

Sort of... but one would need to see if the code for the CPU version is going to go onto a GPU to do each of the events. The data structures for the plain algorithm would be a lot easier and would probably accelerate well. For the tiled algorithm my gut feeling is it would be a lot of work, as the whole thrust there is to use more complex logic to reduce the computational burden. e.g., linked lists and the whole tiling setup, so the data layouts are not at all GPU friendly.

So the plain algorithm would be the one to target IMO.

graeme-a-stewart avatar Jun 07 '24 15:06 graeme-a-stewart

Although I should say from the outset that at the typical particle densities where N2Plain is used (Z->ee) the typical jet reconstruction time is O(10μs), so this is not, per-se, a real target for GPU running.

graeme-a-stewart avatar Jun 07 '24 16:06 graeme-a-stewart

I think we discussed this enough and it's not an open issue right now - thanks for prompting it @Moelf!

graeme-a-stewart avatar Oct 09 '24 06:10 graeme-a-stewart