From efad7267bd8f6005e1a657145d3b8c8e77903d69 Mon Sep 17 00:00:00 2001 From: Roman Cattaneo <1116746+romanc@users.noreply.github.com> Date: Mon, 20 Jan 2025 13:52:34 +0100 Subject: [PATCH 1/2] Remove unused optional keyword arguments These two keyword arguments aren't used in the function. Since the two functions have a "catch-all" `*kwargs` at the end of the argument list, we can safely delete the unused keyword arguments. --- src/gt4py/cartesian/gtc/dace/expansion/daceir_builder.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/gt4py/cartesian/gtc/dace/expansion/daceir_builder.py b/src/gt4py/cartesian/gtc/dace/expansion/daceir_builder.py index 5f2007871e..4930cc7413 100644 --- a/src/gt4py/cartesian/gtc/dace/expansion/daceir_builder.py +++ b/src/gt4py/cartesian/gtc/dace/expansion/daceir_builder.py @@ -417,7 +417,6 @@ def visit_HorizontalExecution( global_ctx: DaCeIRBuilder.GlobalContext, iteration_ctx: DaCeIRBuilder.IterationContext, symbol_collector: DaCeIRBuilder.SymbolCollector, - loop_order, k_interval, **kwargs: Any, ): @@ -723,7 +722,6 @@ def _process_loop_item( scope_nodes, item: Loop, *, - global_ctx: DaCeIRBuilder.GlobalContext, iteration_ctx: DaCeIRBuilder.IterationContext, symbol_collector: DaCeIRBuilder.SymbolCollector, **kwargs: Any, From 1fa3a0623872dce91d7100e6d728d4d83be3c31c Mon Sep 17 00:00:00 2001 From: Roman Cattaneo <1116746+romanc@users.noreply.github.com> Date: Mon, 20 Jan 2025 17:35:04 +0100 Subject: [PATCH 2/2] Loop order doesn't need to be passed down No need to pass down the loop order of a `VerticalLoop`. It is never used/access inside `VerticalLoopSection`s or `HorizontalExecution`s. --- src/gt4py/cartesian/gtc/dace/expansion/daceir_builder.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/gt4py/cartesian/gtc/dace/expansion/daceir_builder.py b/src/gt4py/cartesian/gtc/dace/expansion/daceir_builder.py index 4930cc7413..952bafd46a 100644 --- a/src/gt4py/cartesian/gtc/dace/expansion/daceir_builder.py +++ b/src/gt4py/cartesian/gtc/dace/expansion/daceir_builder.py @@ -521,7 +521,6 @@ def visit_VerticalLoopSection( self, node: oir.VerticalLoopSection, *, - loop_order, iteration_ctx: DaCeIRBuilder.IterationContext, global_ctx: DaCeIRBuilder.GlobalContext, symbol_collector: DaCeIRBuilder.SymbolCollector, @@ -545,7 +544,6 @@ def visit_VerticalLoopSection( iteration_ctx=iteration_ctx, global_ctx=global_ctx, symbol_collector=symbol_collector, - loop_order=loop_order, k_interval=node.interval, **kwargs, ) @@ -838,7 +836,6 @@ def visit_VerticalLoop( sections = flatten_list( self.generic_visit( node.sections, - loop_order=node.loop_order, global_ctx=global_ctx, iteration_ctx=iteration_ctx, symbol_collector=symbol_collector,