From 4fb6eb07a837b05795b1d45c7d98de0eaf544d29 Mon Sep 17 00:00:00 2001 From: JiacongSun Date: Wed, 7 Feb 2024 00:30:01 +0100 Subject: [PATCH] Fixed an issue that the spatial mapping saved in the output json could be incorrect. --- .../stages/SpatialMappingConversionStage.py | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/zigzag/classes/stages/SpatialMappingConversionStage.py b/zigzag/classes/stages/SpatialMappingConversionStage.py index 617921e7..c6d29891 100644 --- a/zigzag/classes/stages/SpatialMappingConversionStage.py +++ b/zigzag/classes/stages/SpatialMappingConversionStage.py @@ -55,25 +55,6 @@ def run(self): spatial_mapping, spatial_mapping_int = self.convert_user_spatial_mapping( user_spatial_mapping ) - # Since the spatial_mapping may be modified in the previous step, - # we have to update this change to self.layer - updated_user_spatial_mapping = {} - for oa_dim, sm_loop in user_spatial_mapping.items(): - if self.is_nested_tuple(sm_loop): # a mix sm loop - sm_comb = [] - for sub_sm_loop in sm_loop: - sm_layer_dim = sub_sm_loop[0] - for sm_element in spatial_mapping.spatial_loop_dim_size: - if sm_element[0] == sm_layer_dim: - sm_comb.append(sm_element) - sm_comb = tuple(sm_comb) - updated_user_spatial_mapping[oa_dim] = sm_comb - else: - sm_layer_dim = sm_loop[0] - for sm_element in spatial_mapping.spatial_loop_dim_size: - if sm_element[0] == sm_layer_dim: - updated_user_spatial_mapping[oa_dim] = sm_element - self.layer.user_spatial_mapping = updated_user_spatial_mapping kwargs = self.kwargs.copy() kwargs["spatial_mapping"] = spatial_mapping