From 415820ff3a23b3463bcf821cf8a77f2a4dd64985 Mon Sep 17 00:00:00 2001 From: samkellerhals Date: Tue, 9 Apr 2024 14:43:30 +0200 Subject: [PATCH] Remove gt4py program workaround --- tools/src/icon4pytools/icon4pygen/metadata.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/tools/src/icon4pytools/icon4pygen/metadata.py b/tools/src/icon4pytools/icon4pygen/metadata.py index 0d7670f210..521d9caeec 100644 --- a/tools/src/icon4pytools/icon4pygen/metadata.py +++ b/tools/src/icon4pytools/icon4pygen/metadata.py @@ -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() @@ -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)