PINA icon indicating copy to clipboard operation
PINA copied to clipboard

Solver Compilation

Open dario-coscia opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe. From PyTorch 2.0 there is the possibility to compile the code, resulting in faster training and inference time, see here for reference. Also PyTorch Lightning supports the torch compilation as shown here.

It would be nice to implement a compilation flag to all PINA solvers to enable compilation for the model and equations (if present in the problem).

Describe the solution you'd like This could be implemented by using the two abstract class SolverInterface, Equation. The amount of code change should be minimal, since PyTorch Lightning already deals itself to compile all internal functions (training_step, forward, ...).

dario-coscia avatar Apr 03 '24 07:04 dario-coscia

Let's implement this feature in the new release

dario-coscia avatar Apr 05 '24 15:04 dario-coscia