From acd46ffed5e42e308b07015b2027eab9b642360a Mon Sep 17 00:00:00 2001 From: Pratyai Mazumder Date: Thu, 17 Oct 2024 18:40:25 +0200 Subject: [PATCH] Use integer division, fractions don't make sense here anyway. --- dace/codegen/targets/cpp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dace/codegen/targets/cpp.py b/dace/codegen/targets/cpp.py index b42e310655..9d4c11cd6c 100644 --- a/dace/codegen/targets/cpp.py +++ b/dace/codegen/targets/cpp.py @@ -420,7 +420,7 @@ def reshape_strides(subset, strides, original_strides, copy_shape): reduced_tile_sizes += [1] * (dims - len(reduced_tile_sizes)) # Pad the remainder with 1s to maintain dimensions. reshaped_copy = copy_shape + [ts for ts in subset.tile_sizes if ts != 1] - reshaped_copy[:len(copy_shape)] = [s / ts for s, ts in zip(copy_shape, reduced_tile_sizes)] + reshaped_copy[:len(copy_shape)] = [s // ts for s, ts in zip(copy_shape, reduced_tile_sizes)] new_strides = [0] * len(reshaped_copy) elements_remaining = functools.reduce(sp.Mul, copy_shape, 1)