Skip to content

Commit

Permalink
Set cached = False in func_to_past_factory because of missing perform…
Browse files Browse the repository at this point in the history
…ance improvement and failure in test_scan_nested_tuple_output[gtfn.run_gtfn-False]
  • Loading branch information
SF-N committed Oct 16, 2024
1 parent afd3e96 commit f72c84f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/gt4py/next/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,12 @@ def __call__(
) -> None:
if not isinstance(program, IT_PRG):
args, kwargs = signature.convert_to_positional(program, *args, **kwargs)
self.jit(program, *args, **kwargs)(*args, **kwargs)
try:
compiled = program._compiled
except:
compiled = self.jit(program, *args, **kwargs)
object.__setattr__(program, "_compiled", compiled)
compiled(*args, **kwargs)

def jit(self, program: INPUT_DATA, *args: Any, **kwargs: Any) -> stages.CompiledProgram:
if not isinstance(program, IT_PRG):
Expand Down
2 changes: 1 addition & 1 deletion src/gt4py/next/ffront/func_to_past.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def func_to_past(inp: DSL_PRG) -> PRG:
)


def func_to_past_factory(cached: bool = True) -> workflow.Workflow[DSL_PRG, PRG]:
def func_to_past_factory(cached: bool = False) -> workflow.Workflow[DSL_PRG, PRG]:
"""
Wrap `func_to_past` in a chainable and optionally cached workflow step.
Expand Down

0 comments on commit f72c84f

Please sign in to comment.