Skip to content

Commit

Permalink
Use integer division, fractions don't make sense here anyway.
Browse files Browse the repository at this point in the history
  • Loading branch information
pratyai committed Oct 19, 2024
1 parent a3d1de5 commit acd46ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dace/codegen/targets/cpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit acd46ff

Please sign in to comment.