3 ms·
When I wrote my bachelor thesis years back I worked on a particle-in-cell code [1] that makes heavy use of numba for GPU kernels. At the time it was the most co
by Escapado 4y ago
When I wrote my bachelor thesis years back I worked on a particle-in-cell code [1] that makes heavy use of numba for GPU kernels. At the time it was the most convenient way to do that from python. I remember spending weeks to optimizing these kernels to eek out every last bit of performance I could (which interestingly enough did eventually involve using atomic operations and introducing a lot of variables[2] instead of using arrays everywhere to keep things in registers instead of slower caches).
I remember the team being really responsive to feature requests back then and I had a lot of fun working with it. IIRC compared to using numpy we managed to get speedups of up to 60x for the most critical pieces of code.
[1]: https://github.com/fbpic/fbpic https://github.com/fbpic/fbpic
[2]: https://github.com/fbpic/fbpic/blob/1867a4f216baf4269f2314ab4388e92ae9a3b201/fbpic/particles/deposition/cuda_methods.py#L838 https://github.com/fbpic/fbpic/blob/1867a4f216baf4269f2314ab...