From 526a872b65321447afdf6ea1a7603fb03829b811 Mon Sep 17 00:00:00 2001 From: bmccolm <briannamccolm@gmail.com> Date: Mon, 15 Jan 2024 09:37:48 -0800 Subject: [PATCH] making zip opbject iterable in resource.py --- cnn_mapping/resource.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cnn_mapping/resource.py b/cnn_mapping/resource.py index 8200893..666d351 100644 --- a/cnn_mapping/resource.py +++ b/cnn_mapping/resource.py @@ -81,8 +81,8 @@ class Resource(object): assert len(buf_capacity_list) == len(buf_unit_static_cost_list) assert len(buf_capacity_list) == len(para_count_list) - self.bufs = [Buffer(*t) for t in zip(buf_capacity_list, \ - buf_access_cost_list, buf_unit_static_cost_list)] + self.bufs = [Buffer(*t) for t in list(zip(buf_capacity_list, \ + buf_access_cost_list, buf_unit_static_cost_list))] self.num_levels = len(self.bufs) @@ -112,8 +112,8 @@ class Resource(object): # LMEI always assume square-shape array, could change later array_width = [para_count_list[i] if array_dim[i] == 1 else int(math.sqrt(para_count_list[i])) for i in range(self.num_levels)] - self.paras = [Parallelism(*t) for t in zip(para_count_list, \ - partition_mode, array_access_costs, array_dim, array_width)] + self.paras = [Parallelism(*t) for t in list(zip(para_count_list, \ + partition_mode, array_access_costs, array_dim, array_width))] self.access_cost = buf_access_cost_list # If list does not contain 3 separate access costs for (inputs, weights, psum) # assume they all have the same cost -- GitLab