Skip to content

Commit

Permalink
Update src/gt4py/next/iterator/transforms/collapse_tuple.py
Browse files Browse the repository at this point in the history
Co-authored-by: Till Ehrengruber <[email protected]>
  • Loading branch information
nfarabullini and tehrengruber authored Nov 6, 2023
1 parent 4b6b279 commit edc348a
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/gt4py/next/iterator/transforms/collapse_tuple.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,14 @@ def apply(
If `ignore_tuple_size`, apply the transformation even if length of the inner tuple
is greater than the length of the outer tuple.
"""
if collapse_tuple_inference:
node_types = it_type_inference.infer_all(node)
return cls(
ignore_tuple_size,
collapse_make_tuple_tuple_get,
collapse_tuple_get_make_tuple,
collapse_tuple_inference,
node_types,
).visit(node)
node_types = it_type_inference.infer_all(node) if use_global_type_inferrence else None
return cls(
ignore_tuple_size,
collapse_make_tuple_tuple_get,
collapse_tuple_get_make_tuple,
collapse_tuple_inference,
node_types
).visit(node)

return cls(
ignore_tuple_size,
Expand Down

0 comments on commit edc348a

Please sign in to comment.