Skip to content

Commit

Permalink
Add torch_op helper function
Browse files Browse the repository at this point in the history
  • Loading branch information
nbouziani committed Feb 5, 2023
1 parent f388b88 commit 422b1d5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions firedrake/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
from firedrake.ensemble import *
from firedrake.randomfunctiongen import *
from firedrake.progress_bar import ProgressBar # noqa: F401
from firedrake.external_operators import *

from firedrake.logging import *
# Set default log level
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,7 @@ def __call__(self, *ω):
metadata = {'F': self.F, 'V_controls': V_controls, 'V_output': V_output}
φ = partial(self.custom_operator, metadata)
return φ(*ω)


def torch_op(*args, **kwargs):
return HybridOperator(*args, **kwargs)

0 comments on commit 422b1d5

Please sign in to comment.