DESC icon indicating copy to clipboard operation
DESC copied to clipboard

Add `@execute_on_cpu` decorator to other `build`/`init` methods

Open YigitElma opened this issue 1 year ago • 2 comments

          We should probably also add this in a number of other places:
  • to the curve/coil init and change resolution methods
  • magnetic field classes init?
  • profiles?
  • all build methods of all objectives?
  • init/build for LinearConstraintProjection and ProximalProjection
  • factorize_linear_constraints

Originally posted by @f0uriest in https://github.com/PlasmaControl/DESC/pull/1056#pullrequestreview-2186389974

YigitElma avatar Jul 24 '24 17:07 YigitElma

Add decorator to init (and build too) then running on GPU and comparing the profile of time with vs without the decorator

dpanici avatar Aug 13 '24 19:08 dpanici

@sinaatalay I think this would be a good way of getting familiar with the code. We can give you some scripts (or tutorial notebooks should also be fine) and you can run them on cluster GPUs by putting execute_on_cpu decorator to some functions and do some profiling with and without it. I have some intuition about which type of functions are faster on the CPU, we can talk about it once you have your laptop.

YigitElma avatar Aug 20 '24 22:08 YigitElma