JJPPeters / clTEM

OpenCL accelerated multislice simulation for electron microscopy.
https://jjppeters.github.io/clTEM/
13 stars 3 forks source link

Compile kernels only once #99

Closed JJPPeters closed 3 years ago

JJPPeters commented 5 years ago

Just like how building the kernels once per worker thread has saved a lot of time. It should be possible to build all kernels for all devices (or at least once when the device is used, then resuse the kernels). This will dramatically decrease time for small simulations (i.e. TEM) where a significant amount of time is spent on building the kernels.

I think this should be possible with a little wrapper class for the context.

Problems come if some devices have errors (I had problem with intel mobile cpu GPUs I think), but hopefully I can catch the errors, and exclude them from the possible device list.

JJPPeters commented 3 years ago

At some point I added this. Not sure when...