From 1c4e84fa1dae7b562b5d4cb078dd45d5e5ffc9a3 Mon Sep 17 00:00:00 2001 From: Yuan Yao Date: Tue, 28 Jul 2020 12:07:19 -0400 Subject: [PATCH] python: Remove the option of not merging child graph into parent. --- smaug/python/graph.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/smaug/python/graph.py b/smaug/python/graph.py index 2e9b6d9c..f1aa449a 100644 --- a/smaug/python/graph.py +++ b/smaug/python/graph.py @@ -25,7 +25,6 @@ def __init__( # This proto stores all the parameters in the network. self.tensor_data_array = tensor_pb2.TensorDataArray() self._parent_graph = None - self._merge_into_parent_graph = True def __enter__(self): self._parent_graph = global_vars.get_graph() @@ -34,7 +33,7 @@ def __enter__(self): def __exit__(self, *args): # Merge the graph into its parent if it exists. - if self._parent_graph is not None and self._merge_into_parent_graph: + if self._parent_graph is not None: self._parent_graph.merge(self) global_vars.set_graph(self._parent_graph) @@ -46,14 +45,6 @@ def backend(self): def mem_policy(self): return self.graph.mem_policy - @property - def merge_into_parent_graph(self): - return self._merge_into_parent_graph - - @merge_into_parent_graph.setter - def merge_into_parent_graph(self, merge): - self._merge_into_parent_graph = merge - @property def layout_trans_enabled(self): return self._layout_trans_enabled