Skip to content

Commit

Permalink
Fix subset size
Browse files Browse the repository at this point in the history
  • Loading branch information
edopao committed Jan 12, 2024
1 parent c36b8a4 commit 077c031
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/gt4py/cartesian/gtc/dace/expansion/daceir_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,6 @@ def visit_HorizontalExecution(
(no slicing) and the tasklet code should use all explicit indexes for array access.
"""
for memlet in [*read_memlets, *write_memlets]:
ndims = len(iteration_ctx.grid_subset.intervals)
field_decl = global_ctx.library_node.field_decls[memlet.field]
# calculate array subset from original memlet
memlet_subset = make_dace_subset(
Expand All @@ -474,10 +473,10 @@ def visit_HorizontalExecution(
field_decl.data_dims,
)
# ensure grid access on single point
assert memlet_subset.size()[:ndims] == [1] * ndims
memlet_data_index = [
dcir.Literal(value=str(r[0]), dtype=common.DataType.INT32)
for r in memlet_subset[:ndims]
for r, size in zip(memlet_subset, memlet_subset.size())
if size == 1
]
# loop through assignment statements in the tasklet body
tasklet_subset_size = 0
Expand Down

0 comments on commit 077c031

Please sign in to comment.