Skip to content

Solver Compilation #275

@dario-coscia

Description

@dario-coscia

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, ...).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions