Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove gt4py program workaround #436

Merged
merged 1 commit into from
Apr 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading