Skip to content

Commit

Permalink
Remove gt4py program workaround (#436)
Browse files Browse the repository at this point in the history
  • Loading branch information
samkellerhals authored Apr 9, 2024
1 parent 2ee5b3d commit 01d8085
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions tools/src/icon4pytools/icon4pygen/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,7 @@ def scan_for_offsets(fvprog: Program) -> list[eve.concepts.SymbolRef]:

all_dims = set(i for j in all_field_types for i in j.dims)

if fvprog.backend:
fendef = fvprog.itir.program # type: ignore
else:
fendef = fvprog.itir
fendef = fvprog.itir

all_offset_labels = (
fendef.pre_walk_values()
Expand All @@ -245,11 +242,7 @@ def get_stencil_info(
"""Generate StencilInfo dataclass from a fencil definition."""
fvprog = get_fvprog(fencil_def)
offsets = scan_for_offsets(fvprog)

if fvprog.backend:
fendef = fvprog.itir.program # type: ignore
else:
fendef = fvprog.itir
fendef = fvprog.itir

fields = _get_field_infos(fvprog)

Expand Down

0 comments on commit 01d8085

Please sign in to comment.