From 0e461a8f641ed240c9c93dae6efd6a38992b5f28 Mon Sep 17 00:00:00 2001 From: n-io Date: Fri, 20 Dec 2024 21:55:31 +0100 Subject: [PATCH] default val on function --- xdsl/transforms/memref_to_dsd.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xdsl/transforms/memref_to_dsd.py b/xdsl/transforms/memref_to_dsd.py index c5d1f6c325..958ffd5e34 100644 --- a/xdsl/transforms/memref_to_dsd.py +++ b/xdsl/transforms/memref_to_dsd.py @@ -130,8 +130,7 @@ def match_and_rewrite(self, op: memref.SubviewOp, rewriter: PatternRewriter, /): # 1d subview onto a nd memref sizes = op.static_sizes.get_values() counter_sizes = collections.Counter(sizes) - if 1 in counter_sizes: - counter_sizes.pop(1) + counter_sizes.pop(1, None) assert ( len(counter_sizes) == 1 ), "1d access into nd memref must specify one size > 1"