From 746f6c66ccbdcb1bdf1618d084b05df296ab58a7 Mon Sep 17 00:00:00 2001 From: Roman Cattaneo Date: Tue, 9 Jun 2026 11:31:55 +0200 Subject: [PATCH 1/2] refactor[cartesian]: remove unused function argument Small cleanup to remove an unused function argument in `get_dace_shape()` of `oir_to_treeir.py`. --- src/gt4py/cartesian/gtc/dace/oir_to_treeir.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/gt4py/cartesian/gtc/dace/oir_to_treeir.py b/src/gt4py/cartesian/gtc/dace/oir_to_treeir.py index b75a5119f2..c578fea24e 100644 --- a/src/gt4py/cartesian/gtc/dace/oir_to_treeir.py +++ b/src/gt4py/cartesian/gtc/dace/oir_to_treeir.py @@ -350,7 +350,6 @@ def visit_Stencil(self, node: oir.Stencil) -> tir.TreeRoot: param, field_without_mask_extents[param.name], k_bound, - symbols, ), strides=get_dace_strides(param, symbols), storage=DEFAULT_STORAGE_TYPE[self._device_type], @@ -374,7 +373,7 @@ def visit_Stencil(self, node: oir.Stencil) -> tir.TreeRoot: # than persistent will yield issues with memory leaks. containers[field.name] = data.Array( dtype=utils.data_type_to_dace_typeclass(field.dtype), - shape=get_dace_shape(field, field_extent, k_bound, symbols), + shape=get_dace_shape(field, field_extent, k_bound), strides=get_dace_strides(field, symbols), transient=True, lifetime=dtypes.AllocationLifetime.Persistent, @@ -532,7 +531,6 @@ def get_dace_shape( field: oir.FieldDecl, extent: definitions.Extent, k_bound: tuple[int, int], - symbols: tir.SymbolDict, ) -> list[symbolic.symbol]: shape = [] for index, axis in enumerate(tir.Axis.dims_3d()): From e6b4aec7ba2345eb807edd083566892634f27877 Mon Sep 17 00:00:00 2001 From: Roman Cattaneo Date: Tue, 9 Jun 2026 11:35:33 +0200 Subject: [PATCH 2/2] one more unrelated cleanup from the other PR --- .../integration_tests/multi_feature_tests/test_suites.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/cartesian_tests/integration_tests/multi_feature_tests/test_suites.py b/tests/cartesian_tests/integration_tests/multi_feature_tests/test_suites.py index 91419f1932..89c988a526 100644 --- a/tests/cartesian_tests/integration_tests/multi_feature_tests/test_suites.py +++ b/tests/cartesian_tests/integration_tests/multi_feature_tests/test_suites.py @@ -800,10 +800,7 @@ class TestVariableKAndReadOutside(gt_testing.StencilTestSuite): def definition(field_in, field_out, index): with computation(PARALLEL), interval(1, None): - field_out[0, 0, 0] = ( - field_in[0, 0, index] # noqa: F841 [unused-variable] - + field_in[0, 0, -2] - ) + field_out[0, 0, 0] = field_in[0, 0, index] + field_in[0, 0, -2] def validation(field_in, field_out, index, *, domain, origin): idx = 1 + (np.arange(domain[-1]) + index)[1:]